Break out of the loop so we stop asking the same thing repeatedly.
Change-Id: Ifcb2cd62589867927ab9f8be03bab7b981e5f761
Reviewed-on: http://gerrit.openafs.org/4315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When dynamically adding new cell mount points to the Freelance
directory do not include a trailing dot when specifying the root.cell
volume name.
Change-Id: Idfae9e3f44380cbce49d77fff22bee15dc4856ce
Reviewed-on: http://gerrit.openafs.org/4333
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
use this for non-pthreads "support code" e.g. salvager.
Change-Id: I17825fa90de33a7a4d17f364713fd4602dae497b
Reviewed-on: http://gerrit.openafs.org/4312
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times.
Change-Id: I5e5e67b695f07bf121b0543c7f936278009eff15
Reviewed-on: http://gerrit.openafs.org/4301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Since we adopted libroken, we get a lot of header includes automatically
from roken.h. Use these, instead of including lots of things multiple
times
Change-Id: I8b304bcd0e376601fbe622f7453d0295b188b697
Reviewed-on: http://gerrit.openafs.org/4300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Check that the given partition matches the vp partition, and ensure
the vp is not in an exclusive state when we check the state.
Otherwise, we may return pending vol ops for a volume on a different
partition, or we may incorrectly return that there is no pending vol
op when in fact the volume does not exist at all.
Change-Id: I3e28c0b7b372360d181a3310eb1fb7fce223ae59
Reviewed-on: http://gerrit.openafs.org/4308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
AFS no longer honors setuid status by default. Update the admin
guide documentation appropriately and add a warning recommending
against enabling setuid status given the limitations of the current
AFS protocol.
Reformat this section of the admin guide to make it easier to
maintain.
Change-Id: I6ea5859037d7d194df801f1a76583257cfc8bbe8
Reviewed-on: http://gerrit.openafs.org/4311
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used
to prevent cm_Analyze() from performing recursive
cm_CheckOfflineVolume operations that will exhaust the stack.
Change-Id: Ia4ee14307bf812cc2208482a19c1a914aca3e447
Reviewed-on: http://gerrit.openafs.org/4240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Sometimes the salvager exits a bit earlier than normal. For instance,
when no applicable inodes are found for a volume group, or if the
-inodes command line option was given. In these cases, we have already
checked out singleVolumeNumber from the fileserver (if we're salvaging
a single VG), so we need to give it back. So, give it back in those
instances.
Change-Id: I3ab732d3b640b76d3bdec7ac9d01e57dc5a54ade
Reviewed-on: http://gerrit.openafs.org/4297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When a volume is VOL_STATE_DELETED, it effectively does not exist, so
there is little point in recording a vp->pending_vol_op structure for
it. Just let callers checkout the volume as they would a nonexistent
volume: without recording anything about the operation.
This just reduces some edge cases and confusing debugging info, so we
don't have to worry about cleaning up pending_vol_op structures for
nonexistent volumes.
Change-Id: I56b92c3f2548ea48f9c61100be07edf9f7277fee
Reviewed-on: http://gerrit.openafs.org/4296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If singleVolumeNumber is not in our volume summary list, then the
singleVolumeNumber volume does not exist. So, don't try to bring it
back online. Still do try to make sure we don't have the volume
checked out, though, so issue an AskDelete, so ensure that it's not
checked out and that the fileserver does not think it exists.
Change AskDelete so we don't care if we tried to delete a volume that
the fileserver thinks already doesn't exist. Change the FSYNC_VOL_DONE
handler so it does not complain about already-deleted volumes.
Change-Id: I33dd876c0db91a3c8a5210fca329d63bf4b3d212
Reviewed-on: http://gerrit.openafs.org/4295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If we fail to write to the inodeFile given by ListViceInodes, we
should log the failure. Otherwise, no indication is given as to what
failed, when a salvage gathers the inode list.
Change-Id: Ia54105e1043969781711b9168c6787d07d1d319f
Reviewed-on: http://gerrit.openafs.org/4294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Commit 5247fa38a4 converted some I/O
calls in the salvager from stdio to OS_OPEN/OS_WRITE/etc. Fix some of
the conversions, including:
- We need to pass O_CREAT to OS_OPEN calls, since we are creating
these files
- OS_WRITE returns the number of bytes written on success, not the
number of "elements" like in stdio
Change-Id: I789b7549c1eabeb821591bf9f42d810252fb11e1
Reviewed-on: http://gerrit.openafs.org/4293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If FDH_REALLYCLOSE is given an FdHandle_t that has more than one user,
currently it does effectively nothing. Ensure that the file descriptor
actually gets closed on a subsequent FDH_CLOSE, but setting the new
fd_needs_rclose field.
Change-Id: I04794662ca64e6be718da82e10994a4a7bc0b39a
Reviewed-on: http://gerrit.openafs.org/4274
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
first brush at supporting next macos. totally not lion about it.
Change-Id: I4d2e05f68266ea82de710717c5340f16425f897e
Reviewed-on: http://gerrit.openafs.org/4290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
in some cases there is more to do, and in some cases we probably
already didn't build anymore, but, let's simplify.
Change-Id: I779c3ba8f3f02e6202700d96ee92cd473de66af2
Reviewed-on: http://gerrit.openafs.org/4288
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We should wait for a volume to transition out of an exclusive state
before calling VDeregisterVolOp_r on a volume, since some code may be
examining the vol op outside of VOL_LOCK in an exclusive state. We
should be doing this anyway before performing volume state checks,
since we may be trying to e.g. attach the volume at the same time.
Change-Id: I3a5b78b7c0033887a973ce941ced592df8c4bf3d
Reviewed-on: http://gerrit.openafs.org/4287
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This
leads to makesrpm.pl building SRPMS with .el6 in their release. As we
endeavour to use the same SRPM on all of our Fedora platforms, this is
less than ideal, so change makesrpm.pl to squash the setting of %dist
before building the RPM.
Change-Id: I5b5b9db7654ce21a269233e8950d4f4d1df81ad7
Reviewed-on: http://gerrit.openafs.org/4285
Reviewed-by: Alexander Ivan Redinger <aredinger@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
ihandle.c had some blocks that were not indented. Indent them.
Change-Id: I05442c6fabc19fab314f515fa950159de05b8c48
Reviewed-on: http://gerrit.openafs.org/4273
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
LICENSE IPL10
FIXES 124359
don't leak ihandles on close. this isn't a complete fix for the issue
(cherry picked from commit b9816e12f7)
This reverts the part of 12e85227c5 that
reverted b9816e12f7.
Change-Id: If4ac661a3a0f8abf7f6a79fa9d72d715861bcf51
Reviewed-on: http://gerrit.openafs.org/4272
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
we need to get the shared partition lock for the per-volume
forceDAFS case
Change-Id: I7be91420bb0df5963e789c932e5c469fe02ec108
Reviewed-on: http://gerrit.openafs.org/3487
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
in order to enable the right commands and print the right errors,
query for DAFS-only FSYNC op.
doesn't use bozo InstanceInfo as it's possible you can run fileserver
outside of bos.
Change-Id: Ib94f7b3a2960cd493f110af4d5dee7e97a6493c9
Reviewed-on: http://gerrit.openafs.org/3486
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The commit aadf69eabb added checks on
vnode length whenever we read or write from a vnode. Add the same
check on directory vnodes when we modify the directory (whenever
entries are added or deleted).
Change-Id: I8aa438941f840019bc541d5a978610c4f78330c8
Reviewed-on: http://gerrit.openafs.org/4233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
VolumeNumber was using atoi to convert a volume header name to a
volume ID. This can return just -1 for volume IDs larger than 2^31-1,
though, so use strtoul instead.
Change-Id: Ibae2d29f196646154fcc4f6ff174246e37b3d735
Reviewed-on: http://gerrit.openafs.org/4199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
VLockVolumeByIdNB currently cannot handle volume IDs larger than
2^31-1. Fix this by using struct flock64, F_SETLKW64, and F_SETLK64 in
the VLockFile functions where possible.
Thanks to Simon Wilkinson for pointing out F_SETLK64.
Change-Id: I422c685aec035716e2f42d13bd97541425ead6a2
Reviewed-on: http://gerrit.openafs.org/4198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The Windows implementation of the VLockFile functions had the handle
incorrectly declared in a few places (they accepted a struct VLockFile
instead of an FD_t). Correct them, and make all VLockFile
implementation functions declare 'FD_t's instead of 'HANDLE's or
'int's.
Change-Id: I2bc414712599cb8f2a2f0a5034b583a15b2c3ad8
Reviewed-on: http://gerrit.openafs.org/4197
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Directory contents are never mapped or stored in pages, so dealing
with page invalidation on directories is just overhead. So make
osi_FlushPages a no-op when we're given a directory, which can avoid a
lot of locks and other processing (particularly when we are called in
afs_getattr in BOZONLOCK_ENV).
Change-Id: I56fbd08c74d01a5fcb45a57e08bb31afcec9331d
Reviewed-on: http://gerrit.openafs.org/4259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
DFlushVolume may traverse a long list of directory objects, and can
even hit the disk, so we should drop the glock for it. This should be
safe in DAFS, since we already transition the volume to an exclusive
state before doing this, and DFlushVolume only deals with structures
internal to the directory package and maintains its own locking.
Change-Id: I6493042c8f36614b55d4dc40d97639e56b34fabd
Reviewed-on: http://gerrit.openafs.org/4242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
exec_alt was failing its tests on Mac OS X (but passing them on Linux).
It turns out that this is because it was failing to NULL terminate the
string that it creates in construct_alt(), which copies in the
characters from argv0, prefix and suffix, but never copies in a trailing
NULL.
Amend the code so that the trailing NULL from suffix is used to
terminate the string.
Change-Id: I286604fb09193367c4e7b2d80051832080362f79
Reviewed-on: http://gerrit.openafs.org/4267
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
we were wiping out fun things like archflags. shouldn't be needed.
let's just do this instead.
Change-Id: I80b3453bb237b4995d642b947d03c17d82cda5e7
Reviewed-on: http://gerrit.openafs.org/4266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
pulled wrong version of change into master. put back atomic
versions of stats.
Change-Id: I3b8413e2606a8bc4bf55aa674860685b2ca2ced6
Reviewed-on: http://gerrit.openafs.org/4265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When an unsigned long is wider than an afs_uint32, comparing the
afs_uint32 vid to ULONG_MAX is always going to be false (which the
compiler can warn us about). Fix this by storing to an unsigned long,
and converting to a volume id after ensuring that the result is not
too large.
Change-Id: Ifbd724dabd988bc4b1ba6ee8f3dc7fa1a0afb226
Reviewed-on: http://gerrit.openafs.org/4244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
if we are trying to find a dead vcache, let it be found, don't immediately
attempt to recycle
FIXES 128511
Change-Id: I7f86f7d4a88e1b89887b64617246e750654b0334
Reviewed-on: http://gerrit.openafs.org/3691
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Once upon a time, in a galaxy far far away, uuid used bcmp and bcpy
operations in kernel space. However, we changed that back in 2001, and
since then the uuid_memcpy and uuid_memcmp macros have been redundant.
Tidy up the code a little by removing them.
Change-Id: I3abcff79b36a330f1619c3d7e0a791eac1cf69a1
Reviewed-on: http://gerrit.openafs.org/4253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Make the 'dtest' test utility, which can be used to test the functioning
of the dir package, as well as to manipulate the directories that it
creates, build again.
Change-Id: I3b87c691cc9cb7ffce9297243d4a709d2e94fd40
Reviewed-on: http://gerrit.openafs.org/4251
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
remote.h is no longer used anywhere within the tree, and defines an
interface that has never been provided by OpenAFS. Remove it.
Change-Id: Id1007364f073c3bc2751491df371f51a37059381
Reviewed-on: http://gerrit.openafs.org/4249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Starting from 1.6.0, our specfile no longer adds a stray '1.' to the
start of the release field. makesrpm.pl was failing to deal with
these new-style names and therefore not actually making an rpm.
Fix this by conditionalising on the OpenAFS version when selecting
which rpm to copy.
Change-Id: I36b32ccc20baa167f46e5095eacb38a8e7d65e27
Cc: Alexander Redinger <aredinger@sinenomine.net>
Reviewed-on: http://gerrit.openafs.org/4258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
packages.h is unused within our tree, and contains nothing of any
use to out of tree callers (it attempts to define bases for error
codes, which has been superceded by our use of comerr)
So, remove it.
Change-Id: I22f2d3fba6ff960f00757c69f6beb5e7f25f9bba
Reviewed-on: http://gerrit.openafs.org/4248
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Update the CellservDB referenced by the spec file to the latest one
from grand.central.org
Change-Id: I315419b45c124908a262420cd9bd3876fe0ba308
Reviewed-on: http://gerrit.openafs.org/4257
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The itc.h header is never installed, or used in the OpenAFS tree.
Remove it.
Change-Id: Ia01f0f5353bc019c3fd0c311b2c7cfc157dca2dd
Reviewed-on: http://gerrit.openafs.org/4247
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Client CPS was not getting output on SIGXCPU like the rest of the
client information, since the conditional in the CPS loop was never
true. Fix this so we traverse the CPS entries correctly.
Change-Id: Ic3434000fbf90e96665779f21811bffcc3a19b45
Reviewed-on: http://gerrit.openafs.org/4256
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
isathing.c only provided one function - util_isint, whose behaviour
can be far better provided by careful application of strtol.
Simplify our world a little by removing the file.
Change-Id: I6a8460daaec092d4916d4a46e04df01d0dfc7ccc
Reviewed-on: http://gerrit.openafs.org/4246
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Use strtol, rather than a combination of util_isint and atoi to
handle integer arguments. This is much cleaner, far more portable,
and removes a dependency on an internal library function that this
file is the only user of.
Change-Id: I3140a396ae3ec32e4498f62769f27c76f03001d9
Reviewed-on: http://gerrit.openafs.org/4245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
in 64 bit 10.6, you need add-kext (not add-symbol-file)
to decode a panic. deal accordingly
Change-Id: I40f3c40150b98be2d80881ee56f8f8e33c92bc0f
Reviewed-on: http://gerrit.openafs.org/4255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
we removed it for i386, kill it for ppc also.
Change-Id: I1c91a138ecbec9c25a9734f5a5bcdc1d08469404
Reviewed-on: http://gerrit.openafs.org/4229
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>