diff options
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_filsys.h | 3 | ||||
-rw-r--r-- | fs/jfs/super.c | 48 |
2 files changed, 48 insertions, 3 deletions
diff --git a/fs/jfs/jfs_filsys.h b/fs/jfs/jfs_filsys.h index 86ccac80f0ab..72a5588faeca 100644 --- a/fs/jfs/jfs_filsys.h +++ b/fs/jfs/jfs_filsys.h | |||
@@ -37,6 +37,9 @@ | |||
37 | #define JFS_ERR_CONTINUE 0x00000004 /* continue */ | 37 | #define JFS_ERR_CONTINUE 0x00000004 /* continue */ |
38 | #define JFS_ERR_PANIC 0x00000008 /* panic */ | 38 | #define JFS_ERR_PANIC 0x00000008 /* panic */ |
39 | 39 | ||
40 | #define JFS_USRQUOTA 0x00000010 | ||
41 | #define JFS_GRPQUOTA 0x00000020 | ||
42 | |||
40 | /* platform option (conditional compilation) */ | 43 | /* platform option (conditional compilation) */ |
41 | #define JFS_AIX 0x80000000 /* AIX support */ | 44 | #define JFS_AIX 0x80000000 /* AIX support */ |
42 | /* POSIX name/directory support */ | 45 | /* POSIX name/directory support */ |
diff --git a/fs/jfs/super.c b/fs/jfs/super.c index 9ff89720f93b..71bc34b96b2b 100644 --- a/fs/jfs/super.c +++ b/fs/jfs/super.c | |||
@@ -23,9 +23,11 @@ | |||
23 | #include <linux/parser.h> | 23 | #include <linux/parser.h> |
24 | #include <linux/completion.h> | 24 | #include <linux/completion.h> |
25 | #include <linux/vfs.h> | 25 | #include <linux/vfs.h> |
26 | #include <linux/mount.h> | ||
26 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
27 | #include <linux/posix_acl.h> | 28 | #include <linux/posix_acl.h> |
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
30 | #include <linux/seq_file.h> | ||
29 | 31 | ||
30 | #include "jfs_incore.h" | 32 | #include "jfs_incore.h" |
31 | #include "jfs_filsys.h" | 33 | #include "jfs_filsys.h" |
@@ -192,7 +194,8 @@ static void jfs_put_super(struct super_block *sb) | |||
192 | 194 | ||
193 | enum { | 195 | enum { |
194 | Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize, | 196 | Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize, |
195 | Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, | 197 | Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, Opt_quota, |
198 | Opt_usrquota, Opt_grpquota | ||
196 | }; | 199 | }; |
197 | 200 | ||
198 | static match_table_t tokens = { | 201 | static match_table_t tokens = { |
@@ -204,8 +207,8 @@ static match_table_t tokens = { | |||
204 | {Opt_errors, "errors=%s"}, | 207 | {Opt_errors, "errors=%s"}, |
205 | {Opt_ignore, "noquota"}, | 208 | {Opt_ignore, "noquota"}, |
206 | {Opt_ignore, "quota"}, | 209 | {Opt_ignore, "quota"}, |
207 | {Opt_ignore, "usrquota"}, | 210 | {Opt_usrquota, "usrquota"}, |
208 | {Opt_ignore, "grpquota"}, | 211 | {Opt_grpquota, "grpquota"}, |
209 | {Opt_err, NULL} | 212 | {Opt_err, NULL} |
210 | }; | 213 | }; |
211 | 214 | ||
@@ -293,6 +296,24 @@ static int parse_options(char *options, struct super_block *sb, s64 *newLVSize, | |||
293 | } | 296 | } |
294 | break; | 297 | break; |
295 | } | 298 | } |
299 | |||
300 | #if defined(CONFIG_QUOTA) | ||
301 | case Opt_quota: | ||
302 | case Opt_usrquota: | ||
303 | *flag |= JFS_USRQUOTA; | ||
304 | break; | ||
305 | case Opt_grpquota: | ||
306 | *flag |= JFS_GRPQUOTA; | ||
307 | break; | ||
308 | #else | ||
309 | case Opt_usrquota: | ||
310 | case Opt_grpquota: | ||
311 | case Opt_quota: | ||
312 | printk(KERN_ERR | ||
313 | "JFS: quota operations not supported\n"); | ||
314 | break; | ||
315 | #endif | ||
316 | |||
296 | default: | 317 | default: |
297 | printk("jfs: Unrecognized mount option \"%s\" " | 318 | printk("jfs: Unrecognized mount option \"%s\" " |
298 | " or missing value\n", p); | 319 | " or missing value\n", p); |
@@ -539,6 +560,26 @@ static int jfs_sync_fs(struct super_block *sb, int wait) | |||
539 | return 0; | 560 | return 0; |
540 | } | 561 | } |
541 | 562 | ||
563 | static int jfs_show_options(struct seq_file *seq, struct vfsmount *vfs) | ||
564 | { | ||
565 | struct jfs_sb_info *sbi = JFS_SBI(vfs->mnt_sb); | ||
566 | |||
567 | if (sbi->flag & JFS_NOINTEGRITY) | ||
568 | seq_puts(seq, ",nointegrity"); | ||
569 | else | ||
570 | seq_puts(seq, ",integrity"); | ||
571 | |||
572 | #if defined(CONFIG_QUOTA) | ||
573 | if (sbi->flag & JFS_USRQUOTA) | ||
574 | seq_puts(seq, ",usrquota"); | ||
575 | |||
576 | if (sbi->flag & JFS_GRPQUOTA) | ||
577 | seq_puts(seq, ",grpquota"); | ||
578 | #endif | ||
579 | |||
580 | return 0; | ||
581 | } | ||
582 | |||
542 | static struct super_operations jfs_super_operations = { | 583 | static struct super_operations jfs_super_operations = { |
543 | .alloc_inode = jfs_alloc_inode, | 584 | .alloc_inode = jfs_alloc_inode, |
544 | .destroy_inode = jfs_destroy_inode, | 585 | .destroy_inode = jfs_destroy_inode, |
@@ -552,6 +593,7 @@ static struct super_operations jfs_super_operations = { | |||
552 | .unlockfs = jfs_unlockfs, | 593 | .unlockfs = jfs_unlockfs, |
553 | .statfs = jfs_statfs, | 594 | .statfs = jfs_statfs, |
554 | .remount_fs = jfs_remount, | 595 | .remount_fs = jfs_remount, |
596 | .show_options = jfs_show_options | ||
555 | }; | 597 | }; |
556 | 598 | ||
557 | static struct export_operations jfs_export_operations = { | 599 | static struct export_operations jfs_export_operations = { |