LINUX: Remove fix_bad_parent
authorAndrew Deason <adeason@sinenomine.net>
Mon, 1 Dec 2014 16:11:38 +0000 (10:11 -0600)
committerDaria Brashear <shadow@your-file-system.com>
Wed, 14 Jan 2015 15:17:37 +0000 (10:17 -0500)
commitd61cb9ad764115811fcca3dd0a735ecad1d6eac4
treeb3512343be6afb3f0b3be8cb569108250b8726bf
parent8b6ea7213a69f19ce2e591f1ae56a1db946c136c
LINUX: Remove fix_bad_parent

For Linux, fix_bad_parent (and in 1.6 and earlier, check_bad_parent)
served the purpose of fixing mvid if it was "wrong", for volume-root
vcaches (mvstat == 2).

However, in modern Linux, we never really use mvid for root vcaches.
This would normally be used for looking up ".." entries in the root
dir, but Linux handles that for us.

Specifically, the only times an "mvstat == 2" mvid is used are:

 - afs_lookup(), where we specifically check for a ".." lookup. Linux
   cannot give us a lookup for "..", since Linux itself services ".."
   lookups through the dcache.

 - afs_readdir_move(), where we look for ".." entries. Linux does not
   use this function, since Linux reimplements afs_readdir() in
   afs_linux_readdir(), and so this function is never called.

Of course, mvid is used in many other locations, mostly for "mvstat ==
1" vcaches (mountpoints) and a few other special cases. But these are
the instances where mvid is relevant for root dirs.

So, since mvid is never really used for "mvstat == 2" vcaches on
Linux, don't bother trying to keep it up-to-date. Doing so is just
needless waste, and causes problems when there are bugs in
fix_bad_parent. The mvid field is still updated in cross-platform code
from time to time; removing that would be more complex and possibly
not worth the effort.

Change-Id: I5011ba069e5c8ed947ab6ff8d8dd393241d9c4bf
Reviewed-on: http://gerrit.openafs.org/11615
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
src/afs/LINUX/osi_vnodeops.c