RE: [PATCH v2 1/2] block: add sync_blockdev_range()

From: Yuezhang.Mo@xxxxxxxx
Date: Thu Apr 07 2022 - 22:31:36 EST


> From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> > > 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.

Thank you for your explanation.
I will update the patch to remove the check and the !CONFIG_BLOCK stub.