Skip to content

Commit

Permalink
GFS2: Don't use MAXQUOTAS value
Browse files Browse the repository at this point in the history
MAXQUOTAS value defines maximum number of quota types VFS supports.
This isn't necessarily the number of types gfs2 supports and with
addition of project quotas these two numbers stop matching. So make gfs2
use its private definition.

CC: cluster-devel@redhat.com
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Jan Kara authored and Steven Whitehouse committed Sep 11, 2014
1 parent 7b7a911 commit a937cca
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/gfs2/incore.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,9 @@ struct gfs2_holder {
unsigned long gh_ip;
};

/* Number of quota types we support */
#define GFS2_MAXQUOTAS 2

/* Resource group multi-block reservation, in order of appearance:
Step 1. Function prepares to write, allocates a mb, sets the size hint.
Expand All @@ -282,8 +285,8 @@ struct gfs2_blkreserv {
u64 rs_inum; /* Inode number for reservation */

/* ancillary quota stuff */
struct gfs2_quota_data *rs_qa_qd[2 * MAXQUOTAS];
struct gfs2_holder rs_qa_qd_ghs[2 * MAXQUOTAS];
struct gfs2_quota_data *rs_qa_qd[2 * GFS2_MAXQUOTAS];
struct gfs2_holder rs_qa_qd_ghs[2 * GFS2_MAXQUOTAS];
unsigned int rs_qa_qd_num;
};

Expand Down

0 comments on commit a937cca

Please sign in to comment.