[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 04/21] fuse: Explicitly set inode ID to 1
From: |
Hanna Czenczek |
Subject: |
[PATCH v2 04/21] fuse: Explicitly set inode ID to 1 |
Date: |
Wed, 4 Jun 2025 15:27:56 +0200 |
Setting .st_ino to the FUSE inode ID is kind of arbitrary. While in
practice it is going to be fixed (to FUSE_ROOT_ID, which is 1) because
we only have the root inode, that is not obvious in fuse_getattr().
Just explicitly set it to 1 (i.e. no functional change).
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Hanna Czenczek <hreitz@redhat.com>
---
block/export/fuse.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/export/fuse.c b/block/export/fuse.c
index a93316e1f4..60d68d8fdd 100644
--- a/block/export/fuse.c
+++ b/block/export/fuse.c
@@ -432,7 +432,7 @@ static void fuse_getattr(fuse_req_t req, fuse_ino_t inode,
}
statbuf = (struct stat) {
- .st_ino = inode,
+ .st_ino = 1,
.st_mode = exp->st_mode,
.st_nlink = 1,
.st_uid = exp->st_uid,
--
2.49.0
- [PATCH v2 00/21] export/fuse: Use coroutines and multi-threading, Hanna Czenczek, 2025/06/04
- [PATCH v2 01/21] fuse: Copy write buffer content before polling, Hanna Czenczek, 2025/06/04
- [PATCH v2 02/21] fuse: Ensure init clean-up even with error_fatal, Hanna Czenczek, 2025/06/04
- [PATCH v2 03/21] fuse: Remove superfluous empty line, Hanna Czenczek, 2025/06/04
- [PATCH v2 04/21] fuse: Explicitly set inode ID to 1,
Hanna Czenczek <=
- [PATCH v2 05/21] fuse: Change setup_... to mount_fuse_export(), Hanna Czenczek, 2025/06/04
- [PATCH v2 06/21] fuse: Fix mount options, Hanna Czenczek, 2025/06/04
- [PATCH v2 07/21] fuse: Set direct_io and parallel_direct_writes, Hanna Czenczek, 2025/06/04
- [PATCH v2 08/21] fuse: Introduce fuse_{at,de}tach_handlers(), Hanna Czenczek, 2025/06/04
- [PATCH v2 10/21] fuse: Add halted flag, Hanna Czenczek, 2025/06/04
- [PATCH v2 12/21] block: Move qemu_fcntl_addfl() into osdep.c, Hanna Czenczek, 2025/06/04
- [PATCH v2 09/21] fuse: Introduce fuse_{inc,dec}_in_flight(), Hanna Czenczek, 2025/06/04
- [PATCH v2 11/21] fuse: Rename length to blk_len in fuse_write(), Hanna Czenczek, 2025/06/04