Whamcloud - gitweb
LU-1842 quota: helper routines to manage FID_SEQ_QUOTA_GLB
The FID_SEQ_QUOTA_GLB sequence is used to produce FID for global
quota indexes. The 32-bit object ID is thus divided into 3 fields
containing:
- 16-bit pool identifier (aka pool_id)
- 8-bit quota type (aka LQUOTA_TYPE_{USR,GRP})
- 8-bit resource type (LQUOTA_RES_{MD,DT} for resp. inodes & blocks)
This static FID scheme allows slaves to enqueue global quota lock
directly on the right FID without requiring a first readdir or to
change the resource ID on the fly when the lock is granted.
This patch adds the helper routines to manipulate global index FIDs.
Signed-off-by: Johann Lombardi <johann@whamcloud.com>
Change-Id: I145c1468db7fe0d2a0f198ac323b00913a815c3c
Reviewed-on: http://review.whamcloud.com/3937
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Niu Yawei <niu@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>