@samitouri / QOSamiQemu / commits / f4a0359e24

fuse: Explicitly set inode ID to 1

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> Message-ID: <20260309150856.26800-5-hreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>

Hanna Czenczek committed Mar 9, 2026 at 16:08 UTC f4a0359e24684746cc8bdd7431b4a9d7de644e52
1 file changed +1 -1
block/export/fuse.c
+1 -1
@@ -432,7 +432,7 @@ static void fuse_getattr(fuse_req_t req, fuse_ino_t inode,
432 }
433
434 statbuf = (struct stat) {
435 - .st_ino = inode,
435 + .st_ino = 1,
436 .st_mode = exp->st_mode,
437 .st_nlink = 1,
438 .st_uid = exp->st_uid,