Re: [PATCH RFC v2 2/2] block: enable RWF_DONTCACHE for block devices
Tal Zussman <[email protected]>
| Newsgroups | dev.linux.lists.ntfs3,org.kernel.vger.linux-block,org.kernel.vger.linux-ext4,org.kernel.vger.linux-fsdevel,org.kernel.vger.linux-kernel,org.kernel.vger.linux-nilfs,org.kvack.linux-mm |
|---|---|
| Message-ID | <CAKha_sonOvAGriyromHtyRc-VY6Zyg3J3zd9UJPfBOAt1a522A@mail.gmail.com> |
On Thu, Feb 26, 2026 at 5:07 PM Christoph Hellwig <[email protected]> wrote: > > --- a/fs/bfs/file.c > > +++ b/fs/bfs/file.c > > @@ -177,7 +177,7 @@ static int bfs_write_begin(const struct kiocb *iocb, > > { > > int ret; > > > > - ret = block_write_begin(mapping, pos, len, foliop, bfs_get_block); > > + ret = block_write_begin(iocb, mapping, pos, len, foliop, bfs_get_block); > > Please don't change the prototoype for block_write_begin and thus > cause churn for all these legacy file systems. Add a new > block_write_begin_iocb, and use that in the block code and to implement > block_write_begin. > > And avoid the overly long line there to keep the code readable. Will do. > > Note that you also need to cover the !CONFIG_BUFFER_HEAD case. > I don't think there is a !CONFIG_BUFFER_HEAD case. The only user of block_write_begin_iocb() would be blkdev_write_begin(), which is only defined under CONFIG_BUFFER_HEAD. !CONFIG_BUFFER_HEAD paths use iomap which doesn't use it. And buffer.c is only compiled for CONFIG_BUFFER_HEAD. Unless I'm missing something? Thanks, Tal