Bug 1484246 - [PATCH] incorrect xattr list handling on FreeBSD
Summary: [PATCH] incorrect xattr list handling on FreeBSD
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: mainline
Hardware: Unspecified
OS: FreeBSD
unspecified
unspecified
Target Milestone: ---
Assignee: nfsmwlin
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1452961
TreeView+ depends on / blocked
 
Reported: 2017-08-23 06:20 UTC by Jiffin
Modified: 2017-12-08 17:39 UTC (History)
4 users (show)

Fixed In Version: glusterfs-3.13.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1452961
Environment:
Last Closed: 2017-12-08 17:39:07 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Jiffin 2017-08-23 06:20:13 UTC
+++ This bug was initially created as a clone of Bug #1452961 +++

Description of problem:
The Linux llistxattr() system call and the FreeBSD extattr_list_link() system call    both get the list of xattrs, but in different format (check the manpages):

Linux: attr<\0>attr<\0>
FreeBSD: <attr_len>attr<attr_len>attr

But in the caller sys_llistxattr and sys_flistxattr do not take the format difference into account.

This patch is based on v3.9.0, it fixes the problem by introducing a new function extattr_list_reshape to reshape the FreeBSD list format into Linux's.

This patch is authored by Iblis Lin <iblis.edu.tw> and tested by Pellaeon Lin <pellaeon>

For your reference, here's the Gist comparing GDB output of volume process with and without patch: https://gist.github.com/pellaeon/bfa9b094e11b47a88bf51f5aa73b9a6d

--- Additional comment from  on 2017-05-21 05:12:02 EDT ---

This patch fixes the problem described by: https://bugzilla.redhat.com/show_bug.cgi?id=1181500#c5

But I'm not sure it'll solve the bug 1181500 .

--- Additional comment from Pranith Kumar K on 2017-07-12 23:00:01 EDT ---

(In reply to nfsmwlin from comment #1)
> This patch fixes the problem described by:
> https://bugzilla.redhat.com/show_bug.cgi?id=1181500#c5
> 
> But I'm not sure it'll solve the bug 1181500 .

hey, this is good patch. Do you want to send the patch on review.gluster.org?

Comment 1 Worker Ant 2017-08-23 06:30:53 UTC
REVIEW: https://review.gluster.org/17917 (posix: fix Bug 1452961 incorrect xattr list handling on FreeBSD) posted (#3) for review on master by Anonymous Coward

Comment 2 Worker Ant 2017-08-23 06:32:22 UTC
REVIEW: https://review.gluster.org/17917 (posix: fix incorrect xattr list handling on FreeBSD) posted (#4) for review on master by jiffin tony Thottan (jthottan)

Comment 3 Worker Ant 2017-08-28 09:34:21 UTC
REVIEW: https://review.gluster.org/17917 (posix: fix incorrect xattr list handling on FreeBSD) posted (#5) for review on master by jiffin tony Thottan (jthottan)

Comment 4 Worker Ant 2017-08-28 10:17:50 UTC
REVIEW: https://review.gluster.org/17917 (posix: fix incorrect xattr list handling on FreeBSD) posted (#6) for review on master by jiffin tony Thottan (jthottan)

Comment 5 Worker Ant 2017-08-29 13:32:56 UTC
COMMIT: https://review.gluster.org/17917 committed in master by Amar Tumballi (amarts) 
------
commit bf7b0b60b1710b19561a2f7c79c3be4d09842b2c
Author: Iblis Lin <iblis.edu.tw>
Date:   Mon Jul 31 11:25:07 2017 +0800

    posix: fix incorrect xattr list handling on FreeBSD
    
    Change-Id: I5be157259f0b665640aaa1eda68063bb19fd7b3d
    BUG: 1484246
    Signed-off-by: Pellaeon Lin <nfsmwlin>
    Signed-off-by: Jiffin Tony Thottan <jthottan>
    Reviewed-on: https://review.gluster.org/17917
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Amar Tumballi <amarts>
    Reviewed-by: Niels de Vos <ndevos>
    CentOS-regression: Gluster Build System <jenkins.org>

Comment 6 Shyamsundar 2017-12-08 17:39:07 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.13.0, please open a new bug report.

glusterfs-3.13.0 has been announced on the Gluster mailinglists [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://lists.gluster.org/pipermail/announce/2017-December/000087.html
[2] https://www.gluster.org/pipermail/gluster-users/


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