1
linux/fs/nilfs2
Ryusuke Konishi 1f28fcd925 nilfs2: fix missing zero-fill initialization of btree node cache
This will fix file system corruption which infrequently happens after
mount.  The problem was reported from users with the title "[NILFS
users] Fail to mount NILFS." (Message-ID:
<200908211918.34720.yuri@itinteg.net>), and so forth.  I've also
experienced the corruption multiple times on kernel 2.6.30 and 2.6.31.

The problem turned out to be caused due to discordance between
mapping->nrpages of a btree node cache and the actual number of pages
hung on the cache; if the mapping->nrpages becomes zero even as it has
pages, truncate_inode_pages() returns without doing anything.  Usually
this is harmless except it may cause page leak, but garbage collection
fairly infrequently sees a stale page remained in the btree node cache
of DAT (i.e. disk address translation file of nilfs), and induces the
corruption.

I identified a missing initialization in btree node caches was the
root cause.  This corrects the bug.

I've tested this for kernel 2.6.30 and 2.6.31.

Reported-by: Yuri Chislov <yuri@itinteg.net>
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Cc: stable <stable@kernel.org>
2009-09-29 20:12:56 +09:00
..
alloc.c nilfs2: persistent object allocator 2009-04-07 08:31:13 -07:00
alloc.h nilfs2: persistent object allocator 2009-04-07 08:31:13 -07:00
bmap_union.h
bmap.c nilfs2: convert nilfs_bmap_lookup to an inline function 2009-09-14 18:27:16 +09:00
bmap.h nilfs2: convert nilfs_bmap_lookup to an inline function 2009-09-14 18:27:16 +09:00
btnode.c nilfs2: fix missing zero-fill initialization of btree node cache 2009-09-29 20:12:56 +09:00
btnode.h nilfs2: use device's backing_dev_info for btree node caches 2009-06-10 23:41:12 +09:00
btree.c nilfs2: allow btree code to directly call dat operations 2009-09-14 18:27:16 +09:00
btree.h nilfs2: remove nilfs_btree_operations from btree mapping 2009-06-10 23:41:11 +09:00
cpfile.c nilfs2: add more check routines in mount process 2009-09-14 18:27:14 +09:00
cpfile.h nilfs2: remove individual gfp constants for each metadata file 2009-09-14 18:27:15 +09:00
dat.c nilfs2: add update functions of virtual block address to dat 2009-09-14 18:27:15 +09:00
dat.h nilfs2: add update functions of virtual block address to dat 2009-09-14 18:27:15 +09:00
dir.c headers: smp_lock.h redux 2009-07-12 12:22:34 -07:00
direct.c nilfs2: allow btree code to directly call dat operations 2009-09-14 18:27:16 +09:00
direct.h nilfs2: remove nilfs_direct_operations from direct mapping 2009-06-10 23:41:11 +09:00
file.c const: mark struct vm_struct_operations 2009-09-27 11:39:25 -07:00
gcdat.c nilfs2: another dat for garbage collection 2009-04-07 08:31:16 -07:00
gcinode.c const: mark remaining address_space_operations const 2009-09-22 07:17:24 -07:00
ifile.c nilfs2: inode map file 2009-04-07 08:31:14 -07:00
ifile.h nilfs2: remove individual gfp constants for each metadata file 2009-09-14 18:27:15 +09:00
inode.c const: mark remaining address_space_operations const 2009-09-22 07:17:24 -07:00
ioctl.c nilfs2: shorten freeze period due to GC in write operation v3 2009-09-14 18:27:15 +09:00
Kconfig fs/Kconfig: move nilfs2 outside misc filesystems 2009-09-14 18:27:16 +09:00
Makefile nilfs2: update makefile and Kconfig 2009-04-07 08:31:16 -07:00
mdt.c const: mark remaining inode_operations as const 2009-09-22 07:17:24 -07:00
mdt.h nilfs2: remove individual gfp constants for each metadata file 2009-09-14 18:27:15 +09:00
namei.c const: mark remaining inode_operations as const 2009-09-22 07:17:24 -07:00
nilfs.h const: mark remaining inode_operations as const 2009-09-22 07:17:24 -07:00
page.c nilfs2: ensure to clear dirty state when deleting metadata file block 2009-05-10 17:04:42 +09:00
page.h nilfs2: buffer and page operations 2009-04-07 08:31:13 -07:00
recovery.c nilfs2: fix format string compile warning (ino_t) 2009-09-14 18:27:13 +09:00
sb.h nilfs2: simplify remaining sget() use 2009-06-11 21:36:18 -04:00
segbuf.c nilfs2: use GFP_NOIO for bio_alloc instead of GFP_NOWAIT 2009-09-14 18:27:14 +09:00
segbuf.h nilfs2: simplify handling of active state of segments 2009-04-07 08:31:20 -07:00
segment.c nilfs2: stop using periodic write_super callback 2009-09-14 18:27:14 +09:00
segment.h nilfs2: remove header file for segment list operations 2009-06-10 23:41:09 +09:00
sufile.c nilfs2: allow future expansion of metadata read out via get info ioctl 2009-06-10 23:41:11 +09:00
sufile.h nilfs2: remove individual gfp constants for each metadata file 2009-09-14 18:27:15 +09:00
super.c const: mark remaining export_operations const 2009-09-22 07:17:24 -07:00
the_nilfs.c fs: remove bdev->bd_inode_backing_dev_info 2009-09-16 15:16:18 +02:00
the_nilfs.h nilfs2: shorten freeze period due to GC in write operation v3 2009-09-14 18:27:15 +09:00