Implement the -checkout option using the FSSYNC communication
channel with the fileserver.
Change-Id: I119fab0c238fd37eb85c9810626ee91210b2efb6
Reviewed-on: http://gerrit.openafs.org/5101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Resource conversion for the cs_CZ locale. Does not include
installer updates.
Change-Id: Ifac0d7d9818dc662e584bc74701133cada9fbf33
Reviewed-on: http://gerrit.openafs.org/6227
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
we need to rework this to use lack of soft acks instead of this
method, which is too fragile
Change-Id: Iedcd1e57e2c6a6c15ce3c040a9a9e6ae7d78bb36
Reviewed-on: http://gerrit.openafs.org/6256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
instead of doing it for potentially every unauth user, just do it for
root.
Change-Id: I39ef22578eb07c339b096b25753a1775c9917e0b
Reviewed-on: http://gerrit.openafs.org/6255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
The SID string of the RPC used to set the token sessionKey
was being leaked. Be sure to free it when it is no longer
required.
Change-Id: I28261643680d608d5c8805e095650a751193ab6d
Reviewed-on: http://gerrit.openafs.org/6244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
The power mgmt events are received in the service. The service
can block all requests from the redirector from being processed
until it knows that it is safe to process them.
The service will receive a SERVICE_CONTROL_APMSUSPEND just before
the system goes to sleep. The service has two seconds to respond
and it uses that time to attempt to send RXAFS_GiveUpAllCallBacks
to all file servers as an rx_multi with no wait. It also marks
all servers down and updates the callback expirations to be just
after the servers were marked down so that they will be forced to
be refreshed when the server is marked up.
Upon resume the service receives two events. First,
SERVICE_CONTROL_APMRESUMEAUTOMATIC which is used to perform an
SMB lan adapter change detection and perform a probe of all down
servers. The second, SERVICE_CONTROL_APMRESUMESUSPEND is used to
resume SMB listeners, perform a 2nd lan adapter change check (just
in case), check the status of all down servers in additional
networks have come up, and finally resume processing of redirector
requests.
With these changes no special logic in the redirector is required.
Change-Id: I5405ecab754dca04f34afb024c4dacc3fe089088
Reviewed-on: http://gerrit.openafs.org/6243
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This message is useless, annoying, and is the UI equivalent of littering... but
it does explain why your backup command is just sitting there.
Change-Id: Ied49d0bf9f81b0e10804133c6f05814321d80438
Reviewed-on: http://gerrit.openafs.org/6223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
The AFS Redirector requests file data extents from the afsd_service.exe. If
it does not receive the requested extent within 10 seconds it issues another
request for that extent. Extent processing in the afsd_service is handled
by background daemons that process tasks serially from a work queue. When
the load on the system is large enough that satisfying the work queue takes
longer than 10 seconds, the redirector would retry the request. This would
increase the length of the work queue and increase lock contention.
Increasing the timeout period for extent retries to two minutes
significantly reduces the number of retry attempts while maintaining
protection against a lost extent request. Two minutes is selected because
that is the rx hard dead call timeout.
Change-Id: I8169fbdc2d3456f151359ffe9eaa8eeccb2ceaf1
Reviewed-on: http://gerrit.openafs.org/6237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Include the World (Everyone) SID as the owner and group for
all files in AFS.
FIXES 130343
Change-Id: I01d697d7a6dea8e0bea67b81c14597c197b4241d
Reviewed-on: http://gerrit.openafs.org/6236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
If the connection is no longer in use, reset the nat keep alive
timer to 0 seconds.
Change-Id: I72b69979fb8b15ab5afaa654b317edc254253b4b
Reviewed-on: http://gerrit.openafs.org/6230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The reference count mutex must always be held when calling CALL_RELE
or CALL_HOLD. Instead of requiring that the caller obtain, and release
the mutex, do so within the HOLD and RELE macros, greatly simplifying
calling code. Provide CALL_RELE_R and CALL_HOLD_R as versions of these
macros which can be used by callers who already hold the reference
count mutex for other purposes.
Change-Id: Ie3e9df8b9d2a79476f1707bd65e588f43271c636
Reviewed-on: http://gerrit.openafs.org/6219
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Upstream has removed the ia_net{,mask} elements from
struct in_ifaddr, so we can no longer use them directly.
Switch to passing an rx_ifaddr_t (i.e. struct ifaddr*) in instead,
as that uses a slightly different codepath which still works
for our purposes.
We compile the kernel module with -Werror, so storing a pointer
(memcpy return value) in an int is forbidden, hence the conditional
declaration of 't'.
Change-Id: Ifefef88a353f4bd50a714ad88afa3a6f012fa3a1
Reviewed-on: http://gerrit.openafs.org/6203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The code to lock the reference count mutex, reduce the connection
reference count, then unlock the mutex, is duplicated many times
throughout rx.c. Replace all of these multiple copies with a single
inline function.
Change-Id: I7adb460019d7434b32a16250cc026be667e7c55d
Reviewed-on: http://gerrit.openafs.org/6218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Hide the rx_packet.h, and hence the rx_packet structure from
application view. rx_packet.h is currently still installed, and is
included directly by RX security classes, to reduce the per-packet
overhead there.
Change-Id: I269ccf4405a8f83cab4b0392b830bc1f36471c29
Reviewed-on: http://gerrit.openafs.org/6182
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
MIN and MAX are used throughout the tree. Windows does
not define them. A future patchset should convert the
openafs src tree to use min and max.
Change-Id: Ibe7bba6a49e3c85f94cd1e1c45e904764bf06e02
Reviewed-on: http://gerrit.openafs.org/6209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Hide the rx_call structure for public view. Provide accessors for
those elements which are currently accessed by applications.
Note that this change as it currently stands removes the visibility
of the last sent time, and sequence number information, from the
VolMonitor function.
Change-Id: Ib25ab5635126f893ae43acb684d92a78278d6ca6
Reviewed-on: http://gerrit.openafs.org/6181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Move the rx_connection structure into a private header file, so that
it is only visible from within the rx module. This allows us to use
types within the structure that are not visible to everywhere that
includes rx.h, as well as being a step towards a more stable ABI for
RX.
Add accessor functions for all of the connection members which are
currently used by external callers, and modify those accessors
which were implemented as macros to also be functions.
Change all external access to the connection structures to use these
new functions.
Change-Id: Ife67e63f37cb04273fbfc9079db3907bde78ab98
Reviewed-on: http://gerrit.openafs.org/6180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser
connections and only apply Nat pings to those connections
instead of examining the security state of the connection.
Change-Id: I978501972509d1e58b08b630e1ff046b404e59d8
Reviewed-on: http://gerrit.openafs.org/6208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose
of tracking which connections belong to the cm_rootUser.
Change-Id: Icd809631637d4fc6c2bb1bd93e7cab74f2fb5c2b
Reviewed-on: http://gerrit.openafs.org/6207
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
If RXK_TIMEDSLEEP_ENV isn't set, then Unix kernel cache managers
call rxevent_Init without a reschedule function. Check for this so
we don't end up calling a NULL function in these situations.
Change-Id: I5e89f5247aeffc4c27d3f81c0ccabe4979232846
Reviewed-on: http://gerrit.openafs.org/6206
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
In response to a NPEnumResources CONNECTED scope query, the usage
field is always set to zero. If the CONNECTABLE flag is set,
mpr.dll will filter the entry out of the result list.
Change-Id: If939f9f168fe2e02a1a8287c661ec2e1cda5eb8f
Reviewed-on: http://gerrit.openafs.org/6195
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
roken provides min() and max() macros. Use these, rather than our own
MIN() and MAX()
Change-Id: I82456c061cb274490e2ef2966a7075c2bde1f016
Reviewed-on: http://gerrit.openafs.org/6196
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
There is a separate implementation for DARWIN and XBSD above, so
having a check for DARWIN here is pointless.
Change-Id: I66741dd1d8dbddc19809fd6e6fcd0897f047f222
Reviewed-on: http://gerrit.openafs.org/6193
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The error checking on the rxMaxMTU parameter was done individually by
every server that sets it, using "internal" RX #defines to do so.
Instead, do the error checking within the function that actually sets
the MTU, reducing both the amount of code duplication, and the amount
of RX knowledge held within the servers.
Change-Id: Ic2cdd9425d5344a5137f76f66f711f4dee91a7b6
Reviewed-on: http://gerrit.openafs.org/6091
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
The link table needs to be created with the VG id or RW vol id, not
the non-RW vol id. Unlike other special inodes, this goes for both the
'parent' and 'volume' volume ids, not just the 'parent' id, since
there is only one link table per VG.
Without this, the salvager can generate invalid linktable special
inodes if it encounters a VG with no inodes for the RW vol.
Change-Id: I10725c514ef1b8a5b09a506e42596b51b74af5a2
Reviewed-on: http://gerrit.openafs.org/6179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
The attach2 error path transitions a volume to VOL_STATE_ERROR, in
case whatever got us to that error path did not already put the volume
in an appropriate state. Log when we do this, to make sure we do not
end up with a volume in VOL_STATE_ERROR state silently.
Change-Id: I02c842b64882d96e707e867ee0f7730a2bebd405
Reviewed-on: http://gerrit.openafs.org/6168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
FSYNC_VOL_ON/FSYNC_VOL_ATTACH can be called to "online" a volume that
was actually kept online for the duration of the volume operation.
Avoid calling VPreAttachVolumeByVp_r for such a volume if it's already
attached, in order to avoid an unnecessary log message and to save a
tiny bit of processing.
Change-Id: I7776b933599ec0488941ccbd9a8e1279f5a552f4
Reviewed-on: http://gerrit.openafs.org/6167
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
When we encounter "odd" states in VPreAttachVolumeByVp_r, say what the
actual state we encountered was, along with the attach flags, so we
have a better idea of what's going on.
Change-Id: Ic5d07d249db7b51301b3ac903ba987cfa21922ee
Reviewed-on: http://gerrit.openafs.org/6166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
In GetVolume, after we call VAttachVolumeByVp_r, there is no explicit
check to see if vp is in VOL_STATE_ERROR state. Make sure we don't try
to use such a volume, or blindly transition the volume away from that
state.
Change-Id: Ib2c975ac215eeff28b4ff5f5bb0a387298d7aab9
Reviewed-on: http://gerrit.openafs.org/6165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
attach2 can result in many different errors; some indicate that the
volume is in an inconsistent state, but many others just indicate that
the volume cannot be attached for benign reasons (such as VNOVOL if
the volume doesn't exist, or VOFFLINE if the volume is being used by a
volume utility). Currently, for DAFS, attach2 transitions the relevant
volume to the VOL_STATE_ERROR state for almost all errors encountered,
even the benign ones. Instead, skip the error state transition for
error handling paths that do not reflect a "broken" volume.
Change-Id: I07754f715920c4ee30fb156fb2412d1e1a7e2597
Reviewed-on: http://gerrit.openafs.org/6164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
When we are not returning an info-tip string from the shell
extension the string output parameter must be set to NULL.
Change-Id: I63cd9bbe078edd01e62d4b0c810a513dfbf205ae
Reviewed-on: http://gerrit.openafs.org/6183
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
The logic in RDR_RequestFileExtentsAsync() made it possible
for memset() to be called multiple times on a buffer that
is already known to be up to date. Restructure the code to
make things faster.
Change-Id: Iea09b01f126a6d8915e6bf3dd3978ad4b482eb03
Reviewed-on: http://gerrit.openafs.org/6178
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
The redirector maintains its own cached status information which
must be updated when a DV change occurs that is not the result
of a redirector initiated data change.
If the current old DV is BAD, send a DV change notification.
If the DV has changed and request was not initiated by the
redirector, send a DV change notification.
If the request was initiated by the redirector, send a notification
for store and directory operations that result in a DV change greater
than the number of active RPCs or any other operation that results
in an unexpected DV change such as FetchStatus.
Change-Id: I6dd4c9d450901e4b5d4c8d67841e3b833cebbe1f
Reviewed-on: http://gerrit.openafs.org/6177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
When deciding whether or not to purge buffers on a DV change
it is the new DV that matters not the old DV. If the new DV
is 0, there should be no purging because there are no buffers
to purge.
Change-Id: Ie505348dbbf8173e477645e5022410ddd3028240
Reviewed-on: http://gerrit.openafs.org/6176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
For consistency use interlocked increment when setting the
cm_buf_t refCnt to 1 even though it is protected by a lock.
Change-Id: I91fbb1469715ee6b7d6f94f416c59ebcd1645336
Reviewed-on: http://gerrit.openafs.org/6175
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
buf_GetNewLocked() searches the free buffer list for a buffer
that has a 0 refcnt, is not in the chunk that is being populated,
is not actively having I/O performed on it and is not dirty.
If it comes across a dirty buffer, it calls buf_Clean() with
the assumption that buf_CleanAsync() (as it was previously called)
was in fact asynchronous and would return immediately. Instead
buf_Clean() is synchronous and when it completes the buffer will
in most cases be clean. buf_GetNewLocked() should use the newly
cleaned buffer if it is still available and not continue the
search from the next entry in the free buffer list.
Change-Id: Iae629df57b9d27a813f7f4c6740be23bd33fe039
Reviewed-on: http://gerrit.openafs.org/6174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
buf_Recycle() does not return with a reference count to the
cm_buf_t object held. Correct the comment.
Change-Id: Ic6acde3178afe59181436d9c10d4ddfb05340372
Reviewed-on: http://gerrit.openafs.org/6173
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
buf_CleanAsync() calls cm_BufWrite() which stores the dirty
buffers synchronously. There is nothing asynchronous about
buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked()
to buf_CleanLocked(). Update the comments to remove the references
to the asynchronous processing which doesn't exist.
That is not to say that the call to buf_Clean() in buf_GetNewLocked()
should not be asynchronous; it should. There is no such functionality
at the moment. One approach would be to modify buf_IncrSyncer to
trigger on an event set by buf_GetNewLocked() instead of the call
to buf_Clean(). Another approach would be registering a background
store event. In any case, that is for another patchset.
Change-Id: I4c6d08d2a81b36f3cc43ada96acfa0ff9db23845
Reviewed-on: http://gerrit.openafs.org/6172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
buf_IncrSyncer() calls rx therefore it should be a pthread
thread so as not to count against the 63 native thread count
limit.
Change-Id: If00eeb7d26bfbf7d0f35addb05290f3704d11a89
Reviewed-on: http://gerrit.openafs.org/6171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
If the cm_scache_t.dataVersion is set to CM_SCACHE_VERSION_BAD,
invalidate the redirector notion of status so that we do not
leak info to users that do not have permission.
If the dataVersion is CM_SCACHE_VERSION_BAD and is updated
with real status info, invalidate the redirector so it attempts
to read the directory contents.
Change-Id: Iaa15b37f7f1863169ffe93ae9bc3d24086a3b734
Reviewed-on: http://gerrit.openafs.org/6159
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
We were defining BSD_COMP twice for UKERNEL. Move one of the #define's
up to the !UKERNEL section.
Change-Id: I91b90d666ab83a2037549c3f66ea038234a42e11
Reviewed-on: http://gerrit.openafs.org/6162
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
needed for rbtrees. linktest does so; we also need to
Change-Id: Ic5c8aaa0727a979212ed4f089d915b106c00fac8
Reviewed-on: http://gerrit.openafs.org/6163
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
For when logging via OutputDebugString() is insufficient, add
a cheap method of logging to a fixed file: c:\temp\AFSRDFSProvider.log.
Set AFSRedirector\NetworkProvider "Debug" to 0x2.
Change-Id: I419bfbe251b8ef58d7c1b7921badde19d72c34e6
Reviewed-on: http://gerrit.openafs.org/6142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>