|
From: | Aaron Bentley |
Subject: | [Gnu-arch-users] Re: extended attributes |
Date: | Tue, 06 Jan 2004 01:02:10 -0500 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6b) Gecko/20031205 Thunderbird/0.4 |
Tom Lord wrote:
For atomic file updates, rename(2) does too much. It modifies or creates a directory entry to have default ownership, permissions and time values.> From: Aaron Bentley <address@hidden>> Perhaps a fully transactional filesystem was never what was needed. > Maybe all that's needed is a variant of rename(2) that only changes the> number of links, atime and mtime. Huh? Can you explain in more detail what you are thinking of becauseI don't get it from that description.
mtime? really? What?!?
I mean "file modification time" from struct stat's st_mtime.A variant of rename could be called move_contents(). It would simply do less. Not change ownership, permissions or file creation time. But it could change #of links, would change inode, modification time and access time. An update done with open() and write() would not change inode or links, but I think this is as close as you can get to atomic updates without adding locks or another layer of indirection.
Ah, diversity. I guess I'm a primitive for using vim. I've used edlin too, but not ed.> Well, yes. But some things that could be quickly implemented were not > because the need wasn't apparent. Sure. Informally, it feels like the original idea was "every file is a sequence of bytes; directories being files that can only be written to via dir-modifying system calls" and then it's all downhill from there. (You know, extended attributes ain't nothing -- you can probably still find people with principled objections to symlinks.)
Aaron
[Prev in Thread] | Current Thread | [Next in Thread] |