Subject: kern/30058: 3.0_BETA: setextattr(1) and extattr(9) not working
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Hubert Feyrer <hubert@feyrer.de>
List: netbsd-bugs
Date: 04/25/2005 18:40:00
>Number:         30058
>Category:       kern
>Synopsis:       3.0_BETA: setextattr(1) and extattr(9) not working
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 25 18:40:00 +0000 2005
>Originator:     Hubert Feyrer
>Release:        NetBSD 3.0_BETA
>Organization:
bla!
>Environment:
	
	
System: NetBSD miyu 3.0_BETA NetBSD 3.0_BETA (MIYU) #3: Thu Mar 31 23:00:08 MEST 2005 feyrer@miyu:/home/cvs/src-3/sys/arch/i386/compile/obj.i386/MIYU i386
Architecture: i386
Machine: i386
>Description:
	The examples in the setextattr(1) manpages don't work:
	1) NetBSD's md5 doesn't know about -q
	2) There is no /boot/anything
	3) When called properly, the filesystem doesn't support the
	   extended attributes:

		miyu# df -k .
		Filesystem  1K-blocks      Used     Avail Capacity  Mounted on
		/dev/wd1e   237606103  98224750 127501048    43%    /

		miyu# dumpfs /dev/rwd0a | head
		file system: /dev/rwd0a
		endian  little-endian
		location 65536  (-b 128)
		magic   19540119 (UFS2) time    Mon Apr 25 20:07:35 2005
		superblock location     65536   id      [ 4234defb 3675e31e ]
		cylgrp  dynamic inodes  FFSv2   sblock  FFSv2   fslevel 5
		nbfree  18447   ndir    1637    nifree  74099   nffree  9513
		ncg     9       size    380016  blocks  357479
		bsize   8192    shift   13      mask    0xffffe000
		fsize   1024    shift   10      mask    0xfffffc00

		miyu# cp /bin/ls  foo
		miyu# setextattr system attrnam attrval foo
		setextattr: foo: failed: Operation not supported

		miyu# ktrace -id setextattr system attrnam attrval foo
		miyu# kdump 
		...
		   495 setextattr CALL  extattr_set_file(0xbfbfec3e,2,0xbfbfec2e,0x804c030,7)
		   495 setextattr NAMI  "foo"
		   495 setextattr RET   extattr_set_file -1 errno 45 Operation not supported
		...

	Following discussion on tech-kern@, it seems that extattr bits have
	not been integrated into the FFS code yet.  The VFS layer changes
	are present, but not the file system layers.[*]

	[*] http://mail-index.netbsd.org/tech-kern/2005/04/25/0008.html


>How-To-Repeat:
	See above.
>Fix:
	1) Short term: Fix manpage. Patch below.
	2) Then: Fix file system layers.


Index: usr.bin/extattr/getextattr.1
===================================================================
RCS file: /cvsroot/src/usr.bin/extattr/getextattr.1,v
retrieving revision 1.2
diff -u -r1.2 getextattr.1
--- usr.bin/extattr/getextattr.1	2 Jan 2005 18:41:23 -0000	1.2
+++ usr.bin/extattr/getextattr.1	25 Apr 2005 18:38:13 -0000
@@ -33,7 +33,7 @@
 .\"
 .\" $FreeBSD: src/usr.sbin/extattr/rmextattr.8,v 1.4 2003/02/24 22:53:25 ru Exp $
 .\"
-.Dd January 2, 2005
+.Dd April 25, 2005
 .Dt RMEXTATTR 8
 .Os
 .Sh NAME
@@ -135,3 +135,13 @@
 The
 .Nm setextattr
 utility can only be used to set attributes to strings.
+.Pp
+Currently the 
+.Xr setextattr 8
+(etc.) tools and anything using 
+.Xr extattr 9
+do not work on
+.Nx
+because the extattr code has not been integrated into the FFS  
+code yet.  The VFS layer changes are present, but not the file system  
+layers.
Index: share/man/man9/extattr.9
===================================================================
RCS file: /cvsroot/src/share/man/man9/extattr.9,v
retrieving revision 1.2
diff -u -r1.2 extattr.9
--- share/man/man9/extattr.9	2 Jan 2005 18:32:38 -0000	1.2
+++ share/man/man9/extattr.9	25 Apr 2005 18:38:13 -0000
@@ -26,7 +26,7 @@
 .\"
 .\" FreeBSD: src/share/man/man9/extattr.9,v 1.14 2003/10/23 02:33:03 hmp Exp
 .\"
-.Dd January 2, 2005
+.Dd April 25, 2005
 .Os
 .Dt EXTATTR 9
 .Sh NAME
@@ -84,3 +84,13 @@
 .Sh SEE ALSO
 .Xr vfsops 9 ,
 .Xr vnodeops 9
+.Sh BUGS
+Currently the
+.Xr setextattr 8
+(etc.) tools and anything using
+.Xr extattr 9
+do not work on
+.Nx
+because the extattr code has not been integrated into the FFS
+code yet.  The VFS layer changes are present, but not the file system
+layers.

>Unformatted: