Hi,
在 2023/12/12 21:14, Christoph Hellwig 写道:
On Mon, Dec 11, 2023 at 05:52:17PM +0100, Jan Kara wrote:
+void bdev_associated_mapping(struct block_device *bdev,
+struct address_space *mapping)
+{
+ mapping->host = bdev->bd_inode;
+}
Here I'm not sure - is
Hi,
在 2023/12/12 21:16, Christoph Hellwig 写道:
+void invalidate_bdev_range(struct block_device *bdev, pgoff_t start,
+ pgoff_t end)
+{
+ invalidate_mapping_pages(bdev->bd_inode->i_mapping, start, end);
+}
+EXPORT_SYMBOL_GPL(invalidate_bdev_range);
Can we have
> +void invalidate_bdev_range(struct block_device *bdev, pgoff_t start,
> +pgoff_t end)
> +{
> + invalidate_mapping_pages(bdev->bd_inode->i_mapping, start, end);
> +}
> +EXPORT_SYMBOL_GPL(invalidate_bdev_range);
Can we have kerneldoc comments for the new helpers
On Mon, Dec 11, 2023 at 05:52:17PM +0100, Jan Kara wrote:
> > +void bdev_associated_mapping(struct block_device *bdev,
> > +struct address_space *mapping)
> > +{
> > + mapping->host = bdev->bd_inode;
> > +}
>
> Here I'm not sure - is the helper really a win? It seems a
Hi,
在 2023/12/12 0:52, Jan Kara 写道:
On Mon 11-12-23 22:05:35, Yu Kuai wrote:
From: Yu Kuai
Those apis will be used for other modules, so that bd_inode won't be
accessed directly from other modules.
Signed-off-by: Yu Kuai
...
+void bdev_associated_mapping(struct block_device *bdev,
+
On Mon 11-12-23 22:05:35, Yu Kuai wrote:
> From: Yu Kuai
>
> Those apis will be used for other modules, so that bd_inode won't be
> accessed directly from other modules.
>
> Signed-off-by: Yu Kuai
...
> +void bdev_associated_mapping(struct block_device *bdev,
> +
From: Yu Kuai
Those apis will be used for other modules, so that bd_inode won't be
accessed directly from other modules.
Signed-off-by: Yu Kuai
---
block/bdev.c | 70 ++
block/blk.h| 2 --
include/linux/blkdev.h | 17 ++
3