* [PATCH] JFS: always load filesystem UUID during mount [not found] <20260302025539.299524-1-joaommp.ref@yahoo.com> @ 2026-03-02 2:55 ` João Paredes 2026-03-16 21:22 ` Dave Kleikamp 0 siblings, 1 reply; 2+ messages in thread From: João Paredes @ 2026-03-02 2:55 UTC (permalink / raw) To: shaggy, joaommp, liaoyuanhong; +Cc: jfs-discussion, linux-kernel The filesystem UUID was only being loaded into super_block sb when an external journal device was in use. When mounting without an external journal, the UUID remained unset, which prevented the computation of a filesystem ID (fsid), which could be confirmed via `stat -f -c "%i"` and thus user space could not use fanotify correctly. A missing filesystem ID causes fanotify to return ENODEV when marking the filesystem for events like FAN_CREATE, FAN_DELETE, FAN_MOVED_TO, and FAN_MOVED_FROM. As a result, applications relying on fanotify could not monitor these events on JFS filesystems without an external journal. Moved the UUID initialization so it is always performed during mount, ensuring the superblock UUID is consistently available. Signed-off-by: João Paredes <joaommp@yahoo.com> --- fs/jfs/jfs_mount.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/jfs/jfs_mount.c b/fs/jfs/jfs_mount.c index 52e6b58c5dbd..dac822f15070 100644 --- a/fs/jfs/jfs_mount.c +++ b/fs/jfs/jfs_mount.c @@ -378,11 +378,12 @@ static int chkSuper(struct super_block *sb) sbi->nbperpage = PSIZE >> sbi->l2bsize; sbi->l2nbperpage = L2PSIZE - sbi->l2bsize; sbi->l2niperblk = sbi->l2bsize - L2DISIZE; + uuid_copy(&sbi->uuid, &j_sb->s_uuid); + if (sbi->mntflag & JFS_INLINELOG) sbi->logpxd = j_sb->s_logpxd; else { sbi->logdev = new_decode_dev(le32_to_cpu(j_sb->s_logdev)); - uuid_copy(&sbi->uuid, &j_sb->s_uuid); uuid_copy(&sbi->loguuid, &j_sb->s_loguuid); } sbi->fsckpxd = j_sb->s_fsckpxd; -- 2.53.0 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] JFS: always load filesystem UUID during mount 2026-03-02 2:55 ` [PATCH] JFS: always load filesystem UUID during mount João Paredes @ 2026-03-16 21:22 ` Dave Kleikamp 0 siblings, 0 replies; 2+ messages in thread From: Dave Kleikamp @ 2026-03-16 21:22 UTC (permalink / raw) To: João Paredes, liaoyuanhong; +Cc: jfs-discussion, linux-kernel On 3/1/26 8:55PM, João Paredes wrote: > The filesystem UUID was only being loaded into super_block sb when an > external journal device was in use. When mounting without an external > journal, the UUID remained unset, which prevented the computation of > a filesystem ID (fsid), which could be confirmed via `stat -f -c "%i"` > and thus user space could not use fanotify correctly. > > A missing filesystem ID causes fanotify to return ENODEV when marking > the filesystem for events like FAN_CREATE, FAN_DELETE, FAN_MOVED_TO, > and FAN_MOVED_FROM. As a result, applications relying on fanotify > could not monitor these events on JFS filesystems without an external > journal. > > Moved the UUID initialization so it is always performed during mount, > ensuring the superblock UUID is consistently available. > > Signed-off-by: João Paredes <joaommp@yahoo.com> Applied to jfs-next. Thanks! Shaggy > --- > fs/jfs/jfs_mount.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/jfs/jfs_mount.c b/fs/jfs/jfs_mount.c > index 52e6b58c5dbd..dac822f15070 100644 > --- a/fs/jfs/jfs_mount.c > +++ b/fs/jfs/jfs_mount.c > @@ -378,11 +378,12 @@ static int chkSuper(struct super_block *sb) > sbi->nbperpage = PSIZE >> sbi->l2bsize; > sbi->l2nbperpage = L2PSIZE - sbi->l2bsize; > sbi->l2niperblk = sbi->l2bsize - L2DISIZE; > + uuid_copy(&sbi->uuid, &j_sb->s_uuid); > + > if (sbi->mntflag & JFS_INLINELOG) > sbi->logpxd = j_sb->s_logpxd; > else { > sbi->logdev = new_decode_dev(le32_to_cpu(j_sb->s_logdev)); > - uuid_copy(&sbi->uuid, &j_sb->s_uuid); > uuid_copy(&sbi->loguuid, &j_sb->s_loguuid); > } > sbi->fsckpxd = j_sb->s_fsckpxd; ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-16 21:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20260302025539.299524-1-joaommp.ref@yahoo.com>
2026-03-02 2:55 ` [PATCH] JFS: always load filesystem UUID during mount João Paredes
2026-03-16 21:22 ` Dave Kleikamp
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®