mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-14 09:11:27 +00:00
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/trunk@7328 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -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 */
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user