Commit 2f713b5c authored by Martin Brandenburg's avatar Martin Brandenburg Committed by Mike Marshall

orangefs: count directory pieces correctly

A large directory full of differently sized file names triggered this.
Most directories, even very large directories with shorter names, would
be lucky enough to fit in one server response.
Signed-off-by: default avatarMartin Brandenburg <martin@omnibond.com>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 942835d6
......@@ -135,9 +135,12 @@ static int parse_readdir(struct orangefs_dir *od,
count = 1;
part = od->part;
while (part && part->next) {
part = part->next;
while (part) {
count++;
if (part->next)
part = part->next;
else
break;
}
new = (void *)op->downcall.trailer_buf;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment