aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vfsops.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_vfsops.c')
-rw-r--r--fs/xfs/xfs_vfsops.c53
1 files changed, 0 insertions, 53 deletions
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index f5844678d45e..1249548aa12e 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -839,59 +839,6 @@ xfs_root(
839} 839}
840 840
841/* 841/*
842 * xfs_statvfs
843 *
844 * Fill in the statvfs structure for the given file system. We use
845 * the superblock lock in the mount structure to ensure a consistent
846 * snapshot of the counters returned.
847 */
848int
849xfs_statvfs(
850 xfs_mount_t *mp,
851 bhv_statvfs_t *statp,
852 bhv_vnode_t *vp)
853{
854 __uint64_t fakeinos;
855 xfs_extlen_t lsize;
856 xfs_sb_t *sbp;
857
858 sbp = &(mp->m_sb);
859
860 statp->f_type = XFS_SB_MAGIC;
861
862 xfs_icsb_sync_counters_flags(mp, XFS_ICSB_LAZY_COUNT);
863 spin_lock(&mp->m_sb_lock);
864 statp->f_bsize = sbp->sb_blocksize;
865 lsize = sbp->sb_logstart ? sbp->sb_logblocks : 0;
866 statp->f_blocks = sbp->sb_dblocks - lsize;
867 statp->f_bfree = statp->f_bavail =
868 sbp->sb_fdblocks - XFS_ALLOC_SET_ASIDE(mp);
869 fakeinos = statp->f_bfree << sbp->sb_inopblog;
870#if XFS_BIG_INUMS
871 fakeinos += mp->m_inoadd;
872#endif
873 statp->f_files =
874 MIN(sbp->sb_icount + fakeinos, (__uint64_t)XFS_MAXINUMBER);
875 if (mp->m_maxicount)
876#if XFS_BIG_INUMS
877 if (!mp->m_inoadd)
878#endif
879 statp->f_files = min_t(typeof(statp->f_files),
880 statp->f_files,
881 mp->m_maxicount);
882 statp->f_ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);
883 spin_unlock(&mp->m_sb_lock);
884
885 xfs_statvfs_fsid(statp, mp);
886 statp->f_namelen = MAXNAMELEN - 1;
887
888 if (vp)
889 XFS_QM_DQSTATVFS(xfs_vtoi(vp), statp);
890 return 0;
891}
892
893
894/*
895 * xfs_sync flushes any pending I/O to file system vfsp. 842 * xfs_sync flushes any pending I/O to file system vfsp.
896 * 843 *
897 * This routine is called by vfs_sync() to make sure that things make it 844 * This routine is called by vfs_sync() to make sure that things make it