Messages in this thread | | | From | "Albert D. Cahalan" <> | Subject | Re: unremovable files and possible fs corruption (2.1.123) | Date | Sat, 10 Oct 1998 16:01:15 -0400 (EDT) |
| |
Theodore Y. Ts'o writes: >> From: "Albert D. Cahalan" <acahalan@cs.uml.edu>
>> Integers are useful too. NTFS has 4 time stamps. (POSIX + DOS) > > If it has genuine cross-filesystem semantics, then we should add > it to the VFS layer. If the extra timestamps are too filesystem > specific, then we shouldn't, and it should be via some other > mechanism, and we should pollute the stat structure with it.
It is moderately cross-filesystem: FAT, HPFS, NTFS, SMB
>> UFS has _two_ immutable flags with different properties. See the problem? > > Actually, UFS's two immutable flags (immutable and append-only) > exactly correspond to the two immutable flags we have in ext2fs.
No way. UFS has two immutable flags, period. It also two append-only flags. See the BSD stat.h excerpt below.
> That's the whole point why we should have a unified interface. > The semantics of the flags are the same because we stole them > from UFS, because they were useful semantics. What I'm saying > now is that we should use the same interface as BSD, given that > we stole the original idea from them.
So maybe you want to add the other flags.
> And given that the immutable flag also maps very nicely to FAT's > read/only flag, we should use the same interface for setting that flag.
Maybe. That still leaves a need for filesystem-specific features that just don't fit. As we've seen with ext2, the existing interface doesn't work on device files.
/* * Definitions of flags stored in file flags word. * * Super-user and owner changeable flags. */ #define UF_SETTABLE 0x0000ffff /* mask of owner changeable flags */ #define UF_NODUMP 0x00000001 /* do not dump file */ #define UF_IMMUTABLE 0x00000002 /* file may not be changed */ #define UF_APPEND 0x00000004 /* writes to file may only append */ #define UF_OPAQUE 0x00000008 /* directory is opaque wrt. union */ #define UF_NOUNLINK 0x00000010 /* file may not be removed or renamed */ /* * Super-user changeable flags. */ #define SF_SETTABLE 0xffff0000 /* mask of superuser changeable flags */ #define SF_ARCHIVED 0x00010000 /* file is archived */ #define SF_IMMUTABLE 0x00020000 /* file may not be changed */ #define SF_APPEND 0x00040000 /* writes to file may only append */ #define SF_NOUNLINK 0x00100000 /* file may not be removed or renamed */
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |