[PATCH v2 1/1] exfat: Add support for FS_IOC_{GET,SET}FSLABEL

From: Ethan Ferguson
Date: Sun Aug 17 2025 - 10:33:56 EST


On 8/17/25 08:30, Namjae Jeon wrote:
> On Sun, Aug 17, 2025 at 9:31 AM Ethan Ferguson
> <ethan.ferguson@xxxxxxxxxx> wrote:
>>
>> Add support for reading / writing to the exfat volume label from the
>> FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL ioctls.
>>
>> Implemented in similar ways to other fs drivers, namely btrfs and ext4,
>> where the ioctls are performed on file inodes.
> We can load and store a volume label using tune.exfat in exfatprogs.
> Is there any usage that requires this, even though there are utils
> that can do it?
>
> Thanks.
Both e2fsprogs and btrfs-progs now use the FS_IOC_{GET,SET}FSLABEL
ioctls to change the label on a mounted filesystem.

As for me, personally, I ran into this while developing on an
embedded device that does not have, and cannot have, exfatprogs.
Having this be a kernel feature would (I believe) bring the exfat driver
more in line with other fs drivers in the mainline tree.

Thank you for your consideration!

>>
>> v2:
>> Fix endianness conversion as reported by kernel test robot
>> v1:
>> Link: https://lore.kernel.org/all/20250815171056.103751-1-ethan.ferguson@xxxxxxxxxx/
>>
>> Ethan Ferguson (1):
>> exfat: Add support for FS_IOC_{GET,SET}FSLABEL
>> exfat: Fix endian conversion
>>
>> fs/exfat/exfat_fs.h | 2 +
>> fs/exfat/exfat_raw.h | 6 +++
>> fs/exfat/file.c | 56 +++++++++++++++++++++++++
>> fs/exfat/super.c | 99 ++++++++++++++++++++++++++++++++++++++++++++
>> 4 files changed, 163 insertions(+)
>>
>> --
>> 2.50.1
>>