static uint64_t osd_objset_user_iused(struct osd_device *osd, uint64_t uidbytes)
{
uint64_t refdbytes, availbytes, usedobjs, availobjs;
static uint64_t osd_objset_user_iused(struct osd_device *osd, uint64_t uidbytes)
{
uint64_t refdbytes, availbytes, usedobjs, availobjs;
/* get fresh statfs info */
dmu_objset_space(osd->od_os, &refdbytes, &availbytes,
&usedobjs, &availobjs);
/* estimate the number of objects based on the disk usage */
/* get fresh statfs info */
dmu_objset_space(osd->od_os, &refdbytes, &availbytes,
&usedobjs, &availobjs);
/* estimate the number of objects based on the disk usage */
if (uidbytes > 0)
/* if we have at least 1 byte, we have at least one dnode ... */
uidobjs = max_t(uint64_t, uidobjs, 1);
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 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.
- if (info->oti_it_inline) {
- OBD_ALLOC_PTR(it);
- if (it == NULL)
- RETURN(ERR_PTR(-ENOMEM));
- } else {
- it = &info->oti_it_quota;
- info->oti_it_inline = 1;
- }
+ OBD_ALLOC_PTR(it);
+ if (it == NULL)
+ RETURN(ERR_PTR(-ENOMEM));
memset(it, 0, sizeof(*it));
it->oiq_oid = osd_quota_fid2dmu(lu_object_fid(lo));
memset(it, 0, sizeof(*it));
it->oiq_oid = osd_quota_fid2dmu(lu_object_fid(lo));
/* initialize zap cursor */
rc = osd_zap_cursor_init(&it->oiq_zc, osd->od_os, it->oiq_oid, 0);
if (rc != 0) {
/* initialize zap cursor */
rc = osd_zap_cursor_init(&it->oiq_zc, osd->od_os, it->oiq_oid, 0);
if (rc != 0) {
struct osd_it_quota *it = (struct osd_it_quota *)di;
ENTRY;
osd_zap_cursor_fini(it->oiq_zc);
lu_object_put(env, &it->oiq_obj->oo_dt.do_lu);
struct osd_it_quota *it = (struct osd_it_quota *)di;
ENTRY;
osd_zap_cursor_fini(it->oiq_zc);
lu_object_put(env, &it->oiq_obj->oo_dt.do_lu);