summaryrefslogtreecommitdiff
path: root/fs/fuse/dev.c
diff options
context:
space:
mode:
authorZhao Chen <winters.zc@antgroup.com>2024-01-09 12:24:43 +0300
committerMiklos Szeredi <mszeredi@redhat.com>2024-03-06 11:56:35 +0300
commit9e7f5296f475ba5ab887ae3e55b922e17e99752b (patch)
treeeb33e03ce83450e7168ab505a0437b1f2f19788a /fs/fuse/dev.c
parent760eac73f9f69aa28fcb3050b4946c2dcc656d12 (diff)
downloadlinux-9e7f5296f475ba5ab887ae3e55b922e17e99752b.tar.xz
fuse: Use the high bit of request ID for indicating resend requests
Some FUSE daemons want to know if the received request is a resend request. The high bit of the fuse request ID is utilized for indicating this, enabling the receiver to perform appropriate handling. The init flag "FUSE_HAS_RESEND" is added to indicate this feature. Signed-off-by: Zhao Chen <winters.zc@antgroup.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/fuse/dev.c')
-rw-r--r--fs/fuse/dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index 3c15a6b7f6f2..3ec8bb5e68ff 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -1814,6 +1814,8 @@ static void fuse_resend(struct fuse_conn *fc)
list_for_each_entry_safe(req, next, &to_queue, list) {
__set_bit(FR_PENDING, &req->flags);
+ /* mark the request as resend request */
+ req->in.h.unique |= FUSE_UNIQUE_RESEND;
}
spin_lock(&fiq->lock);