Commit Graph

11164 Commits

Author SHA1 Message Date
Mark Vitale
1f891b622e 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>
2013-02-05 03:48:42 -08:00
Marc Dionne
804a0db1bb 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>
2013-02-05 03:42:38 -08:00
Jeffrey Altman
52cc798837 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
e267774f1a.

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>
2013-02-04 17:47:52 -08:00
Thorsten Alteholz
dc32caae77 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>
2013-02-04 10:11:58 -08:00
Jeffrey Altman
4b3f499b20 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>
2013-02-03 11:54:14 -08:00
Jeffrey Altman
e4d97fa3e4 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>
2013-02-03 11:53:55 -08:00
Jeffrey Altman
5f17b9f929 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 8b874aa205.

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>
2013-02-03 05:20:14 -08:00
Jeffrey Altman
3ecdfadded 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>
2013-02-02 09:34:00 -08:00
Jeffrey Altman
2e7c203a6c 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>
2013-02-02 09:33:44 -08:00
Jeffrey Altman
8099525c4a 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>
2013-02-02 09:24:40 -08:00
Jeffrey Altman
5649d84f1a 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>
2013-02-02 09:24:09 -08:00
Jeffrey Altman
a5378b71ee 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>
2013-02-02 09:23:54 -08:00
Jeffrey Altman
7c3f5bfba6 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>
2013-02-02 09:23:28 -08:00
Jeffrey Altman
ed6354881d 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>
2013-02-02 09:22:53 -08:00
Jeffrey Altman
ddba1a1f06 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>
2013-02-02 09:22:39 -08:00
Jeffrey Altman
5880a73264 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>
2013-02-02 09:22:19 -08:00
Jeffrey Altman
e41d08c9a1 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>
2013-02-02 09:21:58 -08:00
Jeffrey Altman
cac8dea092 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>
2013-02-02 09:21:25 -08:00
Jeffrey Altman
8ae06c2ea4 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>
2013-02-02 09:19:10 -08:00
Jeffrey Altman
5bedc5e03a 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>
2013-02-02 09:17:05 -08:00
Jeffrey Altman
e7e83d8c7e 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>
2013-02-02 09:14:02 -08:00
Jeffrey Altman
294fce5ddf 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>
2013-02-02 09:13:05 -08:00
Jeffrey Altman
b93ddf1a9c 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>
2013-02-02 09:12:45 -08:00
Jeffrey Altman
8b874aa205 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>
2013-02-02 09:12:24 -08:00
Jeffrey Altman
5be1779547 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>
2013-02-02 09:12:00 -08:00
Jeffrey Altman
8b62d08760 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>
2013-02-02 09:11:18 -08:00
Jeffrey Altman
65ff993572 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>
2013-02-02 09:10:36 -08:00
Jeffrey Altman
3847ec9531 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>
2013-02-02 09:05:20 -08:00
Jeffrey Altman
391bdbf9ac 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>
2013-02-02 09:05:07 -08:00
Jeffrey Altman
4811fd8844 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>
2013-02-02 09:04:14 -08:00
Jeffrey Altman
c753d398f2 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>
2013-02-02 09:04:01 -08:00
Jeffrey Altman
e5e952f5fc 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>
2013-02-02 09:03:33 -08:00
Jeffrey Altman
8d4757284a 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>
2013-02-02 09:03:17 -08:00
Jeffrey Altman
34f4427a97 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>
2013-02-02 09:03:02 -08:00
Jeffrey Altman
e267774f1a 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>
2013-02-02 09:02:47 -08:00
Jeffrey Altman
fce3f679f1 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>
2013-02-02 09:02:34 -08:00
Jeffrey Altman
3e38897012 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>
2013-02-02 09:02:15 -08:00
Jeffrey Altman
24b6365169 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>
2013-02-02 09:01:55 -08:00
Michael Meffie
bb733da134 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>
2013-02-02 05:21:58 -08:00
Simon Wilkinson
40b43a15b8 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>
2013-02-02 05:20:19 -08:00
Simon Wilkinson
b3dd9c2f4e 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>
2013-02-02 05:19:45 -08:00
Simon Wilkinson
9dc6dd9858 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>
2013-02-02 05:19:08 -08:00
Thorsten Alteholz
69f6345034 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>
2013-02-01 14:29:24 -08:00
Derrick Brashear
17986a100e 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>
2013-02-01 14:28:56 -08:00
Derrick Brashear
ed8b480886 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>
2013-02-01 14:28:45 -08:00
Jeffrey Altman
2f8de279e1 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>
2013-02-01 10:47:45 -08:00
Derrick Brashear
d1c6b7bc58 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>
2013-02-01 10:46:58 -08:00
Simon Wilkinson
1839cdbe26 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>
2013-01-31 21:03:08 -08:00
Jeffrey Altman
bf4cda8a55 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>
2013-01-31 11:31:53 -08:00
Jeffrey Altman
23fa416581 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>
2013-01-31 11:31:30 -08:00