scst_vdisk: lower severity of message about not supported fallocate(FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE) and print it only once

git-svn-id: http://svn.code.sf.net/p/scst/svn/branches/3.3.x@7582 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2018-11-01 04:39:36 +00:00
parent 65431b808c
commit b7a56cfa12
2 changed files with 10 additions and 1 deletions
+9
View File
@@ -399,4 +399,13 @@ do { \
#define SCST_SLAB_FLAGS 0L
#endif
#define PRINT_WARNING_ONCE(format, args...) \
do { \
static bool __warned; \
if (!__warned) { \
__warned = true; \
PRINT_WARNING(format, ## args); \
} \
} while(0)
#endif /* __SCST_DEBUG_H */
+1 -1
View File
@@ -3847,7 +3847,7 @@ static int vdisk_unmap_file_range(struct scst_cmd *cmd,
res = fd->f_op->fallocate(fd,
FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, off, len);
if (unlikely(res != 0)) {
PRINT_ERROR("fallocate() for %lld, len %lld "
PRINT_WARNING_ONCE("fallocate() for %lld, len %lld "
"failed: %d", (unsigned long long)off,
(unsigned long long)len, res);
scst_set_cmd_error(cmd,