* sb_bread & bforget
@ 2006-02-13 23:03 Joshua Hudson
2006-02-14 4:09 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Joshua Hudson @ 2006-02-13 23:03 UTC (permalink / raw)
To: linux-kernel
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?
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: sb_bread & bforget
2006-02-13 23:03 sb_bread & bforget Joshua Hudson
@ 2006-02-14 4:09 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2006-02-14 4:09 UTC (permalink / raw)
To: Joshua Hudson; +Cc: linux-kernel
Joshua Hudson <joshudson@gmail.com> 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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-02-14 4:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 23:03 sb_bread & bforget Joshua Hudson
2006-02-14 4:09 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®