예제 #1
0
static int hpfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
	struct super_block *s = dentry->d_sb;
	struct hpfs_sb_info *sbi = hpfs_sb(s);
	u64 id = huge_encode_dev(s->s_bdev->bd_dev);
	hpfs_lock(s);

	/*if (sbi->sb_n_free == -1) {*/
		sbi->sb_n_free = count_bitmaps(s);
		sbi->sb_n_free_dnodes = hpfs_count_one_bitmap(s, sbi->sb_dmap);
	/*}*/
	buf->f_type = s->s_magic;
	buf->f_bsize = 512;
	buf->f_blocks = sbi->sb_fs_size;
	buf->f_bfree = sbi->sb_n_free;
	buf->f_bavail = sbi->sb_n_free;
	buf->f_files = sbi->sb_dirband_size / 4;
	buf->f_ffree = sbi->sb_n_free_dnodes;
	buf->f_fsid.val[0] = (u32)id;
	buf->f_fsid.val[1] = (u32)(id >> 32);
	buf->f_namelen = 254;

	hpfs_unlock(s);

	return 0;
}
예제 #2
0
파일: super.c 프로젝트: dmgerman/original
int hpfs_statfs(struct super_block *s, struct statfs *buf)
{
	/*if (s->s_hpfs_n_free == -1) {*/
		s->s_hpfs_n_free = count_bitmaps(s);
		s->s_hpfs_n_free_dnodes = hpfs_count_one_bitmap(s, s->s_hpfs_dmap);
	/*}*/
	buf->f_type = s->s_magic;
	buf->f_bsize = 512;
	buf->f_blocks = s->s_hpfs_fs_size;
	buf->f_bfree = s->s_hpfs_n_free;
	buf->f_bavail = s->s_hpfs_n_free;
	buf->f_files = s->s_hpfs_dirband_size / 4;
	buf->f_ffree = s->s_hpfs_n_free_dnodes;
	buf->f_namelen = 254;
	return 0;
}
예제 #3
0
static int hpfs_statfs(struct dentry *dentry, struct kstatfs *buf)
{
	struct super_block *s = dentry->d_sb;
	struct hpfs_sb_info *sbi = hpfs_sb(s);
	lock_kernel();

	/*if (sbi->sb_n_free == -1) {*/
		sbi->sb_n_free = count_bitmaps(s);
		sbi->sb_n_free_dnodes = hpfs_count_one_bitmap(s, sbi->sb_dmap);
	/*}*/
	buf->f_type = s->s_magic;
	buf->f_bsize = 512;
	buf->f_blocks = sbi->sb_fs_size;
	buf->f_bfree = sbi->sb_n_free;
	buf->f_bavail = sbi->sb_n_free;
	buf->f_files = sbi->sb_dirband_size / 4;
	buf->f_ffree = sbi->sb_n_free_dnodes;
	buf->f_namelen = 254;

	unlock_kernel();

	return 0;
}