From: Christoph Hellwig <hch@infradead.org>
To: "Yuezhang.Mo@sony.com" <Yuezhang.Mo@sony.com>
Cc: Christoph Hellwig <hch@infradead.org>,
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>
Subject: Re: [PATCH v2 1/2] block: add sync_blockdev_range()
Date: Thu, 7 Apr 2022 01:11:09 -0700 [thread overview]
Message-ID: <Yk6cnX5eHrJYrVXQ@infradead.org> (raw)
In-Reply-To: <HK2PR04MB38910663E1666A0C74A5618781E79@HK2PR04MB3891.apcprd04.prod.outlook.com>
On Wed, Apr 06, 2022 at 10:21:15AM +0000, Yuezhang.Mo@sony.com wrote:
> > From: Christoph Hellwig <hch@infradead.org>
> > > --- 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.
>
> sync_blockdev() and related helpers have this check and a !CONFIG_BLOCK stub.
> I would like to understand the background of your comment, could you explain a little more?
sync_blockdev and sync_blockdev do that because they are unconditionally
called from sync_filesystem, and not just from block-dependent code.
Eventually that should be cleaned up as well, but please don't add it to
new code.
next prev parent reply other threads:[~2022-04-07 8:11 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
2022-04-06 10:21 ` Yuezhang.Mo
2022-04-07 8:11 ` Christoph Hellwig [this message]
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=Yk6cnX5eHrJYrVXQ@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).