public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Foster <bfoster@redhat.com>
To: Dave Chinner <david@fromorbit.com>
Cc: iusty@k1024.org, xfs@oss.sgi.com
Subject: Re: [PATCH 1/2] xfs: project id inheritance is a directory only flag
Date: Wed, 1 Oct 2014 07:58:18 -0400	[thread overview]
Message-ID: <20141001115817.GA53779@bfoster.bfoster> (raw)
In-Reply-To: <1412041565-18873-2-git-send-email-david@fromorbit.com>

On Tue, Sep 30, 2014 at 11:46:04AM +1000, Dave Chinner wrote:
> From: Dave Chinner <dchinner@redhat.com>
> 
> xfs_set_diflags() allows it to be set on non-directory inodes, and
> this flags errors in xfs_repair. Further, inode allocation allows
> the same directory-only flag to be inherited to non-directories.
> Make sure directory inode flags don't appear on other types of
> inodes.
> 
> This fixes several xfstests scratch fileystem corruption reports
> (e.g. xfs/050) now that xfstests checks scratch filesystems after
> test completion.
> 
> Signed-off-by: Dave Chinner <dchinner@redhat.com>
> ---

Reviewed-by: Brian Foster <bfoster@redhat.com>

>  fs/xfs/xfs_inode.c | 4 ++--
>  fs/xfs/xfs_ioctl.c | 4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
> index f07b443..8ed049d 100644
> --- a/fs/xfs/xfs_inode.c
> +++ b/fs/xfs/xfs_inode.c
> @@ -769,6 +769,8 @@ xfs_ialloc(
>  					di_flags |= XFS_DIFLAG_EXTSZINHERIT;
>  					ip->i_d.di_extsize = pip->i_d.di_extsize;
>  				}
> +				if (pip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
> +					di_flags |= XFS_DIFLAG_PROJINHERIT;
>  			} else if (S_ISREG(mode)) {
>  				if (pip->i_d.di_flags & XFS_DIFLAG_RTINHERIT)
>  					di_flags |= XFS_DIFLAG_REALTIME;
> @@ -789,8 +791,6 @@ xfs_ialloc(
>  			if ((pip->i_d.di_flags & XFS_DIFLAG_NOSYMLINKS) &&
>  			    xfs_inherit_nosymlinks)
>  				di_flags |= XFS_DIFLAG_NOSYMLINKS;
> -			if (pip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT)
> -				di_flags |= XFS_DIFLAG_PROJINHERIT;
>  			if ((pip->i_d.di_flags & XFS_DIFLAG_NODEFRAG) &&
>  			    xfs_inherit_nodefrag)
>  				di_flags |= XFS_DIFLAG_NODEFRAG;
> diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
> index 7a6b406..87c3bd1 100644
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@ -968,8 +968,6 @@ xfs_set_diflags(
>  		di_flags |= XFS_DIFLAG_NOATIME;
>  	if (xflags & XFS_XFLAG_NODUMP)
>  		di_flags |= XFS_DIFLAG_NODUMP;
> -	if (xflags & XFS_XFLAG_PROJINHERIT)
> -		di_flags |= XFS_DIFLAG_PROJINHERIT;
>  	if (xflags & XFS_XFLAG_NODEFRAG)
>  		di_flags |= XFS_DIFLAG_NODEFRAG;
>  	if (xflags & XFS_XFLAG_FILESTREAM)
> @@ -981,6 +979,8 @@ xfs_set_diflags(
>  			di_flags |= XFS_DIFLAG_NOSYMLINKS;
>  		if (xflags & XFS_XFLAG_EXTSZINHERIT)
>  			di_flags |= XFS_DIFLAG_EXTSZINHERIT;
> +		if (xflags & XFS_XFLAG_PROJINHERIT)
> +			di_flags |= XFS_DIFLAG_PROJINHERIT;
>  	} else if (S_ISREG(ip->i_d.di_mode)) {
>  		if (xflags & XFS_XFLAG_REALTIME)
>  			di_flags |= XFS_DIFLAG_REALTIME;
> -- 
> 2.0.0
> 
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2014-10-01 11:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-30  1:46 [PATCH 0/2] xfs: cleanup XFS_IOC_SETXATTR behaviour Dave Chinner
2014-09-30  1:46 ` [PATCH 1/2] xfs: project id inheritance is a directory only flag Dave Chinner
2014-10-01 11:58   ` Brian Foster [this message]
2014-09-30  1:46 ` [PATCH 2/2] xfs: only set extent size hint when asked Dave Chinner
2014-09-30  5:58   ` Iustin Pop
2014-09-30 22:13     ` Dave Chinner
2014-10-01 11:59   ` Brian Foster
2014-10-01 23:21     ` Dave Chinner
2014-09-30  5:55 ` [PATCH 0/2] xfs: cleanup XFS_IOC_SETXATTR behaviour Iustin Pop

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=20141001115817.GA53779@bfoster.bfoster \
    --to=bfoster@redhat.com \
    --cc=david@fromorbit.com \
    --cc=iusty@k1024.org \
    --cc=xfs@oss.sgi.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