Bug 1452961 - [PATCH] incorrect xattr list handling on FreeBSD
Summary: [PATCH] incorrect xattr list handling on FreeBSD
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: posix
Version: 3.10
Hardware: Unspecified
OS: FreeBSD
unspecified
unspecified
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
: 1181500 (view as bug list)
Depends On: 1484246
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-21 08:59 UTC by nfsmwlin
Modified: 2018-11-19 08:16 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1484246 (view as bug list)
Environment:
Last Closed: 2018-06-20 18:29:43 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
patch (2.28 KB, patch)
2017-05-21 08:59 UTC, nfsmwlin
no flags Details | Diff

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@hs.ntnu.edu.tw> and tested by Pellaeon Lin <pellaeon@cnmc.tw>

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. ***


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