From: Miklos Szeredi <mszeredi@redhat.com>
To: linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/5] fuse: handle empty request_mask in statx
Date: Thu, 10 Aug 2023 12:54:57 +0200 [thread overview]
Message-ID: <20230810105501.1418427-2-mszeredi@redhat.com> (raw)
In-Reply-To: <20230810105501.1418427-1-mszeredi@redhat.com>
If no attribute is requested, then don't send request to userspace.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
---
fs/fuse/dir.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index f67bef9d83c4..d38ab93e2007 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1209,7 +1209,12 @@ static int fuse_update_get_attr(struct inode *inode, struct file *file,
u32 inval_mask = READ_ONCE(fi->inval_mask);
u32 cache_mask = fuse_get_cache_mask(inode);
- if (flags & AT_STATX_FORCE_SYNC)
+ /* FUSE only supports basic stats */
+ request_mask &= STATX_BASIC_STATS;
+
+ if (!request_mask)
+ sync = false;
+ else if (flags & AT_STATX_FORCE_SYNC)
sync = true;
else if (flags & AT_STATX_DONT_SYNC)
sync = false;
--
2.40.1
next prev parent reply other threads:[~2023-08-10 10:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-10 10:54 [PATCH 0/5] fuse: support birth time Miklos Szeredi
2023-08-10 10:54 ` Miklos Szeredi [this message]
2023-08-10 10:54 ` [PATCH 2/5] fuse: add STATX request Miklos Szeredi
2023-08-10 13:22 ` Bernd Schubert
2023-08-10 14:08 ` Miklos Szeredi
2023-08-10 15:50 ` Bernd Schubert
2023-08-10 10:54 ` [PATCH 3/5] fuse: add ATTR_TIMEOUT macro Miklos Szeredi
2023-08-10 10:55 ` [PATCH 4/5] fuse: implement statx Miklos Szeredi
2023-08-10 13:34 ` kernel test robot
2023-08-10 14:19 ` Miklos Szeredi
2023-08-22 15:20 ` Bernd Schubert
2023-08-22 15:33 ` Miklos Szeredi
2023-08-22 16:55 ` Bernd Schubert
2023-08-23 6:18 ` Miklos Szeredi
2023-08-23 14:51 ` Bernd Schubert
2023-08-23 14:58 ` Miklos Szeredi
2023-08-23 15:24 ` Bernd Schubert
2023-08-23 15:24 ` Bernd Schubert
2023-08-22 16:39 ` Bernd Schubert
2023-08-23 6:15 ` Miklos Szeredi
2023-08-10 10:55 ` [PATCH 5/5] fuse: cache btime Miklos Szeredi
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=20230810105501.1418427-2-mszeredi@redhat.com \
--to=mszeredi@redhat.com \
--cc=linux-fsdevel@vger.kernel.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 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).