X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fosd-zfs%2Fosd_handler.c;h=7d1b579b2204e9d6588e61c918a7a287d3b7dacf;hb=40daa59ac41f450b60b42eb2bb0ff42ebd3c998b;hp=ecc043f25dea9cf20de9e1ee03f25633cccd5e78;hpb=9b973ad37f66a10eb7db1ced6865708497ecc02b;p=fs%2Flustre-release.git diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index ecc043f..7d1b579 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -701,21 +701,20 @@ static int osd_ro(const struct lu_env *env, struct dt_device *d) /* reserve or free quota for some operation */ static int osd_reserve_or_free_quota(const struct lu_env *env, struct dt_device *dev, - enum quota_type type, __u64 uid, - __u64 gid, __s64 count, bool is_md) + struct lquota_id_info *qi) { - int rc; struct osd_device *osd = osd_dt_dev(dev); - struct osd_thread_info *info = osd_oti_get(env); - struct lquota_id_info *qi = &info->oti_qi; struct qsd_instance *qsd = NULL; + int rc; - if (is_md) - qsd = osd->od_quota_slave_md; - else + ENTRY; + + if (qi->lqi_is_blk) qsd = osd->od_quota_slave_dt; + else + qsd = osd->od_quota_slave_md; - rc = quota_reserve_or_free(env, qsd, qi, type, uid, gid, count, is_md); + rc = qsd_reserve_or_free_quota(env, qsd, qi); RETURN(rc); }