mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Mark Brown <broonie@kernel.org>, Jens Axboe <axboe@kernel.dk>
Cc: John Garry <john.g.garry@oracle.com>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	 Mateusz Guzik <mjguzik@gmail.com>,
	Prasad Singamsetty <prasad.singamsetty@oracle.com>
Subject: Re: linux-next: manual merge of the block tree with the vfs-brauner tree
Date: Sat, 29 Jun 2024 12:05:24 +0200	[thread overview]
Message-ID: <20240629-gelohnt-widmung-b53f957cd69f@brauner> (raw)
In-Reply-To: <Zn76C70F9QB_Z0bw@sirena.org.uk>

On Fri, Jun 28, 2024 at 06:59:39PM GMT, Mark Brown wrote:
> Hi all,
> 
> Today's linux-next merge of the block tree got a conflict in:
> 
>   fs/stat.c
> 
> between commit:
> 
>   0ef625bba6fb2 ("vfs: support statx(..., NULL, AT_EMPTY_PATH, ...)")
> 
> from the vfs-brauner tree and commit:
> 
>   0f9ca80fa4f96 ("fs: Add initial atomic write support info to statx")
>   9abcfbd235f59 ("block: Add atomic write support for statx")
> 
> from the block tree.

Jens,

Can you give me the fs bits and I'll put them in a shared branch we can
both pull in?

> 
> I fixed it up (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.
> 
> diff --cc fs/stat.c
> index 6f65b3456cadb,bd0698dfd7b36..0000000000000
> --- a/fs/stat.c
> +++ b/fs/stat.c
> @@@ -214,43 -245,6 +245,45 @@@ int getname_statx_lookup_flags(int flag
>   	return lookup_flags;
>   }
>   
>  +static int vfs_statx_path(struct path *path, int flags, struct kstat *stat,
>  +			  u32 request_mask)
>  +{
>  +	int error = vfs_getattr(path, stat, request_mask, flags);
> ++	struct inode *backing_inode;
>  +
>  +	if (request_mask & STATX_MNT_ID_UNIQUE) {
>  +		stat->mnt_id = real_mount(path->mnt)->mnt_id_unique;
>  +		stat->result_mask |= STATX_MNT_ID_UNIQUE;
>  +	} else {
>  +		stat->mnt_id = real_mount(path->mnt)->mnt_id;
>  +		stat->result_mask |= STATX_MNT_ID;
>  +	}
>  +
>  +	if (path_mounted(path))
>  +		stat->attributes |= STATX_ATTR_MOUNT_ROOT;
>  +	stat->attributes_mask |= STATX_ATTR_MOUNT_ROOT;
>  +
> - 	/* Handle STATX_DIOALIGN for block devices. */
> - 	if (request_mask & STATX_DIOALIGN) {
> - 		struct inode *inode = d_backing_inode(path->dentry);
> - 
> - 		if (S_ISBLK(inode->i_mode))
> - 			bdev_statx_dioalign(inode, stat);
> - 	}
> ++	/*
> ++	 * If this is a block device inode, override the filesystem
> ++	 * attributes with the block device specific parameters that need to be
> ++	 * obtained from the bdev backing inode.
> ++	 */
> ++	backing_inode = d_backing_inode(path->dentry);
> ++	if (S_ISBLK(backing_inode->i_mode))
> ++		bdev_statx(backing_inode, stat, request_mask);
>  +
>  +	return error;
>  +}
>  +
>  +static int vfs_statx_fd(int fd, int flags, struct kstat *stat,
>  +			  u32 request_mask)
>  +{
>  +	CLASS(fd_raw, f)(fd);
>  +	if (!f.file)
>  +		return -EBADF;
>  +	return vfs_statx_path(&f.file->f_path, flags, stat, request_mask);
>  +}
>  +
>   /**
>    * vfs_statx - Get basic and extra attributes by filename
>    * @dfd: A file descriptor representing the base dir for a relative filename



  reply	other threads:[~2024-06-29 10:05 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 17:59 Mark Brown
2024-06-29 10:05 ` Christian Brauner [this message]
2024-06-29 14:28   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2026-03-05 13:44 Mark Brown
2026-03-05 14:54 ` Christoph Hellwig
2026-03-05 15:18   ` Mark Brown
2026-03-05 17:34   ` Keith Busch
2026-03-06 14:22     ` Christoph Hellwig
2026-03-09 13:45       ` Jens Axboe
2026-03-09 13:48         ` Jens Axboe
2026-03-09 13:54           ` Jens Axboe
2026-03-10  6:26             ` Christoph Hellwig
2025-11-17  3:32 Stephen Rothwell
2024-06-28 17:59 Mark Brown
2024-05-08  3:02 Stephen Rothwell
2024-05-08  6:46 ` Christoph Hellwig
2024-04-02  0:21 Stephen Rothwell
2024-02-06  1:48 Stephen Rothwell
2024-02-06 16:37 ` Jens Axboe
2024-02-07  9:27   ` Christian Brauner

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=20240629-gelohnt-widmung-b53f957cd69f@brauner \
    --to=brauner@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=broonie@kernel.org \
    --cc=john.g.garry@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mjguzik@gmail.com \
    --cc=prasad.singamsetty@oracle.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

all inboxes | Powered by JetHome®