Skip to content

Commit d27e202

Browse files
fs/ntfs3: Add more info into /proc/fs/ntfs3/<dev>/volinfo
Signed-off-by: Konstantin Komarov <[email protected]>
1 parent f684073 commit d27e202

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

fs/ntfs3/super.c

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -453,15 +453,23 @@ static struct proc_dir_entry *proc_info_root;
453453
* ntfs3.1
454454
* cluster size
455455
* number of clusters
456+
* total number of mft records
457+
* number of used mft records ~= number of files + folders
458+
* real state of ntfs "dirty"/"clean"
459+
* current state of ntfs "dirty"/"clean"
456460
*/
457461
static int ntfs3_volinfo(struct seq_file *m, void *o)
458462
{
459463
struct super_block *sb = m->private;
460464
struct ntfs_sb_info *sbi = sb->s_fs_info;
461465

462-
seq_printf(m, "ntfs%d.%d\n%u\n%zu\n", sbi->volume.major_ver,
463-
sbi->volume.minor_ver, sbi->cluster_size,
464-
sbi->used.bitmap.nbits);
466+
seq_printf(m, "ntfs%d.%d\n%u\n%zu\n\%zu\n%zu\n%s\n%s\n",
467+
sbi->volume.major_ver, sbi->volume.minor_ver,
468+
sbi->cluster_size, sbi->used.bitmap.nbits,
469+
sbi->mft.bitmap.nbits,
470+
sbi->mft.bitmap.nbits - wnd_zeroes(&sbi->mft.bitmap),
471+
sbi->volume.real_dirty ? "dirty" : "clean",
472+
(sbi->volume.flags & VOLUME_FLAG_DIRTY) ? "dirty" : "clean");
465473

466474
return 0;
467475
}

0 commit comments

Comments
 (0)