[lkml]   [2000]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] inode dirty blocks

On Mon, 4 Dec 2000, Linus Torvalds wrote:

> On Tue, 5 Dec 2000, Andrew Morton wrote:
> >
> > - test12-pre4
> > - aviro bforget patch
> Is the bforget patch really needed?
> If clear_inode() gets rid of dirty buffers, I don't see how new dirty
> buffers can magically appear. I may have missed part of the discussion on
> all this.

Well, to start with you don't want random bh's floating around on the
inode's list. With the current code truncate()+fsync() can send a lot
of already freed stuff to disk. Even though we can survive that (making
clear_inode() to get rid of the list will save you from corruption)...
it doesn't look like a good idea.

BTW, in the current form clear_inode() doesn't get rid of the dirty
buffers. It misses the pages that became anonymous and it misses the
metadata that became freed. We can do that, but I'ld rather avoid
leaving these buffer_heads on the inode's list - stuff that got freed
has no business to be accessible from in-core inode.

> I think that the second patch from Al (the inode dirty meta-data) is the
> _real_ fix, and I don't see why the bforget changes should matter.

We can survive without them (modulo patch to clear_inode()), but...
BTW, there is another reason why we want to have separate function
for freeing the stuff: we may want to mark them clean. If they are
already under IO it will do nothing, but if they are merely dirty...

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:51    [W:0.114 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site