diff options
author | Joseph Qi <joseph.qi@huawei.com> | 2015-02-16 18:59:54 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-16 20:56:04 -0500 |
commit | 06ee5c75b57564435933fc0ffa72dc18a2fda0e7 (patch) | |
tree | 2c59e53d305f97f8d1f15bff1e1903d85d251f1d /fs/ocfs2/ocfs2_fs.h | |
parent | 026749a86ebff68cb2accdcd29872d36ac148920 (diff) |
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>
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r-- | fs/ocfs2/ocfs2_fs.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h index 938387a10d5d..cf4fa43af78e 100644 --- a/fs/ocfs2/ocfs2_fs.h +++ b/fs/ocfs2/ocfs2_fs.h | |||
@@ -229,6 +229,8 @@ | |||
229 | #define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */ | 229 | #define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */ |
230 | #define OCFS2_DEALLOC_FL (0x00000800) /* Truncate log */ | 230 | #define OCFS2_DEALLOC_FL (0x00000800) /* Truncate log */ |
231 | #define OCFS2_QUOTA_FL (0x00001000) /* Quota file */ | 231 | #define OCFS2_QUOTA_FL (0x00001000) /* Quota file */ |
232 | #define OCFS2_DIO_ORPHANED_FL (0X00002000) /* On the orphan list especially | ||
233 | * for dio */ | ||
232 | 234 | ||
233 | /* | 235 | /* |
234 | * Flags on ocfs2_dinode.i_dyn_features | 236 | * Flags on ocfs2_dinode.i_dyn_features |
@@ -729,7 +731,9 @@ struct ocfs2_dinode { | |||
729 | inode belongs to. Only valid | 731 | inode belongs to. Only valid |
730 | if allocated from a | 732 | if allocated from a |
731 | discontiguous block group */ | 733 | discontiguous block group */ |
732 | /*A0*/ __le64 i_reserved2[3]; | 734 | /*A0*/ __le16 i_dio_orphaned_slot; /* only used for append dio write */ |
735 | __le16 i_reserved1[3]; | ||
736 | __le64 i_reserved2[2]; | ||
733 | /*B8*/ union { | 737 | /*B8*/ union { |
734 | __le64 i_pad1; /* Generic way to refer to this | 738 | __le64 i_pad1; /* Generic way to refer to this |
735 | 64bit union */ | 739 | 64bit union */ |