linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@redhat.com>
To: "Pali Rohár" <pali.rohar@gmail.com>,
	"Andreas Dilger" <adilger@dilger.ca>,
	"David Sterba" <dsterba@suse.com>,
	"Darrick J. Wong" <darrick.wong@oracle.com>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL
Date: Tue, 31 Dec 2019 16:54:18 -0600	[thread overview]
Message-ID: <517472d1-c686-2f18-4e0b-000cda7e88c7@redhat.com> (raw)
In-Reply-To: <20191228143651.bjb4sjirn2q3xup4@pali>

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


  parent reply	other threads:[~2019-12-31 22:54 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-28 14:36 FS_IOC_GETFSLABEL and FS_IOC_SETFSLABEL Pali Rohár
2019-12-28 19:14 ` Andreas Dilger
2019-12-28 20:05   ` Pali Rohár
2019-12-31 22:54 ` Eric Sandeen [this message]
2020-01-01 18:10   ` Theodore Y. Ts'o
2020-01-01 18:39     ` Pali Rohár
2020-01-02 21:57       ` Darrick J. Wong
2020-01-02 22:08         ` Pali Rohár
2020-01-07 23:15           ` Darrick J. Wong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=517472d1-c686-2f18-4e0b-000cda7e88c7@redhat.com \
    --to=sandeen@redhat.com \
    --cc=adilger@dilger.ca \
    --cc=darrick.wong@oracle.com \
    --cc=dsterba@suse.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pali.rohar@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).