This fixes an assert when len=0 in file_to_extents when we get some weird
metadata from the MDS.
Fixes: #778
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
<< truncate_size << dendl;
in->truncate_size = truncate_size;
in->oset.truncate_size = truncate_size;
- if (g_conf.client_oc && prior_size) { //do actual truncation
+ if (g_conf.client_oc && prior_size > truncate_size) { //do actual truncation
vector<ObjectExtent> ls;
filer->file_to_extents(in->ino, &in->layout,
truncate_size, prior_size - truncate_size,