Bug 1103591 - snapshot xlator's use of offset in dirent structure causes build failure in NetBSD
Summary: snapshot xlator's use of offset in dirent structure causes build failure in N...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: unclassified
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Raghavendra Bhat
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-06-02 07:23 UTC by Raghavendra Bhat
Modified: 2014-11-11 08:33 UTC (History)
2 users (show)

Fixed In Version: glusterfs-3.6.0beta1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-11-11 08:33:48 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Raghavendra Bhat 2014-06-02 07:23:52 UTC
Description of problem:

NetBSD build chokes in master because of struct dirent usage in
snapview-server.c:svs_glfs_readdir()

Linux and NetBSD struct dirent do not have the same layout, and in fact
the whole buffer returned by readdir() has a different layout and is not
straightforward to convert. 

In snapview-server xlator, upon doing the readdir from one of the snapshots on a directory via gfapi call (glfs_readdir_r), the offset field of the struct dirent that is obtained from readdir call is copied to gf_dirent_t structure directly. It causes failure in NetBSD as the struct dirent structure there does not contain the offset member. 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:
Build fails on NetBSD

Expected results:


Additional info:

Comment 1 Anand Avati 2014-06-02 07:31:31 UTC
REVIEW: http://review.gluster.org/7946 (snapview-server: use telldir api to get the offset of the dentry) posted (#1) for review on master by Raghavendra Bhat (raghavendra)

Comment 2 Anand Avati 2014-06-03 05:34:24 UTC
COMMIT: http://review.gluster.org/7946 committed in master by Vijay Bellur (vbellur) 
------
commit 15f7b4de1124a37a53c7ddb5635b005322b23025
Author: Raghavendra Bhat <raghavendra>
Date:   Mon Jun 2 12:54:52 2014 +0530

    snapview-server: use telldir api to get the offset of the dentry
    
    * dirent structure (struct dirent) in NetBSD does not contain the offset
      member. Direct access of offset from struct dirent (used here to copy
      its contents to gf_dirent_t structure after making readdir call) causes
      glusterfs build failures on NetBSD. So like posix does, use telldir api
      to get the offset of the dentry (in this case glfs_telldir).
    
    Change-Id: I72472c16cbf55dd99ea80ba982b0a4205e6ebffb
    BUG: 1103591
    Signed-off-by: Raghavendra Bhat <raghavendra>
    Reviewed-on: http://review.gluster.org/7946
    Reviewed-by: Harshavardhana <harsha>
    Reviewed-by: Emmanuel Dreyfus <manu>
    Tested-by: Gluster Build System <jenkins.com>
    Reviewed-by: Vijay Bellur <vbellur>

Comment 3 Niels de Vos 2014-09-22 12:41:34 UTC
A beta release for GlusterFS 3.6.0 has been released. Please verify if the release solves this bug report for you. In case the glusterfs-3.6.0beta1 release does not have a resolution for this issue, leave a comment in this bug and move the status to ASSIGNED. If this release fixes the problem for you, leave a note and change the status to VERIFIED.

Packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update (possibly an "updates-testing" repository) infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-September/018836.html
[2] http://supercolony.gluster.org/pipermail/gluster-users/

Comment 4 Niels de Vos 2014-11-11 08:33:48 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.6.1, please reopen this bug report.

glusterfs-3.6.1 has been announced [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://supercolony.gluster.org/pipermail/gluster-users/2014-November/019410.html
[2] http://supercolony.gluster.org/mailman/listinfo/gluster-users


Note You need to log in before you can comment on or make changes to this bug.