lkml.org 
[lkml]   [2021]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] fs: fat: Make the volume label writable when mounted
Hello!

On Sunday 10 October 2021 21:06:52 OGAWA Hirofumi wrote:
> > diff --git a/include/uapi/linux/msdos_fs.h b/include/uapi/linux/msdos_fs.h
> > index a5773899f4d9..b666bca09238 100644
> > --- a/include/uapi/linux/msdos_fs.h
> > +++ b/include/uapi/linux/msdos_fs.h
> > @@ -104,6 +104,7 @@ struct __fat_dirent {
> > #define FAT_IOCTL_SET_ATTRIBUTES _IOW('r', 0x11, __u32)
> > /*Android kernel has used 0x12, so we use 0x13*/
> > #define FAT_IOCTL_GET_VOLUME_ID _IOR('r', 0x13, __u32)
> > +#define VFAT_IOCTL_SET_LABEL _IOW('r', 0x14, __u32)
>
> maybe FAT_IOCTL_SET_LABEL is better.

Please do not introduce a new fs specific ioctls. There is already
vfs-agnostic FS_IOC_SETFSLABEL ioctl, look at manpage:
https://man7.org/linux/man-pages/man2/ioctl_fslabel.2.html

I have WIP patches which adds support for FS_IOC_SETFSLABEL ioctl into
kernel vfat driver. But it is not possible to implement this ioctl
properly until issues with encoding are fixed in vfat driver. Some of
dependency patches I have sent to ML as RFC series:
https://lore.kernel.org/lkml/20210808162453.1653-1-pali@kernel.org/

If you have a time and motivation, I can send you my unfinished WIP
patches which implements FS_IOC_SETFSLABEL ioctl for vfat.

\
 
 \ /
  Last update: 2021-10-10 14:18    [W:0.086 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site