Re: FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/28/19 6:36 AM, Pali Rohár wrote:
> Hello!
> 
> I see that you have introduced in commit 62750d0 two new IOCTLs for
> filesyetems: FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL.
> 
> I would like to ask, are these two new ioctls mean to be generic way for
> userspace to get or set fs label independently of which filesystem is
> used? Or are they only for btrfs?

The reason it was lifted out of btrfs to the vfs is so that other filesystems
can use the same interface.  However, it is up to each filesystem to implement
it (and to interpret what's been written to or read from disk.)

> Because I was not able to find any documentation for it, what is format
> of passed buffer... null-term string? fixed-length? and in which
> encoding? utf-8? latin1? utf-16? or filesystem dependent?

It simply copies the bits from the memory location you pass in, it knows
nothing of encodings.

For the most part it's up to the filesystem's own utilities to do any
interpretation of the resulting bits on disk, null-terminating maximal-length
label strings, etc.

-Eric





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux