THE WEEK IN REVIEW
- Timewarp Zones: where'd they go? Currently, a rough prototype is finished. The time-adjustment is done at the system call layer (time, stime, etc. as well as stat, utime, etc.). Did you know that there's a specific ntp_gettime syscall? I'm pretty sure that there's nothing that uses it[2], but, if there is, it's zone-time safe. In answer to the queries from the previous post: first, if a zone is independent in time, it should remain that way. Thus, changes in actual system clock time (global zone time) result in a modification of the offsets of TWZs to preserve their independence. Second, the filesystem is stored in system time, and simply wrapped with offset time on view in the TWZ. This does preclude some truth in the filesystem: if I touch a file, then change the time, the file will have always been touched immediately prior to the current time. However, the presumed use scenario for such a zone involves setting the zone into the future, then running commands which depend only on the date being some future date (not a relative gap having been established in the filesystem), so this should be acceptable. It's a small price to pay for the reduced complexity (see: validity of NFS cache entries, etc.). If this turns out to not be the case, a good deal more work will have to be done. The third question will probably be answered as the concept of TWZs moves through its current life phase: the midlife crisis and question of whether it will continue to be developed.
- ZFS Properties: as the TWZ project is on ice, I figured I'd try to get a taste for ZFS work.[3] As such, I took a recommendation from George Wilson and have been working on RFE 6527390, which requests the availability of ZFS properties in an NFS-accessible way. So far, it seems that the best strategy for implementing this is to extend the .zfs directory. You may know this pseudo-filesystem star as a directory located in the root of every ZFS filesystem which contains the snapshots you've saved. As envisioned, it would also become the home to a properties directory, containing a file for each ZFS property (eg. /myzfs/.zfs/props/compression) which when read would produce the value, and perhaps which when written would alter the value. There's also the issue of whether the files should produce human-readable or script-friendly output (eg. 1g vs. 1073741824). To quote an email I recently received from my mother, the mind reels with possibilities.
I was looking to get a taste of ZFS, and so far I have gotten about that, but I've also gotten mouthfuls of Dave Powell's GFS, which, fortunately, is very palatable. It's a generic pseudo-filesystem implementation written for Solaris, and is also the subject of the third Google result for "pseudo filesystem". It greatly reduces the overhead involved in creating a pseudo-filesystem--I only have to write the vnode ops that I want to specialize (and a few callbacks), which lets me spend my time on writing the backend access functionality (don't think about those last 3 words too much), not the frontend. I can't do it enough justice here, but there is a good discussion in the author's blog.
[#1] If you don't think it's as exciting as being in a movie killing zombies with a shotgun, you may not be an intern here.
[#2] Though it is referenced fifteen times in the ONNV source, I couldn't actually find any calls. In my find | grep zeal to find the answer to this question, I accidentally recursively created a 14 TB logfile on coupe, and ignominiously removed myself from this particular pursuit of knowledge.
[#3] Some might say that I already did, with my pseudo-successful attempt to tackle 6261172 (subsequently described as "aribtrarily complex"). My belief that I could solve the problem was grounded firmly in my lack of understanding it.
[#4] This is, in fact, noteworthy. sed uses the same editing syntax as ed, which is used as a test program for the operating systems class at Brown. It's one of the few binaries provided (along with cat, ls, etc.), and if you can run it, you're in good shape. However, once you run it, how do you quit? Traditionally, nobody knows. So you reboot your simulator. Fortunately, I learned today that the answer is "q," as well as several more useful ed/sed commands. Live and learn.