]> git.baikalelectronics.ru Git - kernel.git/commit
nilfs2: fix regression of garbage collection ioctl
authorRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Thu, 16 Dec 2010 00:57:57 +0000 (09:57 +0900)
committerRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Thu, 16 Dec 2010 05:35:18 +0000 (14:35 +0900)
commit393d8de0172460e2174a905ffee0fdb364623748
tree93934dcf6b7709ed40e861d3b586f2c3f37f4151
parent0fcc65036b61bbecc5bbbddd6fc03ff74419029a
nilfs2: fix regression of garbage collection ioctl

On 2.6.37-rc1, garbage collection ioctl of nilfs was broken due to the
commit a5f0db2c54659535 ("nilfs2: remove own inode hash used for GC"),
and leading to filesystem corruption.

The patch doesn't queue gc-inodes for log writer if they are reused
through the vfs inode cache.  Here, gc-inode is the inode which
buffers blocks to be relocated on GC.  That patch queues gc-inodes in
nilfs_init_gcinode() function, but this function is not called when
they don't have I_NEW flag.  Thus, some of live blocks are wrongly
overrode without being moved to new logs.

This resolves the problem by moving the gc-inode queueing to an outer
function to ensure it's done right.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
fs/nilfs2/gcinode.c
fs/nilfs2/ioctl.c