All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Theodore Ts'o" <tytso@mit.edu>
To: "Darrick J. Wong" <djwong@kernel.org>
Cc: Rob Landley <rob@landley.net>,
	Denys Vlasenko <vda.linux@googlemail.com>,
	David Howells <dhowells@redhat.com>,
	Linux API <linux-api@vger.kernel.org>,
	"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>
Subject: Re: lsattr: incorrect size for ioctl result
Date: Tue, 29 Jun 2021 23:57:59 -0400	[thread overview]
Message-ID: <YNvrx+Wt0WmA+gGJ@mit.edu> (raw)
In-Reply-To: <20210629210422.GD13767@locust>

On Tue, Jun 29, 2021 at 02:04:22PM -0700, Darrick J. Wong wrote:
> 
> Why don't we deprecate FS_IOC_[GS]ETFLAGS and tell everyone to use
> FS[GS]ETXATTR?  They use the same code paths and vfs helpers now.

The FS_IOC_[GS]ETXATTR ioctls use struct fsxattr, which contains
fsx_xflags.  But there are flags returned (and set) by
FS_IOC_[GS]ETFLAGS that are not in fsx_xflags --- and vice versa, of
course.

That's not a problem for xfs, since fsx_xflags was originally designed
for xfs (and so it has some xfs-specific flags such as
FS_XFLAG_REALTIME, FS_XFLAG_RTINHERIT, FS_XFLAG_FILESTREAM,
FS_XFLAG_COWEXTSIZE, etc.).

But for other file systems, including btrfs, ext4 and f2fs, which
utilize FS_IOC_[GS]ETFLAGS flags which are not supported by
FS_IOC_[GS]ETXATTR's fsx_xflags.  Examples of such flags include
FS_ENCRYPT_FL, FS_TOPDIR_FL, FS_NOCMP_FL, and FS_CASEFOLD_FL.

There is also the _IO[RW] long vs int "API violation" for the
FS_IOC_[GS]ETVERSION which isn't addressed by FS_IOC_[GS]ETATTR.

So FS_IOC_[GS]ETATTR isn't a complete replacement/solution for these
"problem" ioctls.  And of course, even if we were to start telling
everyone to start using a new interface, it'll be many years before
any transition is complete.

						- Ted

  reply	other threads:[~2021-06-30  3:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CAK1hOcO3qHFO6QOkpjnC_A4LVhwed02XxCYZvEn+8t+HnyGjZA@mail.gmail.com>
     [not found] ` <b1b801af-d309-829e-fd48-6487661df809@landley.net>
     [not found]   ` <CAK1hOcMh3RK_Nd_=W-RgqhMZJh-OGY9qMDfxpALZHpxwriHgAA@mail.gmail.com>
2021-06-25  9:01     ` lsattr: incorrect size for ioctl result Rob Landley
2021-06-25 12:14       ` Denys Vlasenko
2021-06-28 16:33       ` Theodore Ts'o
2021-06-28 19:35         ` Rob Landley
2021-06-29 15:24           ` Theodore Ts'o
2021-06-29 21:04             ` Darrick J. Wong
2021-06-30  3:57               ` Theodore Ts'o [this message]
2021-06-30 18:30               ` Rob Landley

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=YNvrx+Wt0WmA+gGJ@mit.edu \
    --to=tytso@mit.edu \
    --cc=dhowells@redhat.com \
    --cc=djwong@kernel.org \
    --cc=linux-api@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=rob@landley.net \
    --cc=vda.linux@googlemail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.