[Bugs] [Bug 1138897] NetBSD port

bugzilla at redhat.com bugzilla at redhat.com
Sat Dec 20 09:46:31 UTC 2014


https://bugzilla.redhat.com/show_bug.cgi?id=1138897



--- Comment #70 from Anand Avati <aavati at redhat.com> ---
COMMIT: http://review.gluster.org/9084 committed in release-3.6 by Raghavendra
Bhat (raghavendra at redhat.com) 
------
commit 5c7afe9c1d6086ba1fb1d6e8d352da12a828ad8d
Author: Emmanuel Dreyfus <manu at netbsd.org>
Date:   Mon Nov 10 10:01:00 2014 +0100

    telldir()/seekdir() portability fixes

    POSIX says that an offset obtained from telldir() can only be used
    on the same DIR *. Linux is abls to reuse the offset accross
    closedir()/opendir() for a given directory, but this is not portable
    and such a behavior should be fixed.

    An incomplete fix for the posix xlator was merged in
    http://review.gluster.org/8933
    This change set completes it.

    - Perform the same fix index xlator.
    - Use appropriate casts and variable types so that 32 bit signed
      offsets obtained by telldir() do not get clobbered when copied into
      64 bit signed types.
    - modify afr-self-heald.c so that it does not use anonymous fd,
      since this will cause closedir()/opendir() between each
      syncop_readdir(). On failure we fallback to anonymous fs
      only for Linux so that we can cope with updated client vs not
      updated brick.
    - Avoid sending an EINVAL when the client request for the EOF offset.
      Here we fix an error in previous fix for posix xlator: since we
      fill each directory entry with the offset of the next entry, we
      must consider as EOF the offset of the last entry, and not the
      value of telldir() after we read it.

    This is a backport of I59fb7f06a872c4f98987105792d648141c258c6a

    BUG: 1138897
    Change-Id: I1e9f3e4a7d780b98adf6d9f197ee2198d43ef94d
    Signed-off-by: Emmanuel Dreyfus <manu at netbsd.org>
    Reviewed-on: http://review.gluster.org/9084
    Tested-by: Gluster Build System <jenkins at build.gluster.com>
    Reviewed-by: Raghavendra Bhat <raghavendra at redhat.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list