lkml.org 
[lkml]   [2002]   [Jun]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 12/16] fix race between writeback and unlink


On Mon, 3 Jun 2002, Andrew Morton wrote:
>
> But why does ext2_put_inode() even exist? We're already throwing
> away the prealloc window in ext2_release_file? I guess for
> shared mappings over spares files: if all file handles have
> closed off, we still need to make allocations against that
> inode, yes?

Shared mappings still hold the "struct file" open (you have
"vma->vm_file->f_dentry->d_inode"), so you still have the file handle
while the mapping is open.

I assume that the reason is that _any_ block allocation will trigegr
pre-alloc, which means that we have preallocation for things like
directories etc too - which really do not have a "struct file" associated
with them.

Whether that is really worth it is unclear, but it also means that ext2
doesn't have to pass down the "struct file" to the lower levels at all, as
it keeps all pre-alloc stuff in the inode.

On the whole it's probably a mistake, but my point is that it's likely a
mistake that is hard to fix. Which is why I didn't even try to fix ext2 to
not use "put_inode" and the prealloc dropping there..

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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