]> git.baikalelectronics.ru Git - kernel.git/commit
udf: Perform preallocation only for regular files
authorJan Kara <jack@suse.cz>
Thu, 16 Jul 2009 16:02:25 +0000 (18:02 +0200)
committerJan Kara <jack@suse.cz>
Mon, 14 Sep 2009 17:13:00 +0000 (19:13 +0200)
commit457b92c213de9254ab6dd95fdb6cc407a05e06c1
tree902b49848f8d2033c24ad78ac5d391bf092091ef
parent8ae7281df96cf7ce19d95cf9bb72cc8577b9ac7c
udf: Perform preallocation only for regular files

So far we preallocated blocks also for directories but that brings a
problem, when to get rid of preallocated blocks we don't need. So far
we removed them in udf_clear_inode() which has a disadvantage that
1) blocks are unavailable long after writing to a directory finished
   and thus one can get out of space unnecessarily early
2) releasing blocks from udf_clear_inode is problematic because VFS
   does not expect us to redirty inode there and it also slows down
   memory reclaim.

So preallocate blocks only for regular files where we can drop preallocation
in udf_release_file.

Signed-off-by: Jan Kara <jack@suse.cz>
fs/udf/inode.c