linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: "Darrick J. Wong" <darrick.wong@oracle.com>
Cc: "Luis R. Rodriguez" <mcgrof@kernel.org>,
	Eric Sandeen <sandeen@sandeen.net>,
	David Howells <dhowells@redhat.com>,
	xfs <linux-xfs@vger.kernel.org>, Tso Ted <tytso@mit.edu>,
	Nikolay Borisov <nborisov@suse.com>, Flex Liu <fliu@suse.com>,
	Jake Norris <jake.norris@suse.com>, Jan Kara <jack@suse.cz>
Subject: Re: [PATCH] xfs_repair: clear extra file attributes on symlinks
Date: Fri, 3 Nov 2017 08:22:17 +1100	[thread overview]
Message-ID: <20171102212217.GV5858@dastard> (raw)
In-Reply-To: <20171102052306.GQ4911@magnolia>

On Wed, Nov 01, 2017 at 10:23:06PM -0700, Darrick J. Wong wrote:
> On Thu, Nov 02, 2017 at 01:39:48AM +0100, Luis R. Rodriguez wrote:
> > On Tue, Oct 31, 2017 at 03:43:20PM -0700, Darrick J. Wong wrote:
> > > you shouldn't be able to set any DIFLAG/DIFLAG2 flags on special files.
> > 
> > Do we know for certain *all* DIFLAG/DIFLAG2 flags can *only* be set via
> > an ioctl()?
> 
> I'm fairly sure that inode flags get set via ioctl, via inheritance at
> creation time with only two exceptions*, but could you please take a look
> at all the places we set inode di_flags/di_flags2 and report back?

*users* can only set/clear inode flags through ioctls. The kernel
can set/clear inode flags at any time, and they may be flags that
users cannot change (e.g. the reflink flag, or the prealloc flag
which is set during fallocate() calls to tell the kernel not to
remove preallocations beyond EOF).

Write up a set of masks that state what flags are valid on what
type of inode. We can review that for correctness, then we can
work out how to handle bad flags in repair...

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

      reply	other threads:[~2017-11-02 21:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-31 21:51 [PATCH] xfs_repair: clear extra file attributes on symlinks Luis R. Rodriguez
2017-10-31 22:12 ` Darrick J. Wong
2017-10-31 22:19   ` Luis R. Rodriguez
2017-10-31 22:41     ` [PATCH v2] " Luis R. Rodriguez
2017-10-31 22:43     ` [PATCH] " Darrick J. Wong
2017-10-31 23:10       ` Luis R. Rodriguez
2017-10-31 23:12         ` Eric Sandeen
2017-11-01 23:50           ` Luis R. Rodriguez
2018-04-26 23:50             ` Luis R. Rodriguez
2017-11-02  0:39       ` Luis R. Rodriguez
2017-11-02  5:23         ` Darrick J. Wong
2017-11-02 21:22           ` Dave Chinner [this message]

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=20171102212217.GV5858@dastard \
    --to=david@fromorbit.com \
    --cc=darrick.wong@oracle.com \
    --cc=dhowells@redhat.com \
    --cc=fliu@suse.com \
    --cc=jack@suse.cz \
    --cc=jake.norris@suse.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=nborisov@suse.com \
    --cc=sandeen@sandeen.net \
    --cc=tytso@mit.edu \
    /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).