From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCC52C11F65 for ; Wed, 30 Jun 2021 03:58:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BA6B361D2B for ; Wed, 30 Jun 2021 03:58:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229532AbhF3EAj (ORCPT ); Wed, 30 Jun 2021 00:00:39 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:47548 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229446AbhF3EAi (ORCPT ); Wed, 30 Jun 2021 00:00:38 -0400 Received: from cwcc.thunk.org (pool-72-74-133-215.bstnma.fios.verizon.net [72.74.133.215]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 15U3vxQq002163 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 29 Jun 2021 23:58:00 -0400 Received: by cwcc.thunk.org (Postfix, from userid 15806) id 532E915C3C8E; Tue, 29 Jun 2021 23:57:59 -0400 (EDT) Date: Tue, 29 Jun 2021 23:57:59 -0400 From: "Theodore Ts'o" To: "Darrick J. Wong" Cc: Rob Landley , Denys Vlasenko , David Howells , Linux API , "Michael Kerrisk (man-pages)" Subject: Re: lsattr: incorrect size for ioctl result Message-ID: References: <9acca2fa-eaef-1a0b-ac72-6b0eab3d8a45@landley.net> <20210629210422.GD13767@locust> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210629210422.GD13767@locust> Precedence: bulk List-ID: X-Mailing-List: linux-api@vger.kernel.org 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