X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Finclude%2Flustre_idmap.h;h=35f55eb75570719bebabdd1832813e7721585034;hb=210803a2475862464045b609eee43237d74e853b;hp=3f4015a93db6e1d7d2662a4a5cddea4a89e16538;hpb=72057a3af19ee02d9a686bd7e7d074917e381310;p=fs%2Flustre-release.git diff --git a/lustre/include/lustre_idmap.h b/lustre/include/lustre_idmap.h index 3f4015a..35f55eb 100644 --- a/lustre/include/lustre_idmap.h +++ b/lustre/include/lustre_idmap.h @@ -23,11 +23,10 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. * * lustre/lustre/include/lustre_idmap.h * @@ -45,11 +44,20 @@ #include +#ifdef HAVE_GROUP_INFO_GID + +#define CFS_GROUP_AT(gi, i) ((gi)->gid[(i)]) + +#else /* !HAVE_GROUP_INFO_GID */ + #define CFS_NGROUPS_PER_BLOCK ((int)(PAGE_SIZE / sizeof(gid_t))) #define CFS_GROUP_AT(gi, i) \ ((gi)->blocks[(i) / CFS_NGROUPS_PER_BLOCK][(i) % CFS_NGROUPS_PER_BLOCK]) +#endif /* HAVE_GROUP_INFO_GID */ + +#include struct lu_ucred;