diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c index f64b482a7953..c6fb5f0577b8 100644 --- a/fs/xfs/xfs_inode.c +++ b/fs/xfs/xfs_inode.c | |||
@@ -61,6 +61,20 @@ STATIC int xfs_iformat_local(xfs_inode_t *, xfs_dinode_t *, int, int); | |||
61 | STATIC int xfs_iformat_extents(xfs_inode_t *, xfs_dinode_t *, int); | 61 | STATIC int xfs_iformat_extents(xfs_inode_t *, xfs_dinode_t *, int); |
62 | STATIC int xfs_iformat_btree(xfs_inode_t *, xfs_dinode_t *, int); | 62 | STATIC int xfs_iformat_btree(xfs_inode_t *, xfs_dinode_t *, int); |
63 | 63 | ||
64 | /* | ||
65 | * helper function to extract extent size hint from inode | ||
66 | */ | ||
67 | xfs_extlen_t | ||
68 | xfs_get_extsz_hint( | ||
69 | struct xfs_inode *ip) | ||
70 | { | ||
71 | if ((ip->i_d.di_flags & XFS_DIFLAG_EXTSIZE) && ip->i_d.di_extsize) | ||
72 | return ip->i_d.di_extsize; | ||
73 | if (XFS_IS_REALTIME_INODE(ip)) | ||
74 | return ip->i_mount->m_sb.sb_rextsize; | ||
75 | return 0; | ||
76 | } | ||
77 | |||
64 | #ifdef DEBUG | 78 | #ifdef DEBUG |
65 | /* | 79 | /* |
66 | * Make sure that the extents in the given memory buffer | 80 | * Make sure that the extents in the given memory buffer |