Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw
* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-nmw: (51 commits) [DLM] block dlm_recv in recovery transition [DLM] don't overwrite castparam if it's NULL [GFS2] Get superblock a different way [GFS2] Don't try to remove buffers that don't exist [GFS2] Alternate gfs2_iget to avoid looking up inodes being freed [GFS2] Data corruption fix [GFS2] Clean up journaled data writing [GFS2] GFS2: chmod hung - fix race in thread creation [DLM] Make dlm_sendd cond_resched more [GFS2] Move inode deletion out of blocking_cb [GFS2] flocks from same process trip kernel BUG at fs/gfs2/glock.c:1118! [GFS2] Clean up gfs2_trans_add_revoke() [GFS2] Use slab operations for all gfs2_bufdata allocations [GFS2] Replace revoke structure with bufdata structure [GFS2] Fix ordering of dirty/journal for ordered buffer unstuffing [GFS2] Clean up ordered write code [GFS2] Move pin/unpin into lops.c, clean up locking [GFS2] Don't mark jdata dirty in gfs2_unstuffer_page() [GFS2] Introduce gfs2_remove_from_ail [GFS2] Correct lock ordering in unlink ...
This commit is contained in:
@@ -169,6 +169,33 @@ struct gfs2_rgrp {
|
||||
__u8 rg_reserved[80]; /* Several fields from gfs1 now reserved */
|
||||
};
|
||||
|
||||
/*
|
||||
* quota linked list: user quotas and group quotas form two separate
|
||||
* singly linked lists. ll_next stores uids or gids of next quotas in the
|
||||
* linked list.
|
||||
|
||||
Given the uid/gid, how to calculate the quota file offsets for the corresponding
|
||||
gfs2_quota structures on disk:
|
||||
|
||||
for user quotas, given uid,
|
||||
offset = uid * sizeof(struct gfs2_quota);
|
||||
|
||||
for group quotas, given gid,
|
||||
offset = (gid * sizeof(struct gfs2_quota)) + sizeof(struct gfs2_quota);
|
||||
|
||||
|
||||
uid:0 gid:0 uid:12 gid:12 uid:17 gid:17 uid:5142 gid:5142
|
||||
+-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+
|
||||
| valid | valid | :: | valid | valid | :: | valid | inval | :: | inval | valid |
|
||||
+-------+-------+ +-------+-------+ +-------+- - - -+ +- - - -+-------+
|
||||
next:12 next:12 next:17 next:5142 next:NULL next:NULL
|
||||
| | | | |<-- user quota list |
|
||||
\______|___________/ \______|___________/ group quota list -->|
|
||||
| | |
|
||||
\__________________/ \_______________________________________/
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
* quota structure
|
||||
*/
|
||||
@@ -177,7 +204,8 @@ struct gfs2_quota {
|
||||
__be64 qu_limit;
|
||||
__be64 qu_warn;
|
||||
__be64 qu_value;
|
||||
__u8 qu_reserved[64];
|
||||
__be32 qu_ll_next; /* location of next quota in list */
|
||||
__u8 qu_reserved[60];
|
||||
};
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user