aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2009-11-30 17:58:32 -0500
committerJan Kara <jack@suse.cz>2009-12-10 09:02:54 -0500
commit5a20bdfcdc5c5e5f0647d8d99a998066ef5496ac (patch)
tree30f50f2655dd17681169e4cf825a1849265bf3b7 /fs
parent1aeec43432d6bfb7a300bb0363f2723b8c4c706d (diff)
ext4: Support for 64-bit quota format
Add support for new 64-bit quota format. It is enough to add proper mount options handling. The rest is done by the generic code. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/super.c30
1 files changed, 24 insertions, 6 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index d4ca92aab514..10483fa7c05c 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -765,9 +765,22 @@ static inline void ext4_show_quota_options(struct seq_file *seq,
765#if defined(CONFIG_QUOTA) 765#if defined(CONFIG_QUOTA)
766 struct ext4_sb_info *sbi = EXT4_SB(sb); 766 struct ext4_sb_info *sbi = EXT4_SB(sb);
767 767
768 if (sbi->s_jquota_fmt) 768 if (sbi->s_jquota_fmt) {
769 seq_printf(seq, ",jqfmt=%s", 769 char *fmtname = "";
770 (sbi->s_jquota_fmt == QFMT_VFS_OLD) ? "vfsold" : "vfsv0"); 770
771 switch (sbi->s_jquota_fmt) {
772 case QFMT_VFS_OLD:
773 fmtname = "vfsold";
774 break;
775 case QFMT_VFS_V0:
776 fmtname = "vfsv0";
777 break;
778 case QFMT_VFS_V1:
779 fmtname = "vfsv1";
780 break;
781 }
782 seq_printf(seq, ",jqfmt=%s", fmtname);
783 }
771 784
772 if (sbi->s_qf_names[USRQUOTA]) 785 if (sbi->s_qf_names[USRQUOTA])
773 seq_printf(seq, ",usrjquota=%s", sbi->s_qf_names[USRQUOTA]); 786 seq_printf(seq, ",usrjquota=%s", sbi->s_qf_names[USRQUOTA]);
@@ -1074,9 +1087,9 @@ enum {
1074 Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback, 1087 Opt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,
1075 Opt_data_err_abort, Opt_data_err_ignore, 1088 Opt_data_err_abort, Opt_data_err_ignore,
1076 Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota, 1089 Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
1077 Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota, 1090 Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
1078 Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err, Opt_resize, 1091 Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
1079 Opt_usrquota, Opt_grpquota, Opt_i_version, 1092 Opt_resize, Opt_usrquota, Opt_grpquota, Opt_i_version,
1080 Opt_stripe, Opt_delalloc, Opt_nodelalloc, 1093 Opt_stripe, Opt_delalloc, Opt_nodelalloc,
1081 Opt_block_validity, Opt_noblock_validity, 1094 Opt_block_validity, Opt_noblock_validity,
1082 Opt_inode_readahead_blks, Opt_journal_ioprio 1095 Opt_inode_readahead_blks, Opt_journal_ioprio
@@ -1125,6 +1138,7 @@ static const match_table_t tokens = {
1125 {Opt_grpjquota, "grpjquota=%s"}, 1138 {Opt_grpjquota, "grpjquota=%s"},
1126 {Opt_jqfmt_vfsold, "jqfmt=vfsold"}, 1139 {Opt_jqfmt_vfsold, "jqfmt=vfsold"},
1127 {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"}, 1140 {Opt_jqfmt_vfsv0, "jqfmt=vfsv0"},
1141 {Opt_jqfmt_vfsv1, "jqfmt=vfsv1"},
1128 {Opt_grpquota, "grpquota"}, 1142 {Opt_grpquota, "grpquota"},
1129 {Opt_noquota, "noquota"}, 1143 {Opt_noquota, "noquota"},
1130 {Opt_quota, "quota"}, 1144 {Opt_quota, "quota"},
@@ -1425,6 +1439,9 @@ clear_qf_name:
1425 goto set_qf_format; 1439 goto set_qf_format;
1426 case Opt_jqfmt_vfsv0: 1440 case Opt_jqfmt_vfsv0:
1427 qfmt = QFMT_VFS_V0; 1441 qfmt = QFMT_VFS_V0;
1442 goto set_qf_format;
1443 case Opt_jqfmt_vfsv1:
1444 qfmt = QFMT_VFS_V1;
1428set_qf_format: 1445set_qf_format:
1429 if (sb_any_quota_loaded(sb) && 1446 if (sb_any_quota_loaded(sb) &&
1430 sbi->s_jquota_fmt != qfmt) { 1447 sbi->s_jquota_fmt != qfmt) {
@@ -1467,6 +1484,7 @@ set_qf_format:
1467 case Opt_offgrpjquota: 1484 case Opt_offgrpjquota:
1468 case Opt_jqfmt_vfsold: 1485 case Opt_jqfmt_vfsold:
1469 case Opt_jqfmt_vfsv0: 1486 case Opt_jqfmt_vfsv0:
1487 case Opt_jqfmt_vfsv1:
1470 ext4_msg(sb, KERN_ERR, 1488 ext4_msg(sb, KERN_ERR,
1471 "journaled quota options not supported"); 1489 "journaled quota options not supported");
1472 break; 1490 break;