static uint64_t osd_objset_user_iused(struct osd_device *osd, uint64_t uidbytes)
{
uint64_t refdbytes, availbytes, usedobjs, availobjs;
- uint64_t uidobjs;
+ uint64_t uidobjs, bshift;
/* get fresh statfs info */
dmu_objset_space(osd->od_os, &refdbytes, &availbytes,
&usedobjs, &availobjs);
/* estimate the number of objects based on the disk usage */
+ bshift = fls64(osd->od_max_blksz) - 1;
uidobjs = osd_objs_count_estimate(refdbytes, usedobjs,
- uidbytes >> SPA_MAXBLOCKSHIFT);
+ uidbytes >> bshift, bshift);
if (uidbytes > 0)
/* if we have at least 1 byte, we have at least one dnode ... */
uidobjs = max_t(uint64_t, uidobjs, 1);
* \param dtrec - is the record to fill with space usage information
* \param dtkey - is the id the of the user or group for which we would
* like to access disk usage.
- * \param capa - is the capability, not used.
*
* \retval +ve - success : exact match
* \retval -ve - failure
static int osd_acct_index_lookup(const struct lu_env *env,
struct dt_object *dtobj,
struct dt_rec *dtrec,
- const struct dt_key *dtkey,
- struct lustre_capa *capa)
+ const struct dt_key *dtkey)
{
struct osd_thread_info *info = osd_oti_get(env);
char *buf = info->oti_buf;
*
* \param dt - osd index object
* \param attr - not used
- * \param capa - BYPASS_CAPA
*/
static struct dt_it *osd_it_acct_init(const struct lu_env *env,
struct dt_object *dt,
- __u32 attr,
- struct lustre_capa *capa)
+ __u32 attr)
{
struct osd_thread_info *info = osd_oti_get(env);
struct osd_it_quota *it;