Skip to content

Commit

Permalink
orangefs: count directory pieces correctly
Browse files Browse the repository at this point in the history
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: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
  • Loading branch information
Martin Brandenburg authored and Mike Marshall committed May 4, 2017
1 parent 942835d commit 2f713b5
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions fs/orangefs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2f713b5

Please sign in to comment.