summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/ocfs2_fs.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-02-17 10:00:42 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2010-02-17 10:00:42 +1100
commitec144a81ade915b5b38adedf10e84690813ed768 (patch)
treec94b53c971ab2c39e27433267318b3c7bc86ff1b /fs/ocfs2/ocfs2_fs.h
parentb919ee827e048826786fd7e889a2b04f63382fe6 (diff)
parent88626272549b94310975932a9970d11a9b362a16 (diff)
downloadblackbird-obmc-linux-ec144a81ade915b5b38adedf10e84690813ed768.tar.gz
blackbird-obmc-linux-ec144a81ade915b5b38adedf10e84690813ed768.zip
Merge commit 'origin/master' into next
Diffstat (limited to 'fs/ocfs2/ocfs2_fs.h')
-rw-r--r--fs/ocfs2/ocfs2_fs.h11
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)
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)
OpenPOWER on IntegriCloud