From: "J. R. Okajima" <hooanon05g@gmail.com>
To: Andreas Dilger <adilger@dilger.ca>
Cc: Linux NFS Mailing List <linux-nfs@vger.kernel.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: fsetxattr(2) for ACL on nfs
Date: Sat, 27 May 2017 08:59:56 +0900 [thread overview]
Message-ID: <28291.1495843196@jrobl> (raw)
In-Reply-To: <9E1EC8DB-1864-4ABA-8BEB-79C3EA9C4EBF@dilger.ca>
Andreas Dilger:
> > open("../ro/f_src", O_RDONLY) = 3
> > fstat(3, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
> > open("./f_src", O_WRONLY|O_CREAT|O_EXCL, 0600) = 4
> > fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
> > fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
> > mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fcb293f8000
> > read(3, "f\n", 131072) = 2
> > write(4, "f\n", 2) = 2
> > read(3, "", 131072) = 0
> > utimensat(4, NULL, {{1495750885, 0}, {1495750885, 0}}, 0) = 0
> > fgetxattr(3, "system.posix_acl_access", 0x7ffed40196d0, 132) = -1 ENODATA (No data available)
> > fstat(3, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
> > fsetxattr(4, "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x06\x00\xff\xff\xff\xff\x04\x00\x04\x00\xff\xff\xff\xff \x00\x04\x00\xff\xff\xff\xff", 28, 0) = -1 EACCES (Permission denied)
>
> To me this looks like "cp" is broken. If it gets no POSIX ACL xattr from the
> kernel (ENODATA) for this file, why is it trying to save a POSIX ACL to the
> copy? That just adds needless overhead, either at the syscall level, or also
> on disk if it is storing ACLs on files that don't need them...
Maybe you are right.
But on v4.11, it succeeded.
open("../ro/f_src", O_RDONLY) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
open("./f_src", O_WRONLY|O_CREAT|O_EXCL, 0600) = 4
fstat(4, {st_mode=S_IFREG|0600, st_size=0, ...}) = 0
fadvise64(3, 0, 0, POSIX_FADV_SEQUENTIAL) = 0
mmap(NULL, 139264, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f3dcf031000
read(3, "f\n", 131072) = 2
write(4, "f\n", 2) = 2
read(3, "", 131072) = 0
utimensat(4, NULL, {{1495842847, 0}, {1495842847, 0}}, 0) = 0
fgetxattr(3, "system.posix_acl_access", 0x7fff63443360, 132) = -1 ENODATA (No data available)
fstat(3, {st_mode=S_IFREG|0644, st_size=2, ...}) = 0
fsetxattr(4, "system.posix_acl_access", "\x02\x00\x00\x00\x01\x00\x06\x00\xff\xff\xff\xff\x04\x00\x04\x00\xff\xff\xff\xff \x00\x04\x00\xff\xff\xff\xff", 28, 0) = 0
J. R. Okajima
next prev parent reply other threads:[~2017-05-26 23:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-25 22:37 fsetxattr(2) for ACL on nfs J. R. Okajima
2017-05-26 19:58 ` Andreas Dilger
2017-05-26 23:59 ` J. R. Okajima [this message]
2017-05-31 20:32 ` J. Bruce Fields
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=28291.1495843196@jrobl \
--to=hooanon05g@gmail.com \
--cc=adilger@dilger.ca \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).