(Illustration by Gaich Muramatsu)
On Wed, Apr 18, 2001 at 03:47:09PM +0200, Garry Glendown wrote: > Jan Harkes wrote: > > On Wed, Apr 18, 2001 at 03:05:39PM +0200, Garry Glendown wrote: > > > dig:/coda # cp /tmp/htdig.tgz . > > > cp: writing `./htdig.tgz': Invalid argument > > > dig:/coda # ls -l /tmp/htdig.tgz htdig.tgz > > > -rw-r--r-- 1 root root 4298648 Apr 2 13:11 /tmp/htdig.tgz > > > -rw-r--r-- 1 codadmin nogroup 1998848 Apr 18 14:51 htdig.tgz > > > (exiting root) > > > > What filesystem is used for /usr/coda/venus.cache? The Coda kernel > > module redirects all read/write operations directly to the underlying > > containerfile. These errors are possibly not generated by Coda, but by > > the filesystem. > > Outsch ... for recovery reasons, the system is running on reiserfs for > system and data drive. Could this be the reason? Yes, that is definitely the reason. ReiserFS journals the metadata when the filehandle is released. Coda's cachemanager opens the containerfile in reiserfs, grabs the device/inode numbers and passes them down to the Coda kernel module. Then the cachemanager has no more use for the filehandle and closes it. Reiser then logs the size of the containerfile, and the subsequent read/write operations start failing (or not, depending on the version of reiserfs). I've got a patch for linux-2.4.2 where the Coda kernel module keeps a reference to the filehandle until the file in /coda is released. This allows us to use any filesystem that has special semantics on file_open and file_release but still uses generic_read/write_file. This should cover most UNIX like filesystems including ramfs and shmfs. The patch now needs to be cleaned up and forward ported to the latest 2.4.4-pre kernel before I can send it off to Linus. A 2.2.x version should be pretty straightforward, although the existing patch won't work as the Coda kernel module in 2.2 and 2.4 are internally very different. JanReceived on 2001-04-18 09:53:47