OpenAFS Master Repository branch, openafs-stable-1_6_x, updated. openafs-stable-1_6_5-22-gf618802
Gerrit Code Review
gerrit@openafs.org
Wed, 28 Aug 2013 08:02:43 -0700 (PDT)
The following commit has been merged in the openafs-stable-1_6_x branch:
commit f61880266f476fefbeacbe2a7af1e397b0ddadc3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Mar 22 17:54:12 2012 -0500
salvager: Trust inode-based special data over OGM
Currently the salvaging code looks for special inodes, and infers the
volume id and inode type from the OGM data in each special inode file.
However, we can already derive this information from the inode number
itself for the special inode, so if they disagree, use the values
based off of the inode number and correct the OGM data.
The inode number should be more likely to be correct, since that is
how we look up the special inode from the header when attaching the
volume. It is also impossible to get special inode files with the same
name, so this ensures we don't get duplicates. And for people that go
snooping around /vicepX/AFSIDat even though we tell them not to, it
seems more likely that they go around 'chmod'ing or 'chown'ing rather
than 'mv'ing.
This change avoids an abort in the salvaging code when the OGM data is
wrong. If we trust the OGM data when it is incorrect, we assume the
special inode file is for a different volume. So when we go to
recreate one of the special files for the volume we're actually
working with, the IH_CREATE fails (from EEXIST) and so we abort.
Reviewed-on: http://gerrit.openafs.org/6946
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit df522b588396aaac3ec662b516ef7287f3b7c47b)
Change-Id: I7ae826b6d6747e3ab3a1d8086ff17503a904a6d5
Reviewed-on: http://gerrit.openafs.org/9282
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/vol/namei_ops.c | 103 +++++++++++++++++++++++++++++++++++++++++++------
src/vol/namei_ops.h | 1 +
src/vol/vol-salvage.c | 8 ++++
3 files changed, 100 insertions(+), 12 deletions(-)
--
OpenAFS Master Repository