Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-15880 quota: fix issues in reserving quota
[fs/lustre-release.git]
/
lustre
/
osd-ldiskfs
/
osd_handler.c
diff --git
a/lustre/osd-ldiskfs/osd_handler.c
b/lustre/osd-ldiskfs/osd_handler.c
index
8d45211
..
ab7facf
100644
(file)
--- a/
lustre/osd-ldiskfs/osd_handler.c
+++ b/
lustre/osd-ldiskfs/osd_handler.c
@@
-2541,23
+2541,20
@@
const int osd_dto_credits_noquota[DTO_NR] = {
/* reserve or free quota for some operation */
static int osd_reserve_or_free_quota(const struct lu_env *env,
struct dt_device *dev,
/* 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_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;
struct qsd_instance *qsd = NULL;
+ int rc;
ENTRY;
ENTRY;
- if (is_md)
- qsd = osd->od_quota_slave_md;
- else
+ if (qi->lqi_is_blk)
qsd = osd->od_quota_slave_dt;
qsd = osd->od_quota_slave_dt;
+ else
+ qsd = osd->od_quota_slave_md;
- rc = q
uota_reserve_or_free(env, qsd, qi, type, uid, gid, count, is_md
);
+ rc = q
sd_reserve_or_free_quota(env, qsd, qi
);
RETURN(rc);
}
RETURN(rc);
}