Re: 2.4.11-pre2 fs/buffer.c: invalidate: busy buffer

Neil Brown
2001-10-03T06:54:34Z

On Wednesday October 3, adilger@turbolabs.com wrote:
> On Oct 03, 2001 00:21 -0400, Alexander Viro wrote:
> > AFAICS, md.c also doesn't play nice with buffe cache.
snip
> >
snip
>
> Three possibilities:
> 1) Save the blocksize and restore it afterwards (ugly, not 100% fix)
> 2) Do I/O in the current blocksize, which adds slight complication to
> this function, but not too much (loop on the number of blocks to
> write, normally only one). I don't know what impact this has
> on superblock consistency, but in theory none because you can't
> guarantee larger than single-sector I/O anyways, although there
> _may_ be a slightly increased chance of not getting a bh in OOM.
> Compiled but untested patch below. I had also looked at the read
> path, but it is only used for new disks so no harm in setting blocksize.
> 3) Rewrite to do I/O directly via pagecache?

4) Rewrite to do I/O directly via generic_make_request just like it
does for all other I/O to underlying devices.
It is on my (mental) todo list, but doesn't have a high priority.
At the same time, it would be good to get write_disk_sb to notice
if the write failed.....

NeilBrown