Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

  • Loading branch information...
commit a7f77bc2bf4b4df26b44e1ff15cd98f1d8172538 2 parents eef3dc4 + 8a10497
Jeremy R. Fishman authored
Showing with 6 additions and 1 deletion.
  1. +3 −0  src/cc/meta/MetaRequest.cc
  2. +3 −1 src/cc/meta/kfsops.cc
View
3  src/cc/meta/MetaRequest.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
4 src/cc/meta/kfsops.cc
@@ -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;
}
/*!
Please sign in to comment.
Something went wrong with that request. Please try again.