Re: [PATCH 02/17] block: add a bdev_rw_virt helper

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 4/22/25 23:26, Christoph Hellwig wrote:
> Add a helper to perform synchronous I/O on a kernel direct map range.
> Currently this is implemented in various places in usually not very
> efficient ways, so provide a generic helper instead.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  block/bio.c         | 30 ++++++++++++++++++++++++++++++
>  include/linux/bio.h |  5 ++++-
>  2 files changed, 34 insertions(+), 1 deletion(-)
> 
> diff --git a/block/bio.c b/block/bio.c
> index 4e6c85a33d74..a6a867a432cf 100644
> --- a/block/bio.c
> +++ b/block/bio.c
> @@ -1301,6 +1301,36 @@ int submit_bio_wait(struct bio *bio)
>  }
>  EXPORT_SYMBOL(submit_bio_wait);
>  
> +/**
> + * bdev_rw_virt - synchronously read into / write from kernel mapping
> + * @bdev:	block device to access
> + * @sector:	sector to accasse

s/accasse/access

> + * @data:	data to read/write
> + * @len:	length to read/write

Maybe "length in bytes to read/write", to avoid any confusion with sector unit.

With that, feel free to add:

Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>

-- 
Damien Le Moal
Western Digital Research




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux