Permalink
Browse files

Merge branch 'master' of github.com:quantcast/qfs

  • Loading branch information...
2 parents eef3dc4 + 8a10497 commit a7f77bc2bf4b4df26b44e1ff15cd98f1d8172538 Jeremy R. Fishman committed Feb 14, 2013
Showing with 6 additions and 1 deletion.
  1. +3 −0 src/cc/meta/MetaRequest.cc
  2. +3 −1 src/cc/meta/kfsops.cc
@@ -1326,6 +1326,9 @@ MetaGetlayout::handle()
} else {
status = metatree.getalloc(fid, startOffset, chunkInfo,
maxResCnt > 0 ? maxResCnt + 1 : maxResCnt);
+ if (status == -ENOENT && (fa = metatree.getFattr(fid))) {
+ status = 0;
+ }
}
if (status != 0) {
return;
View
@@ -1418,16 +1418,18 @@ Tree::getalloc(fid_t fid, chunkOff_t offset, vector<MetaChunkInfo*>& v, int maxC
if (! l) {
return -ENOENT;
}
+ int ret = -ENOENT;
int maxRet = max(0, maxChunks);
ChunkIterator cit(l, kp, fid);
MetaChunkInfo* ci;
while ((ci = cit.next())) {
+ ret = 0;
v.push_back(ci);
if (--maxRet == 0) {
break;
}
}
- return 0;
+ return ret;
}
/*!

0 comments on commit a7f77bc

Please sign in to comment.