int df(const struct mtab *mt)
{
- long totblocks, busyblocks, totinodes, busyinodes;
+ fsblkcnt_t totblocks, busyblocks;
+ fsfilcnt_t totinodes, busyinodes;
struct statvfs sv;
int n;
int fs_lookup_credentials(vfs_ucred_t *credentials,
uid_t *caller_uid, gid_t *caller_gid, cp_grant_id_t grant2, size_t cred_size);
-u32_t fs_bufs_heuristic(int minbufs, u32_t btotal, u32_t bfree,
- int blocksize, dev_t majordev);
void lmfs_markdirty(struct buf *bp);
void lmfs_markclean(struct buf *bp);
void lmfs_blockschange(dev_t dev, int delta);
/* calls that libminixfs does into fs */
-void fs_blockstats(u32_t *blocks, u32_t *free, u32_t *used);
+void fs_blockstats(u64_t *blocks, u64_t *free, u64_t *used);
int fs_sync(void);
/* get_block arguments */
void
lmfs_setquiet(int q) { quiet = q; }
-u32_t fs_bufs_heuristic(int minbufs, u32_t btotal, u32_t bfree,
+static u32_t fs_bufs_heuristic(int minbufs, u32_t btotal, u64_t bfree,
int blocksize, dev_t majordev)
{
struct vm_stats_info vsi;
int bufs;
u32_t kbytes_used_fs, kbytes_total_fs, kbcache, kb_fsmax;
- u32_t kbytes_remain_mem, bused;
+ u32_t kbytes_remain_mem;
+ u64_t bused;
bused = btotal-bfree;
static void cache_heuristic_check(int major)
{
int bufs, d;
- u32_t btotal, bfree, bused;
+ u64_t btotal, bfree, bused;
fs_blockstats(&btotal, &bfree, &bused);
/*===========================================================================*
* blockstats *
*===========================================================================*/
-void fs_blockstats(u32_t *blocks, u32_t *free, u32_t *used)
+void fs_blockstats(u64_t *blocks, u64_t *free, u64_t *used)
{
struct super_block *sp = get_super(fs_dev);
/*===========================================================================*
* blockstats *
*===========================================================================*/
-void fs_blockstats(u32_t *blocks, u32_t *free, u32_t *used)
+void fs_blockstats(u64_t *blocks, u64_t *free, u64_t *used)
{
*used = *blocks = v_pri.volume_space_size_l;
*free = 0;
struct statvfs st;
struct super_block *sp;
int r, scale;
- u32_t used;
+ uint64_t used;
sp = get_super(fs_dev);
scale = sp->s_log_zone_size;
- fs_blockstats((u32_t *) &st.f_blocks, (u32_t *) &st.f_bfree, &used);
+ fs_blockstats(&st.f_blocks, &st.f_bfree, &used);
st.f_bavail = st.f_bfree;
st.f_bsize = sp->s_block_size << scale;
/*===========================================================================*
* blockstats *
*===========================================================================*/
-void fs_blockstats(u32_t *blocks, u32_t *free, u32_t *used)
+void fs_blockstats(u64_t *blocks, u64_t *free, u64_t *used)
{
struct super_block *sp;
typedef __int64_t __off_t; /* file offset */
typedef __int32_t __pid_t; /* process id */
typedef __uint8_t __sa_family_t; /* socket address family */
-typedef __uint32_t __socklen_t; /* socket-related datum length */
+typedef unsigned int __socklen_t; /* socket-related datum length */
typedef __uint32_t __uid_t; /* user id */
-typedef __uint32_t __fsblkcnt_t; /* fs block count (statvfs) */
-typedef __uint32_t __fsfilcnt_t; /* fs file count */
+typedef __uint64_t __fsblkcnt_t; /* fs block count (statvfs) */
+typedef __uint64_t __fsfilcnt_t; /* fs file count */
struct __tag_wctrans_t;
typedef struct __tag_wctrans_t *__wctrans_t;
}
void
-fs_blockstats(u32_t *total, u32_t *free, u32_t *used)
+fs_blockstats(u64_t *total, u64_t *free, u64_t *used)
{
*total = *free = *used = 0;
}