Skip to contentSkip to conversation

clear uptodate in 2.6's discard_buffer()?

DISCUSSION Eric Sandeen 1 participant 1 message Sep 12, 2005 VFS

lore
Share & tools
lore
#0 lore raw

I was tracking down a problem in xfs, which led me to discover that discard_buffer(), in my case called when truncating a file, does not clear the Uptodate flag on the bh.

It looks like clearing Uptodate was removed fairly specifically in the 2.6 tree, long ago, as part of a much larger changeset:

http://linux.bkbits.net:8080/linux-2.6/[email protected]?nav=index.html|src/|src/fs|related/fs/buffer.c

At first glance it seems odd to me that we would clear dirty, mapped, req, new, and delay flags, and also NULL out the b_bdev, but leave buffers marked as uptodate.

Is there a reason to leave the uptodate flag, or is this an oversight?

Thanks,

-Eric