quota: don't disable accounting with quotaoff
PATCH 1/1 quota: don't disable accounting with quotaoff
The quotaon(8) man page says:
NOTES ON XFS FILESYSTEMS
...
To turn off quota limit enforcement on any XFS filesys- tem, first make sure that quota accounting and enforce- ment are both turned on using repquota -v filesystem. Then, use quotaoff -v filesystem to disable limit
enforcement. This may be done while the filesystem is
mounted.
Turning on quota limit enforcement on an XFS filesystem is achieved using quotaon -v filesystem. This may be done while the filesystem is mounted
however, quotaoff turns off both enforcement -and- accounting, and then quotaon fails.
If the manpage describes the intended behavior, then I think the following patch is needed.
---
quotaon_xfs.c +3 -4
@@ -208,10 +208,9 @@ }#endif /* XFS_ROOTHACK */ -if (xarg ==NULL ) {/* both acct & enfd on/off */ - xopts |= (type ==USRQUOTA ) ? - (XFS_QUOTA_UDQ_ACCT |XFS_QUOTA_UDQ_ENFD ) : - (XFS_QUOTA_GDQ_ACCT |XFS_QUOTA_GDQ_ENFD ); +if (xarg ==NULL ) {/* only enfd on/off */ + xopts |= (type ==USRQUOTA ) ?XFS_QUOTA_UDQ_ENFD : +XFS_QUOTA_GDQ_ENFD ; err =xfs_onoff ((char *)dev, type, flags, roothack, xopts); }else if (strcmp (xarg,"account" ) ==0 ) {
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Hi,
Quoted 15 lines · Eric Sandeen
The quotaon(8) man page says:
NOTES ON XFS FILESYSTEMS
...
To turn off quota limit enforcement on any XFS filesys- tem, first make sure that quota accounting and enforce- ment are both turned on using repquota -v filesystem. Then, use quotaoff -v filesystem to disable limit
enforcement. This may be done while the filesystem is
mounted.Turning on quota limit enforcement on an XFS filesystem is achieved using quotaon -v filesystem. This may be done while the filesystem is mounted
Quoted 5 lines
however, quotaoff turns off both enforcement -and- accounting, and then quotaon fails.
If the manpage describes the intended behavior, then I think the following patch is needed.
Yes, I think this behavior makes more sence. Applied.
Honza
Quoted 21 lines
Signed-off-by Eric Sandeen <[email protected]>---
quotaon_xfs.c +3
-4@@ -208,10 +208,9 @@ }#endif /* XFS_ROOTHACK */ -if (xarg ==NULL ) {/* both acct & enfd on/off */ - xopts |= (type ==USRQUOTA ) ? - (XFS_QUOTA_UDQ_ACCT |XFS_QUOTA_UDQ_ENFD ) : - (XFS_QUOTA_GDQ_ACCT |XFS_QUOTA_GDQ_ENFD ); +if (xarg ==NULL ) {/* only enfd on/off */ + xopts |= (type ==USRQUOTA ) ?XFS_QUOTA_UDQ_ENFD : +XFS_QUOTA_GDQ_ENFD ; err =xfs_onoff ((char *)dev, type, flags, roothack, xopts); }else if (strcmp (xarg,"account" ) ==0 ) {
Signature · 7 lines
Jan Kara <[email protected]> SUSE Labs, CR _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs