[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1529059871-11971-1-git-send-email-sigshen@synology.com>
Date: Fri, 15 Jun 2018 18:51:08 +0800
From: Sig Shen <sigshen@...ology.com>
To: unlisted-recipients:; (no To-header on input)
Cc: sigshen@...ology.com, Philippe Ombredanne <pombredanne@...b.com>,
Thomas Gleixner <tglx@...utronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Kate Stewart <kstewart@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH] vfs: Support FALLOC_FL_NO_HIDE_STALE flag with fallocate
FALLOC_FL_NO_HIDE_STALE flag must be set if user want to issue
a discard request for block devices. But vfs_fallocate() will
return with an error -EOPNOTSUPP indicating lack of support
if this flag is set.
fix it by allowing FALLOC_FL_NO_HIDE_STALE flag in vfs_fallocate
Fixes: 25f4c41415e5 ("block: implement (some of) fallocate for block devices")
Signed-off-by: Sig Shen <sigshen@...ology.com>
---
include/linux/falloc.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/linux/falloc.h b/include/linux/falloc.h
index 674d59f..770a122 100644
--- a/include/linux/falloc.h
+++ b/include/linux/falloc.h
@@ -27,6 +27,7 @@ struct space_resv {
FALLOC_FL_COLLAPSE_RANGE | \
FALLOC_FL_ZERO_RANGE | \
FALLOC_FL_INSERT_RANGE | \
+ FALLOC_FL_NO_HIDE_STALE | \
FALLOC_FL_UNSHARE_RANGE)
#endif /* _FALLOC_H_ */
--
2.7.4
Powered by blists - more mailing lists