mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: refactor inode geometry setup routines
Migrate all of the inode geometry setup code from xfs_mount.c into a single libxfs function that we can share with xfsprogs. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
This commit is contained in:
parent
ef32595999
commit
494dba7b27
4 changed files with 101 additions and 144 deletions
|
@ -23,16 +23,6 @@ struct xfs_icluster {
|
|||
* sparse chunks */
|
||||
};
|
||||
|
||||
/* Calculate and return the number of filesystem blocks per inode cluster */
|
||||
static inline int
|
||||
xfs_icluster_size_fsb(
|
||||
struct xfs_mount *mp)
|
||||
{
|
||||
if (mp->m_sb.sb_blocksize >= M_IGEO(mp)->inode_cluster_size)
|
||||
return 1;
|
||||
return M_IGEO(mp)->inode_cluster_size >> mp->m_sb.sb_blocklog;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make an inode pointer out of the buffer/offset.
|
||||
*/
|
||||
|
@ -95,13 +85,6 @@ xfs_imap(
|
|||
struct xfs_imap *imap, /* location map structure */
|
||||
uint flags); /* flags for inode btree lookup */
|
||||
|
||||
/*
|
||||
* Compute and fill in value of m_ino_geo.inobt_maxlevels.
|
||||
*/
|
||||
void
|
||||
xfs_ialloc_compute_maxlevels(
|
||||
struct xfs_mount *mp); /* file system mount structure */
|
||||
|
||||
/*
|
||||
* Log specified fields for the ag hdr (inode section)
|
||||
*/
|
||||
|
@ -168,5 +151,6 @@ int xfs_inobt_insert_rec(struct xfs_btree_cur *cur, uint16_t holemask,
|
|||
int *stat);
|
||||
|
||||
int xfs_ialloc_cluster_alignment(struct xfs_mount *mp);
|
||||
void xfs_ialloc_setup_geometry(struct xfs_mount *mp);
|
||||
|
||||
#endif /* __XFS_IALLOC_H__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue