Skip to content

Commit

Permalink
ocfs2: Sync max_inline_data_with_xattr from tools.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Tao Ma authored and Joel Becker committed Jan 26, 2010
1 parent 1dd473f commit 1097df3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions fs/ocfs2/ocfs2_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1417,9 +1417,16 @@ static inline int ocfs2_fast_symlink_chars(int blocksize)
return blocksize - offsetof(struct ocfs2_dinode, id2.i_symlink);
}

static inline int ocfs2_max_inline_data(int blocksize)
static inline int ocfs2_max_inline_data_with_xattr(int blocksize,
struct ocfs2_dinode *di)
{
return blocksize - offsetof(struct ocfs2_dinode, id2.i_data.id_data);
if (di && (di->i_dyn_features & OCFS2_INLINE_XATTR_FL))
return blocksize -
offsetof(struct ocfs2_dinode, id2.i_data.id_data) -
di->i_xattr_inline_size;
else
return blocksize -
offsetof(struct ocfs2_dinode, id2.i_data.id_data);
}

static inline int ocfs2_extent_recs_per_inode(int blocksize)
Expand Down

0 comments on commit 1097df3

Please sign in to comment.