All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffle Xu <jefflexu@linux.alibaba.com>
To: vgoyal@redhat.com, stefanha@redhat.com, miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org, bo.liu@linux.alibaba.com,
	virtualization@lists.linux-foundation.org
Subject: [RFC PATCH 1/3] fuse: add fuse_should_enable_dax() helper
Date: Thu, 15 Jul 2021 17:30:29 +0800	[thread overview]
Message-ID: <20210715093031.55667-2-jefflexu@linux.alibaba.com> (raw)
In-Reply-To: <20210715093031.55667-1-jefflexu@linux.alibaba.com>

This is in prep for following per-file DAX checking.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
---
 fs/fuse/dax.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 0e5407f48e6a..97b8bd09baa3 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1336,11 +1336,19 @@ static const struct address_space_operations fuse_dax_file_aops  = {
 	.invalidatepage	= noop_invalidatepage,
 };
 
-void fuse_dax_inode_init(struct inode *inode)
+static bool fuse_should_enable_dax(struct inode *inode)
 {
 	struct fuse_conn *fc = get_fuse_conn(inode);
 
 	if (!fc->dax)
+		return false;
+ 
+	return true;
+}
+
+void fuse_dax_inode_init(struct inode *inode)
+{
+	if (!fuse_should_enable_dax(inode))
 		return;
 
 	inode->i_flags |= S_DAX;
-- 
2.27.0

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

WARNING: multiple messages have this Message-ID (diff)
From: Jeffle Xu <jefflexu@linux.alibaba.com>
To: vgoyal@redhat.com, stefanha@redhat.com, miklos@szeredi.hu
Cc: linux-fsdevel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	bo.liu@linux.alibaba.com
Subject: [RFC PATCH 1/3] fuse: add fuse_should_enable_dax() helper
Date: Thu, 15 Jul 2021 17:30:29 +0800	[thread overview]
Message-ID: <20210715093031.55667-2-jefflexu@linux.alibaba.com> (raw)
In-Reply-To: <20210715093031.55667-1-jefflexu@linux.alibaba.com>

This is in prep for following per-file DAX checking.

Signed-off-by: Jeffle Xu <jefflexu@linux.alibaba.com>
---
 fs/fuse/dax.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/fs/fuse/dax.c b/fs/fuse/dax.c
index 0e5407f48e6a..97b8bd09baa3 100644
--- a/fs/fuse/dax.c
+++ b/fs/fuse/dax.c
@@ -1336,11 +1336,19 @@ static const struct address_space_operations fuse_dax_file_aops  = {
 	.invalidatepage	= noop_invalidatepage,
 };
 
-void fuse_dax_inode_init(struct inode *inode)
+static bool fuse_should_enable_dax(struct inode *inode)
 {
 	struct fuse_conn *fc = get_fuse_conn(inode);
 
 	if (!fc->dax)
+		return false;
+ 
+	return true;
+}
+
+void fuse_dax_inode_init(struct inode *inode)
+{
+	if (!fuse_should_enable_dax(inode))
 		return;
 
 	inode->i_flags |= S_DAX;
-- 
2.27.0


  reply	other threads:[~2021-07-15  9:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-15  9:30 [RFC PATCH 0/3] virtiofs,fuse: support per-file DAX Jeffle Xu
2021-07-15  9:30 ` Jeffle Xu
2021-07-15  9:30 ` Jeffle Xu [this message]
2021-07-15  9:30   ` [RFC PATCH 1/3] fuse: add fuse_should_enable_dax() helper Jeffle Xu
2021-07-15  9:30 ` [RFC PATCH 2/3] fuse: Make DAX mount option a tri-state Jeffle Xu
2021-07-15  9:30   ` Jeffle Xu
2021-07-15  9:30 ` [RFC PATCH 3/3] fuse: add per-file DAX flag Jeffle Xu
2021-07-15  9:30   ` Jeffle Xu
2021-07-15 15:13   ` kernel test robot
2021-07-16  1:09     ` JeffleXu
2021-07-15 15:24   ` kernel test robot
2021-07-16  0:40   ` Liu Bo
2021-07-16  0:51     ` Vivek Goyal
2021-07-16  0:51       ` Vivek Goyal
2021-07-16  1:18       ` JeffleXu
2021-07-16  1:18         ` JeffleXu
2021-07-16  1:32         ` Vivek Goyal
2021-07-16  1:32           ` Vivek Goyal
2021-07-16  1:52           ` [PATCH] virtiofsd: support per-file DAX Jeffle Xu
2021-07-16  1:52             ` Jeffle Xu
2021-07-16  1:59           ` [RFC PATCH 3/3] fuse: add per-file DAX flag JeffleXu
2021-07-16  1:59             ` JeffleXu

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=20210715093031.55667-2-jefflexu@linux.alibaba.com \
    --to=jefflexu@linux.alibaba.com \
    --cc=bo.liu@linux.alibaba.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=stefanha@redhat.com \
    --cc=vgoyal@redhat.com \
    --cc=virtualization@lists.linux-foundation.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.