From: Sig Shen <sigshen@synology.com>
To: unlisted-recipients:; (no To-header on input)
Cc: sigshen@synology.com, Philippe Ombredanne <pombredanne@nexb.com>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Kate Stewart <kstewart@linuxfoundation.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH] vfs: Support FALLOC_FL_NO_HIDE_STALE flag with fallocate
Date: Fri, 15 Jun 2018 18:51:08 +0800 [thread overview]
Message-ID: <1529059871-11971-1-git-send-email-sigshen@synology.com> (raw)
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@synology.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
next reply other threads:[~2018-06-15 10:51 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-15 10:51 Sig Shen [this message]
2018-06-15 15:33 ` [PATCH] vfs: Support FALLOC_FL_NO_HIDE_STALE flag with fallocate Theodore Y. Ts'o
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1529059871-11971-1-git-send-email-sigshen@synology.com \
--to=sigshen@synology.com \
--cc=gregkh@linuxfoundation.org \
--cc=kstewart@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pombredanne@nexb.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).