(Illustration by Gaich Muramatsu)
[I had asked Jan about tarring up DATA, LOG and venus.cache to be able to roll back to a previous state where venus had a full set of hoarded files after hosing venus with unrepairable conflicts. Jan told me that I needed to remove the test for the inode of the cachefile being correct at startup. I have appended a patch that does that. venus starts, and doesn't complain about its cachefiles. However, trying to read one of them paniced the system. From gdb'ing the core dump, I think coda_rdwr opened a file by inum and passed it to VOP_READ->ffs_read, which lost due to the type (unallocated inode I think). So, I think two things need fixing: 1) my change should change the inode value in RVM, not decline to have it match. It really seems to need to match... 2) The kernel should be more paranoid about checking things, and not take the 'struct cnode' inode value so freely. As a minimum, it probably should validate that it is a regular file. (I maintain that venus should not be able to panic the system). I can send the backtrace to people if they think it helpful, and/or poke around with gdb more. I am running NetBSD 1.6-stable on i386. Index: coda-src/venus/fso_cachefile.cc =================================================================== RCS file: /coda-src/coda/coda-src/venus/fso_cachefile.cc,v retrieving revision 4.43 diff -u -r4.43 fso_cachefile.cc --- coda-src/venus/fso_cachefile.cc 3 Jun 2002 14:33:23 -0000 4.43 +++ coda-src/venus/fso_cachefile.cc 16 Dec 2002 18:14:59 -0000 @@ -111,7 +111,16 @@ tstat.st_uid == (uid_t)V_UID && tstat.st_gid == (gid_t)V_GID && (tstat.st_mode & ~S_IFMT) == V_MODE && +#ifdef STRICT_INODES + /* + * We intentionally don't check the inodes so that untarring a + * saved tarball of DATA, LOG and the cache hierarcy can restore + * a host to a previous state. This enables bandwidth-poort hosts + * to remember the effects of hoard walking when recovering from + * various kinds of venus lossage as an alternative to -init. + */ tstat.st_ino == inode && +#endif /* ALLOW_WRONG_INODES */ #endif tstat.st_size == (off_t)length; Greg Troxel <gdt_at_ir.bbn.com>Received on 2002-12-16 13:23:59