]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
ocfs2: Create reflinked file in orphan dir.
authorTao Ma <tao.ma@oracle.com>
Tue, 18 Aug 2009 03:44:14 +0000 (11:44 +0800)
committerJoel Becker <joel.becker@oracle.com>
Wed, 23 Sep 2009 03:09:48 +0000 (20:09 -0700)
commitbc13d347574fc0a8a666bc0f4cc2b635d202e372
tree47eb9a764d3689ddd860d96f6cd80cf26a84bcc2
parent19bd341f6a6c6b314bcac55bbd906bfd3603fe9e
ocfs2: Create reflinked file in orphan dir.

reflink is a very complicated process, so it can't be integrated
into one transaction. So if the system panic in the operation, we
may leave a unfinished inode in the destication directory.

So we will try to create an inode in orphan_dir first, reflink it
to the src file and then move it to the destication file in the end.
In that way we won't be afraid of any corruption during the reflink.

This patch adds 2 functions for orphan_dir operation:
1. Create a new inode in orphand dir.
2. Move an inode to a target dir.

Note:
fsck.ocfs2 should work for us to remove the unfinished file in the
orphan_dir.

Signed-off-by: Tao Ma <tao.ma@oracle.com>
fs/ocfs2/namei.c
fs/ocfs2/namei.h