openafs.git
11 years agoWindows: AFSLocateNameEntry separate VolumeCB In/Out
Jeffrey Altman [Fri, 8 Feb 2013 22:28:09 +0000]
Windows: AFSLocateNameEntry separate VolumeCB In/Out

Tracking the VolumeCB references within AFSLocateNameEntry has
proven to be very error prone.  When the VolumeCB parameter is
an in/out parameter the caller cannot reliably determine whether
or not AFSLocateNameEntry replaced the updated the pointer and
whether it properly released the references.  This patchset
changes the interface so that VolumeCB and ParentDirectoryCB
have separate in and out parameters.  The caller is now responsible
for tracking its own Volume reference counts and AFSLocateNameEntry
obtains its own which will either be returned to the caller as a
non-NULL OutVolumeCB or released.

This patchset turns ParentDirectoryCB into an IN only parameter
and adds OutParentDirectoryCB as a dedicated OUT parameter.  However,
it does not alter any associated reference count logic.  That will
be implemented in a subsequent patchset.

Change-Id: Ic271d13496b4af80339c5ccd505fa04ec57b4700
Reviewed-on: http://gerrit.openafs.org/9086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorx: remove rx_misc.h define trailing semicolons
Jeffrey Altman [Sun, 10 Feb 2013 16:54:44 +0000]
rx: remove rx_misc.h define trailing semicolons

PIN and UNPIN macro definitions should not have trailing
semicolons.

Change-Id: I242c0a7a40cbabe852ed975eb64df52dbb585624
Reviewed-on: http://gerrit.openafs.org/9088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorx: Remove rx_atomic_add_and_read trailing semi-colon
Marc Dionne [Wed, 6 Feb 2013 23:44:35 +0000]
rx: Remove rx_atomic_add_and_read trailing semi-colon

Remove a stray trailing semi-colon from the definition of
rx_atomic_add_and_read.

Change-Id: Iae9c62c132bcbb3d2e609dde2d54e0435d36cc03
Reviewed-on: http://gerrit.openafs.org/9075
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: GetVolumeInfo cell name
Jeffrey Altman [Thu, 7 Feb 2013 03:44:44 +0000]
Windows: GetVolumeInfo cell name

The service was supposed to provide the redirector the cell name
as part of the AFSVolumeInfoCB response from RDR_GetVolumeInfo.
Add a new field to store it and populate it.

Change-Id: Idcafaee66ed1031dfdeee1804bbdff617e464d3f
Reviewed-on: http://gerrit.openafs.org/9079
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Return full volume name for RO and BK
Jeffrey Altman [Thu, 7 Feb 2013 03:43:16 +0000]
Windows: Return full volume name for RO and BK

RDR_GetVolumeInfo must return the full volume name (not the volume
group name) for RO and BK volume types.

Change-Id: Ic215b205c07faab53f8a899d0f662b64c902dde2
Reviewed-on: http://gerrit.openafs.org/9078
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSFileOpenResultCB.Authenticated
Jeffrey Altman [Thu, 7 Feb 2013 00:35:00 +0000]
Windows: AFSFileOpenResultCB.Authenticated

Notify the redirector whether the the result of a file open
request is the result of a user authenticated action.

Change-Id: If1f7704b3ea31e40e88b3589fd604a7d50653ec1
Reviewed-on: http://gerrit.openafs.org/9077
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoLinux: Detect undefined symbols in kernel modules
Marc Dionne [Mon, 28 Jan 2013 01:52:39 +0000]
Linux: Detect undefined symbols in kernel modules

Undefined symbols in the kernel modules are not currently detected
at build time.  As a result, buildbot may indicate success while
the resulting kernel modules are unusable.

In the kernel build process, modpost warns about missing symbols
but does not return an error in the case of external modules.
Detect these warnings and cause the libafs build to fail.

Change-Id: I2c428a5ce7e3a0d10178679f789b3d787719c397
Reviewed-on: http://gerrit.openafs.org/8981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: add cm_HaveToken
Jeffrey Altman [Thu, 7 Feb 2013 00:32:28 +0000]
Windows: add cm_HaveToken

cm_HaveToken answers the question of whether a cm_user_t has a
token for a specified cell.

Change-Id: I4dff312a7e9000ccee6952c21fca174700364c4c
Reviewed-on: http://gerrit.openafs.org/9076
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agopam: Build using libtool
Simon Wilkinson [Tue, 8 Jan 2013 14:38:34 +0000]
pam: Build using libtool

Build the pam_afs and pam_afs.krb modules using libtool, so they
fit in with the rest of the new build infrastructure.

This requires some additonal symbol exports from auth and kauth,
which are included

Change-Id: I97a130ba69216cd63ba388f2aaabe830a0c4543f
Reviewed-on: http://gerrit.openafs.org/8900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: AFSLocateNameEntry double free Volume RefCount
Jeffrey Altman [Tue, 5 Feb 2013 05:29:12 +0000]
Windows: AFSLocateNameEntry double free Volume RefCount

If AFSBuildMountPointTarget fails when called from AFSLocateNameEntry
the pCurrentVolume reference count will have been freed even though
the pointer has not been updated.   If the failure is
STATUS_OBJECT_NAME_NOT_FOUND and AFSLocateNameEntry was called
by AFSCreateCommon, the Volume reference count will be freed twice.

Change-Id: I0b5ccb512ea0ec2e24099dff38bbbeddebf0bee3
Reviewed-on: http://gerrit.openafs.org/9069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSObjectInfoDecrement correct return value
Jeffrey Altman [Mon, 4 Feb 2013 21:22:56 +0000]
Windows: AFSObjectInfoDecrement correct return value

The return value must be the new ObjectReferenceCount value not
the value of the Reason counter.  This was broken by patchset
e267774f1a4f9cc5bfc32c545df36a4bf7947607.

Change-Id: I9dd3cd56f6c7d43f061bdda8e24666b5f9a4ed9b
Reviewed-on: http://gerrit.openafs.org/9068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSVolumeCB track RefCount reasons
Jeffrey Altman [Mon, 4 Feb 2013 20:14:16 +0000]
Windows: AFSVolumeCB track RefCount reasons

Introduct AFSVolumeIncrement and AFSVolumeDecrement functions
which are used to increment not only the AFSVolumeCB.VolumeReferenceCount
but also a new VolumeReferences[Reason] counter.  In the future when
a VolumeReferenceCount error occurs it may be possible to isolate the
cause to a subset of the code.

In the process, the VolumeReferenceCount necessary to free the
AFSVolumeCB object is changed from 1 to 0 and AFSInitVolume no longer
initializes the AFSVolumeCB count to 2.

The signature for AFSInitVolume and AFSLocateNameEntry are modified
to permit a volume reference reason to be provided.  This permits
the reference to be allocated in one function and released in another
without resulting in count imbalances.

Change-Id: I021a6efe061817ff044c18a699ee63a7ffbfc7bf
Reviewed-on: http://gerrit.openafs.org/9067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoOpenBSD: Add config headers for new(er) OS versions.
Antoine Verheijen [Wed, 23 Jan 2013 02:24:25 +0000]
OpenBSD: Add config headers for new(er) OS versions.

The OS-specific config header files have not kept up with the
newer releases of OpenBSD. This patch corrects that by adding
header files for OpenBSD versions from 4.9 to 5.3 (the newest
version currently under development).

Change-Id: I5e233cc7b96be2c1c52824653c42d3c6d77d6f50
Reviewed-on: http://gerrit.openafs.org/8927
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoBuild system: Add LT_LDRULE_shlib_missing
Simon Wilkinson [Tue, 8 Jan 2013 15:26:45 +0000]
Build system: Add LT_LDRULE_shlib_missing

Add a new LT_LDRULE which can be used to build shared libraries which
may not contain all of the symbols listed in their .sym files. This
allows us to build a library like roken, where different symbols
will be present on different operating systems.

Change-Id: I82e0df49131aa7184360130547c82052a6dd704b
Reviewed-on: http://gerrit.openafs.org/8901
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoLinux: crset should use passed credentials
Marc Dionne [Fri, 25 Jan 2013 02:38:28 +0000]
Linux: crset should use passed credentials

When copying credentials in crset, take the passed credentials as
the source instead of the current process credentials.

This doesn't cause any problems currently since crset always gets
called with the current credentials.

Change-Id: Ia6a341e96d00071587443f8eef4a99992b368abc
Reviewed-on: http://gerrit.openafs.org/8980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoLINUX: ifconfig's output has changed
Chas Williams (CONTRACTOR) [Wed, 30 Jan 2013 03:54:00 +0000]
LINUX: ifconfig's output has changed

net-tools in Fedora 18 has changed 'inet addr' to just 'inet' (possibly
to more closely match the ip command).

Change-Id: I9224d0eb4dd77e248c8f8eed966fa26ec7dda08c
Reviewed-on: http://gerrit.openafs.org/8987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoBuild system: ADd LT_LDRULE_static_NOQ
Simon Wilkinson [Tue, 8 Jan 2013 15:28:17 +0000]
Build system: ADd LT_LDRULE_static_NOQ

Add a NOQ variant of the LT_LDRULE_static build macro, so that it
can be used as part of compound rules.

Change-Id: I45b3d4ff09465d2d472e27c2fd290e0311791403
Reviewed-on: http://gerrit.openafs.org/8902
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agodafs: preattach should wait for exclusive states
Mark Vitale [Fri, 21 Dec 2012 22:56:14 +0000]
dafs: preattach should wait for exclusive states

In rare circumstances an FSYNC_VOL_ON operation may fail silently,
leaving the volume in its previous state.  The only clue is a FileLog
message "volume <nnnn> not in quiescent state".

This is caused by a race condition in the volume package: an
FSYNC_VOL_ON operation is attempting to preattach a volume
(in VPreAttachVolumeByVp_r()) at the same time a fileserver RPC
(e.g. FetchStatus) is detaching the volume (in VReleaseVolumeHandles_r())
at the conclusion of attach2() logic.

The fix calls VWaitExclusiveState_r() before calling
VPreAttachVolumeByVp_r().

Change-Id: Ib66859381d29311fda3e08984dcb740eadafb340
Reviewed-on: http://gerrit.openafs.org/8814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoParallel libtool build fixes
Marc Dionne [Sat, 2 Feb 2013 17:17:48 +0000]
Parallel libtool build fixes

Serialize the use of libtool in a few places to avoid having
concurrent libtool instances in the same directory..

Change-Id: I5abaeae8f6a31cd84643b7df39c77493d198b600
Reviewed-on: http://gerrit.openafs.org/9024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: Use AFS_OBJECT_REFERENCE_MAX in struct
Jeffrey Altman [Mon, 4 Feb 2013 19:56:27 +0000]
Windows: Use AFS_OBJECT_REFERENCE_MAX in struct

Use AFS_OBJECT_REFERENCE_MAX to size the array in the struct.
This should have been a part of patchset
e267774f1a4f9cc5bfc32c545df36a4bf7947607.

Change-Id: I9323387a27a5bc2e708f8a8424cb38b491d542d7
Reviewed-on: http://gerrit.openafs.org/9066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoBeautify ubik_print()
Thorsten Alteholz [Sun, 3 Feb 2013 10:58:25 +0000]
Beautify ubik_print()

After lots of intermediate steps a call to ubik_print(), ubik_vprint()
and ubik_dprint*() ends in vFSLog() which adds a timestamp to the output.
So any call to ubik_print(), that does not contain a \n at the end,
makes a mess of the logfile.
The least invasive change will simply add this newline at the end
of any ubik_print() call.
This also prevents long lines in the log, which might appear on
multi-homed hosts with lots of interfaces.

FIXES 1446

Change-Id: I2e44588fcc5b27704dd5fec5a83d99d3a86f86e4
Reviewed-on: http://gerrit.openafs.org/9059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: cm_SetupFetchBIOD reserving type
Jeffrey Altman [Sun, 3 Feb 2013 19:03:36 +0000]
Windows: cm_SetupFetchBIOD reserving type

Change type of 'reserving' to afs_uint64 to match the return type
of buf_TryReserveBuffers().

Change-Id: I8aaac5a763ec55acada2702b898a9bcd50f82ed0
Reviewed-on: http://gerrit.openafs.org/9062
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: cm_user interlocked operations
Jeffrey Altman [Sun, 27 Jan 2013 20:43:58 +0000]
Windows: cm_user interlocked operations

Convert cm_user refcnts to use interlocked operations.

Change-Id: Ib40d2446792dcde3038ea601281406e013147595
Reviewed-on: http://gerrit.openafs.org/9061
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Fix RDR_BkgFetch rock assigment
Jeffrey Altman [Sun, 3 Feb 2013 06:20:36 +0000]
Windows: Fix RDR_BkgFetch rock assigment

The wrong variables were assigned to the rock base and offset
in the final queuing of a RDR_BkgFetch request within
RDR_RequestFileExtentsAsync.

Introduced in 8b874aa205cd05b8109a296c8cb8ad0bb5114553.

Change-Id: I77af22caed9eceb4c90b8fa18b91945d059995e5
Reviewed-on: http://gerrit.openafs.org/9058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: dirty threshold 64 * chunksize
Jeffrey Altman [Tue, 29 Jan 2013 17:28:57 +0000]
Windows: dirty threshold 64 * chunksize

must be large enough to keep the pipe full

Change-Id: I1bf8b5800ff286e74dbe57ced19943db891b715f
Reviewed-on: http://gerrit.openafs.org/8996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: More RDR Garbage Collection
Jeffrey Altman [Tue, 29 Jan 2013 02:12:10 +0000]
Windows: More RDR Garbage Collection

This patchset addresses the failure of AFSVolumeCB, AFSDirectoryCB,
and AFSObjectInformationCB objects to be garbage collected by the
AFSPrimaryVolumeWorker thread.  The AFSPrimaryVolumeWorker thread
is broken up into smaller pieces.

Change-Id: I54749960be8f22313ba7ee5f9f96438be6321f25
Reviewed-on: http://gerrit.openafs.org/8995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSEvaluateTargetByID Sanity Check Result
Jeffrey Altman [Sun, 27 Jan 2013 20:06:09 +0000]
Windows: AFSEvaluateTargetByID Sanity Check Result

If the file server provides the service with bogus status info
and that status info is inconsistent with the allocated fields
in the associated ObjectInformationCB and FCB structures, it can
result in a BSOD.  Perform some basic sanity checks and if an
inconsistency is discovered, fail the request.  This may result
in the inability to access a file/directory but will prevent a
BSOD.

Change-Id: Iabf66adc5e953dc4ae27ed701148a9ffbf55abcc
Reviewed-on: http://gerrit.openafs.org/8994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Replace ParentObjectInformation pointer
Jeffrey Altman [Fri, 1 Feb 2013 18:40:22 +0000]
Windows: Replace ParentObjectInformation pointer

Although rare there have been crashes which were the result of
the ObjectInformationCB being freed while another ObjectInformationCB
is pointing to it via the ParentObjectInformation pointer.

This patchset removes the pointer and replaces it with the ParentFileId
which is used to lookup the Parent ObjectInformationCB via the VolumeCB
BTree of all volume objects. The reference counting rules remain the
same.

Change-Id: Iaf66587be2619c8c2f06cd586ef8d423b76d1e79
Reviewed-on: http://gerrit.openafs.org/8993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Test for PRSFS_INSERT in redirector interface
Jeffrey Altman [Fri, 1 Feb 2013 18:39:22 +0000]
Windows: Test for PRSFS_INSERT in redirector interface

If a test for PRSFS_WRITE fails and the cm_scache.creator is the
current user, then also test for PRSFS_INSERT privilege.

Change-Id: Ib3e34f7ce50216cd9ff82afe9a7184f79d46ce15
Reviewed-on: http://gerrit.openafs.org/8978
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Additional I/O subsystem trace messages for AFSWrite
Jeffrey Altman [Fri, 25 Jan 2013 05:45:21 +0000]
Windows: Additional I/O subsystem trace messages for AFSWrite

When debugging be able to obtain additional details about the
I/O subsystem.

Change-Id: Ie875870cb874c6df0d8f94781656af8a34eeddf5
Reviewed-on: http://gerrit.openafs.org/8977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: .readonly space reporting
Jeffrey Altman [Fri, 25 Jan 2013 05:18:37 +0000]
Windows: .readonly space reporting

.readonly volumes can be stored on multiple partitions which each
have a different size and free space available.  To ensure consistency
regardless of which partition the .readonly is accessed from and
because .readonly volume sizes cannot change, report the allocation
size of the volume as the partition size.  Continue to report that
volume has zero free sectors because the volume cannot be written to.

Change-Id: Ib57b1175da048344af615b9350d72d9eb3ffe97d
Reviewed-on: http://gerrit.openafs.org/8976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY
Jeffrey Altman [Fri, 25 Jan 2013 05:17:25 +0000]
Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY

Instead of stating that the AFS device is read only; report
that the volume in question is read only using the FILE_READ_ONLY_VOLUME
file system characteristic.

Change-Id: I0b172f8a984802a3cefdea84436c9ed44f34d7f1
Reviewed-on: http://gerrit.openafs.org/8975
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSQueryFsAttributeInfo use service response
Jeffrey Altman [Fri, 25 Jan 2013 05:13:03 +0000]
Windows: AFSQueryFsAttributeInfo use service response

The File System attributes are set by the service in the volume
information request.  Use the values the service provides instead
of returning an incomplete hard coded list.

Change-Id: If620cd520ab29780ef296c6f15dfaee3774c3d41
Reviewed-on: http://gerrit.openafs.org/8974
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: FILE_FS_DEVICE_INFORMATION Device Type
Jeffrey Altman [Fri, 25 Jan 2013 05:11:41 +0000]
Windows: FILE_FS_DEVICE_INFORMATION Device Type

Consistently report our device type as FILE_DEVICE_NETWORK_FILE_SYSTEM
instead of FILE_DEVICE_DISK or FILE_DEVICE_DISK_FILE_SYSTEM except
when returning FILE_FS_DEVICE_INFORMATION where we must lie and state
that the device type is FILE_DEVICE_DISK.  Otherwise, the Win32 API
GetFileType() returns FILE_TYPE_UNKNOWN instead of FILE_TYPE_DISK.

Applications built from msys (but not current cygwin) treat files
of type FILE_TYPE_UNKNOWN as special character devices instead of
files.  This breaks msysGit.

Change-Id: I7107ae84ede31abb01481b2e8c3915588d9fd529
Reviewed-on: http://gerrit.openafs.org/8973
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: RDR_CleanupFile FSync only files
Jeffrey Altman [Tue, 22 Jan 2013 17:46:20 +0000]
Windows: RDR_CleanupFile FSync only files

If the cm_scache type is something other than a file, there
is no point performing an FSync.   Do not incur the overhead.

Take into account any outstanding AsyncStore operations that
might be in-flight.

Change-Id: I66cd59cbcd81f2a7639e478832f921ac393ea3ae
Reviewed-on: http://gerrit.openafs.org/8972
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSCleanupFile always flush on last handle
Jeffrey Altman [Tue, 22 Jan 2013 17:44:21 +0000]
Windows: AFSCleanupFile always flush on last handle

Do not rely on a count of dirty extents to determine if the
service should flush a file during a cleanup operation.  Simply
because there are no dirty extents held by the redirector does
not imply that the service has no dirty buffers for the file.

Change-Id: Ifc7c139a587413626eae145f343c4295dd94f28a
Reviewed-on: http://gerrit.openafs.org/8971
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: clear ASYNCSTORING flag in scache recycle
Jeffrey Altman [Sun, 20 Jan 2013 18:27:51 +0000]
Windows: clear ASYNCSTORING flag in scache recycle

If the scache has been recycled the ASYNCSTORING flag cannot
be accurrate.  Clear it.

Change-Id: Ie5a5a19bf1818e36f6274ba24ddeaf5f4b835ff4
Reviewed-on: http://gerrit.openafs.org/8970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: restructure daemon state tracking
Jeffrey Altman [Sun, 20 Jan 2013 18:26:24 +0000]
Windows: restructure daemon state tracking

Move all of the per thread state info into a struct and
allocate an array of structs instead of an array for each
data type.

Change-Id: I25b878192a8f919b21d96e981d7369a429b9171d
Reviewed-on: http://gerrit.openafs.org/8969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: osisleep cleanup
Jeffrey Altman [Sun, 20 Jan 2013 18:23:50 +0000]
Windows: osisleep cleanup

Change-Id: Id76989dfab53a166a4174569973fb0a5f5e5e972
Reviewed-on: http://gerrit.openafs.org/8968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: remove out of date cm_buf #define
Jeffrey Altman [Fri, 18 Jan 2013 02:02:36 +0000]
Windows: remove out of date cm_buf #define

Change-Id: Id60f509d7c8a1e9eb2f94d4c481d00e9b820b827
Reviewed-on: http://gerrit.openafs.org/8967
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Convert BkgDaemon Procedures to use rock
Jeffrey Altman [Thu, 17 Jan 2013 06:44:27 +0000]
Windows: Convert BkgDaemon Procedures to use rock

The BkgDaemon functions accepted four 32-bit parameters into
which 64-bit offsets and lengths were fit.  Convert the routines
to use a procedure specific rock type which is allocated by the
caller to cm_QueueBkgRequest and freed by cm_BkgDaemon.

The use of a rock will permit greater flexibility for future
background procedures to be implemented that require more complex
data to be passed around.

Change-Id: I4fc06e1d4a3a3ee25c699c95a90a9c9993199ddd
Reviewed-on: http://gerrit.openafs.org/8966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Set dirty page limit to 2 x ChunkSize / 4096
Jeffrey Altman [Thu, 17 Jan 2013 06:42:54 +0000]
Windows: Set dirty page limit to 2 x ChunkSize / 4096

4096 is the size of a memory manager page.  ChunkSize is in octets.
Windows doesn't wait until the limit is reached to begin flushing
and ChunkSize is not a hard limit.

Change-Id: Ic1d5dda18eefbf309696b8a19ef5623248f54faf
Reviewed-on: http://gerrit.openafs.org/8965
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Add CM_MERGEFLAG_CACHE_BYPASS
Jeffrey Altman [Fri, 25 Jan 2013 00:42:41 +0000]
Windows: Add CM_MERGEFLAG_CACHE_BYPASS

If a store operation is performed direct to the file server
bypassing the AFSCache, call cm_MergeStatus() with
CM_MERGEFLAG_CACHE_BYPASS to ensure that the valid version
numbers for the cm_scache_t object are incremented appropriately.
After a cache bypass occurs, only buffers with the current
data version number are valid since the cached data will be
incomplete.

Change-Id: I9438f8c9759407de69ab894df4f6fe91027a4b94
Reviewed-on: http://gerrit.openafs.org/8964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSInitPIOCtlDirectoryCB fixes
Jeffrey Altman [Thu, 31 Jan 2013 02:45:44 +0000]
Windows: AFSInitPIOCtlDirectoryCB fixes

Rename ObjectInfo parameter to ParentObjectInfo since
it does represent the parent of the PIOCtlDirectoryCB
that is being allocated.

If the AFS_DIR_ENTRY_TAG allocation fails, do not call
AFSDeleteObjectInfo( pObjectInfoCB) prior to the try_return
because AFSDeleteObjectInfo() will be executed in the try_exit
block.

Finally, do not increment the pDirNode->ObjectInformationCB
reference count when returning STATUS_REPARSE.  The reference
count is tracked by the pDirNode pointer and has already been
allocated.

Change-Id: Iac3d2b1b58d3bf12eb08c92b96beca43e794aef5
Reviewed-on: http://gerrit.openafs.org/8963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Additional trace %p and %d changes
Jeffrey Altman [Fri, 25 Jan 2013 00:28:44 +0000]
Windows: Additional trace %p and %d changes

Use %p when logging pointers.

Use %d for counts.

Change-Id: Ib3a3b1226945eccb15d912d7ff1c83f0257e7acd
Reviewed-on: http://gerrit.openafs.org/8962
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSProcessCreate drop DirOpenRefCount on exit
Jeffrey Altman [Fri, 25 Jan 2013 00:25:37 +0000]
Windows: AFSProcessCreate drop DirOpenRefCount on exit

AFSProcessCreate() must not maintain its DirOpenReferenceCount
when bFileCreated is true because the AFSCcb maintains its own
count and the one obtained by AFSProcessCreate() will only be
leaked.

Change-Id: I6591eb1c10d3dffe7449894b29c9999f5db91d64
Reviewed-on: http://gerrit.openafs.org/8961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Trace DirectoryCB allocations
Jeffrey Altman [Fri, 25 Jan 2013 00:14:42 +0000]
Windows: Trace DirectoryCB allocations

Add a trace subsystem for tracking Directory Entry allocations
and deallocations to assist with debugging.

Change-Id: Ic5f0361bf10752f50d433d3e9f4792b32bec8de1
Reviewed-on: http://gerrit.openafs.org/8960
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Introduce NameArray Reference Counts
Jeffrey Altman [Thu, 24 Jan 2013 23:55:24 +0000]
Windows: Introduce NameArray Reference Counts

Split the DirOpenReferenceCounts into those related to DirectoryCB
reference counting unrelated to the NameArrays and those that are
related to the NameArrays.  This helps track down the source of
overcounts and undercounts.

Change-Id: Ie3c6f15394fe116761e32ed4d7756a4bf6a5549f
Reviewed-on: http://gerrit.openafs.org/8959
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSSetRenameInfo Notify correct object of change
Jeffrey Altman [Thu, 24 Jan 2013 23:52:51 +0000]
Windows: AFSSetRenameInfo Notify correct object of change

When AFSSetRenameInfo makes a change, it is the parent object
that must be notified not the parent of the parent.

Change-Id: I56b3f1c076cb4abb4b5e41aed261e867a2d2ebb7
Reviewed-on: http://gerrit.openafs.org/8958
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Allocated VolumeCB from PagedPool
Jeffrey Altman [Thu, 24 Jan 2013 23:51:01 +0000]
Windows: Allocated VolumeCB from PagedPool

Only the non-paged portion of the VolumeCB should be allocated
from the non-paged pool.  Allocate the VolumeCB itself from the
paged pool.

Change-Id: If248faf78546bb34fd1ba1ddcc1acb5a6da20c6f
Reviewed-on: http://gerrit.openafs.org/8957
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Move VolumeWorkerContext to NonPaged pool
Jeffrey Altman [Sun, 27 Jan 2013 04:19:05 +0000]
Windows: Move VolumeWorkerContext to NonPaged pool

The VolumeWorkerContext contains a KEVENT which must be allocated
from the NonPaged pool.  Move it to the AFSNonPagedVolumeCB struct.

Change-Id: If24ea5f22e6cc7e71328d0d2d8e0c8b9209ce5b2
Reviewed-on: http://gerrit.openafs.org/8992
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Categorize ObjectInformationCB RefCnts
Jeffrey Altman [Thu, 24 Jan 2013 23:44:33 +0000]
Windows: Categorize ObjectInformationCB RefCnts

To assist in tracking down the source of ObjectInformationCB
overcounts and undercounts, add an advisory array which tracks
the reference counts by category.  In the procress ensure that
all reference count changes are logged by tracing.

Change-Id: I813cd0af5e12e36ba9863577dbd35abef6339414
Reviewed-on: http://gerrit.openafs.org/8956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFS_SUBSYSTEM_OBJECT_REF_COUNTING fixes
Jeffrey Altman [Thu, 24 Jan 2013 23:24:55 +0000]
Windows: AFS_SUBSYSTEM_OBJECT_REF_COUNTING fixes

A large number of trace messages monitoring ObjectInformationCB
reference counting were categorized under AFS_SUBSYSTEM_FCB_REF_COUNTING
instead of AFS_SUBSYSTEM_OBJECT_REF_COUNTING.  This patchset applies
the correct subsystem category.

Change-Id: I6c309b42b3d679f961d82c1a975d84122c9275f9
Reviewed-on: http://gerrit.openafs.org/8955
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Reduce RDR Object Lifetime
Jeffrey Altman [Thu, 24 Jan 2013 21:29:52 +0000]
Windows: Reduce RDR Object Lifetime

Adjust the redirector object lifetime from 10 minutes (600 seconds)
to 20 seconds.  The object lifetime is how long an object can remain
idle before garbage collection is permitted.

Change-Id: I8db89bfb0ccd40e9295dcbb30fbc2c96813d9fc9
Reviewed-on: http://gerrit.openafs.org/8954
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agowindows: Update raw fetch/store operations
Jeffrey Altman [Sun, 13 Jan 2013 15:15:02 +0000]
windows: Update raw fetch/store operations

rawops.c is a hold over from Eric Williams' original attempt
to implement an AFS redirector.  When the rest of the his code
was purged from the tree and replaced with a more complete
implementation based upon the Kernel Drivers's File System
framework rawops.c was left behind.

Although the source file has been compiled as part of the build,
its functions ReadData and WriteData have never been called.  This
patchset:

 1. renames the functions to raw_ReadData and raw_WriteData

 2. modifies the function signatures and provides a header
    with prototypes

 3. requires that cm_scache.rw be write-locked upon entry

 4. renames variables

 5. removes the #define CM_BUF_BUFSIZE and relies upon
    cm_data.blockSize instead

 6. Always write back the current range as an async store
    instead of the previous chunk as random write patterns
    will fail to store all of the dirty buffers.

Change-Id: I1594b2950ab14da0c0de2a382fd1ba8248a9d1c6
Reviewed-on: http://gerrit.openafs.org/8953
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agovlclient: add -probe option
Michael Meffie [Wed, 16 Jan 2013 17:10:02 +0000]
vlclient: add -probe option

Add a new option to the vlclient test program to call the
probe server RPC to ping the vlservers in a cell. Uses a multi
rx call to do the probes in parallel.

The existing -host option can be used to ping a single
vlserver.

Change-Id: I25666b7ff139ae43364ac04869b14997f3ed0d53
Reviewed-on: http://gerrit.openafs.org/8911
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agotests: Don't use libafsauthent
Simon Wilkinson [Sat, 2 Feb 2013 07:22:50 +0000]
tests: Don't use libafsauthent

Use liboafs_auth.la directly, rather than using libafsauthent, to
build the auth tests

Change-Id: Idf0e7a32626802b6113d21833ded09d9e20e3659
Reviewed-on: http://gerrit.openafs.org/9023
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoauth: Permit NULL fallback in localauth case
Simon Wilkinson [Sat, 2 Feb 2013 07:20:14 +0000]
auth: Permit NULL fallback in localauth case

Allow the caller of afsconf_PickClientSecObj to specify both
local authentication, and to request fallback to null authentication
if local auth isn't available.

Change-Id: Ib3b801bfde3f32b4cb9cdc7c08a3d8ab985c080f
Reviewed-on: http://gerrit.openafs.org/9022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorx: Fix AIX test_and_set_bit
Simon Wilkinson [Sat, 2 Feb 2013 07:17:53 +0000]
rx: Fix AIX test_and_set_bit

The AIX definition of rx_atomic_test_and_set_bit had its test the
wrong way round - so an already set bit would return false, and a clear
bit would return true. Fix this.

Change-Id: I7778c411016bca53b38257fca59ae0f7aaad64ae
Reviewed-on: http://gerrit.openafs.org/9021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agofix some typos in bos_setrestricted
Thorsten Alteholz [Wed, 30 Jan 2013 19:11:04 +0000]
fix some typos in bos_setrestricted

the real name of the command is: 'bos setrestricted'
it is sufficient to name 'bos install' only once

Change-Id: Ic68f7cb55466e1c92c34eeda37c0a64a11b7e4d8
Reviewed-on: http://gerrit.openafs.org/8990
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agorx: convert rxinit_status to atomic
Derrick Brashear [Mon, 21 Jan 2013 21:13:56 +0000]
rx: convert rxinit_status to atomic

we don't need to use a lock just for this; switch to atomic and use that
to trigger configuration.

Change-Id: Ia96ec308dda51d1f6d13f290a23251c66665e499
Reviewed-on: http://gerrit.openafs.org/8930
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agodarwin: stop processing upcalls once rx shutdown starts
Derrick Brashear [Mon, 21 Jan 2013 21:10:17 +0000]
darwin: stop processing upcalls once rx shutdown starts

we have a chicken and egg. can't stop upcall without
killing socket; can't kill socket while rx might try to transmit on it.
cheat, and if rx is shut down, don't process things upcall receives.

FIXES 131577

Change-Id: I6b72f6e7aefb7937b768dcb9c0a83d0ee3317bfa
Reviewed-on: http://gerrit.openafs.org/8931
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: Disable hard dead timeout for RDR File Server connections
Jeffrey Altman [Wed, 19 Dec 2012 21:52:34 +0000]
Windows: Disable hard dead timeout for RDR File Server connections

The UNIX cache manager does not implement hard dead timeouts
on file server connections.  The Windows cache manager had to
because of the SMB connection timeout requirements.  For the
AFS redirector there is no timeout requirement.  Therefore,
when the SMB stack is disabled the Windows cache manager can
disable the hard dead timeout.

The idle dead timeouts are in place to cancel connections when
file servers stop replying with real data.

Change-Id: I44f77b78a52e7cac3a88a53830748b77f3ff4000
Reviewed-on: http://gerrit.openafs.org/8828
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agolibafsrpc: avoid more concurrent libtool
Derrick Brashear [Fri, 1 Feb 2013 13:42:49 +0000]
libafsrpc: avoid more concurrent libtool

libtool gets confused if it is running two instances in the same
directory, so make sure we build libafsrpc.a after the other things
we already single-stream.

Change-Id: I4c26b5707fdb73319563b063b45eb40b7ca1457e
Reviewed-on: http://gerrit.openafs.org/9017
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agorx: atomic bit ops
Simon Wilkinson [Mon, 21 Jan 2013 21:50:25 +0000]
rx: atomic bit ops

Add rx_atomic_test_bit, rx_atomic_set_bit, and rx_atomic_clear_bit
to provide bitwise operations over atomic types. These allow the
use of atomic flag variables.

Uses native platform atomic operations wherever these are available,
otherwise falls back to our 'standard' MUTEX based implementation.

LICENSE BSD

Change-Id: I161631b2408e85f757ff04bf831a631ccb1f930d
Reviewed-on: http://gerrit.openafs.org/8936
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: rename 'rbytes' to 'rxbytes' for clarity
Jeffrey Altman [Fri, 25 Jan 2013 08:25:46 +0000]
Windows: rename 'rbytes' to 'rxbytes' for clarity

Throughout cm_dcache.c, the various 'rbytes' represents the number
of bytes to be read from the next rx_Read or rx_Readv call.
Rename the variable to 'rxbytes' to improve clarity.

Change-Id: Iffd8dd397c0e6ab4cc44019b7f937a80f5d492d2
Reviewed-on: http://gerrit.openafs.org/8952
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Update Bulk I/O Descriptor
Jeffrey Altman [Thu, 3 Jan 2013 19:11:31 +0000]
Windows: Update Bulk I/O Descriptor

Update the cm_bulkIO_t and associated functions such that
the 'reserved' field is no longer a boolean indicated whether
or not buffers have been reserved but instead becomes a count
of the number of buffers that have been reserved.

buf_TryReserveBuffers is modified to return an afs_uint64
count of the number of buffers reserved instead of a boolean.

cm_SetupStoreBIOD, cm_SetupFetchBIOD, and cm_ReleaseBIOD altered
to store the reserved buffer count and use it when freeing the
BIOD.

Prior to this change it was not possible to reserve a count other
than the number of buffers it takes to store one chunkSize of data.

Change-Id: I78d71c77ffddd7f34278314fcfe9ee568b835a8b
Reviewed-on: http://gerrit.openafs.org/8951
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: reformat
Jeffrey Altman [Sun, 16 Dec 2012 07:02:06 +0000]
Windows: reformat

Change-Id: Ifba4f0d54032bd9580c97e7a94d2550e49b1a1ac
Reviewed-on: http://gerrit.openafs.org/8950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: handle CM_ERROR_RETRY in cm_Analyze()
Jeffrey Altman [Tue, 6 Nov 2012 11:41:47 +0000]
Windows: handle CM_ERROR_RETRY in cm_Analyze()

cm_Analyze() was not forcing a retry when it received CM_ERROR_RETRY.

Change-Id: I5c392623a3917bebdd5cb9bd86b030395d7a7d48
Reviewed-on: http://gerrit.openafs.org/8949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Decrement Fcb OpenHandleCount while locked
Jeffrey Altman [Sat, 29 Dec 2012 20:58:06 +0000]
Windows: Decrement Fcb OpenHandleCount while locked

AFSCleanup performs tests on the Fcb Open Handle Count to determine
when to perform final cleanup tasks on the last handle close.  The
test is protected by holding the Fcb Resource.  If the Open Handle
Count is decremented after dropping the Resource, it creates a
race with other threads that might be blocked entering AFSCleanup
to close their handle on the same object.

Change-Id: I0403d8aeafd736484728a25c5c48ab28e8b8a804
Reviewed-on: http://gerrit.openafs.org/8863
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSOpenRoot obtain VolumeRoot OpenReferenceCount earlier
Jeffrey Altman [Sat, 29 Dec 2012 21:12:21 +0000]
Windows: AFSOpenRoot obtain VolumeRoot OpenReferenceCount earlier

In AFSOpenRoot obtain the VolumeRoot reference count before performing
any operations that require use of the VolumeRoot.  If the operations
fail, release the reference count.

Change-Id: I2e5a6574f87db858aa60d812c68f637266db529e
Reviewed-on: http://gerrit.openafs.org/8862
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: RDR FILE Processing Tracing
Jeffrey Altman [Sat, 29 Dec 2012 21:10:14 +0000]
Windows: RDR FILE Processing Tracing

Additional/improved trace messaging for name not found and
path not found errors.

Change-Id: Ieedbee072c0f2c7050a33734fe16b4dfc0504cea
Reviewed-on: http://gerrit.openafs.org/8861
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: DirOpenReferenceCount reorganizing completed
Jeffrey Altman [Sat, 29 Dec 2012 05:57:31 +0000]
Windows: DirOpenReferenceCount reorganizing completed

This patchset completes the reorganizing of the DirOpenReferenceCount
handling.  Now that every AFSCcb is given a refCount in AFSInitCcb()
which is released in AFSRemoveCcb() it is possible to simplify some
of the logic surrounding DirOpenReferenceCount handling across
the AFSCommonCreate -> XXX -> AFSLocateNameEntry -> {MountPoint, Symlink}
call sequences.

Wherever possible releasing of DirOpenReferenceCounts occur in a
functions try_exit block.  AFSCommonCreate() uses the new variables
bReleaseDir and bReleaseParentDir to track whether these refcounts
need to be released.  Additional comments document the decision
making.

There was at least one code path in AFSLocateNameEntry() where
the DirOpenReferenceCount could be dropped when it should not have
been. (pExistingDirNode == pDirNode).

Change-Id: I266a902ad4c44b4b8e49258c2da4acd2df1f4476
Reviewed-on: http://gerrit.openafs.org/8860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: NameArray DIRENTRY_REF_COUNT logging
Jeffrey Altman [Sat, 29 Dec 2012 05:51:55 +0000]
Windows: NameArray DIRENTRY_REF_COUNT logging

Include the NameArray pointer in the AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING
log messages generated from the NameArray management routines.  This
permits correlation between the reference count changes and the
NameArray to which they were associated.

Change-Id: Ieb1b78dec35b91fe2b325ed9da760f56e98759c3
Reviewed-on: http://gerrit.openafs.org/8859
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSSetRenameInfo DIRENTRY_REF_COUNTING
Jeffrey Altman [Sat, 29 Dec 2012 05:49:43 +0000]
Windows: AFSSetRenameInfo DIRENTRY_REF_COUNTING

When logging the result of the DirOpenReferenceCount increment,
use lCount instead of referencing the DirOpenReferenceCount field
which could have been changed.

Change-Id: I2227472bf903c347e505e4e1d8b60d35e176c0df
Reviewed-on: http://gerrit.openafs.org/8858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSSetFileLinkInfo() DirOpenReferenceCount handling
Jeffrey Altman [Sat, 29 Dec 2012 05:44:27 +0000]
Windows: AFSSetFileLinkInfo() DirOpenReferenceCount handling

AFSSetFileLinkInfo() would leak a DirOpenReferenceCount when
pNewTargetDirEntry is not NULL upon exit.  It also did not
properly handle a STATUS_REPARSE response from AFSNotifyHardLink().
The AFSInsertDirectoryNode() call should not be performed when
the result is STATUS_REPARSE since that means the entry already
exists.

Change-Id: Ibbf497cb4c3c412e4f95cdffc6025f03f0e2ed8b
Reviewed-on: http://gerrit.openafs.org/8857
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSNotifyHardLink() DirOpenReferenceCount handling
Jeffrey Altman [Sat, 29 Dec 2012 05:40:25 +0000]
Windows: AFSNotifyHardLink() DirOpenReferenceCount handling

This patchset consolidates the releasing of the DirOpenReferenceCount
within AFSNotifyHardLink() into the try_exit block.  This clarifies
the logic and avoids duplicate code blocks.

Change-Id: I7bf7e5af55646ea570c76e36a673900521a3582c
Reviewed-on: http://gerrit.openafs.org/8856
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSNotifyFileCreate() DirOpenReferenceCount handling
Jeffrey Altman [Sat, 29 Dec 2012 05:36:44 +0000]
Windows: AFSNotifyFileCreate() DirOpenReferenceCount handling

This patchset consolidates the releasing of the DirOpenReferenceCount
within AFSNotifyFileCreate() into the try_exit block.  This clarifies
the logic and avoids duplicate code blocks.

Change-Id: I82e964f579f9e8b6e095291ace0bbe2cdac5af60
Reviewed-on: http://gerrit.openafs.org/8855
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSClose() DirOpenReferenceCount handling
Jeffrey Altman [Sat, 29 Dec 2012 05:29:45 +0000]
Windows: AFSClose() DirOpenReferenceCount handling

Unless the caller of AFSRemoveCcb() steals the DirectoryCB object
from the AFSCcb before calling AFSRemoveCcb(), AFSRemoveCcb() will
release the reference count.

In all but one case where the DirectoryCB must be accessed after
the AFSCcb is destroyed AFSClose() can now let AFSRemoveCcb() do the
work.

Change-Id: I8d631d79b2465cd6f2e31444fd052270b078915c
Reviewed-on: http://gerrit.openafs.org/8854
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Fix AFSLocateNameEntry prototype
Jeffrey Altman [Sat, 29 Dec 2012 05:28:04 +0000]
Windows: Fix AFSLocateNameEntry prototype

The VolumeCB parameter is an IN/OUT parameter.

Change-Id: I3eb4231e0d095cc98cc5847905d61d924d12e6f3
Reviewed-on: http://gerrit.openafs.org/8853
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSInitCcb redefinition
Jeffrey Altman [Sat, 29 Dec 2012 05:17:59 +0000]
Windows: AFSInitCcb redefinition

The new AFSInitCcb() allocates its own DirOpenReferenceCount to
associate with the AFSCcb.DirectoryCB.

It also accepts the GrantedAccess mask and the FileAccess values
which are stored in the AFSCcb.

These changes simplify the callers and remove responsibility of
tracking whether or not the DirOpenReferenceCount was successfully
associated with the AFSCcb.

The allocated DirOpenReferenceCount is always released by
AFSRemoveCcb().

Change-Id: Ib475310d934830974c553e0eeff96b114a56541b
Reviewed-on: http://gerrit.openafs.org/8852
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: AFSRemoveCcb cannot fail
Jeffrey Altman [Thu, 27 Dec 2012 19:41:29 +0000]
Windows: AFSRemoveCcb cannot fail

Since AFSRemoveCcb cannot fail, change the signature from returning
NTSTATUS to void.

Remove all error handling code.

Change-Id: Ifa893a714f97cefb9bd122ab84508e5d36987e88
Reviewed-on: http://gerrit.openafs.org/8851
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoRework set_header_word macros
Marc Dionne [Sat, 22 Dec 2012 12:54:54 +0000]
Rework set_header_word macros

Rework the set_header_word macros so that all compilers are
happy:
- the use of offsetof() is avoided, as it has an issue on IRIX
when the result is not constant
- the assignment within the macro is explicitely sequenced before
the function call to avoid a gcc sequence-point warning

Change-Id: I2355233e865b155f958379bfa2736fee19ef2680
Reviewed-on: http://gerrit.openafs.org/8816
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoNEWS updates for 1.6.2
Ken Dreyer [Wed, 12 Dec 2012 17:37:47 +0000]
NEWS updates for 1.6.2

Add an entry for 1.6.2 with "in progress" instead of a date to hold the
release notes for 1.6.2pre4 rather than creating separate entries for
each release candidate. Users who track the release candidates can refer
to the public announcements, and this will be cleaner when reading
history later on.

Change-Id: I625044e20836e072b62ffa738eca23f1d11813a5
Reviewed-on: http://gerrit.openafs.org/8750
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>

11 years agoCellServDB update 28 Jan 2013
Stephan Wiesand [Mon, 28 Jan 2013 14:53:36 +0000]
CellServDB update 28 Jan 2013

Change-Id: Icb622cc5480aeba108b9a11f55cfb44ab7f7c262
Reviewed-on: http://gerrit.openafs.org/8982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agolibafs: fs flushall for unix cm
Michael Meffie [Thu, 7 Jun 2012 18:46:04 +0000]
libafs: fs flushall for unix cm

Implement the fs flushall command on the unix cache manager to flush
all volume data.  Uses a new common pioctl code point VIOC_FLUSHALL (14),
registered with the grand.central.org assigned numbers.

Change-Id: I214d8c762573b308d79fa7122a91d48ddd403eb9
Reviewed-on: http://gerrit.openafs.org/7540
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agoWindows: Use %p for ptrs in redirector trace messages
Jeffrey Altman [Thu, 24 Jan 2013 03:50:26 +0000]
Windows: Use %p for ptrs in redirector trace messages

Pointers were being logged with %08lX which results in partial
pointer values being logged on 64-bit systems.

Change-Id: Ic11e5b607b3df41f145536dfcb02dfa22537ee77
Reviewed-on: http://gerrit.openafs.org/8943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoSOLARIS: Use vn_renamepath as early as possible
Andrew Deason [Fri, 18 Jan 2013 20:27:16 +0000]
SOLARIS: Use vn_renamepath as early as possible

Commit 6c509601 uses the vn_renamepath when we are building on Solaris
11. However, some recent patch level of Solaris 10 (more recent than
stock 10u10) has the same problem fixed by that commit, where
vn_setpath takes an additional argument. So instead, just test for the
existence of vn_renamepath itself, so we also use it on Solaris 10
when we can.

Thanks to Rich Sudlow for reporting this.

Change-Id: Ic1c0437d2438c6e19b8fff8278ecda9b96bd020b
Reviewed-on: http://gerrit.openafs.org/8920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoaklog: Fix allow_weak_crypto warning
Andrew Deason [Tue, 22 Jan 2013 21:41:38 +0000]
aklog: Fix allow_weak_crypto warning

It's _crypto, not _enctypes. The user will just be more confused than
before if we tell them to do the wrong thing.

Change-Id: Ib94b14efbd3c89d9f58fb8985326ee8691fd993b
Reviewed-on: http://gerrit.openafs.org/8938
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>

11 years agorx: Remove warning inhibition on rx.c
Simon Wilkinson [Fri, 18 Jan 2013 22:54:03 +0000]
rx: Remove warning inhibition on rx.c

The CFLAGS_NOERROR rule for rx.c seems to have crept back in as
part of the libtool changes. The LWP build of rx.c has never had
warning inhibition on rx.c, and the inhibition in the pthread
builds was removed by 327762071be3806c5d08be0218982c7027754756

Change-Id: Icde3f0b6ee2f8ae0818a3dc722c6171284d6a9e6
Reviewed-on: http://gerrit.openafs.org/8921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoFreeBSD 9.1: Warning fixes
Andrew Deason [Fri, 18 Jan 2013 23:05:12 +0000]
FreeBSD 9.1: Warning fixes

Fix warnings caused by some changes in FreeBSD 9.1:

 - afs_cmount takes a uint64_t for flags instead of an int
 - vn_rdwr takes a ssize_t* for resid instead of an int*

[kaduk@mit.edu: rebase onto master and use fine-grained version checks]

Change-Id: I03ab805a625790004a910df96b96aeda1121e2a7
Reviewed-on: http://gerrit.openafs.org/8922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoWindows: Police Library IOCTLs
Rod Widdowson [Sun, 30 Dec 2012 11:13:24 +0000]
Windows: Police Library IOCTLs

Ensure that the callers of the various library ioctls have
the correct identity or privs.  All this policing is done in
the fs (non unloadable) layer, and to ensure that the library
layer cannot receive these calls directly we forbid non
create Opens of the library control device.

Change-Id: I2342fe10047642082adfbd1cc6aaee09cc91b520
Reviewed-on: http://gerrit.openafs.org/8893
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agoWindows: Police the DEBUG TRACE ioctls
Rod Widdowson [Fri, 28 Dec 2012 15:00:15 +0000]
Windows: Police the DEBUG TRACE ioctls

When we get a IOCTL_AFS_GET_TRACE_BUFFER, a IOCTL_AFS_CONFIGURE_DEBUG_TRACE
or a IOCTL_AFS_FORCE_CRASH, we check to see whether the caller is in the
Administrators group and if it isn't we fail the request with ACCESS_DENIED.

NOTE that this does not check whether the user has done the "run as admin"
thing.  We actually need to determine which priviledges are appropriate to
this action and use that rather than group membership to police these actions
and this will be added in a later patch.  Meanwhile this represents a
significant increment in security from previously.

Change-Id: I0997e59a82735735674d8edee7a7a68d241e6ef8
Reviewed-on: http://gerrit.openafs.org/8843
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>

11 years agomacos: update decode-panic
Derrick Brashear [Mon, 21 Jan 2013 16:57:54 +0000]
macos: update decode-panic

fix a couple brain-os from the last round of updates, so it can
actually decode panics.

Change-Id: If39f1fb273a834d0618264d944387bd8b6751284
Reviewed-on: http://gerrit.openafs.org/8929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoImprove libroken configure check
Andrew Deason [Thu, 17 Jan 2013 21:37:06 +0000]
Improve libroken configure check

It is not sufficient to just check if libroken is available; we need
to check if the specific functionality we want is there. So, try to
compile and link while referencing specific functions.

As mentioned in the comments, testing every single function we use may
not be practical, and we should perhaps just add functions to test as
we find breakage. This commit tests rk_rename, which is missing in at
least the Debian package heimdal-dev, version
1.4.0~git20100726.dfsg.1-2+squeeze1.

Change-Id: I0ac6c9aea1f8598bb1b1315544683b2403de5f69
Reviewed-on: http://gerrit.openafs.org/8916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoxstat: length check cm call info
Michael Meffie [Mon, 10 Dec 2012 23:00:25 +0000]
xstat: length check cm call info

Define the cm xstat function call counters with an xmacro to avoid
duplicating the list of cm function names.  This obviates the need
to update xstat_cm_test.c when new function names are added to the
cm xstat collection id 0.

Check the number of returned records when printing the function call
counts to avoid over-running when a newer xstat_cm_test client
receives data from an older cm.

Change-Id: I3c5470afb7b04167173b41bb576a4a6ec14753f7
Reviewed-on: http://gerrit.openafs.org/8741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoxstat: remove unused call info function
Michael Meffie [Mon, 10 Dec 2012 23:02:20 +0000]
xstat: remove unused call info function

Remove the dead function PrintCallInfo(), which was replaced
by print_cmCallStats() long, long ago.

Change-Id: Id67323d66cc498f77e55f173218547ad5d4223c7
Reviewed-on: http://gerrit.openafs.org/8740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoOpenBSD: Add support for missing routine memmove() in kernel.
Antoine Verheijen [Mon, 21 Jan 2013 08:48:01 +0000]
OpenBSD: Add support for missing routine memmove() in kernel.

OpenBSD does not have the memmove() routine available to dynamically
loaded modules in its kernel. It exists but is not exported so it
winds up "mia" on dynamic load of the kernel module. It's needed for
the Heimdal code that's been added into OpenAFS. This patch deals
with this issue by creating an inline version in the OS-specific
param.h file.

Note that this issue does not seem to exist in the amd64 version of
OpenBSD so (at least for now) tis fix is only applied to the i386
version of the header files.

Change-Id: Ide8a5ff49cb662e145fd93aefd8e3a12d7cbead5
Reviewed-on: http://gerrit.openafs.org/8926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoOpenBSD 4.6/4.7: Define curproc for rx_atomic.h.
Antoine Verheijen [Mon, 21 Jan 2013 06:27:02 +0000]
OpenBSD 4.6/4.7: Define curproc for rx_atomic.h.

For OpenBSD 4.6 and 4.7, the rx_atomic.h header ultimately resorts
to the use of the default atomic routines that rely on MUTEX
macros. Those macros require that 'curproc' be defined, which in
turn requires the presence of the 'sys/proc.h' header. This patch
inserts that header into the param.h file for those systems.

Note that subsequent versions of OpenBSD have __sync_fetch_and_add
and don't require 'curproc' as a result.

Change-Id: I5131aed60631ef285eda92180ef65845165526b1
Reviewed-on: http://gerrit.openafs.org/8925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>

11 years agoLinux 3.8: vmtruncate removal
Marc Dionne [Thu, 10 Jan 2013 02:22:27 +0000]
Linux 3.8: vmtruncate removal

vmtruncate had been deprecated for a while and has now been
removed.  Do things the new way based on truncate_setsize.

Change-Id: If584329f7330f44be3909e4c8b935e4fe5e2b536
Reviewed-on: http://gerrit.openafs.org/8906
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>