linux/fs/ufs
Evgeniy Dushistov 6ef4d6bf86 [PATCH] ufs: change block number on the fly
First of all some necessary notes about UFS by it self: To avoid waste of disk
space the tail of file consists not from blocks (which is ordinary big enough,
16K usually), it consists from fragments(which is ordinary 2K).  When file is
growing its tail occupy 1 fragment, 2 fragments...  At some stage decision to
allocate whole block is made and all fragments are moved to one block.

How this situation was handled before:

  ufs_prepare_write
  ->block_prepare_write
    ->ufs_getfrag_block
      ->...
        ->ufs_new_fragments:

	bh = sb_bread
	bh->b_blocknr = result + i;
	mark_buffer_dirty (bh);

This is wrong solution, because:

- it didn't take into consideration that there is another cache: "inode page
  cache"

- because of sb_getblk uses not b_blocknr, (it uses page->index) to find
  certain block, this breaks sb_getblk.

How this situation is handled now: we go though all "page inode cache", if
there are no such page in cache we load it into cache, and change b_blocknr.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-25 10:01:01 -07:00
..
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
balloc.c [PATCH] ufs: change block number on the fly 2006-06-25 10:01:01 -07:00
cylinder.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
dir.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
file.c [PATCH] Make most file operations structs in fs/ const 2006-03-28 09:16:06 -08:00
ialloc.c [PATCH] ufs cleanup 2006-01-14 10:27:32 -08:00
inode.c [PATCH] ufs: change block number on the fly 2006-06-25 10:01:01 -07:00
namei.c [PATCH] ufs: switch to inode_inc_count, inode_dec_count 2006-03-23 07:38:16 -08:00
super.c [PATCH] VFS: Permit filesystem to perform statfs with a known root dentry 2006-06-23 07:42:45 -07:00
swab.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
symlink.c [PATCH] Fix up symlink function pointers 2005-08-19 18:08:21 -07:00
truncate.c [PATCH] ufs: ufs_trunc_indirect: infinite cycle 2006-06-25 10:01:01 -07:00
util.c [PATCH] ufs: ufs_trunc_indirect: infinite cycle 2006-06-25 10:01:01 -07:00
util.h [PATCH] ufs: ufs_trunc_indirect: infinite cycle 2006-06-25 10:01:01 -07:00