lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 3 Apr 2022 21:52:02 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     "Yuezhang.Mo@...y.com" <Yuezhang.Mo@...y.com>
Cc:     Namjae Jeon <linkinjeon@...nel.org>,
        "sj1557.seo@...sung.com" <sj1557.seo@...sung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "Andy.Wu@...y.com" <Andy.Wu@...y.com>,
        "Wataru.Aoyama@...y.com" <Wataru.Aoyama@...y.com>,
        "axboe@...nel.dk" <axboe@...nel.dk>,
        Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH v2 1/2] block: add sync_blockdev_range()

On Sat, Apr 02, 2022 at 03:28:00AM +0000, Yuezhang.Mo@...y.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@...y.com>
> Suggested-by: Christoph Hellwig <hch@...radead.org>
> Reviewed-by: Andy Wu <Andy.Wu@...y.com>
> Reviewed-by: Aoyama Wataru <wataru.aoyama@...y.com>
> cc: Jens Axboe <axboe@...nel.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ