[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH block/for-next v2 01/16] block: add a new helper to get inode from block_device
- To: Yu Kuai <yukuai1@xxxxxxxxxxxxxxx>
- From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
- Date: Sun, 26 Nov 2023 23:21:29 -0800
- Cc: hch@xxxxxxxxxxxxx, ming.lei@xxxxxxxxxx, axboe@xxxxxxxxx, roger.pau@xxxxxxxxxx, colyli@xxxxxxx, kent.overstreet@xxxxxxxxx, joern@xxxxxxxxxxxxxxx, miquel.raynal@xxxxxxxxxxx, richard@xxxxxx, vigneshr@xxxxxx, sth@xxxxxxxxxxxxx, hoeppner@xxxxxxxxxxxxx, hca@xxxxxxxxxxxxx, gor@xxxxxxxxxxxxx, agordeev@xxxxxxxxxxxxx, jejb@xxxxxxxxxxxxx, martin.petersen@xxxxxxxxxx, clm@xxxxxx, josef@xxxxxxxxxxxxxx, dsterba@xxxxxxxx, viro@xxxxxxxxxxxxxxxxxx, brauner@xxxxxxxxxx, nico@xxxxxxxxxxx, xiang@xxxxxxxxxx, chao@xxxxxxxxxx, tytso@xxxxxxx, adilger.kernel@xxxxxxxxx, agruenba@xxxxxxxxxx, jack@xxxxxxxx, konishi.ryusuke@xxxxxxxxx, dchinner@xxxxxxxxxx, linux@xxxxxxxxxxxxxx, min15.li@xxxxxxxxxxx, yukuai3@xxxxxxxxxx, dlemoal@xxxxxxxxxx, willy@xxxxxxxxxxxxx, akpm@xxxxxxxxxxxxxxxxxxxx, hare@xxxxxxx, p.raghav@xxxxxxxxxxx, linux-block@xxxxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, linux-bcache@xxxxxxxxxxxxxxx, linux-mtd@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-scsi@xxxxxxxxxxxxxxx, linux-bcachefs@xxxxxxxxxxxxxxx, linux-btrfs@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-erofs@xxxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, gfs2@xxxxxxxxxxxxxxx, linux-nilfs@xxxxxxxxxxxxxxx, yi.zhang@xxxxxxxxxx, yangerkun@xxxxxxxxxx
- Delivery-date: Mon, 27 Nov 2023 07:22:46 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Mon, Nov 27, 2023 at 02:21:01PM +0800, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@xxxxxxxxxx>
>
> 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 way. Nothing outside of core block layer code
should ever directly use the bdev inode. We've been rather sloppy
and added a lot of direct reference to it, but they really need to
go away and be replaced with well defined high level operation on
struct block_device. Once that is done we can remove the bd_inode
pointer, but replacing it with something that pokes even more deeply
into bdev internals is a bad idea.
|