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-10370 ofd: truncate does not update blocks count on client
[fs/lustre-release.git]
/
lustre
/
ofd
/
ofd_dev.c
diff --git
a/lustre/ofd/ofd_dev.c
b/lustre/ofd/ofd_dev.c
index
7e306ff
..
c2cda39
100644
(file)
--- a/
lustre/ofd/ofd_dev.c
+++ b/
lustre/ofd/ofd_dev.c
@@
-2081,7
+2081,12
@@
out:
res = ldlm_resource_get(ns, NULL, &tsi->tsi_resid,
LDLM_EXTENT, 0);
if (!IS_ERR(res)) {
res = ldlm_resource_get(ns, NULL, &tsi->tsi_resid,
LDLM_EXTENT, 0);
if (!IS_ERR(res)) {
+ struct ost_lvb *res_lvb;
+
ldlm_res_lvbo_update(res, NULL, 0);
ldlm_res_lvbo_update(res, NULL, 0);
+ res_lvb = res->lr_lvb_data;
+ repbody->oa.o_valid |= OBD_MD_FLBLOCKS;
+ repbody->oa.o_blocks = res_lvb->lvb_blocks;
ldlm_resource_putref(res);
}
}
ldlm_resource_putref(res);
}
}