FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 05-04-2010, 10:10 PM
Christoph Hellwig
 
Default gfs2: fix quota state reporting

We need to report both the accounting and enforcing flags if we are
in enforcing mode.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: xfs/fs/gfs2/quota.c
================================================== =================
--- xfs.orig/fs/gfs2/quota.c 2010-05-04 23:16:59.718256886 +0200
+++ xfs/fs/gfs2/quota.c 2010-05-04 23:54:25.643255558 +0200
@@ -1418,10 +1418,18 @@ static int gfs2_quota_get_xstate(struct

memset(fqs, 0, sizeof(struct fs_quota_stat));
fqs->qs_version = FS_QSTAT_VERSION;
- if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON)
- fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
- else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT)
- fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
+
+ switch (sdp->sd_args.ar_quota) {
+ case GFS2_QUOTA_ON:
+ fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
+ /*FALLTHRU*/
+ case GFS2_QUOTA_ACCOUNT:
+ fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
+ break;
+ case GFS2_QUOTA_OFF:
+ break;
+ }
+
if (sdp->sd_quota_inode) {
fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr;
fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks;
 
Old 05-05-2010, 09:07 AM
Steven Whitehouse
 
Default gfs2: fix quota state reporting

Hi,

Now in the GFS2 -nmw git tree. Thanks,

Steve.

On Wed, 2010-05-05 at 00:10 +0200, Christoph Hellwig wrote:
> We need to report both the accounting and enforcing flags if we are
> in enforcing mode.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: xfs/fs/gfs2/quota.c
> ================================================== =================
> --- xfs.orig/fs/gfs2/quota.c 2010-05-04 23:16:59.718256886 +0200
> +++ xfs/fs/gfs2/quota.c 2010-05-04 23:54:25.643255558 +0200
> @@ -1418,10 +1418,18 @@ static int gfs2_quota_get_xstate(struct
>
> memset(fqs, 0, sizeof(struct fs_quota_stat));
> fqs->qs_version = FS_QSTAT_VERSION;
> - if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON)
> - fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
> - else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT)
> - fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
> +
> + switch (sdp->sd_args.ar_quota) {
> + case GFS2_QUOTA_ON:
> + fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
> + /*FALLTHRU*/
> + case GFS2_QUOTA_ACCOUNT:
> + fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
> + break;
> + case GFS2_QUOTA_OFF:
> + break;
> + }
> +
> if (sdp->sd_quota_inode) {
> fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr;
> fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks;
 
Old 05-17-2010, 12:40 PM
Steven Whitehouse
 
Default GFS2: fix quota state reporting

From: Christoph Hellwig <hch@lst.de>

We need to report both the accounting and enforcing flags if we are
in enforcing mode.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
---
fs/gfs2/quota.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/fs/gfs2/quota.c b/fs/gfs2/quota.c
index 6dbcbad..6ca0967 100644
--- a/fs/gfs2/quota.c
+++ b/fs/gfs2/quota.c
@@ -1418,10 +1418,18 @@ static int gfs2_quota_get_xstate(struct super_block *sb,

memset(fqs, 0, sizeof(struct fs_quota_stat));
fqs->qs_version = FS_QSTAT_VERSION;
- if (sdp->sd_args.ar_quota == GFS2_QUOTA_ON)
- fqs->qs_flags = (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
- else if (sdp->sd_args.ar_quota == GFS2_QUOTA_ACCOUNT)
- fqs->qs_flags = (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
+
+ switch (sdp->sd_args.ar_quota) {
+ case GFS2_QUOTA_ON:
+ fqs->qs_flags |= (XFS_QUOTA_UDQ_ENFD | XFS_QUOTA_GDQ_ENFD);
+ /*FALLTHRU*/
+ case GFS2_QUOTA_ACCOUNT:
+ fqs->qs_flags |= (XFS_QUOTA_UDQ_ACCT | XFS_QUOTA_GDQ_ACCT);
+ break;
+ case GFS2_QUOTA_OFF:
+ break;
+ }
+
if (sdp->sd_quota_inode) {
fqs->qs_uquota.qfs_ino = GFS2_I(sdp->sd_quota_inode)->i_no_addr;
fqs->qs_uquota.qfs_nblks = sdp->sd_quota_inode->i_blocks;
--
1.6.2.5
 

Thread Tools




All times are GMT. The time now is 02:53 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org