Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1452961

Summary: [PATCH] incorrect xattr list handling on FreeBSD
Product: [Community] GlusterFS Reporter: nfsmwlin
Component: posixAssignee: bugs <bugs>
Status: CLOSED EOL QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 3.10CC: bugs, iblis.dif01, pkarampu, too_extreme001
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: FreeBSD   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1484246 (view as bug list) Environment:
Last Closed: 2018-06-20 18:29:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1484246    
Bug Blocks:    
Attachments:
Description Flags
patch none

Description nfsmwlin 2017-05-21 08:59:26 UTC
Created attachment 1280683 [details]
patch

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

Comment 1 nfsmwlin 2017-05-21 09:12:02 UTC
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 .

Comment 2 Pranith Kumar K 2017-07-13 03:00:01 UTC
(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 3 Worker Ant 2017-08-23 06:29:05 UTC
REVIEW: https://review.gluster.org/17917 (posix: fix Bug 1452961 incorrect xattr list handling on FreeBSD) posted (#2) for review on master by Anonymous Coward

Comment 4 Shyamsundar 2018-06-20 18:29:43 UTC
This bug reported is against a version of Gluster that is no longer maintained
(or has been EOL'd). See https://www.gluster.org/release-schedule/ for the
versions currently maintained.

As a result this bug is being closed.

If the bug persists on a maintained version of gluster or against the mainline
gluster repository, request that it be reopened and the Version field be marked
appropriately.

Comment 5 Vijay Bellur 2018-11-19 08:16:01 UTC
*** Bug 1181500 has been marked as a duplicate of this bug. ***