On Wed, Jun 29, 2011 at 09:06:13AM +0000, Emmanuel Dreyfus wrote: > It is easy to do the conversion so that our Linux-like listexattr() returns > NUL-separated strings, while our FreeBSD-like extattr_list_file() returns > one-byte length prefixed strings. The question is what should our vnode > interface (VOP_LISTEXTATTR) require? Linux-like format is also used > by MacOS X and FUSE, so it will make FUSE code simplier, so I will go > for that second option. This means I leave src/sys/ufs/ufs/ufs_extattr.c > as is and just convert the output in src/sys/kern/vfs_xattr.c
The conversion is easy to do, but the right place to do it is tricky. VOP_LISTEXTATTR() writes its output to the userland buffer, therefore if I convert in src/sys/ufs/ufs/ufs_extattr.c, I have to copyin/convert/copyout, and that does not looks good perfromance-wise. Converting in libc is another option, and we can also add a flavor flag to VOP_LISTEXTATTR so that we can require the filesystem to output the data in the appropriate format. Opinions? -- Emmanuel Dreyfus m...@netbsd.org