ext4: Print mount options in when mounting and add a remount message
This adds a "re-mounted" message to ext4_remount(), and both it and the mount message in ext4_fill_super() now have the original mount options data string. Signed-off-by: Curt Wohlgemuth <curtw@google.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
72b8ab9dde
commit
d4c402d9fd
1 changed files with 10 additions and 1 deletions
|
@ -2431,6 +2431,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
|
||||||
__releases(kernel_lock)
|
__releases(kernel_lock)
|
||||||
__acquires(kernel_lock)
|
__acquires(kernel_lock)
|
||||||
{
|
{
|
||||||
|
char *orig_data = kstrdup(data, GFP_KERNEL);
|
||||||
struct buffer_head *bh;
|
struct buffer_head *bh;
|
||||||
struct ext4_super_block *es = NULL;
|
struct ext4_super_block *es = NULL;
|
||||||
struct ext4_sb_info *sbi;
|
struct ext4_sb_info *sbi;
|
||||||
|
@ -3037,9 +3038,11 @@ no_journal:
|
||||||
} else
|
} else
|
||||||
descr = "out journal";
|
descr = "out journal";
|
||||||
|
|
||||||
ext4_msg(sb, KERN_INFO, "mounted filesystem with%s", descr);
|
ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. "
|
||||||
|
"Opts: %s", descr, orig_data);
|
||||||
|
|
||||||
lock_kernel();
|
lock_kernel();
|
||||||
|
kfree(orig_data);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
cantfind_ext4:
|
cantfind_ext4:
|
||||||
|
@ -3086,6 +3089,7 @@ out_fail:
|
||||||
kfree(sbi->s_blockgroup_lock);
|
kfree(sbi->s_blockgroup_lock);
|
||||||
kfree(sbi);
|
kfree(sbi);
|
||||||
lock_kernel();
|
lock_kernel();
|
||||||
|
kfree(orig_data);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3576,6 +3580,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
|
||||||
#ifdef CONFIG_QUOTA
|
#ifdef CONFIG_QUOTA
|
||||||
int i;
|
int i;
|
||||||
#endif
|
#endif
|
||||||
|
char *orig_data = kstrdup(data, GFP_KERNEL);
|
||||||
|
|
||||||
lock_kernel();
|
lock_kernel();
|
||||||
|
|
||||||
|
@ -3709,6 +3714,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data)
|
||||||
#endif
|
#endif
|
||||||
unlock_super(sb);
|
unlock_super(sb);
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
|
|
||||||
|
ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data);
|
||||||
|
kfree(orig_data);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
restore_opts:
|
restore_opts:
|
||||||
|
@ -3730,6 +3738,7 @@ restore_opts:
|
||||||
#endif
|
#endif
|
||||||
unlock_super(sb);
|
unlock_super(sb);
|
||||||
unlock_kernel();
|
unlock_kernel();
|
||||||
|
kfree(orig_data);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue