abp->f_type = 0;
abp->f_bsize = afsp->vfs_bsize;
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 9000000;
+ abp->f_ffree = AFS_VFS_FAKEFREE;
abp->f_vfstype = AFS_VFSFSID;
abp->f_vfsnumber = afsp->vfs_number;
abp->f_vfsoff = abp->f_vfslen = abp->f_vfsvers = -1;
abp->f_type = MOUNT_AFS;
#endif
- /* Fake a high number below to satisfy programs that use the statfs call
- * to make sure that there's enough space in the device partition before
- * storing something there.
- */
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 0x7fffffff;
+ abp->f_ffree = AFS_VFS_FAKEFREE;
if (abp != sysstat) {
abp->f_fsid.val[0] = sysstat->f_fsid.val[0];
abp->f_bsize = mp->vfs_bsize;
abp->f_iosize = mp->vfs_bsize;
- /* Fake a high number below to satisfy programs that use the statfs call
- * to make sure that there's enough space in the device partition before
- * storing something there.
- */
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 2000000;
+ abp->f_ffree = AFS_VFS_FAKEFREE;
abp->f_fsid.val[0] = mp->mnt_stat.f_fsid.val[0];
abp->f_fsid.val[1] = mp->mnt_stat.f_fsid.val[1];
* before storing something there.
*/
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = abp->f_favail = 9000000;
+ abp->f_ffree = abp->f_favail = AFS_VFS_FAKEFREE;
abp->f_fsid = (AFS_VFSMAGIC << 16) || AFS_VFSFSID;
AFS_GUNLOCK();
* before storing something there.
*/
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = abp->f_favail = 900000;
+ abp->f_ffree = abp->f_favail = AFS_VFS_FAKEFREE;
abp->f_fsid = AFS_VFSMAGIC; /* magic */
strcpy(abp->f_basetype, AFS_MOUNT_AFS);
statp->f_bsize = sbp->s_blocksize;
#endif
statp->f_blocks = statp->f_bfree = statp->f_bavail = statp->f_files =
- statp->f_ffree = 9000000;
+ statp->f_ffree = AFS_VFS_FAKEFREE;
statp->f_fsid.val[0] = AFS_VFSMAGIC;
statp->f_fsid.val[1] = AFS_VFSFSID;
statp->f_namelen = 256;
statp->f_bsize = sbp->s_blocksize;
#endif
statp->f_blocks = statp->f_bfree = statp->f_bavail = statp->f_files =
- statp->f_ffree = 9000000;
+ statp->f_ffree = AFS_VFS_FAKEFREE;
statp->f_fsid.val[0] = AFS_VFSMAGIC;
statp->f_fsid.val[1] = AFS_VFSFSID;
statp->f_namelen = 256;
abp->f_frsize = mp->osi_vfs_bsize;
abp->f_iosize = mp->osi_vfs_bsize;
- /*
- * Fake a high number below to satisfy programs that use the ustat (for
- * * AIX), or statfs (for the rest) call to make sure that there's
- * enough * space in the device partition before storing something there
- * (like * ed(1))
- */
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 9000000;
+ abp->f_ffree = AFS_VFS_FAKEFREE;
return (0);
}
AFS_STATCNT(afs_statfs);
abp->f_bsize = afsp->osi_vfs_bsize;
- /*
- * Fake a high number below to satisfy programs that use the ustat (for
- * * AIX), or statfs (for the rest) call to make sure that there's
- * enough * space in the device partition before storing something there
- * (like * ed(1))
- */
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 9000000;
+ abp->f_ffree = AFS_VFS_FAKEFREE;
abp->f_fsid.val[0] = AFS_VFSMAGIC; /* magic */
abp->f_fsid.val[1] = (int)AFS_VFSFSID;
return 0;
AFS_STATCNT(afs_statfs);
abp->f_frsize = 1024;
- abp->f_favail = 9000000;
abp->f_bsize = afsp->vfs_bsize;
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 9000000;
+ abp->f_favail = abp->f_ffree = AFS_VFS_FAKEFREE;
abp->f_fsid = (AFS_VFSMAGIC << 16) || AFS_VFSFSID;
AFS_GUNLOCK();
AFS_STATCNT(afs_statfs);
abp->f_frsize = 1024;
- abp->f_favail = 9000000;
abp->f_bsize = afsp->vfs_bsize;
abp->f_blocks = abp->f_bfree = abp->f_bavail = abp->f_files =
- abp->f_ffree = 9000000;
+ abp->f_favail = abp->f_ffree = AFS_VFS_FAKEFREE;
#ifdef AFS_USR_AIX_ENV
abp->f_fsid.val[0] = AFS_VFSMAGIC;
#define AFS_VFSFSID AFS_MOUNT_AFS
#endif
#endif
+/* use this value for reporting total space, free space, etc.
+ * fake a high number to satisfy programs that use the statfs call to make sure
+ * that there's enough space in the device partition before storing something
+ * there. keep it just under 2^31, to try and be safe about not breaking
+ * stuff that looks at the amount of free space. */
+#define AFS_VFS_FAKEFREE (2147483647)
/* Moved from VNOPS/afs_vnop_flocks so can be used in prototypes */
#if defined(AFS_HPUX102_ENV)