]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Linux: Flush vcaches when a mount fails
authorSimon Wilkinson <sxw@inf.ed.ac.uk>
Sat, 19 Dec 2009 14:48:32 +0000 (14:48 +0000)
committerDerrick Brashear <shadow|account-1000005@unknown>
Sun, 20 Dec 2009 18:09:10 +0000 (10:09 -0800)
commit90e1f45015b7473de5ac0d68297dcb32fb652729
treeaa4ac40489eb4878d55b832b728c8435ec14e8cd
parent8644f90a75281c8f678e2c3b93531857b9f3fa1f
Linux: Flush vcaches when a mount fails

GetVCache (well, really NewVCache) creates a new vcache, with an attached
inode, and links it into the VLRU queue, regardless of whether it is
successful in populating that vcache or not. The attached inode, on Linux,
contains a reference to the super block of the filesystem. If the created
vcache is for the root, however, and populating that vcache failes, then mount
fails, and the super block is disposed of. This leaves us with a vcache in
the VLRU queue which contains a reference to a non-existent inode.

When ShakeLooseVCaches comes along a few minutes later, it attempts to discard
this inode. However, doing so fails because the inode no longer has a valid
super block.

Avoid this trauma by ensuring all vcaches are disposed of before the super
block goes away, in the event of a mount failure.

Change-Id: I68864f1ea401d24adba76164905a17de6ab3e6ce
Reviewed-on: http://gerrit.openafs.org/1003
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from 994ef0e7cab95e2fc6f47fc8838490112e432ffd)
Reviewed-on: http://gerrit.openafs.org/1008
Tested-by: Derrick Brashear <shadow@dementia.org>
src/afs/LINUX/osi_vfsops.c