lkml.org 
[lkml]   [2022]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v2 1/2] block: add sync_blockdev_range()
On Sat, Apr 02, 2022 at 03:28:00AM +0000, Yuezhang.Mo@sony.com wrote:
> sync_blockdev_range() is to support syncing multiple sectors
> with as few block device requests as possible, it is helpful
> to make the block device to give full play to its performance.
>
> Signed-off-by: Yuezhang Mo <Yuezhang.Mo@sony.com>
> Suggested-by: Christoph Hellwig <hch@infradead.org>
> Reviewed-by: Andy Wu <Andy.Wu@sony.com>
> Reviewed-by: Aoyama Wataru <wataru.aoyama@sony.com>
> cc: Jens Axboe <axboe@kernel.dk>
> ---
> block/bdev.c | 10 ++++++++++
> include/linux/blkdev.h | 6 ++++++
> 2 files changed, 16 insertions(+)
>
> diff --git a/block/bdev.c b/block/bdev.c
> index 102837a37051..57043e4f3322 100644
> --- a/block/bdev.c
> +++ b/block/bdev.c
> @@ -200,6 +200,16 @@ int sync_blockdev(struct block_device *bdev)
> }
> EXPORT_SYMBOL(sync_blockdev);
>
> +int sync_blockdev_range(struct block_device *bdev, loff_t lstart, loff_t lend)
> +{
> + if (!bdev)
> + return 0;

This check isn't really needed, and I don't think we need a
!CONFIG_BLOCK stub for this either.

\
 
 \ /
  Last update: 2022-04-04 06:54    [W:0.085 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site