[lkml]   [2006]   [Feb]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: sb_bread & bforget
Joshua Hudson <> wrote:
> New filesystem is using BTrees for directories. An update will touch
> multiple blocks, loaded into buffer_head structures with sb_bread.
> If update fails (only possible causes are read error & disk full), is it
> kosher to call bforget on all modified buffer_head structures, or
> does that have some unintended consequences?

It's probably wrong. bforget() will clear the dirty bit, so you'd lose
anything else which had been written to that buffer but not written back.

bforget() is used for truncate, where we know the data is being tosed away.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-02-14 05:12    [W:0.021 / U:3.776 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site