Messages in this thread | | | Subject | Re: FAT, NTFS, CIFS and DOS attributes | From | Nicholas Miell <> | Date | Mon, 03 Jan 2005 15:28:45 -0800 |
| |
On Mon, 2005-01-03 at 14:24 -0800, H. Peter Anvin wrote: > Hello all, > > I recently posted to LKML a patch to get or set DOS attribute flags for > fatfs. That patch used ioctl(). It was suggested that a better way > would be using xattrs, although the xattr mechanism seems clumsy to me, > and has namespace issues. > > I also think it would be good to have a unified interface for FAT, NTFS > and CIFS for these attributes. > > I noticed that CIFS has a placeholder "user.DosAttrib" in cifs/xattr.c, > although it doesn't seem to be implemented. > > Questions: > > a) is xattr the right thing? It seems to be a fairly complex and > ill-thought-out mechanism all along, especially the whole namespace > business (what is a system attribute to one filesystem is a user > attribute to another, for example.)
More importantly, what has a defined meaning for one filesystem and is interpreted and generated on demand by the kernel is irrelevant or unsupported on other filesystems.
So, yes, you can't just copy a bunch of files from vfat to ext3 and preserve the vfat attributes, but you should be able to stuff a bunch of vfat files into a tar file and then restore them to a vfat filesystem with all their original attributes intact.
> b) if xattr is the right thing, shouldn't this be in the system > namespace rather than the user namespace?
Yes.
> c) What should the representation be? Binary byte? String containing a > subset of "rhsvda67" (barf)?
ASCII strings require no special tools to manipulate from shell scripts (or even for the end user to interpret).
-- Nicholas Miell <nmiell@comcast.net>
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |