]> git.baikalelectronics.ru Git - kernel.git/commit
orangefs: skip forward to the next directory entry if seek is short
authorMartin Brandenburg <martin@omnibond.com>
Tue, 2 May 2017 16:15:10 +0000 (12:15 -0400)
committerMike Marshall <hubcap@omnibond.com>
Thu, 4 May 2017 18:38:10 +0000 (14:38 -0400)
commit6a8f295ceca2df1806160606b56eb618358b0fef
tree9f5c413977e91c7fe6df153bc625833ad2ae78eb
parentc279640847c3998334281c32ebfd1c2d27d10086
orangefs: skip forward to the next directory entry if seek is short

If userspace seeks to a position in the stream which is not correct, it
would have returned EIO because the data in the buffer at that offset
would be incorrect.  This and the userspace daemon returning a corrupt
directory are indistinguishable.

Now if the data does not look right, skip forward to the next chunk and
try again.  The motivation is that if the directory changes, an
application may seek to a position that was valid and no longer is valid.

It is not yet possible for a directory to change.

Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Signed-off-by: Mike Marshall <hubcap@omnibond.com>
fs/orangefs/dir.c