Re: [PATCH block/for-next v2 07/16] bcachefs: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
Hi, 在 2023/11/27 15:24, Kent Overstreet 写道: On Mon, Nov 27, 2023 at 04:09:47PM +0900, Damien Le Moal wrote: On 11/27/23 15:21, Yu Kuai wrote: From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/bcachefs/

Re: [PATCH block/for-next v2 07/16] bcachefs: use new helper to get inode from block_device

2023-11-26 Thread Kent Overstreet
On Mon, Nov 27, 2023 at 04:09:47PM +0900, Damien Le Moal wrote: > On 11/27/23 15:21, Yu Kuai wrote: > > From: Yu Kuai > > > > Which is more efficiency, and also prepare to remove the field > > 'bd_inode' from block_device. > > > > Signed-off-by: Yu Kuai > > --- > > fs/bcachefs/util.h | 2 +- >

Re: [PATCH block/for-next v2 01/16] block: add a new helper to get inode from block_device

2023-11-26 Thread Christoph Hellwig
On Mon, Nov 27, 2023 at 02:21:01PM +0800, Yu Kuai wrote: > From: Yu Kuai > > block_devcie is allocated from bdev_alloc() by bdev_alloc_inode(), and > currently block_device contains a pointer that point to the address of > inode, while such inode is allocated together: This is going the wrong wa

Re: [PATCH block/for-next v2 07/16] bcachefs: use new helper to get inode from block_device

2023-11-26 Thread Damien Le Moal
On 11/27/23 15:21, Yu Kuai wrote: > From: Yu Kuai > > Which is more efficiency, and also prepare to remove the field > 'bd_inode' from block_device. > > Signed-off-by: Yu Kuai > --- > fs/bcachefs/util.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/bcachefs/util.

Re: [PATCH block/for-next v2 07/16] bcachefs: use new helper to get inode from block_device

2023-11-26 Thread Kent Overstreet
On Mon, Nov 27, 2023 at 02:21:07PM +0800, Yu Kuai wrote: > From: Yu Kuai > > Which is more efficiency, and also prepare to remove the field > 'bd_inode' from block_device. > > Signed-off-by: Yu Kuai Acked-by: Kent Overstreet > --- > fs/bcachefs/util.h | 2 +- > 1 file changed, 1 insertion(+

Re: [PATCH block/for-next v2 00/16] block: remove field 'bd_inode' from block_device

2023-11-26 Thread Al Viro
On Mon, Nov 27, 2023 at 02:21:00PM +0800, Yu Kuai wrote: > From: Yu Kuai > > Changes in v2: > - split different portions into different patches, as greg k-h > suggested. > - use container_of() instead of "bdev + 1" to get the address of > bd_inode in the new helper, as grep k-h suggested. Yo

[PATCH block/for-next v2 15/16] buffer: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/buffer.c | 8 include/linux/buffer_head.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/buffer.c b/fs/

[PATCH block/for-next v2 16/16] block: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also remove the field 'bd_inode' since it's not used anymore. Signed-off-by: Yu Kuai --- block/bdev.c | 39 ++- block/blk-zoned.c | 4 ++-- block/fops.c | 4 ++-- block/genhd.c

[PATCH block/for-next v2 14/16] nilfs2: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/nilfs2/segment.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index 55e31cc903d1..d346f5c1aa

[PATCH block/for-next v2 13/16] jbd2: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/jbd2/journal.c | 3 ++- fs/jbd2/recovery.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c inde

[PATCH block/for-next v2 12/16] gfs2: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/gfs2/glock.c | 2 +- fs/gfs2/ops_fstype.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c index

[PATCH block/for-next v2 11/16] ext4: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/ext4/dir.c | 2 +- fs/ext4/ext4_jbd2.c | 2 +- fs/ext4/super.c | 8 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/ext4

[PATCH block/for-next v2 10/16] erofs: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/erofs/data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/erofs/data.c b/fs/erofs/data.c index 029c761670bf..85d490b3b53d 100644 --

[PATCH block/for-next v2 09/16] cramfs: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/cramfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cramfs/inode.c b/fs/cramfs/inode.c index 60dbfa0f8805..e9ed1e24c9e4 100

[PATCH block/for-next v2 07/16] bcachefs: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/bcachefs/util.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/bcachefs/util.h b/fs/bcachefs/util.h index 2984b57b2958..fe7ccb3a3517

[PATCH block/for-next v2 08/16] btrfs: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- fs/btrfs/disk-io.c | 6 +++--- fs/btrfs/volumes.c | 4 ++-- fs/btrfs/zoned.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/d

[PATCH block/for-next v2 05/16] s390/dasd: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- drivers/s390/block/dasd_ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/s390/block/dasd_ioctl.c b/drivers/s390/block/dasd_io

[PATCH block/for-next v2 06/16] scsicam: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- drivers/scsi/scsicam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/scsicam.c b/drivers/scsi/scsicam.c index e2c7d8ef205f..d

[PATCH block/for-next v2 03/16] bcache: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- drivers/md/bcache/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/bcache/super.c b/drivers/md/bcache/super.c index bfe168

[PATCH block/for-next v2 04/16] mtd: block2mtd: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- drivers/mtd/devices/block2mtd.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/d

[PATCH block/for-next v2 02/16] xen/blkback: use new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Which is more efficiency, and also prepare to remove the field 'bd_inode' from block_device. Signed-off-by: Yu Kuai --- drivers/block/xen-blkback/xenbus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/xen-blkback/xenbus.c b/drivers/block/xen-b

[PATCH block/for-next v2 01/16] block: add a new helper to get inode from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai block_devcie is allocated from bdev_alloc() by bdev_alloc_inode(), and currently block_device contains a pointer that point to the address of inode, while such inode is allocated together: bdev_alloc inode = new_inode() // inode is &bdev_inode->vfs_inode bdev = I_BDEV(inode)

[PATCH block/for-next v2 00/16] block: remove field 'bd_inode' from block_device

2023-11-26 Thread Yu Kuai
From: Yu Kuai Changes in v2: - split different portions into different patches, as greg k-h suggested. - use container_of() instead of "bdev + 1" to get the address of bd_inode in the new helper, as grep k-h suggested. Yu Kuai (16): block: add a new helper to get inode from block_device

Re: [PATCH -next] block: remove field 'bd_inode' from block_device

2023-11-26 Thread Yu Kuai
Hi, 在 2023/11/25 22:32, Greg KH 写道: On Sat, Nov 25, 2023 at 05:39:12PM +0800, Yu Kuai wrote: From: Yu Kuai block_devcie is allocated from bdev_alloc() by bdev_alloc_inode(), and currently block_device contains a pointer that point to the address of inode, while such inode is allocated togethe