Skip to content
This repository
Browse code

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

  • Loading branch information...
commit a7f77bc2bf4b4df26b44e1ff15cd98f1d8172538 2 parents eef3dc4 + 8a10497
Jeremy R. Fishman authored

Showing 2 changed files with 6 additions and 1 deletion. Show diff stats Hide diff stats

  1. +3 0  src/cc/meta/MetaRequest.cc
  2. +3 1 src/cc/meta/kfsops.cc
3  src/cc/meta/MetaRequest.cc
@@ -1326,6 +1326,9 @@ MetaGetlayout::handle()
1326 1326 } else {
1327 1327 status = metatree.getalloc(fid, startOffset, chunkInfo,
1328 1328 maxResCnt > 0 ? maxResCnt + 1 : maxResCnt);
  1329 + if (status == -ENOENT && (fa = metatree.getFattr(fid))) {
  1330 + status = 0;
  1331 + }
1329 1332 }
1330 1333 if (status != 0) {
1331 1334 return;
4 src/cc/meta/kfsops.cc
@@ -1418,16 +1418,18 @@ Tree::getalloc(fid_t fid, chunkOff_t offset, vector<MetaChunkInfo*>& v, int maxC
1418 1418 if (! l) {
1419 1419 return -ENOENT;
1420 1420 }
  1421 + int ret = -ENOENT;
1421 1422 int maxRet = max(0, maxChunks);
1422 1423 ChunkIterator cit(l, kp, fid);
1423 1424 MetaChunkInfo* ci;
1424 1425 while ((ci = cit.next())) {
  1426 + ret = 0;
1425 1427 v.push_back(ci);
1426 1428 if (--maxRet == 0) {
1427 1429 break;
1428 1430 }
1429 1431 }
1430   - return 0;
  1432 + return ret;
1431 1433 }
1432 1434
1433 1435 /*!

0 comments on commit a7f77bc

Please sign in to comment.
Something went wrong with that request. Please try again.