Emmanuel Dreyfus 22e18a4c0c Avoid spurious EINVAL in posix_readdir()
On non Linux systems, we check that seekdir() succeeds and we return
EINVAL if it does not. We need this to avoid infinite loops if some
other component in GlusterFS makes an invalid seekdir() usage. This
was introduced in this change: http://review.gluster.org/#/c/8760/

But seekdir() also fails when using the offset returned for the
last entry, and this is expected behavior. As a result, the seekdir()
test produces a spurious EINVAL when reaching end of directory. That
error is not propagated to calling process, but it may harm internal
GlusterFS processing. At least it produce a spurious error message
in brick's log.

We fix the problem by remembering the last entry offset in fd private
data. When a new posix_readdir() invocation requests that offset,
we avoid returning EINVAL.

BUG: 1129939
Change-Id: I4e67a2ea46538aae63eea663dd4aa33b16ad24c7
Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org>
Reviewed-on: http://review.gluster.org/8926
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
2014-10-29 02:26:32 -07:00
2014-10-15 01:22:02 -07:00
2014-10-18 12:15:48 -07:00
2014-10-27 04:40:55 -07:00
2014-04-16 06:38:06 -07:00
2010-03-12 04:09:34 -08:00
2014-10-15 01:22:02 -07:00
2014-09-02 11:17:03 -07:00
2014-10-15 01:22:02 -07:00
2011-07-18 17:24:14 +05:30
2011-07-18 15:47:16 +05:30
2014-09-16 02:30:36 -07:00

For more info, please visit http://www.gluster.org/.
Description
No description provided
Readme 86 MiB
Languages
C 86.6%
Shell 7.5%
Python 3.6%
Perl 0.7%
Makefile 0.4%
Other 0.9%