diff options
author | Jan Kara <jack@suse.cz> | 2009-11-30 16:22:41 -0500 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2009-12-10 09:02:54 -0500 |
commit | 1aeec43432d6bfb7a300bb0363f2723b8c4c706d (patch) | |
tree | 082a2dde06351428ba09b6de57e0178ab282e56d /fs/ext3/super.c | |
parent | 498c60153ebb8889d8944591383c5c12af1127d4 (diff) |
ext3: Support for vfsv1 quota format
We just have to add proper mount options handling. The rest is handled by
the generic quota code.
CC: linux-ext4@vger.kernel.org
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3/super.c')
-rw-r--r-- | fs/ext3/super.c | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 46433b30e45f..7ad1e8c30bd0 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -539,9 +539,22 @@ static inline void ext3_show_quota_options(struct seq_file *seq, struct super_bl | |||
539 | #if defined(CONFIG_QUOTA) | 539 | #if defined(CONFIG_QUOTA) |
540 | struct ext3_sb_info *sbi = EXT3_SB(sb); | 540 | struct ext3_sb_info *sbi = EXT3_SB(sb); |
541 | 541 | ||
542 | if (sbi->s_jquota_fmt) | 542 | if (sbi->s_jquota_fmt) { |
543 | seq_printf(seq, ",jqfmt=%s", | 543 | char *fmtname = ""; |
544 | (sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold": "vfsv0"); | 544 | |
545 | switch (sbi->s_jquota_fmt) { | ||
546 | case QFMT_VFS_OLD: | ||
547 | fmtname = "vfsold"; | ||
548 | break; | ||
549 | case QFMT_VFS_V0: | ||
550 | fmtname = "vfsv0"; | ||
551 | break; | ||
552 | case QFMT_VFS_V1: | ||
553 | fmtname = "vfsv1"; | ||
554 | break; | ||
555 | } | ||
556 | seq_printf(seq, ",jqfmt=%s", fmtname); | ||
557 | } | ||
545 | 558 | ||
546 | if (sbi->s_qf_names[USRQUOTA]) | 559 | if (sbi->s_qf_names[USRQUOTA]) |
547 | seq_printf(seq, ",usrjquota=%s", sbi->s_qf_names[USRQUOTA]); | 560 | seq_printf(seq, ",usrjquota=%s", sbi->s_qf_names[USRQUOTA]); |
@@ -802,9 +815,9 @@ enum { | |||
802 | Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, | 815 | Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, |
803 | Opt_data_err_abort, Opt_data_err_ignore, | 816 | Opt_data_err_abort, Opt_data_err_ignore, |
804 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, | 817 | Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, |
805 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, | 818 | Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota, |
806 | Opt_ignore, Opt_barrier, Opt_err, Opt_resize, Opt_usrquota, | 819 | Opt_noquota, Opt_ignore, Opt_barrier, Opt_err, Opt_resize, |
807 | Opt_grpquota | 820 | Opt_usrquota, Opt_grpquota |
808 | }; | 821 | }; |
809 | 822 | ||
810 | static const match_table_t tokens = { | 823 | static const match_table_t tokens = { |
@@ -852,6 +865,7 @@ static const match_table_t tokens = { | |||
852 | {Opt_grpjquota, "grpjquota=%s"}, | 865 | {Opt_grpjquota, "grpjquota=%s"}, |
853 | {Opt_jqfmt_vfsold, "jqfmt=vfsold"}, | 866 | {Opt_jqfmt_vfsold, "jqfmt=vfsold"}, |
854 | {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"}, | 867 | {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"}, |
868 | {Opt_jqfmt_vfsv1, "jqfmt=vfsv1"}, | ||
855 | {Opt_grpquota, "grpquota"}, | 869 | {Opt_grpquota, "grpquota"}, |
856 | {Opt_noquota, "noquota"}, | 870 | {Opt_noquota, "noquota"}, |
857 | {Opt_quota, "quota"}, | 871 | {Opt_quota, "quota"}, |
@@ -1138,6 +1152,9 @@ clear_qf_name: | |||
1138 | goto set_qf_format; | 1152 | goto set_qf_format; |
1139 | case Opt_jqfmt_vfsv0: | 1153 | case Opt_jqfmt_vfsv0: |
1140 | qfmt = QFMT_VFS_V0; | 1154 | qfmt = QFMT_VFS_V0; |
1155 | goto set_qf_format; | ||
1156 | case Opt_jqfmt_vfsv1: | ||
1157 | qfmt = QFMT_VFS_V1; | ||
1141 | set_qf_format: | 1158 | set_qf_format: |
1142 | if (sb_any_quota_loaded(sb) && | 1159 | if (sb_any_quota_loaded(sb) && |
1143 | sbi->s_jquota_fmt != qfmt) { | 1160 | sbi->s_jquota_fmt != qfmt) { |
@@ -1180,6 +1197,7 @@ set_qf_format: | |||
1180 | case Opt_offgrpjquota: | 1197 | case Opt_offgrpjquota: |
1181 | case Opt_jqfmt_vfsold: | 1198 | case Opt_jqfmt_vfsold: |
1182 | case Opt_jqfmt_vfsv0: | 1199 | case Opt_jqfmt_vfsv0: |
1200 | case Opt_jqfmt_vfsv1: | ||
1183 | ext3_msg(sb, KERN_ERR, | 1201 | ext3_msg(sb, KERN_ERR, |
1184 | "error: journaled quota options not " | 1202 | "error: journaled quota options not " |
1185 | "supported."); | 1203 | "supported."); |