as object's uid/gid can change after declaration in a concurrent
thread, we can't really trust them to optimaze credits calculation.
so only target uid/gid (what we declare to change to) can be used
for optimization.
Fixes:
9f79d4488 ("LU-10048 ofd: take local locks within transaction")
Signed-off-by: Alex Zhuravlev <bzzz@whamcloud.com>
Change-Id: If859e64033487574ebb670e80f11c968f1595d00
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/57570
Reviewed-by: Mikhail Pershin <mpershin@whamcloud.com>
Reviewed-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
RETURN(rc);
}
- if (qi->lqi_id.qid_uid == 0) {
- /* root ID should be always present in the quota file */
+ if (qi->lqi_id.qid_uid == 0 && qi->lqi_space > 0) {
+ /* root ID should be always present in the quota file,
+ * also only "target" uid (where we add space) is
+ * guaranteed, the source one can change after the
+ * declaration */
crd = 1;
} else {
/* can't rely on the current state as it can change