kernel_optimize_test/fs/jfs
Mark Bellon 8fc2751beb [PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mounts
If /etc/mtab is a regular file all of the mount options (of a file system)
are written to /etc/mtab by the mount command.  The quota tools look there
for the quota strings for their operation.  If, however, /etc/mtab is a
symlink to /proc/mounts (a "good thing" in some environments) the tools
don't write anything - they assume the kernel will take care of things.

While the quota options are sent down to the kernel via the mount system
call and the file system codes handle them properly unfortunately there is
no code to echo the quota strings into /proc/mounts and the quota tools
fail in the symlink case.

The attached patchs modify the EXT[2|3] and JFS codes to add the necessary
hooks.  The show_options function of each file system in these patches
currently deal with only those things that seemed related to quotas;
especially in the EXT3 case more can be done (later?).

Jan Kara also noted the difficulty in moving these changes above the FS
codes responding similarly to myself to Andrew's comment about possible
VFS migration. Issue summary:

 - FS codes have to process the entire string of options anyway.

 - Only FS codes that use quotas must have a show_options function (for
   quotas to work properly) however quotas are only used in a small number
   of FS.

 - Since most of the quota using FS support other options these FS codes
   should have the a show_options function to show those options - and the
   quota echoing becomes virtually negligible.

Based on feedback I have modified my patches from the original:

   JFS a missing patch has been restored to the posting
   EXT[2|3] and JFS always use the show_options function
       - Each FS has at least one FS specific option displayed
       - QUOTA output is under a CONFIG_QUOTA ifdef
       - a follow-on patch will add a multitude of options for each FS
   EXT[2|3] and JFS "quota" is treated as "usrquota"
   EXT3 journalled data check for journalled quota removed
   EXT[2|3] mount when quota specified but not compiled in

 - no changes from my original patch.  I tested the patch and the codes
   warn but

 - still mount.  With all due respection I believe the comments
   otherwise were a

 - misread of the patch.  Please reread/test and comment.  XFS patch
   removed - the XFS team already made the necessary changes EXT3 mixing
   old and new quotas are handled differently (not purely exclusive)

 - if old and new quotas for the same type are used together the old
   type is silently depricated for compatability (e.g.  usrquota and
   usrjquota)

 - mixing of old and new quotas is an error (e.g.  usrjquota and
   grpquota)

Signed-off-by: Mark Bellon <mbellon@mvista.com>
Acked-by: Dave Kleikamp <shaggy@austin.ibm.com>
Cc: Jan Kara <jack@ucw.cz>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-07 16:57:23 -07:00
..
acl.c [PATCH] remove <linux/xattr_acl.h> 2005-06-23 09:45:33 -07:00
endian24.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
file.c JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
inode.c JFS: Check for invalid inodes in jfs_delete_inode 2005-08-01 16:54:26 -05:00
jfs_acl.h [PATCH] remove <linux/xattr_acl.h> 2005-06-23 09:45:33 -07:00
jfs_btree.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_debug.c JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_debug.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_dinode.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_dmap.c JFS: Remove assert statement in dbJoin & return -EIO instead 2005-07-15 09:43:36 -05:00
jfs_dmap.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_dtree.c JFS: Fix i_blocks accounting when allocation fails 2005-07-26 09:29:13 -05:00
jfs_dtree.h JFS: Code cleanup - getting rid of never-used debug code 2005-06-27 15:35:37 -05:00
jfs_extent.c JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_extent.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_filsys.h [PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mounts 2005-09-07 16:57:23 -07:00
jfs_imap.c JFS: Code cleanup - getting rid of never-used debug code 2005-06-27 15:35:37 -05:00
jfs_imap.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_incore.h [PATCH] JFS: Support page sizes greater than 4K 2005-05-02 22:23:53 -07:00
jfs_inode.c JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_inode.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_lock.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_logmgr.c JFS: Improve sync barrier processing 2005-07-27 09:17:57 -05:00
jfs_logmgr.h JFS: Improve sync barrier processing 2005-07-27 09:17:57 -05:00
jfs_metapage.c JFS: Fix typo in last patch 2005-07-22 11:08:44 -05:00
jfs_metapage.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_mount.c [PATCH] JFS: Support page sizes greater than 4K 2005-05-02 22:23:53 -07:00
jfs_superblock.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_txnmgr.c JFS: Fix race in txLock 2005-08-10 11:14:39 -05:00
jfs_txnmgr.h JFS: fix sparse warnings by moving extern declarations to headers 2005-05-04 15:29:35 -05:00
jfs_types.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_umount.c [PATCH] JFS: Support page sizes greater than 4K 2005-05-02 22:23:53 -07:00
jfs_unicode.c JFS: performance patch 2005-06-23 16:57:56 -05:00
jfs_unicode.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_uniupr.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_xattr.h Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
jfs_xtree.c JFS: Code cleanup - getting rid of never-used debug code 2005-06-27 15:35:37 -05:00
jfs_xtree.h JFS: Code cleanup - getting rid of never-used debug code 2005-06-27 15:35:37 -05:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
namei.c JFS: Initialize dentry->d_op for negative dentries too 2005-08-17 13:53:13 -05:00
resize.c [PATCH] JFS: Support page sizes greater than 4K 2005-05-02 22:23:53 -07:00
super.c [PATCH] disk quotas fail when /etc/mtab is symlinked to /proc/mounts 2005-09-07 16:57:23 -07:00
symlink.c [PATCH] Fix up symlink function pointers 2005-08-19 18:08:21 -07:00
xattr.c JFS: Need to be root to create files with security context 2005-07-13 09:15:18 -05:00