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/
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 +-
>
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
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.
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(+
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
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/
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
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
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
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
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
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
--
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
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
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
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
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
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
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
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
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)
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
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
24 matches
Mail list logo