Commit Graph

8044 Commits

Author SHA1 Message Date
Marc Dionne
e4250dc64e Cache bypass: release and unlock pages when we get 0-length reply
In some cases, such as reading past the end of file as known to the
server, fetchdata will get a 0 length reply.  Deal gracefully by
unlocking and releasing any pages reserved by readpages.  Failure
to do so here leads to deadlocks later as we can exit with some pages
still locked.

Change-Id: Ic9e496c8c64d5e94f2cf9976d160ef5873f27249
Reviewed-on: http://gerrit.openafs.org/3283
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-07 17:21:00 -08:00
Simon Wilkinson
f78b29b900 rx: Reorganise includes
RX files were including the same header set in three different places,
once for user-land builds, once for kernel builds and once for ukernel.
The duplication was a bit pointless, and really frustrating when adding
new headers. So, reorganise the includes so that we only list headers
that are used in all three builds in one location.

Also take the opportunity to indent the #ifdefs so that it is clear
what is going on, and to remove some more of AFS_OSF_ENV and
AFS_AUX_ENV from kernel builds.

Change-Id: Ic2b5d39de4dd406bbc0acaa29fc876ac882ccf10
Reviewed-on: http://gerrit.openafs.org/3160
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-11-06 12:36:30 -07:00
Michael Meffie
27f00bb296 Windows: fix keystroke delay in waitkey
Fix the keystroke delay in the pthreaded wait for key
function.

Change-Id: I79293ceca57a418d23b0a211f875c17b805f9391
Reviewed-on: http://gerrit.openafs.org/3268
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-06 05:05:06 -07:00
Michael Meffie
aac929badb avoid private stdio fields in waitkey
Use the stdio_ext functions provided by solaris and glibc
instead of directly accessing private stdio FILE structure
members. This is needed for 64-bit solaris builds and is more
portable in general since the FILE structure is meant to be
opaque.  Remove the duplicated code in the pthreaded butc
package.

Change-Id: Idbefa88e2563bb117322e818b1300b324fc3626d
Reviewed-on: http://gerrit.openafs.org/3257
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-06 05:04:46 -07:00
Andrew Deason
ef4b9e13ef DAFS: Do not let VScheduleSalvage_r free vp
In VScheduleSalvage_r, we were calling VCancelReservation_r, which has
the possibility of free'ing vp. Since we still use vp after doing this
(and since we're already inside VCancelReservation_r to begin with),
we must not free vp. Instead, just decrement nWaiters without
triggering any of the dtor code in VCancelReservation_r. This is safe
as long as all VScheduleSalvage_r callers ensure that they check to
free the vp if necessary, which they all do.

Thanks to Derrick Brashear.

Change-Id: Iebdbdf47c6307cd7c036b88ad4dbc25bc7a3279a
Reviewed-on: http://gerrit.openafs.org/3272
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-05 13:11:23 -07:00
Derrick Brashear
a8d1fe61f4 merge ntops and namei
instead of having 2 implementations of nearly the same thing,
merge what we can. this can get closer, probably, but this is
a start.

Change-Id: I8446649e37ab0856e6e40933a44a35edbc708638
Reviewed-on: http://gerrit.openafs.org/3180
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-05 12:27:14 -07:00
Jonathan Billings
bb1dd6c950 RedHat: Remove potpourri.h from RedHat SPEC file manifest
potpourri.h is no longer needed, so it should be removed from the
list of files to be installed.  The missing file was causing the
RPM package build process to fail.

a reverse-cherry-pick of fb7e276efd
Reviewed-on: http://gerrit.openafs.org/3267
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>

Change-Id: Ib4c585130da68f0bb8cab8eb8ffdb7d8980a11d9
Reviewed-on: http://gerrit.openafs.org/3270
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-05 10:39:31 -07:00
Marc Dionne
f2c6ae300a Cache bypass: Fix oops in bypass transition functions
The FCSBypass flag might change between the time we check it before
entering afs_TransitionToCaching or afs_TransitionToBypass and when
we check it again within the functions.

Instead of panicing, just exit if someone beat us to it.  Also move
the checks within the write lock region to make sure the code
doesn't get run multiple times.

Change-Id: I4319896e522d0681c548299d2bd547e71998cc88
Reviewed-on: http://gerrit.openafs.org/3266
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 19:53:53 -07:00
Andrew Deason
732a4c52d5 RX: Fix old rx_stats incrementors
A couple of places were still trying to increment rx_stats members by
just ++'ing them. Update them to use rx_atomic_inc.

Change-Id: I35f5b24a08952d308074851623b06580e4b2b93b
Reviewed-on: http://gerrit.openafs.org/3263
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 12:16:31 -07:00
Andrew Deason
354d21878e krb5_free_string takes a krb5_context
Give krb5_free_string a krb5_context, not just the string to free.

Change-Id: Ic24794286716669679ea278d20b279a458683103
Reviewed-on: http://gerrit.openafs.org/3262
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 10:38:38 -07:00
Andrew Deason
e8c93c424f tsm: Make explicit rules for stem-changing targets
If the stem changes for generating a .o from a .c file,
implicit/suffix rules will not apply. That is, if we specify the
dependencies for 'bar.o' in a Makefile as so:

bar.o: foo.c

This will not match an implicit .c.o rule, since the filename stem
changes. We must add an explicit AFS_CCRULE invocation to make the
rule do anything.

This fixes this problem for the src/tsm41 directory. It may exist
elsewhere, but it's difficult to find unless the build breaks.

Change-Id: I090c074beec120201f334b8bc613170cd4345dde
Reviewed-on: http://gerrit.openafs.org/3261
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 10:38:19 -07:00
Andrew Deason
7d6860c852 UKERNEL: f_fsid is a struct on AIX
The statvfs f_fsid member is a struct with two fields on AIX when
_ALL_SOURCE is defined (which we define to get various extensions). So
in the AIX case, use it as such a struct instead of a single integer.

Change-Id: Ibd94d6b38b0cdc08b5812fe29e4e93344765ff05
Reviewed-on: http://gerrit.openafs.org/3260
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 10:37:30 -07:00
Andrew Deason
8401d0281f afsd: Pass cacheMountDir to aix_vmount
cacheMountDir is no longer global, so aix_vmount() needs it passed as
an argument. Do so.

Change-Id: I26c56b49f5ec675277d137424f672f0b727f705d
Reviewed-on: http://gerrit.openafs.org/3259
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 10:36:49 -07:00
Andrew Deason
3f4460e1e9 Use termios.h for winsize test where available
The configure test for 'winsize' existence was using sys/termios.h,
but some platforms (AIX) have termios.h but no sys/termios.h. So, use
termios.h instead where available.

Change-Id: I284b7fa27ceeed84d9e14b62032176846d764bf2
Reviewed-on: http://gerrit.openafs.org/3258
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 10:36:26 -07:00
Marc Dionne
6f1da57603 volser: add missing Makefile dependencies
Add some missing dependencies in the volser Makefile to prevent
trying to compile while a header file is still being generated.

This caused parallel make errors on some slower systems.

Change-Id: Ieab26cf03a86e340f442d683512a7326eec7834d
Reviewed-on: http://gerrit.openafs.org/3244
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-04 08:16:52 -07:00
Marc Dionne
2ea841feac Linux: 2.6.37 - replace get_sb with mount
With kernel 2.6.37 the new entry point for mounting a filesystem
is the mount() operation instead of get_sb().

Replace afs_get_sb with afs_mount if the new operation is
available, and use mount_nodev instead of get_sb_nodev.

Note that this is not strictly required for 2.6.37 since the old
interfaces are still around, but we might as well switch now.

Change-Id: Icc73a552fd53148bdd7b84e6d3266491488d9ed2
Reviewed-on: http://gerrit.openafs.org/3245
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-03 05:46:03 -07:00
Hartmut Reuter
951612f450 Make osi_fetchstore.c protocol independent
For future use of OSD and vicep-access osi_fetchstore.c should not depend on
the rx-fileserver-protocol but call instead the routines pointed to by ops.

Some code beautyfication in afs_fetchstore.c to use nBytes instead of code.

New global variable afs_protocols in afs_fetchstore.c which will be used
in RXOSD/VICEP-ACCESS programs in the future.

Change-Id: Id6b6e6c794b4fb00ad4719670caefd381f98949b
Reviewed-on: http://gerrit.openafs.org/2952
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-03 04:47:08 -07:00
Rod Widdowson
c61e1aeeef Docs: Specify where the Windows mini dump file is written
Change-Id: Ia97bc5f22f10c35e2d2928ca8ed618583f06563e
Reviewed-on: http://gerrit.openafs.org/3187
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-11-02 20:29:01 -07:00
Derrick Brashear
d5ce8d19ac rx mutex inversion fix
as discovered by Benjamin Kaduk, we were usually holding rx_refcnt_mutex
but briefly, and here we held it longer, and thus around acquiring freepktQ
mutex. undo it by simply setting STATE_RESET sooner as newcall does.

Change-Id: I3ae6fce1832d79c7cf17e93831cf8f30aebeb82b
Reviewed-on: http://gerrit.openafs.org/3219
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-11-02 20:23:42 -07:00
Jeffrey Altman
862e29a98a Windows: Do not leak cm_volume_t objects from the LRU queue
During cm_volume_t object recycling the object is removed
from the LRU to ensure that a single object is not recycled
by multiple threads at the same time.  Before cm_FindVolumeByName()
exits the object must be re-inserted into the LRU if it is not
present.

LICENSE MIT

Change-Id: I3feb3fb55beddffdbbf52a79efcc8d44af39b891
Reviewed-on: http://gerrit.openafs.org/3220
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2010-11-02 20:22:25 -07:00
Jeffrey Altman
58901738ad vol: attach2 must always return with VOL_LOCK held
attach2() is required to return with the VOL_LOCK held
even though it is called without it.  This must be true
for error conditions as well.  Not all error paths are
obtaining the VOL_LOCK before returning.  Add out paths for
lock held and lock unheld error cases.

Change-Id: Ib6a05a9bafd9eb3a26a1dd3881d19baa6d59a05e
Reviewed-on: http://gerrit.openafs.org/3177
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-02 11:01:55 -07:00
Chas Williams (CONTRACTOR)
c120f5c9b6 afs: minor cleanup for LINUX struct vcache
mapcnt is no longer used in either linux client and should be removed
to save a little space/sanity.

Change-Id: Iea734fcbcb7bb639ea080de7b5bf70238bcb60f2
Reviewed-on: http://gerrit.openafs.org/3207
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-02 06:39:22 -07:00
Andrew Deason
0aa7fac246 DAFS: Fix demand-salvages of attached volumes
Currently, when an error is encountered for an attached volume, we
call VRequestSalvage_r, which makes the volume go into the
VOL_STATE_SALVAGING state. This state implies that the volume is
offline, however, which is not necessarily the case if we're calling
VRequestSalvage_r from, for example, VAllocVnode_r or VUpdateVolume_r.

So now, make a new state called VOL_STATE_SALVAGE_REQ to indicate when
a salvage has been requested but the volume is not offline yet (and
thus is not yet ready to give to the salvager). If VCheckSalvage finds
a volume in this state, it offlines the volume first. The FSSYNC
VOL_OFF handler now checks for this state, and if we're giving the
volume to the salvager, we wait for the volume to exit that state.

VRequestSalvage_r also gains a new flag, VOL_SALVAGE_NO_OFFLINE. This
is to ensure that the existing salvaging code paths for unattached
volumes does not change (for when VRequesetSalvage_r is called from
attach2). If this flag is passed, we do what we used to do, which is
just salvage the volume without offlining it.

Change-Id: Ie709ac7013ab2b52c87fa408c254651abe5e6af3
Reviewed-on: http://gerrit.openafs.org/2329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-02 04:43:49 -07:00
Andrew Deason
138ac6577e Cleanup VOffline log message for non-DAFS
Commit fd592c7674 fixed the 'Volume X
(Y) is now offline' message for DAFS, but the same problem persists
for non-DAFS. Fix the non-DAFS case.

Change-Id: I7b19a3c2cad8b7233eb03a83598f9bf95db5ac65
Reviewed-on: http://gerrit.openafs.org/3213
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-02 04:40:08 -07:00
Andrew Deason
81602ffa3b QSG: DAFS uses dasalvager
For DAFS, you want to use 'dasalvager' not 'salvager'. One place was
still referencing 'salvager' in a DAFS example, so fix it.

Change-Id: Id671fa6125212beb1fb7f23a8743c1288848ee12
Reviewed-on: http://gerrit.openafs.org/3217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-02 04:21:02 -07:00
Derrick Brashear
572f9baaeb check for error_message
IRIX apparently has enough krb5 to try building aklog, but no
error_message. ok. so let's cope

Change-Id: I3cb6d529829de348f73d5c9f5380e153f8ccce52
Reviewed-on: http://gerrit.openafs.org/3208
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-11-01 05:20:54 -07:00
Derrick Brashear
af0951f373 kill off afs/debug.h
as reported by Marc Dionne, debug.h was still redefinining assert()

yeah, let's be done with that.

Change-Id: Icf2cf3db0f4972ebd4ee8cc0547e436b612e8bbc
Reviewed-on: http://gerrit.openafs.org/3194
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-11-01 05:17:45 -07:00
Simon Wilkinson
5e47d03ed3 Add libroken as its own library
Include libroken as a library in its own right, so that the whole
of the code can benefit from it. This change purely adds libroken
for the Unix build system. It doesn't replace those pieces of
libroken in hcrypto or util, or enable it for Windows.

There is also the option of using a system-install libroken, if one is
found at configure time.
  *) If --with-libroken=yes, or is not supplied than a system library
     will be used if suitable. Otherwise, we'll use the internal
     libroken
  *) If --with-libroken=/path/to/installation then the libroken at
     that path will be used. If there is no libroken there, or it
     is not suitable, an error will be returned
  *) If --with-libroken=internal then the internal libroken is used,
     regardless of what is present on the system.

We deliberately do not provide installed headers for the internal
libroken. If other applications wish to make use of libroken, then
they should use the Heimdal one, rather than piggybacking on ours.

Change-Id: Iff01e1e17090404cc8e4783108ae8a8784170918
Reviewed-on: http://gerrit.openafs.org/3191
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-31 19:00:23 -07:00
Heimdal Developers
b5d0c34fcd Import of code from heimdal
This commit updates the code imported from heimdal to
a3afa695ee3eb1ff5ad8de3e80c20d5049fce934 (switch-from-svn-to-git-1619-ga3afa69)

Change-Id: I5aafccd5a2afb46d312d0ebf93050eded29ced30
Reviewed-on: http://gerrit.openafs.org/3204
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:33:14 -07:00
Simon Wilkinson
6ab0529a70 auth: Use Kernel XDR for kernel tokens
For consistency, we should use a version of token.xdr.c built with
the -k flag when we build it into our kernel modules.

Change-Id: I08e7a1966664141af6c4ed160d3fb860eb5821bd
Reviewed-on: http://gerrit.openafs.org/3202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:32:54 -07:00
Simon Wilkinson
c094874817 util: netutils never builds in the kernel ...
... so stop pretending that it does.

Change-Id: I9d1d7c9b8c826f18e7f02decdb555956b257e155
Reviewed-on: http://gerrit.openafs.org/3201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:32:23 -07:00
Heimdal Developers
0a87f5852a Import of code from heimdal
This commit updates the code imported from heimdal to
a3afa695ee3eb1ff5ad8de3e80c20d5049fce934 (switch-from-svn-to-git-1619-ga3afa69)

Change-Id: I57e56bbad5811d47194459618ffc6e361f01a876
Reviewed-on: http://gerrit.openafs.org/3190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:32:08 -07:00
Simon Wilkinson
88e2a2f266 Import still more files from libroken
This time, these are files which are needed to get Windows going.

Change-Id: I262c5770ec04318f02cbc3e02520e63e09bc4dc6
Reviewed-on: http://gerrit.openafs.org/3203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:31:51 -07:00
Marc Dionne
a546fc1707 Linux: remove stale prototype and references for read_super
The 2.6 code doesn't have an afs_read_super, so remove the
prototype and the outdated comments that reference it.

Change-Id: I1ff5c836ea0ba326d4512ddcfab3f34765347331
Reviewed-on: http://gerrit.openafs.org/3199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-30 22:30:46 -07:00
Jason Edgecombe
9c8d58cd93 Quickstart Guide: Add some verbiage about /vicepXX/AlwaysAttach
Change-Id: I18f8276933d69ebf7de247bd98c46b30f9e5f372
Reviewed-on: http://gerrit.openafs.org/3158
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 13:34:49 -07:00
Marc Dionne
a43605e7bf rxosd: allow parallel make
Build rules that use COMPILE_PART1 must be prefixed with +
to indicate to make that the subprocess is a make and that it
can run with parallel jobs.

Change-Id: If48b32b885c7c5be6a820cd44a83d01d1eecd20d
Reviewed-on: http://gerrit.openafs.org/3198
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 13:30:48 -07:00
Phillip Moore
1fa575c09e Fix fs bypassthreshold to accept a size of -1 to disable
The fs bypassthreshold command assumes a value of -1 means the feature
is disabled, but the CLI refused to accept this argument, since it is
not strictly a digit (according ti isdigit()).  This patch accepts the
string -1, and makes it possible to both enable AND disable this
feature.

Change-Id: I87720b2dcfc4e9ee9f322c4841836b74440ac442
Reviewed-on: http://gerrit.openafs.org/3009
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:17:20 -07:00
Phillip Moore
c77ac5ce97 fs getfid defaults to '.', like other path-related commands
I noticed that all of the other commands that accept a list of paths
use the SetDotDefault() function to default to ".", when no arguments
are given.  This patch adds that call to getfid, making it more
consistent with similar commands.

Change-Id: Ia50c6805996d338cbd8d006107caa4ea56178c8e
Reviewed-on: http://gerrit.openafs.org/3008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:17:11 -07:00
Phillip Moore
d390df097c fs getfid output changed for consistency with Windows implementation
This patch removes the redundant volume ID from the output of fs
getfid, and replaces it with the cell name, which is what the Windows
implementation provides.

Change-Id: I7ce009733a204eeb744683d9c4355c436e9e07aa
Reviewed-on: http://gerrit.openafs.org/3007
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:17:00 -07:00
Phillip Moore
b04a450df2 Makes fs getfid error handling consistent with other fs commands
This patch makes the fs getfid command print errors for paths that
can't be handled correctly, instead of quietly ignoring them, and it
also returns an error code if any such paths are encountered.  This
makes the behavior consistent with other fs commands, such as
listquota, whereis, etc.

FIXES 128372

Change-Id: Ibb6e3f6cee5dccbf9347dfa8bfee8776a7552b91
Reviewed-on: http://gerrit.openafs.org/3005
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:16:42 -07:00
Rod Widdowson
4f5cdd73f6 QuickStart Unix: use dafs type and name for demand attach file services
bos create <machine name> dafs dafs [...] (not fs).

Change-Id: I7c06666da4733144ec0709f2783dcb431c6a5891
Reviewed-on: http://gerrit.openafs.org/3197
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:05:22 -07:00
Ben Kaduk
aad83a30a8 FBSD: correct and simplify vcache eviction routines
osi_VM_FlushVCache and osi_TryEvictVCache were both attempting
to be wrappers around vgone(), with some checks before hand.
Implement the latter in terms of the former to prevent
code duplication and propagation of incorrect code.

Additionally, correct the locking around vgone().  The
vnode lock must be held, and we must also increase the vnode's
hold count so that it does not disappear out from under us.
As we need the interlock to check the usecount, keep it
locked until we lock the vnode lock, for extra protection.

As an added bonus, we no longer try to call vgonel(), which
is not an exported symbol and merely happened to work due
to the current kernel linker implementation.

Remove some stale comments.

With this change, a parallel buildworld completes on
my four-core machine.

Change-Id: I665607da25518ddd786869b139d87baed8a05e9f
Reviewed-on: http://gerrit.openafs.org/3196
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:04:09 -07:00
Ben Kaduk
b6367aa84b FBSD: lock interlock around v_usecount accesses
The FreeBSD vnode locking strategy requires that the vnode
interlock be held for all accesses to v_usecount, such as those
used by our VREFCOUNT and VREFCOUNT_GT macros.  Conveniently,
a wrapper function is provided that takes the lock around its
access of the element, vrefcnt().  Use it for our macros.

Change-Id: Ia88eb21046fe844a6adb830734dcae2f76ef2dc5
Reviewed-on: http://gerrit.openafs.org/3195
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 12:03:49 -07:00
Derrick Brashear
812333c9a0 RPM scripts should allow newbinary restart to restart
add a mode where a newbinary restart can be used instead of
condrestart to induce a restart.

also, on upgrade, don't turn on the server RC script if it was
previously manually disabled.

Change-Id: I0e45be751cb2c5d9392d85467a979a22f5a777cf
Reviewed-on: http://gerrit.openafs.org/3163
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 11:33:00 -07:00
Chas Williams (CONTRACTOR)
0e8cce4577 afs: clean afs_osi_Alloc() usage
Add asserts for any failures cases not explicitly handled and remove
any casting.

Change-Id: I282d917ab84b37012553233f2c913b2aef1c92e2
Reviewed-on: http://gerrit.openafs.org/3012
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 11:28:03 -07:00
Chas Williams (CONTRACTOR)
061b714656 afs: simplify afs_osi_alloc.c
remove the osimem struct and related casts

Change-Id: I25c6b0101ce0ec03c9930ab79c05190defb1529d
Reviewed-on: http://gerrit.openafs.org/3011
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 11:27:53 -07:00
Chas Williams (CONTRACTOR)
ebeac56867 afs: afs_osi_Alloc_NoSleep() cleanup
afs_osi_Alloc_NoSleep() is no longer used by the SOLARIS or IRIX
clients.  It is used by the *BSD code in rx, so just let those
platforms define/prototype it in their osi_machdep.h

Change-Id: Ie2e4a6f7520329c345ac63c67d7b156ed21d109f
Reviewed-on: http://gerrit.openafs.org/3010
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 11:27:40 -07:00
Hartmut Reuter
80ede16475 What the cache manager needs to know about rxosd
this patch contains only the RPC interface to rxosd which already
contains the definition of all RPCs not just those few used in the
cache manager.

The code which calls these RPCs will follow in subesquent patches.

Change-Id: Ia90934b06e809d0a34ed5d4a0d77eed78b74780c
Reviewed-on: http://gerrit.openafs.org/3192
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 11:22:00 -07:00
Rod Widdowson
6aa9a8b9f6 windows: terminate multi_sz correctly
CreateProcess requires a null-terminated list of null-terminated strings
as an environment parameter.

A missing level of indirection was causing the final null to be
missed, meaning that if bosserver ran from somewhere which had an
environment the create process would fail.

Fix the null termination.

Change-Id: I3496d1c76570b80c760d0c0d8ee7fe046cec75b6
Reviewed-on: http://gerrit.openafs.org/3193
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2010-10-29 10:24:59 -07:00
Jeffrey Altman
5fce5754ce Windows: Finish converting vol apps to pthread only
The src/vol directory on Windows is one of the rare examples
where a single directory builds both lwp and pthreaded versions
of libraries and executables.  With this patchset the executables
are fully converted from lwp to pthread.  This requires that
afsrpc.dll include the pthread implementations of the threadname,
fasttime, and lock implementations from the LWP directory.
The inclusion within afsrpc.dll permits the dviced and
dvolser directories to avoid rebuilding those object modules.

Change-Id: I70c6e9ec346b5d9ef05d2400ddaf21e33a0c67a4
Reviewed-on: http://gerrit.openafs.org/3181
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2010-10-29 09:46:08 -07:00