linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the block tree with the vfs-brauner tree
@ 2024-02-06  1:48 Stephen Rothwell
  2024-02-06 16:37 ` Jens Axboe
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2024-02-06  1:48 UTC (permalink / raw)
  To: Jens Axboe, Christian Brauner
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 3656 bytes --]

Hi all,

Today's linux-next merge of the block tree got a conflict in:

  block/blk.h

between commits:

  19db932fd2b0 ("bdev: make bdev_{release, open_by_dev}() private to block layer")
  09f8289e1b74 ("bdev: make struct bdev_handle private to the block layer")
  d75140abba91 ("bdev: remove bdev pointer from struct bdev_handle")

from the vfs-brauner tree and commits:

  c4e47bbb00da ("block: move cgroup time handling code into blk.h")
  08420cf70cfb ("block: add blk_time_get_ns() and blk_time_get() helpers")
  da4c8c3d0975 ("block: cache current nsec time in struct blk_plug")
  06b23f92af87 ("block: update cached timestamp post schedule/preemption")

from the block tree.

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.

-- 
Cheers,
Stephen Rothwell

diff --cc block/blk.h
index f02b25f22e8b,913c93838a01..000000000000
--- a/block/blk.h
+++ b/block/blk.h
@@@ -516,8 -517,70 +517,75 @@@ static inline int req_ref_read(struct r
  	return atomic_read(&req->ref);
  }
  
 +void bdev_release(struct file *bdev_file);
 +int bdev_open(struct block_device *bdev, blk_mode_t mode, void *holder,
 +	      const struct blk_holder_ops *hops, struct file *bdev_file);
 +int bdev_permission(dev_t dev, blk_mode_t mode, void *holder);
++
+ static inline u64 blk_time_get_ns(void)
+ {
+ 	struct blk_plug *plug = current->plug;
+ 
+ 	if (!plug)
+ 		return ktime_get_ns();
+ 
+ 	/*
+ 	 * 0 could very well be a valid time, but rather than flag "this is
+ 	 * a valid timestamp" separately, just accept that we'll do an extra
+ 	 * ktime_get_ns() if we just happen to get 0 as the current time.
+ 	 */
+ 	if (!plug->cur_ktime) {
+ 		plug->cur_ktime = ktime_get_ns();
+ 		current->flags |= PF_BLOCK_TS;
+ 	}
+ 	return plug->cur_ktime;
+ }
+ 
+ static inline ktime_t blk_time_get(void)
+ {
+ 	return ns_to_ktime(blk_time_get_ns());
+ }
+ 
+ /*
+  * From most significant bit:
+  * 1 bit: reserved for other usage, see below
+  * 12 bits: original size of bio
+  * 51 bits: issue time of bio
+  */
+ #define BIO_ISSUE_RES_BITS      1
+ #define BIO_ISSUE_SIZE_BITS     12
+ #define BIO_ISSUE_RES_SHIFT     (64 - BIO_ISSUE_RES_BITS)
+ #define BIO_ISSUE_SIZE_SHIFT    (BIO_ISSUE_RES_SHIFT - BIO_ISSUE_SIZE_BITS)
+ #define BIO_ISSUE_TIME_MASK     ((1ULL << BIO_ISSUE_SIZE_SHIFT) - 1)
+ #define BIO_ISSUE_SIZE_MASK     \
+ 	(((1ULL << BIO_ISSUE_SIZE_BITS) - 1) << BIO_ISSUE_SIZE_SHIFT)
+ #define BIO_ISSUE_RES_MASK      (~((1ULL << BIO_ISSUE_RES_SHIFT) - 1))
+ 
+ /* Reserved bit for blk-throtl */
+ #define BIO_ISSUE_THROTL_SKIP_LATENCY (1ULL << 63)
+ 
+ static inline u64 __bio_issue_time(u64 time)
+ {
+ 	return time & BIO_ISSUE_TIME_MASK;
+ }
+ 
+ static inline u64 bio_issue_time(struct bio_issue *issue)
+ {
+ 	return __bio_issue_time(issue->value);
+ }
+ 
+ static inline sector_t bio_issue_size(struct bio_issue *issue)
+ {
+ 	return ((issue->value & BIO_ISSUE_SIZE_MASK) >> BIO_ISSUE_SIZE_SHIFT);
+ }
+ 
+ static inline void bio_issue_init(struct bio_issue *issue,
+ 				       sector_t size)
+ {
+ 	size &= (1ULL << BIO_ISSUE_SIZE_BITS) - 1;
+ 	issue->value = ((issue->value & BIO_ISSUE_RES_MASK) |
+ 			(blk_time_get_ns() & BIO_ISSUE_TIME_MASK) |
+ 			((u64)size << BIO_ISSUE_SIZE_SHIFT));
+ }
+ 
  #endif /* BLK_INTERNAL_H */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: linux-next: manual merge of the block tree with the vfs-brauner tree
  2024-02-06  1:48 Stephen Rothwell
@ 2024-02-06 16:37 ` Jens Axboe
  2024-02-07  9:27   ` Christian Brauner
  0 siblings, 1 reply; 10+ messages in thread
From: Jens Axboe @ 2024-02-06 16:37 UTC (permalink / raw)
  To: Stephen Rothwell, Christian Brauner
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

On 2/5/24 6:48 PM, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the block tree got a conflict in:
> 
>   block/blk.h
> 
> between commits:
> 
>   19db932fd2b0 ("bdev: make bdev_{release, open_by_dev}() private to block layer")
>   09f8289e1b74 ("bdev: make struct bdev_handle private to the block layer")
>   d75140abba91 ("bdev: remove bdev pointer from struct bdev_handle")
> 
> from the vfs-brauner tree and commits:
> 
>   c4e47bbb00da ("block: move cgroup time handling code into blk.h")
>   08420cf70cfb ("block: add blk_time_get_ns() and blk_time_get() helpers")
>   da4c8c3d0975 ("block: cache current nsec time in struct blk_plug")
>   06b23f92af87 ("block: update cached timestamp post schedule/preemption")
> 
> from the block tree.
> 
> 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.

That's a lot of conflicts. Christian, we really should separate some of
these so we can have the shared bits in a shared branch.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: linux-next: manual merge of the block tree with the vfs-brauner tree
  2024-02-06 16:37 ` Jens Axboe
@ 2024-02-07  9:27   ` Christian Brauner
  0 siblings, 0 replies; 10+ messages in thread
From: Christian Brauner @ 2024-02-07  9:27 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Stephen Rothwell, Linux Kernel Mailing List,
	Linux Next Mailing List

On Tue, Feb 06, 2024 at 09:37:33AM -0700, Jens Axboe wrote:
> On 2/5/24 6:48 PM, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the block tree got a conflict in:
> > 
> >   block/blk.h
> > 
> > between commits:
> > 
> >   19db932fd2b0 ("bdev: make bdev_{release, open_by_dev}() private to block layer")
> >   09f8289e1b74 ("bdev: make struct bdev_handle private to the block layer")
> >   d75140abba91 ("bdev: remove bdev pointer from struct bdev_handle")
> > 
> > from the vfs-brauner tree and commits:
> > 
> >   c4e47bbb00da ("block: move cgroup time handling code into blk.h")
> >   08420cf70cfb ("block: add blk_time_get_ns() and blk_time_get() helpers")
> >   da4c8c3d0975 ("block: cache current nsec time in struct blk_plug")
> >   06b23f92af87 ("block: update cached timestamp post schedule/preemption")
> > 
> > from the block tree.
> > 
> > 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.
> 
> That's a lot of conflicts. Christian, we really should separate some of
> these so we can have the shared bits in a shared branch.

Yes, happy to do that. Let's quickly sync later today when you're up?

^ permalink raw reply	[flat|nested] 10+ messages in thread

* linux-next: manual merge of the block tree with the vfs-brauner tree
@ 2024-04-02  0:21 Stephen Rothwell
  0 siblings, 0 replies; 10+ messages in thread
From: Stephen Rothwell @ 2024-04-02  0:21 UTC (permalink / raw)
  To: Jens Axboe, Christian Brauner
  Cc: Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]

Hi all,

Today's linux-next merge of the block tree got a conflict in:

  io_uring/rw.c

between commit:

  80a07849c0b8 ("fs: claw back a few FMODE_* bits")

from the vfs-brauner tree and commit:

  40ffda3dc1a1 ("io_uring/rw: always setup io_async_rw for read/write requests")

from the block tree.

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.

-- 
Cheers,
Stephen Rothwell

diff --cc io_uring/rw.c
index d9dfde1142a1,3134a6ece1be..000000000000
--- a/io_uring/rw.c
+++ b/io_uring/rw.c
@@@ -1021,13 -1003,13 +1004,13 @@@ int io_write(struct io_kiocb *req, unsi
  	if (force_nonblock) {
  		/* If the file doesn't support async, just async punt */
  		if (unlikely(!io_file_supports_nowait(req)))
- 			goto copy_iov;
+ 			goto ret_eagain;
  
 -		/* File path supports NOWAIT for non-direct_IO only for block devices. */
 +		/* Check if we can support NOWAIT. */
  		if (!(kiocb->ki_flags & IOCB_DIRECT) &&
 -			!(kiocb->ki_filp->f_mode & FMODE_BUF_WASYNC) &&
 -			(req->flags & REQ_F_ISREG))
 +		    !(req->file->f_op->fop_flags & FOP_BUFFER_WASYNC) &&
 +		    (req->flags & REQ_F_ISREG))
- 			goto copy_iov;
+ 			goto ret_eagain;
  
  		kiocb->ki_flags |= IOCB_NOWAIT;
  	} else {

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* linux-next: manual merge of the block tree with the vfs-brauner tree
@ 2024-05-08  3:02 Stephen Rothwell
  2024-05-08  6:46 ` Christoph Hellwig
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Rothwell @ 2024-05-08  3:02 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Al Viro, Christian Brauner, Christoph Hellwig,
	Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]

Hi all,

FIXME: Add owner of second tree to To:
       Add author(s)/SOB of conflicting commits.

Today's linux-next merge of the block tree got a conflict in:

  block/ioctl.c

between commit:

  695eaf683e8e ("blk_ioctl_{discard,zeroout}(): we only want ->bd_inode->i_mapping here...")

from the vfs-brauner tree and commits:

  719c15a75ebf ("blk-lib: check for kill signal in ioctl BLKDISCARD")
  fb4271f2bfac ("Merge branch 'for-6.10/block' into for-next")

from the block tree.

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.

-- 
Cheers,
Stephen Rothwell

diff --cc block/ioctl.c
index 3b31c09941dc,c0f1b6583a9a..000000000000
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@@ -95,8 -95,13 +95,12 @@@ static int compat_blkpg_ioctl(struct bl
  static int blk_ioctl_discard(struct block_device *bdev, blk_mode_t mode,
  		unsigned long arg)
  {
+ 	unsigned int bs_mask = bdev_logical_block_size(bdev) - 1;
  	uint64_t range[2];
  	uint64_t start, len, end;
 -	struct inode *inode = bdev->bd_inode;
+ 	struct bio *prev = NULL, *bio;
+ 	sector_t sector, nr_sects;
+ 	struct blk_plug plug;
  	int err;
  
  	if (!(mode & BLK_OPEN_WRITE))
@@@ -124,9 -131,34 +130,34 @@@
  	err = truncate_bdev_range(bdev, mode, start, start + len - 1);
  	if (err)
  		goto fail;
- 	err = blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL);
+ 
+ 	sector = start >> SECTOR_SHIFT;
+ 	nr_sects = len >> SECTOR_SHIFT;
+ 
+ 	blk_start_plug(&plug);
+ 	while (1) {
+ 		if (fatal_signal_pending(current)) {
+ 			if (prev)
+ 				bio_await_chain(prev);
+ 			err = -EINTR;
+ 			goto out_unplug;
+ 		}
+ 		bio = blk_alloc_discard_bio(bdev, &sector, &nr_sects,
+ 				GFP_KERNEL);
+ 		if (!bio)
+ 			break;
+ 		prev = bio_chain_and_submit(prev, bio);
+ 	}
+ 	if (prev) {
+ 		err = submit_bio_wait(prev);
+ 		if (err == -EOPNOTSUPP)
+ 			err = 0;
+ 		bio_put(prev);
+ 	}
+ out_unplug:
+ 	blk_finish_plug(&plug);
  fail:
 -	filemap_invalidate_unlock(inode->i_mapping);
 +	filemap_invalidate_unlock(bdev->bd_mapping);
  	return err;
  }
  

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: linux-next: manual merge of the block tree with the vfs-brauner tree
  2024-05-08  3:02 Stephen Rothwell
@ 2024-05-08  6:46 ` Christoph Hellwig
  0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2024-05-08  6:46 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Jens Axboe, Al Viro, Christian Brauner, Christoph Hellwig,
	Linux Kernel Mailing List, Linux Next Mailing List

Thanks Stephen,

the merge looks good to me.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* linux-next: manual merge of the block tree with the vfs-brauner tree
@ 2024-06-28 17:59 Mark Brown
  2024-06-29 10:05 ` Christian Brauner
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2024-06-28 17:59 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christian Brauner, John Garry, Linux Kernel Mailing List,
	Linux Next Mailing List, Mateusz Guzik, Prasad Singamsetty

[-- Attachment #1: Type: text/plain, Size: 2574 bytes --]

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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* linux-next: manual merge of the block tree with the vfs-brauner tree
@ 2024-06-28 17:59 Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2024-06-28 17:59 UTC (permalink / raw)
  To: Jens Axboe
  Cc: Christian Brauner, John Garry, Linux Kernel Mailing List,
	Linux Next Mailing List, Prasad Singamsetty

[-- Attachment #1: Type: text/plain, Size: 1392 bytes --]

Hi all,

Today's linux-next merge of the block tree got a conflict in:

  include/linux/fs.h

between commit:

  1bc6d4452d5c9 ("fs: new helper vfs_empty_path()")

from the vfs-brauner tree and commit:

  c34fc6f26ab86 ("fs: Initial atomic write support")

from the block tree.

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 include/linux/fs.h
index dc9f9c4b2572d,db26b4a70c628..0000000000000
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@@ -3626,21 -3627,6 +3640,23 @@@ extern int vfs_fadvise(struct file *fil
  extern int generic_fadvise(struct file *file, loff_t offset, loff_t len,
  			   int advice);
  
 +static inline bool vfs_empty_path(int dfd, const char __user *path)
 +{
 +	char c;
 +
 +	if (dfd < 0)
 +		return false;
 +
 +	/* We now allow NULL to be used for empty path. */
 +	if (!path)
 +		return true;
 +
 +	if (unlikely(get_user(c, path)))
 +		return false;
 +
 +	return !c;
 +}
 +
+ bool generic_atomic_write_valid(struct iov_iter *iter, loff_t pos);
+ 
  #endif /* _LINUX_FS_H */

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: linux-next: manual merge of the block tree with the vfs-brauner tree
  2024-06-28 17:59 linux-next: manual merge of the block tree with the vfs-brauner tree Mark Brown
@ 2024-06-29 10:05 ` Christian Brauner
  2024-06-29 14:28   ` Jens Axboe
  0 siblings, 1 reply; 10+ messages in thread
From: Christian Brauner @ 2024-06-29 10:05 UTC (permalink / raw)
  To: Mark Brown, Jens Axboe
  Cc: John Garry, Linux Kernel Mailing List, Linux Next Mailing List,
	Mateusz Guzik, Prasad Singamsetty

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



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: linux-next: manual merge of the block tree with the vfs-brauner tree
  2024-06-29 10:05 ` Christian Brauner
@ 2024-06-29 14:28   ` Jens Axboe
  0 siblings, 0 replies; 10+ messages in thread
From: Jens Axboe @ 2024-06-29 14:28 UTC (permalink / raw)
  To: Christian Brauner, Mark Brown
  Cc: John Garry, Linux Kernel Mailing List, Linux Next Mailing List,
	Mateusz Guzik, Prasad Singamsetty

On 6/29/24 4:05 AM, Christian Brauner wrote:
> 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?

It's pretty far down in my tree at this point, so I think we'll just
have to live with this conflict. At least it's not a complicated one to
resolve.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-06-29 14:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28 17:59 linux-next: manual merge of the block tree with the vfs-brauner tree Mark Brown
2024-06-29 10:05 ` Christian Brauner
2024-06-29 14:28   ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
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

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).