diff options
author | Tao Ma <tao.ma@oracle.com> | 2010-01-19 22:31:11 -0500 |
---|---|---|
committer | Joel Becker <joel.becker@oracle.com> | 2010-01-25 22:20:45 -0500 |
commit | 1097df3ffe855eb1476496fa5394816fb197af05 (patch) | |
tree | 89f1c5be559743e6dd768107a2b1afc329895e09 /fs | |
parent | 1dd473fdf1d8a7531e0955480cd129f9c1e8b8a3 (diff) |
ocfs2: Sync max_inline_data_with_xattr from tools.
In ocfs2-tools, we have added ocfs2_max_inline_data_with_xattr,
so add it in the kernel's ocfs2_fs.h.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/ocfs2/ocfs2_fs.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/ocfs2/ocfs2_fs.h b/fs/ocfs2/ocfs2_fs.h index 1a1a679e51b5..7638a38c32bc 100644 --- a/fs/ocfs2/ocfs2_fs.h +++ b/fs/ocfs2/ocfs2_fs.h | |||
@@ -1417,9 +1417,16 @@ static inline int ocfs2_fast_symlink_chars(int blocksize) | |||
1417 | return blocksize - offsetof(struct ocfs2_dinode, id2.i_symlink); | 1417 | return blocksize - offsetof(struct ocfs2_dinode, id2.i_symlink); |
1418 | } | 1418 | } |
1419 | 1419 | ||
1420 | static inline int ocfs2_max_inline_data(int blocksize) | 1420 | static inline int ocfs2_max_inline_data_with_xattr(int blocksize, |
1421 | struct ocfs2_dinode *di) | ||
1421 | { | 1422 | { |
1422 | return blocksize - offsetof(struct ocfs2_dinode, id2.i_data.id_data); | 1423 | if (di && (di->i_dyn_features & OCFS2_INLINE_XATTR_FL)) |
1424 | return blocksize - | ||
1425 | offsetof(struct ocfs2_dinode, id2.i_data.id_data) - | ||
1426 | di->i_xattr_inline_size; | ||
1427 | else | ||
1428 | return blocksize - | ||
1429 | offsetof(struct ocfs2_dinode, id2.i_data.id_data); | ||
1423 | } | 1430 | } |
1424 | 1431 | ||
1425 | static inline int ocfs2_extent_recs_per_inode(int blocksize) | 1432 | static inline int ocfs2_extent_recs_per_inode(int blocksize) |