diff options
| author | Curt Wohlgemuth <curtw@google.com> | 2010-05-16 12:00:00 -0400 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2010-05-16 12:00:00 -0400 |
| commit | d4c402d9fd97a54bb7ed89f9e9869897eb4f6e1f (patch) | |
| tree | 6469b5d8aa9e18db0d689f79ab8e40ae5ff3064d | |
| parent | 72b8ab9dde211ea518ff27e631b2046ef90c29a2 (diff) | |
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>
| -rw-r--r-- | fs/ext4/super.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index d83cdcbd9b31..8e655f5acb3a 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
| @@ -2431,6 +2431,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent) | |||
| 2431 | __releases(kernel_lock) | 2431 | __releases(kernel_lock) |
| 2432 | __acquires(kernel_lock) | 2432 | __acquires(kernel_lock) |
| 2433 | { | 2433 | { |
| 2434 | char *orig_data = kstrdup(data, GFP_KERNEL); | ||
| 2434 | struct buffer_head *bh; | 2435 | struct buffer_head *bh; |
| 2435 | struct ext4_super_block *es = NULL; | 2436 | struct ext4_super_block *es = NULL; |
| 2436 | struct ext4_sb_info *sbi; | 2437 | struct ext4_sb_info *sbi; |
| @@ -3037,9 +3038,11 @@ no_journal: | |||
| 3037 | } else | 3038 | } else |
| 3038 | descr = "out journal"; | 3039 | descr = "out journal"; |
| 3039 | 3040 | ||
| 3040 | ext4_msg(sb, KERN_INFO, "mounted filesystem with%s", descr); | 3041 | ext4_msg(sb, KERN_INFO, "mounted filesystem with%s. " |
| 3042 | "Opts: %s", descr, orig_data); | ||
| 3041 | 3043 | ||
| 3042 | lock_kernel(); | 3044 | lock_kernel(); |
| 3045 | kfree(orig_data); | ||
| 3043 | return 0; | 3046 | return 0; |
| 3044 | 3047 | ||
| 3045 | cantfind_ext4: | 3048 | cantfind_ext4: |
| @@ -3086,6 +3089,7 @@ out_fail: | |||
| 3086 | kfree(sbi->s_blockgroup_lock); | 3089 | kfree(sbi->s_blockgroup_lock); |
| 3087 | kfree(sbi); | 3090 | kfree(sbi); |
| 3088 | lock_kernel(); | 3091 | lock_kernel(); |
| 3092 | kfree(orig_data); | ||
| 3089 | return ret; | 3093 | return ret; |
| 3090 | } | 3094 | } |
| 3091 | 3095 | ||
| @@ -3576,6 +3580,7 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
| 3576 | #ifdef CONFIG_QUOTA | 3580 | #ifdef CONFIG_QUOTA |
| 3577 | int i; | 3581 | int i; |
| 3578 | #endif | 3582 | #endif |
| 3583 | char *orig_data = kstrdup(data, GFP_KERNEL); | ||
| 3579 | 3584 | ||
| 3580 | lock_kernel(); | 3585 | lock_kernel(); |
| 3581 | 3586 | ||
| @@ -3709,6 +3714,9 @@ static int ext4_remount(struct super_block *sb, int *flags, char *data) | |||
| 3709 | #endif | 3714 | #endif |
| 3710 | unlock_super(sb); | 3715 | unlock_super(sb); |
| 3711 | unlock_kernel(); | 3716 | unlock_kernel(); |
| 3717 | |||
| 3718 | ext4_msg(sb, KERN_INFO, "re-mounted. Opts: %s", orig_data); | ||
| 3719 | kfree(orig_data); | ||
| 3712 | return 0; | 3720 | return 0; |
| 3713 | 3721 | ||
| 3714 | restore_opts: | 3722 | restore_opts: |
| @@ -3730,6 +3738,7 @@ restore_opts: | |||
| 3730 | #endif | 3738 | #endif |
| 3731 | unlock_super(sb); | 3739 | unlock_super(sb); |
| 3732 | unlock_kernel(); | 3740 | unlock_kernel(); |
| 3741 | kfree(orig_data); | ||
| 3733 | return err; | 3742 | return err; |
| 3734 | } | 3743 | } |
| 3735 | 3744 | ||
