[Bugs] [Bug 1138897] NetBSD port
bugzilla at redhat.com
bugzilla at redhat.com
Wed Oct 29 09:27:00 UTC 2014
https://bugzilla.redhat.com/show_bug.cgi?id=1138897
--- Comment #49 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/8933 committed in release-3.6 by Vijay Bellur
(vbellur at redhat.com)
------
commit 190f43f1818e097a4e4f041c4f56516b067632f0
Author: Emmanuel Dreyfus <manu at netbsd.org>
Date: Wed Oct 15 14:09:16 2014 +0200
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.
Backport of I4e67a2ea46538aae63eea663dd4aa33b16ad24c7
BUG: 1138897
Change-Id: I4e98294d157f67ae1a1f0ece1562c77d1219da40
Signed-off-by: Emmanuel Dreyfus <manu at netbsd.org>
Reviewed-on: http://review.gluster.org/8933
Tested-by: Gluster Build System <jenkins at build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur at redhat.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=alUidSa0u2&a=cc_unsubscribe
More information about the Bugs
mailing list