[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <517472d1-c686-2f18-4e0b-000cda7e88c7@redhat.com>
Date: Tue, 31 Dec 2019 16:54:18 -0600
From: Eric Sandeen <sandeen@...hat.com>
To: Pali Rohár <pali.rohar@...il.com>,
Andreas Dilger <adilger@...ger.ca>,
David Sterba <dsterba@...e.com>,
"Darrick J. Wong" <darrick.wong@...cle.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL
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
Powered by blists - more mailing lists