Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Meta server: fix return code of Tree::getalloc(fid, offset, chunk_inf…

…o_vector, max_chunks) in the case when leaf node search returns next file, i.e. no chunks exists after the specified offset.
  • Loading branch information...
commit 739a9bb4c3288fdbb30f407a1d1ceadfbc87dd74 1 parent a6324c7
@mikeov mikeov authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/cc/meta/kfsops.cc
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.