alistair23-linux/fs/ufs
Evgeniy Dushistov 4b25a37e20 [PATCH] ufs: zeroize the rest of block in truncate
This patch fix behaviour in such test scenario:

  lseek(fd, BIG_OFFSET)
  write(fd, buf, sizeof(buf))
  truncate(BIG_OFFSET)
  truncate(BIG_OFFSET + sizeof(buf))
  read(fd, buf...)

Because of if file big enough(BIG_OFFSET) we start allocate space by block,
ordinary block size > page size, so we should zeroize the rest of block in
truncate(except last framgnet, about which VFS should care), to not get
garbage, when we extend file.

Also patch corrects conversion from pointer to block to physical block number,
this helps in case of not common used UFS types.

And add to debug output inode number.

Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-03-16 19:25:03 -07:00
..
balloc.c [PATCH] ufs: zeroize the rest of block in truncate 2007-03-16 19:25:03 -07:00
cylinder.c
dir.c [PATCH] remove many unneeded #includes of sched.h 2007-02-14 08:09:54 -08:00
file.c
ialloc.c [PATCH] ufs2: more correct work with time 2007-03-16 19:25:03 -07:00
inode.c [PATCH] ufs: zeroize the rest of block in truncate 2007-03-16 19:25:03 -07:00
Makefile
namei.c [PATCH] mark struct inode_operations const 3 2007-02-12 09:48:46 -08:00
super.c [PATCH] Mark struct super_operations const 2007-02-12 09:48:47 -08:00
swab.h
symlink.c [PATCH] mark struct inode_operations const 3 2007-02-12 09:48:46 -08:00
truncate.c [PATCH] ufs: zeroize the rest of block in truncate 2007-03-16 19:25:03 -07:00
util.c
util.h [PATCH] ufs2 write: block allocation update 2007-02-12 09:48:40 -08:00