summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.h
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2016-03-02 09:58:09 +1100
committerDave Chinner <david@fromorbit.com>2016-03-02 09:58:09 +1100
commit12c3f05c7b592ae3bf2219392f1cbf252645cd79 (patch)
tree84d13db49ec7de70cee1ae873c3f05e9e89b3fe2 /fs/xfs/xfs_super.h
parent5d518bd6cec6f921ee1be504094762496afb45fb (diff)
downloadlinux-12c3f05c7b592ae3bf2219392f1cbf252645cd79.tar.gz
linux-12c3f05c7b592ae3bf2219392f1cbf252645cd79.tar.bz2
linux-12c3f05c7b592ae3bf2219392f1cbf252645cd79.zip
xfs: fix up inode32/64 (re)mount handling
inode32/inode64 allocator behavior with respect to mount, remount and growfs is a little tricky. The inode32 mount option should only enable the inode32 allocator heuristics if the filesystem is large enough for 64-bit inodes to exist. Today, it has this behavior on the initial mount, but a remount with inode32 unconditionally changes the allocation heuristics, even for a small fs. Also, an inode32 mounted small filesystem should transition to the inode32 allocator if the filesystem is subsequently grown to a sufficient size. Today that does not happen. This patch consolidates xfs_set_inode32 and xfs_set_inode64 into a single new function, and moves the "is the maximum inode number big enough to matter" test into that function, so it doesn't rely on the caller to get it right - which remount did not do, previously. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_super.h')
-rw-r--r--fs/xfs/xfs_super.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
index 499058fea303..2dfb1ce4585f 100644
--- a/fs/xfs/xfs_super.h
+++ b/fs/xfs/xfs_super.h
@@ -65,8 +65,8 @@ extern __uint64_t xfs_max_file_offset(unsigned int);
extern void xfs_flush_inodes(struct xfs_mount *mp);
extern void xfs_blkdev_issue_flush(struct xfs_buftarg *);
-extern xfs_agnumber_t xfs_set_inode32(struct xfs_mount *, xfs_agnumber_t agcount);
-extern xfs_agnumber_t xfs_set_inode64(struct xfs_mount *, xfs_agnumber_t agcount);
+extern xfs_agnumber_t xfs_set_inode_alloc(struct xfs_mount *,
+ xfs_agnumber_t agcount);
extern const struct export_operations xfs_export_operations;
extern const struct xattr_handler *xfs_xattr_handlers[];