]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Unix: Modify disk cache versioning
authorSimon Wilkinson <sxw@your-file-system.com>
Thu, 22 Apr 2010 21:24:11 +0000 (22:24 +0100)
committerDerrick Brashear <shadow@dementia.org>
Fri, 23 Apr 2010 12:50:18 +0000 (05:50 -0700)
commitd4e66ef219c88cdb17f2e860027cf6752ea21b17
tree9de4780692d6468e2caba44fb3f8e85478f65e15
parentcfc9b34856c6649a44e9fe762f9b0c0f09d7c653
Unix: Modify disk cache versioning

This change increments the disk cache version number, and adds a
structure size record to the disk cache header. All old disk caches
will be replaced when the client is started.

With the various changes made to unify our file handles, and to
support large file handles on Linux, the size of the 'fcache'
structure was modified earlier in the 1.5 series. However, fcache
is also the building block of the CacheItems file, so these changes
inadvertently broke users upgrading from 1.4. In addition, as the
disk cache inode is now a union of many different structures, the
structure size is now potentially volatile across both kernel, and
OpenAFS revisions.

Up the version number so old disk caches are invalidated and won't
crash users who are upgrading. Also take the opportunity to add an
item to the header which stores the size of struct fcache used
by the disk cache. If the size on disk doesn't match that expected
by the kernel module, truncate the cache and start again.

Change-Id: I2ee8863d0bfaaaba34272c9e139638e17669a53e
Reviewed-on: http://gerrit.openafs.org/1811
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/afs.h
src/afs/afs_dcache.c
src/afs/afs_init.c