Christoph Hellwig wrote: > On Thu, Nov 01, 2007 at 05:19:35PM +1100, Lachlan McIlroy wrote: >> Read-ahead of an inode cluster will set XBF_READ_AHEAD in the buffer. >> If we don't remove the flag it will still be set when we flush the >> buffer back to disk. Not sure if leaving this flag set causes any >> serious problems but it does trigger an assert. > > It might be better if such temporary flags never actually make it to > bp->b_flags. Just pass down a flags variable all the way to > _xfs_buf_ioapply and keep the flags just for this I/O separate from > those that are permanent and in bp->b_flags. > Okay, I've done that (new patch attached). It's certainly not as clean as the last patch.