2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00
linux-next/fs/ufs
Evgeniy Dushistov d63b70902b [PATCH] fix garbage instead of zeroes in UFS
Looks like this is the problem, which point Al Viro some time ago:

ufs's get_block callback allocates 16k of disk at a time, and links that
entire 16k into the file's metadata.  But because get_block is called for only
a single buffer_head (a 2k buffer_head in this case?) we are only able to tell
the VFS that this 2k is buffer_new().

So when ufs_getfrag_block() is later called to map some more data in the file,
and when that data resides within the remaining 14k of this fragment,
ufs_getfrag_block() will incorrectly return a !buffer_new() buffer_head.

I don't see _right_ way to do nullification of whole block, if use inode
page cache, some pages may be outside of inode limits (inode size), and
will be lost; if use blockdev page cache it is possible to zero real data,
if later inode page cache will be used.

The simpliest way, as can I see usage of block device page cache, but not only
mark dirty, but also sync it during "nullification".  I use my simple tests
collection, which I used for check that create,open,write,read,close works on
ufs, and I see that this patch makes ufs code 18% slower then before.

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2007-01-05 23:55:29 -08:00
..
balloc.c [PATCH] fix garbage instead of zeroes in UFS 2007-01-05 23:55:29 -08:00
cylinder.c [PATCH] ufs: easy debug 2006-06-25 10:01:03 -07:00
dir.c [PATCH] struct path: convert ufs 2006-12-08 08:28:50 -08:00
file.c [PATCH] Streamline generic_file_* interfaces and filemap cleanups 2006-10-01 00:39:28 -07:00
ialloc.c [PATCH] inode-diet: Eliminate i_blksize from the inode structure 2006-09-27 08:26:18 -07:00
inode.c [PATCH] fix garbage instead of zeroes in UFS 2007-01-05 23:55:29 -08:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namei.c [PATCH] r/o bind mounts: unlink: monitor i_nlink 2006-10-01 00:39:30 -07:00
super.c [PATCH] fs/*: trivial vsnprintf() conversion 2006-12-07 08:39:35 -08: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: truncate correction 2006-08-27 11:01:31 -07:00
util.c [PATCH] ufs endianness annotations 2006-10-10 16:15:34 -07:00
util.h [PATCH] fs: ufs add missing bracket 2006-12-07 08:39:44 -08:00