ocfs2: add functions to add and remove inode in orphan dir
Add functions to add inode to orphan dir and remove inode in orphan dir. Here we do not call ocfs2_prepare_orphan_dir and ocfs2_orphan_add directly. Because append O_DIRECT will add inode to orphan two and may result in more than one orphan entry for the same inode. [akpm@linux-foundation.org: avoid dynamic stack allocation] Signed-off-by: Joseph Qi <joseph.qi@huawei.com> Cc: Weiwei Wang <wangww631@huawei.com> Cc: Junxiao Bi <junxiao.bi@oracle.com> Cc: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Cc: Xuejiufei <xuejiufei@huawei.com> Cc: alex chen <alex.chen@huawei.com> Cc: Fengguang Wu <fengguang.wu@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
026749a86e
commit
06ee5c75b5
@@ -229,6 +229,8 @@
|
||||
#define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */
|
||||
#define OCFS2_DEALLOC_FL (0x00000800) /* Truncate log */
|
||||
#define OCFS2_QUOTA_FL (0x00001000) /* Quota file */
|
||||
#define OCFS2_DIO_ORPHANED_FL (0X00002000) /* On the orphan list especially
|
||||
* for dio */
|
||||
|
||||
/*
|
||||
* Flags on ocfs2_dinode.i_dyn_features
|
||||
@@ -729,7 +731,9 @@ struct ocfs2_dinode {
|
||||
inode belongs to. Only valid
|
||||
if allocated from a
|
||||
discontiguous block group */
|
||||
/*A0*/ __le64 i_reserved2[3];
|
||||
/*A0*/ __le16 i_dio_orphaned_slot; /* only used for append dio write */
|
||||
__le16 i_reserved1[3];
|
||||
__le64 i_reserved2[2];
|
||||
/*B8*/ union {
|
||||
__le64 i_pad1; /* Generic way to refer to this
|
||||
64bit union */
|
||||
|
Reference in New Issue
Block a user