/*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
- */
-/*
- * Copyright (c) 2011 Whamcloud, Inc.
+ *
+ * Copyright (c) 2011, 2012, Whamcloud, Inc.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
return NULL;
LASSERT(osd->od_oi_table != NULL && osd->od_oi_count >= 1);
- return &osd->od_oi_table[fid->f_seq % osd->od_oi_count];
+ /* It can work even od_oi_count equals to 1 although it's unexpected,
+ * the only reason we set it to 1 is for performance measurement */
+ return &osd->od_oi_table[fid->f_seq & (osd->od_oi_count - 1)];
}
#endif /* __KERNEL__ */