linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>
Cc: Namjae Jeon <linkinjeon@kernel.org>,
	"sj1557.seo@samsung.com" <sj1557.seo@samsung.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"Andy.Wu@sony.com" <Andy.Wu@sony.com>,
	"Wataru.Aoyama@sony.com" <Wataru.Aoyama@sony.com>,
	"axboe@kernel.dk" <axboe@kernel.dk>,
	Christoph Hellwig <hch@infradead.org>
Subject: Re: [PATCH v2 1/2] block: add sync_blockdev_range()
Date: Sun, 3 Apr 2022 21:52:02 -0700	[thread overview]
Message-ID: <Ykp5cmdP3nV8XTFj@infradead.org> (raw)
In-Reply-To: <HK2PR04MB38914CCBCA891B82060B659281E39@HK2PR04MB3891.apcprd04.prod.outlook.com>

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.

  reply	other threads:[~2022-04-04  4:52 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-02  3:28 [PATCH v2 1/2] block: add sync_blockdev_range() Yuezhang.Mo
2022-04-04  4:52 ` Christoph Hellwig [this message]
2022-04-06 10:21   ` Yuezhang.Mo
2022-04-07  8:11     ` Christoph Hellwig
2022-04-08  2:29       ` Yuezhang.Mo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Ykp5cmdP3nV8XTFj@infradead.org \
    --to=hch@infradead.org \
    --cc=Andy.Wu@sony.com \
    --cc=Wataru.Aoyama@sony.com \
    --cc=Yuezhang.Mo@sony.com \
    --cc=axboe@kernel.dk \
    --cc=linkinjeon@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj1557.seo@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).