From feccce4df0866783b65b493bba0964aeed4226dc Mon Sep 17 00:00:00 2001 From: Baolin Liu Date: Wed, 14 Oct 2026 07:43:10 +0800 Subject: [PATCH] ntfs: support FS_IOC_GETFSUUID NTFS reads the 64-bit volume serial number from the boot sector but leaves the superblock UUID unset. As a result, the generic FS_IOC_GETFSUUID handler returns ENOTTY for files and directories on an NTFS volume. Register the on-disk little-endian serial number as an eight-byte filesystem identifier with super_set_uuid(). The generic VFS handler can then expose the existing volume identifier. Signed-off-by: Baolin Liu Signed-off-by: Namjae Jeon --- fs/ntfs/super.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ntfs/super.c b/fs/ntfs/super.c index ed9f29b16c7c..71f0aea46bf8 100644 --- a/fs/ntfs/super.c +++ b/fs/ntfs/super.c @@ -997,6 +997,8 @@ static bool parse_ntfs_boot_sector(struct ntfs_volume *vol, vol->mft_record_size_bits; ntfs_debug("vol->mftmirr_size = %i", vol->mftmirr_size); vol->serial_no = le64_to_cpu(b->volume_serial_number); + super_set_uuid(vol->sb, (const u8 *)&b->volume_serial_number, + sizeof(b->volume_serial_number)); ntfs_debug("vol->serial_no = 0x%llx", vol->serial_no); vol->sparse_compression_unit = 4;