Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
	David Chinner <david@fromorbit.com>,
	linux-xfs@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Miklos Szeredi <mszeredi@redhat.com>
Subject: Re: linux-next: manual merge of the vfs tree with the xfs tree
Date: Tue, 13 Apr 2021 08:20:48 -0700
Message-ID: <20210413152048.GM3957620@magnolia> (raw)
In-Reply-To: <20210412122211.713ca71d@canb.auug.org.au>

On Mon, Apr 12, 2021 at 12:22:11PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the vfs tree got a conflict in:
> 
>   fs/xfs/xfs_ioctl.c
> 
> between commits:
> 
>   ceaf603c7024 ("xfs: move the di_projid field to struct xfs_inode")
>   031474c28a3a ("xfs: move the di_extsize field to struct xfs_inode")
>   b33ce57d3e61 ("xfs: move the di_cowextsize field to struct xfs_inode")
>   4800887b4574 ("xfs: cleanup xfs_fill_fsxattr")
>   ee7b83fd365e ("xfs: use a union for i_cowextsize and i_flushiter")
>   db07349da2f5 ("xfs: move the di_flags field to struct xfs_inode")
>   3e09ab8fdc4d ("xfs: move the di_flags2 field to struct xfs_inode")
> 
> from the xfs tree and commit:
> 
>   280cad4ac884 ("xfs: convert to fileattr")
> 
> from the vfs tree.
> 
> I fixed it up (I think - see below) and can carry the fix as
> necessary. This is now fixed as far as linux-next is concerned, but any
> non trivial conflicts should be mentioned to your upstream maintainer
> when your tree is submitted for merging.  You may also want to consider
> cooperating with the maintainer of the conflicting tree to minimise any
> particularly complex conflicts.

This looks correct to me; thanks for pointing out the merge conflict! :)

--D

> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc fs/xfs/xfs_ioctl.c
> index 708b77341a70,bbda105a2ce5..000000000000
> --- a/fs/xfs/xfs_ioctl.c
> +++ b/fs/xfs/xfs_ioctl.c
> @@@ -1056,76 -1057,16 +1057,18 @@@ xfs_ioc_ag_geometry
>   static void
>   xfs_fill_fsxattr(
>   	struct xfs_inode	*ip,
> - 	bool			attr,
> - 	struct fsxattr		*fa)
> + 	int			whichfork,
> + 	struct fileattr		*fa)
>   {
>  +	struct xfs_mount	*mp = ip->i_mount;
> - 	struct xfs_ifork	*ifp = attr ? ip->i_afp : &ip->i_df;
> + 	struct xfs_ifork	*ifp = XFS_IFORK_PTR(ip, whichfork);
>   
> - 	simple_fill_fsxattr(fa, xfs_ip2xflags(ip));
> + 	fileattr_fill_xflags(fa, xfs_ip2xflags(ip));
>  -	fa->fsx_extsize = ip->i_d.di_extsize << ip->i_mount->m_sb.sb_blocklog;
>  -	fa->fsx_cowextsize = ip->i_d.di_cowextsize <<
>  -			ip->i_mount->m_sb.sb_blocklog;
>  -	fa->fsx_projid = ip->i_d.di_projid;
>  +
>  +	fa->fsx_extsize = XFS_FSB_TO_B(mp, ip->i_extsize);
>  +	if (ip->i_diflags2 & XFS_DIFLAG2_COWEXTSIZE)
>  +		fa->fsx_cowextsize = XFS_FSB_TO_B(mp, ip->i_cowextsize);
>  +	fa->fsx_projid = ip->i_projid;
>   	if (ifp && (ifp->if_flags & XFS_IFEXTENTS))
>   		fa->fsx_nextents = xfs_iext_count(ifp);
>   	else
> @@@ -1212,10 -1167,10 +1169,10 @@@ static in
>   xfs_ioctl_setattr_xflags(
>   	struct xfs_trans	*tp,
>   	struct xfs_inode	*ip,
> - 	struct fsxattr		*fa)
> + 	struct fileattr		*fa)
>   {
>   	struct xfs_mount	*mp = ip->i_mount;
>  -	uint64_t		di_flags2;
>  +	uint64_t		i_flags2;
>   
>   	/* Can't change realtime flag if any extents are allocated. */
>   	if ((ip->i_df.if_nextents || ip->i_delayed_blks) &&
> @@@ -1348,8 -1289,11 +1291,11 @@@ xfs_ioctl_setattr_check_extsize
>   	xfs_extlen_t		size;
>   	xfs_fsblock_t		extsize_fsb;
>   
> + 	if (!fa->fsx_valid)
> + 		return 0;
> + 
>   	if (S_ISREG(VFS_I(ip)->i_mode) && ip->i_df.if_nextents &&
>  -	    ((ip->i_d.di_extsize << mp->m_sb.sb_blocklog) != fa->fsx_extsize))
>  +	    ((ip->i_extsize << mp->m_sb.sb_blocklog) != fa->fsx_extsize))
>   		return -EINVAL;
>   
>   	if (fa->fsx_extsize == 0)
> @@@ -1520,18 -1476,18 +1478,19 @@@ xfs_fileattr_set
>   	 * extent size hint should be set on the inode. If no extent size flags
>   	 * are set on the inode then unconditionally clear the extent size hint.
>   	 */
>  -	if (ip->i_d.di_flags & (XFS_DIFLAG_EXTSIZE | XFS_DIFLAG_EXTSZINHERIT))
>  -		ip->i_d.di_extsize = fa->fsx_extsize >> mp->m_sb.sb_blocklog;
>  -	else
>  -		ip->i_d.di_extsize = 0;
>  -	if (xfs_sb_version_has_v3inode(&mp->m_sb) &&
>  -	    (ip->i_d.di_flags2 & XFS_DIFLAG2_COWEXTSIZE))
>  -		ip->i_d.di_cowextsize = fa->fsx_cowextsize >>
>  -				mp->m_sb.sb_blocklog;
>  +	if (ip->i_diflags & (XFS_DIFLAG_EXTSIZE | XFS_DIFLAG_EXTSZINHERIT))
>  +		ip->i_extsize = XFS_B_TO_FSB(mp, fa->fsx_extsize);
>   	else
>  -		ip->i_d.di_cowextsize = 0;
>  +		ip->i_extsize = 0;
>  +
>  +	if (xfs_sb_version_has_v3inode(&mp->m_sb)) {
>  +		if (ip->i_diflags2 & XFS_DIFLAG2_COWEXTSIZE)
>  +			ip->i_cowextsize = XFS_B_TO_FSB(mp, fa->fsx_cowextsize);
>  +		else
>  +			ip->i_cowextsize = 0;
>  +	}
>   
> + skip_xattr:
>   	error = xfs_trans_commit(tp);
>   
>   	/*



  reply index

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-12  2:22 Stephen Rothwell
2021-04-13 15:20 ` Darrick J. Wong [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-04-19  0:49 Stephen Rothwell
2021-04-20 16:40 ` Darrick J. Wong
2018-10-31  0:52 Stephen Rothwell
2018-10-31  1:12 ` Dave Chinner
2016-12-11 23:19 Stephen Rothwell
2015-11-10 23:21 Stephen Rothwell
2015-04-14  1:34 Stephen Rothwell
2015-04-13  1:57 Stephen Rothwell
2015-04-13  2:12 ` Dave Chinner
2011-07-18  3:36 Stephen Rothwell
2011-07-19  1:29 ` Dave Chinner
2010-07-26  1:51 Stephen Rothwell
2010-07-26  3:59 ` Dave Chinner
2010-07-26  4:05   ` Stephen Rothwell
2010-07-05  0:02 Stephen Rothwell
2010-07-07  1:48 ` Christoph Hellwig
2010-07-07  3:50   ` Stephen Rothwell
2010-08-04  1:54 ` Stephen Rothwell

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=20210413152048.GM3957620@magnolia \
    --to=djwong@kernel.org \
    --cc=david@fromorbit.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=mszeredi@redhat.com \
    --cc=sfr@canb.auug.org.au \
    --cc=viro@ZenIV.linux.org.uk \
    /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

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git