...
This adds initialization of super block
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@xxxxxxxxxxxxxxxxxxxx>
+static int ntfs_statfs(struct dentry *dentry, struct kstatfs *buf)namelen field of kstatfs (also as statfs struct from statfs system call) contains
+{
+ struct super_block *sb = dentry->d_sb;
+ struct ntfs_sb_info *sbi = sb->s_fs_info;
+ struct wnd_bitmap *wnd = &sbi->used.bitmap;
+
+ buf->f_type = sb->s_magic;
+ buf->f_bsize = sbi->cluster_size;
+ buf->f_blocks = wnd->nbits;
+
+ buf->f_bfree = buf->f_bavail = wnd_zeroes(wnd);
+ buf->f_fsid.val[0] = (u32)sbi->volume.ser_num;
+ buf->f_fsid.val[1] = (u32)(sbi->volume.ser_num >> 32);
+ buf->f_namelen = NTFS_NAME_LEN;