I have looked into source code of lx brand zone, and found that support of 
getxattr()/setattr() hasn't been fully implemented yet.

in illumos-joyent/usr/src/uts/common/brand/lx/syscall/lx_xattr.c, I read below 
message.

/*
        * *xattr() family of functions.
        *
        * These are largely unimplemented. In most cases we return EOPNOTSUPP, 
rather
        * than using NOSYS_NO_EQUIV to avoid unwanted stderr output from ls(1).
        *
        * Note that CRED() is used instead of f_cred in the f*xattr functions. 
This
        * is intentional as Linux does not have the same notion of per-fd 
credentials.
        */

So wondering whether Joyent team has a chance to finish this?

Tons of thanks in advance.

________________________________
发件人: 龙白滔 <[email protected]>
发送时间: 2016年6月16日 13:28:39
收件人: [email protected]
主题: [smartos-discuss] getxattr()/setxattr() on SmartOS platform

Hello, all,

We ran Sheepdog server in lx-branded zone and the execution went to "else" 
block while "if" one is expected.


#define MDNAME  "user.md.size"
#define MDSIZE  sizeof(uint64_t)
        if (getxattr(path, MDNAME, &size, MDSIZE) < 0) {
                if (errno == ENODATA) {
                        goto create;
                } else {
                        sd_err("%s, %m", path);
                        goto broken_path;
                }
        }


We also wrote a test program on SmartOS which calls getxaddr() and setxaddr() 
and encountered error saying that "sys/xattr.h" is not found. It's true that we 
failed to locate this header file.

We have two questions here:
1.whethere getxattr()/setxaddr() have been correctly emulated in lx-branded 
zone?
2. are getxattr()/setxaddr() natively supported on SmartOS platform? if not so, 
how to achieve similar purpose?

Thanks a lot in advance.

Baitao of Briphant Team from China
smartos-discuss | Archives<https://www.listbox.com/member/archive/184463/=now> 
[https://www.listbox.com/images/feed-icon-10x10.jpg1249f3d.jpg?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2ZlZWQtaWNvbi0xMHgxMC5qcGc]
 <https://www.listbox.com/member/archive/rss/184463/27408809-83ccdc46>  | 
Modify<https://www.listbox.com/member/?&;> Your Subscription       
[https://www.listbox.com/images/listbox-logo-small.png1249f3d.png?uri=aHR0cHM6Ly93d3cubGlzdGJveC5jb20vaW1hZ2VzL2xpc3Rib3gtbG9nby1zbWFsbC5wbmc]
 <http://www.listbox.com>



-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to