Whamcloud - gitweb
LU-1305 lu: fid_is_acct function
authorAlex Zhuravlev <bzzz@whamcloud.com>
Wed, 23 May 2012 07:54:00 +0000 (11:54 +0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 1 Jun 2012 17:52:57 +0000 (13:52 -0400)
a helper introduced in orion for new quota componenent

Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: Iee557fbd8f910c49b65e1b66330e6906d6efe975
Reviewed-on: http://review.whamcloud.com/2882
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_fid.h

index 4e6955e..e4c8324 100644 (file)
@@ -128,6 +128,13 @@ static inline void lu_local_obj_fid(struct lu_fid *fid, __u32 oid)
         fid->f_ver = 0;
 }
 
+static inline int fid_is_acct(const struct lu_fid *fid)
+{
+        return fid_seq(fid) == FID_SEQ_LOCAL_FILE &&
+               (fid_oid(fid) == ACCT_USER_OID ||
+                fid_oid(fid) == ACCT_GROUP_OID);
+}
+
 enum lu_mgr_type {
         LUSTRE_SEQ_SERVER,
         LUSTRE_SEQ_CONTROLLER