tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ffsv2 extattr support



Hi,

my NetBSD 6.99.44 seems to be complete now. From daily build ISO+FTP
and then from cvs checkout -A of yesterday. Guided by
  http://www.netbsd.org/docs/guide/en/chap-fetch.html#chap-fetch-cvs
  http://www.netbsd.org/docs/guide/en/chap-updating.html

But i had no success with getting an FFSv1 filesystem with extattr
support. In part it seems to believe to be able, but the real
action does not work.

-------------------------------------------------------------------

netbsdcur# disklabel -i -I wd1
partition>N
Label name [fictitious]: ffs1test
partition>W
Label disk [n]?y
Label written
partition>E
# /dev/rwd1d:
type: ESDI
disk: QEMU HARDDISK   
label: ffs1test
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 260
total sectors: 262144
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

4 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:    262144         0     4.2BSD      0     0     0  # (Cyl.      0 -    260*)
 d:    262144         0     unused      0     0        # (Cyl.      0 -    260*)
partition>Q

------

netbsdcur# newfs -O 1 /dev/rwd1a
/dev/rwd1a: 128.0MB (262144 sectors) block size 8192, fragment size 1024
        using 4 cylinder groups of 32.00MB, 4096 blks, 7936 inodes.
super-block backups (for fsck_ffs -b #) at:
32, 65568, 131104, 196640,

------

netbsdcur# mkdir /mnt/ffs1
netbsdcur# mount /dev/wd1a /mnt/ffs1
netbsdcur# cd /mnt/ffs1
netbsdcur# mkdir -p .attribute/system .attribute/user
netbsdcur# cd ..
netbsdcur# umount /mnt/ffs1

netbsdcur# mount -o extattr /dev/wd1a /mnt/ffs1
mount_ffs: /dev/wd1a on /mnt/ffs1: Operation not supported

netbsdcur# mount
/dev/wd0a on / type ffs (local)
...
/dev/wd1a on /mnt/ffs1 type ffs (extattr, local)

------

netbsdcur# echo xyz > /mnt/ffs1/x

netbsdcur# getextattr system bla /mnt/ffs1/x
getextattr: /mnt/ffs1/x: failed: Operation not supported

netbsdcur# setextattr user bla blablabla /mnt/ffs1/x
setextattr: /mnt/ffs1/x: failed: Operation not supported

netbsdcur# getextattr system bla /mnt/ffs1/x
getextattr: /mnt/ffs1/x: failed: Operation not supported

------

But statvfs(2) as well as mount(8) indicate that extattr is enabled:

int main(int argc, char **argv)
{
 int ret;
 struct statvfs buf;

 ret = statvfs("/mnt/ffs1/x", &buf);
 if (ret == 0) 
   printf("MNT_EXTATTR in statvfs.f_flag : %d\n", buf.f_flag & MNT_EXTATTR);
 exit(!!ret);
}

yields:

  MNT_EXTATTR in statvfs.f_flag : 16777216

-------------------------------------------------------------------

Have a nice day :)

Thomas



Home | Main Index | Thread Index | Old Index