From: David Arendt <admin@prnet.org>
To: linux-btrfs@vger.kernel.org
Subject: extended attributes wiredness
Date: Fri, 23 Nov 2012 18:45:04 +0100 [thread overview]
Message-ID: <50AFB620.6040707@prnet.org> (raw)
Hi,
I am using kernel 3.7-rc6.
I have written a test application for extended attributes and have for
some folders a wired behaviour:
#include <stdio.h>
#include <string.h>
#include <attr/xattr.h>
char attrs[1024];
ssize_t attrslen;
int i;
char value[1024];
ssize_t valuelen;
int main(int argc, char *argv[])
{
if (argc != 2)
{
fprintf(stderr, "Syntax: testxattr <filename>\n");
return 1;
}
printf("processing file %s\n", argv[1]);
attrslen = llistxattr(argv[1], attrs, 1024);
if (attrslen < 0)
{
perror("listxattr failed");
return 1;
}
for (i = 0; i < attrslen; i+= strlen(&attrs[i]) + 1)
{
printf("processing attribute %s\n", &attrs[i]);
valuelen = lgetxattr(argv[1], &attrs[i], value, 1024);
if (valuelen < 0);
{
perror("lgetxattr failed");
return 1;
}
printf("value %.*s", (int) valuelen, value);
}
return 0;
}
is returning:
processing file /u00/root.20121121.210102.full/var/lib/nfs/sm
processing attribute system.posix_acl_default
lgetxattr failed: No data available
output of stat:
File: '/u00/root.20121121.210102.full/var/lib/nfs/sm'
Size: 94 Blocks: 0 IO Block: 4096 directory
Device: 3ah/58d Inode: 1331353 Links: 1
Access: (0755/drwxr-xr-x) Uid: (65534/ nobody) Gid: ( 0/ root)
Access: 2012-10-18 21:25:11.350000993 +0200
Modify: 2012-11-21 06:32:24.050210417 +0100
Change: 2012-11-21 06:32:24.050210417 +0100
Birth: -
Is this a bug in btrfs or do I miss something here ?
Thanks in advance,
David Arendt
next reply other threads:[~2012-11-23 17:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-23 17:45 David Arendt [this message]
2012-11-23 20:43 ` extended attributes wiredness Garry T. Williams
2012-11-23 21:09 ` David Arendt
2012-11-24 3:39 ` Liu Bo
2012-11-24 7:17 ` David Arendt
2012-11-25 20:15 ` David Arendt
2012-11-26 2:54 ` Liu Bo
2012-11-26 5:38 ` David Arendt
2012-11-27 7:46 ` Liu Bo
2012-11-27 16:53 ` David Arendt
2012-11-27 19:20 ` David Arendt
2012-11-28 10:54 ` Liu Bo
2012-11-28 11:12 ` Rock Lee
2012-11-28 17:11 ` David Arendt
2012-11-27 21:18 ` David Arendt
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=50AFB620.6040707@prnet.org \
--to=admin@prnet.org \
--cc=linux-btrfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.