Created attachment 1280683 [details]
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):
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 <email@example.com> and tested by Pellaeon Lin <firstname.lastname@example.org>
For your reference, here's the Gist comparing GDB output of volume process with and without patch: https://gist.github.com/pellaeon/bfa9b094e11b47a88bf51f5aa73b9a6d
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 .
(In reply to nfsmwlin from comment #1)
> This patch fixes the problem described by:
> 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?
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
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
*** Bug 1181500 has been marked as a duplicate of this bug. ***