openafs.git
9 years agoWindows: version 1.7.3100 (1.7.31) openafs-devel-1_7_31
Jeffrey Altman [Mon, 5 May 2014 14:06:47 +0000]
Windows: version 1.7.3100 (1.7.31)

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

9 years agoWindows: Change Log for 1.7.3100 (1.7.31)
Jeffrey Altman [Mon, 5 May 2014 13:59:36 +0000]
Windows: Change Log for 1.7.3100 (1.7.31)

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

9 years agoWindows: Fix uninitialized variables
Rod Widdowson [Tue, 13 May 2014 01:50:48 +0000]
Windows: Fix uninitialized variables

VS2013 spotted two cases where we do not set up the
Iosb.Status when we catch an exception from Cc.
Fix them.

Reviewed-on: http://gerrit.openafs.org/11140
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit ccb092c37802d300b6ec12d45f10bed42d2a5a59)

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

9 years agoWindows: cm_Analyze retries vs CM_REQ_NORETRY (2)
Jeffrey Altman [Thu, 8 May 2014 13:06:07 +0000]
Windows: cm_Analyze retries vs CM_REQ_NORETRY (2)

Commit a1b5a1d42280753de13094006dcc130fede978a1 left out a critical
part of the patch.  The check for "retry < 2" when determining whether
retries should be skipped due to CM_REQ_NORETRY.

Reviewed-on: http://gerrit.openafs.org/11131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit aad509a7e11432bbe8cf0a3a0adaa78d7f9c9da5)

Change-Id: I78e0f10cbd61817d0006a7212712d5fa14165b1a
Reviewed-on: http://gerrit.openafs.org/11135
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>

9 years agoWindows: Adjust Last Write time handling for -1
Rod Widdowson [Sun, 4 May 2014 18:33:11 +0000]
Windows: Adjust Last Write time handling for -1

The "what date/time gets changed when and by whom" in Windows is badly
defined, but all filesystems support the semantic that if a date is set
using a specific file object (or the timestamp is set to the magic number
-1)
then other changes provoked by that file object will be ignored.

AFS redirector timestamp handling does not support this behavior.
For the LastWrite timestamp (other timestamps are pretty much advisory and
maintained on a best effort basis) the timestamp would be updated by a
write operation even after -1 is set via the file handle.

This patchset implements the -1 behavior for LastWrite.  It also follows
the standard Windows practice of setting the LastWrite timestamp to be the
time of close of the handle that performed the write, not the time of the
write itself.

Finally, it should be noted that since RX*FS_StoreXXX operations update
the last write time on the server the client must restore the LastWrite
timestamp at handle close if -1 was specified.

Reviewed-on: http://gerrit.openafs.org/11110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit d9e14a08129cc70a3baca67c2c1adb8aba5945a2)

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

9 years agoWindows: RDR AFSSubtituteName invalid UNICODE_STRING
Jeffrey Altman [Tue, 21 Jan 2014 10:44:41 +0000]
Windows: RDR AFSSubtituteName invalid UNICODE_STRING

The 'ComponentName' parameter to AFSSubstituteName() is a UNICODE_STRING
pointer.  Its address should not be passed to AFSDbgTrace when used
in conjunction with a %wZ format.

Reviewed-on: http://gerrit.openafs.org/11090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit a1f5a9d72f795023813c116329cd40dec3bd43af)

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

9 years agorx: Avoid rxi_Delay on RXS_CheckResponse failure
Andrew Deason [Fri, 21 Feb 2014 21:30:49 +0000]
rx: Avoid rxi_Delay on RXS_CheckResponse failure

Currently we rxi_Delay whenever RXS_CheckResponse fails for any
reason. This can result in disastrous performance degradations if a
client keeps sending "bad" responses, since rxi_Delay'ing here will
delay the Rx listener thread. This means we cannot receive any packets
for about a second, which can easily cause us to drop a lot of
incoming packets.

Instead, send the abort after 1 second by scheduling an event. This
will retain existing behavior from the point of view of the client
(it will get the abort after 1 second), but avoids hanging the Rx
listener thread.

FIXES 131802

(cherry picked from commit 0ec67b0a9a175af14e360da75d1f5429c6c97b24)

Change-Id: Idd893563d64e8335aa8fe908992665f353c14caa
Reviewed-on: http://gerrit.openafs.org/11115
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

9 years agorx: Split out rxi_SendConnectionAbortLater
Andrew Deason [Fri, 21 Feb 2014 21:26:35 +0000]
rx: Split out rxi_SendConnectionAbortLater

Take the functionality in rxi_SendConnectionAbort that schedules a
delayed abort, and split it out into a new function,
rxi_SendConnectionAbortLater. This allows callers an easy interface to
send such a delayed abort with their own delay.

This commit should incur no change in behavior; it is just code
reorganization.

(cherry picked from commit 61d80537cae95d125c4b9fed31e2454a281b8b02)

Change-Id: Ia043f9ac111ff50daa0a2df4faff2d71787722ca
Reviewed-on: http://gerrit.openafs.org/11114
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

9 years agorx: Clarify error checks for busy channel check
Andrew Deason [Tue, 11 Dec 2012 19:19:02 +0000]
rx: Clarify error checks for busy channel check

Commit a84c6b0ece1fdee4f462c6ce27fa78c2e0d419f4 changed this so we
don't just discard an incoming request if the call already had an
error. But if the call already has an error, rxi_WaitforTQBusy is a
no-op, so checking if the error has "changed" is unnecessary and can
be confusing. Just bypass this whole block if the call already has an
error.

Discussed during the 5 Dec 2012 release-team meeting.

Reviewed-on: http://gerrit.openafs.org/8748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit cef726558d9ae24a5d3dd00d92550a527f3226df)

Change-Id: Id3dc6c6ba9b82936de1053af1df0001c264e21a0
Reviewed-on: http://gerrit.openafs.org/11113
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>

10 years agoWindows: Deny writes/truncation to files w RO attr
Jeffrey Altman [Fri, 4 Apr 2014 20:42:36 +0000]
Windows: Deny writes/truncation to files w RO attr

If the readonly file attribute is set on a file, refuse to process
writes, truncations or overwrites.   The afsd_service will do so
and this can lead to data corruption.

At the same time, writes from the redirector to afsd_service must
not be denied because of the readonly attribute.  That check was
performed during the CreateFile.   Otherwise, a new file can be
created with the readonly attribute and then not be writable.

Reviewed-on: http://gerrit.openafs.org/10985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit dd8d2aa871fc5841c281d1292c39ffb8edf1ebd1)

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

10 years agoWindows: NP Fail requests if AFSGetAuthenticationId fails
Jeffrey Altman [Wed, 12 Mar 2014 16:49:40 +0000]
Windows: NP Fail requests if AFSGetAuthenticationId fails

If during the processing of a network provider request the Logon
Session AuthenticationId is zero and the AFSGetAuthenticationId()
function is unable to obtain the current thread's AuthenticationId,
then fail the request.

Reviewed-on: http://gerrit.openafs.org/10900
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit e24ed842eba54f62105b08d2b9fb281cc19519f1)

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

10 years agoWindows: Fix AFSSetBasicInfo attribute processing
Jeffrey Altman [Tue, 15 Apr 2014 16:19:21 +0000]
Windows: Fix AFSSetBasicInfo attribute processing

The prior behavior of AFSSetBasicInfo() was to let the caller
set whatever it wanted as the new file attributes regardless of
the attributes that are supported by AFS.  In doing so, reparse
point and directory attributes could be cleared, and other values
could be set even though they would be lost as soon as the
DirectoryCB object was garbage collected.

New behavior:

1. return STATUS_INVALID_PARAMETER if reparse point attribute
   would be altered

2. return STATUS_INVALID_PARAMETER if directory attribute would
   be altered.

3. successfully modify readonly attribute

4. ignore all other attribute values

Reviewed-on: http://gerrit.openafs.org/11073
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 70299e6c3def0b84520232c02b9071c9cbf8a851)

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

10 years agoWindows: Pin write position prior to defer
Rod Widdowson [Mon, 14 Apr 2014 20:50:36 +0000]
Windows: Pin write position prior to defer

If we extend the file prior to defrring the write *and* the write
is set up FILE_WRITE_TO_END_OF_FILE then we have to convert the
FILE_WRITE_TO_END_OF_FILE to an absolute position since we have
already moved the FCB->Header.FileSize.

Reviewed-on: http://gerrit.openafs.org/11069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit a4bcc4b1dccf6ab2745be83288c380f5454a2db9)

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

10 years agoWindows: AFSCommonWrite add bWriteToEndOfFile var
Jeffrey Altman [Mon, 14 Apr 2014 20:48:32 +0000]
Windows: AFSCommonWrite add bWriteToEndOfFile var

To improve readability add a bWriteToEndOfFile variable which
stores the value of

  liStartingByte.LowPart == FILE_WRITE_TO_END_OF_FILE &&
  liStartingByte.HighPart == -1

Reviewed-on: http://gerrit.openafs.org/11068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 564f9fd06777882abd29a0da6274150f5b1e7d7f)

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

10 years agoWindows: Do not defer Synchronous operations
Rod Widdowson [Mon, 14 Apr 2014 20:45:37 +0000]
Windows: Do not defer Synchronous operations

There is nothing to be gained by posting a synchronous write.
Let it hang out in CcCopyWrite until there is enough memory
unless the write became synchronous after a deferral in which
case it can be deferred again.

Introduce bWait variable which is set to the result of
IoIsSynchronousWrite( Irp).

This change is being introduced after further analysis of the
FastFat example.

Reviewed-on: http://gerrit.openafs.org/11067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 41b865212b7576c0840bfc0f7c34c900e46f41c8)

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

10 years agoWindows: No RO volume test SetFilePosInfo
Jeffrey Altman [Fri, 11 Apr 2014 14:22:45 +0000]
Windows: No RO volume test SetFilePosInfo

Setting the file position information on a file is not a data
changing operation.  Do not perform a readonly volume check.

Reviewed-on: http://gerrit.openafs.org/11066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit fe706913190acf176292e8c68d0a0adfc015f487)

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

10 years agoWindows: 1.7.30 Release
Jeffrey Altman [Sat, 22 Mar 2014 04:21:42 +0000]
Windows: 1.7.30 Release

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

10 years agoWindows: ChangeLog for 1.7.30
Jeffrey Altman [Sat, 22 Mar 2014 04:20:02 +0000]
Windows: ChangeLog for 1.7.30

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

10 years agoWindows: AFSShareWrite do not assign pFcb too soon
Jeffrey Altman [Mon, 10 Feb 2014 10:13:37 +0000]
Windows: AFSShareWrite do not assign pFcb too soon

In AFSShareWrite the value of pFcb is used to determine whether
or not the pfcb->NPFcb->Resource must be released upon exit.
Therefore, it must not be assigned a value until just before the
resource is acquired.

Reviewed-on: http://gerrit.openafs.org/10828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 939784c017f065a2f4fce19b48cdde56ac4be83c)

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

10 years agoWindows: Platform specific MIDL output
Jeffrey Altman [Sun, 16 Mar 2014 19:41:45 +0000]
Windows: Platform specific MIDL output

Add $(CPU) to the MIDL generated _c.c and _s.c output files
to prevent conflicts.

Reviewed-on: http://gerrit.openafs.org/10907
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 62f922445d3501fff4320cc7c8d93b6cd1a6361e)

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

10 years agoWindows: XP do not mark rdr devices as secure
Jeffrey Altman [Sat, 15 Mar 2014 16:44:09 +0000]
Windows: XP do not mark rdr devices as secure

Commit 9174531dca75f1f2d235ed806f784422792c3ab2 introduced the use
of device characteristics (secure and remote) to the IoCreateDevice()
and IoCreateDeviceSecure() calls for the AFSRedirector device objects.

After this change end users began to report problems on 32-bit Windows
XP SP3 when the initial access to the AFS redirector was performed by
a Limited Access Account.

This patchset conditionalizes the specification of the secure device
characteristic when registering the redirector with MUP on 32-bit
Windows XP.

Reviewed-on: http://gerrit.openafs.org/10906
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit faa5195fcfe1e202665462d273c00b900bf5ac17)

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

10 years agoWindows: NP AFSGetConnectionInfo AuthId == 0
Jeffrey Altman [Wed, 12 Mar 2014 16:41:45 +0000]
Windows: NP AFSGetConnectionInfo AuthId == 0

During the processing of a network provider GetConnectionInfo request
if the provided Authentication Logon Session Id is zero, the redirector
should attempt to obtain the Logon Session Id in kernel.  This was
not performed within AFSGetConnectionInfo().

Reviewed-on: http://gerrit.openafs.org/10899
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 85b747fc549a46b2170c99ab4fb86326894210ef)

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

10 years agoWindows: NP AFSGetConnection retrieve AuthId sooner
Jeffrey Altman [Wed, 12 Mar 2014 16:39:59 +0000]
Windows: NP AFSGetConnection retrieve AuthId sooner

When processing a network provider GetConnection requestion obtain
the Authentication Logon Session Id earlier in the function so that
it can be logged as part of subsequent trace messages.

Reviewed-on: http://gerrit.openafs.org/10898
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 8a6732f9f6d876fc20f5612a4b325533d157d091)

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

10 years agoWindows: cm_ForceNewConnections serverp == NULL
Jeffrey Altman [Mon, 17 Feb 2014 06:12:37 +0000]
Windows: cm_ForceNewConnections serverp == NULL

If serverp == NULL, return immediately.  Do not dereference a NULL
pointer.

Reviewed-on: http://gerrit.openafs.org/10845
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 8803c35994eb48605e26831296bd1c57f0adf50a)

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

10 years agoWindows: cm_GetCell_gen Fixup cm_server cellp on race
Jeffrey Altman [Thu, 23 Jan 2014 03:17:56 +0000]
Windows: cm_GetCell_gen Fixup cm_server cellp on race

If a race occurs during the instantiation of a new cm_cell_t object,
the created servers will point at the wrong cm_cell_t object after
the race is detected.  Before cm_GetCell_gen completes the cm_server_t
objects must be fixed to point to the correct cm_cell_t.

Reviewed-on: http://gerrit.openafs.org/10777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3e4af71581fa8d174a0127bb225e7fba2450aaae)

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

10 years agoWindows: Support arbitrary callback ports
Jeffrey Altman [Fri, 31 Jan 2014 05:56:49 +0000]
Windows: Support arbitrary callback ports

Reconfigure the advanced firewall to support callback ports
other than port 7001.

This changes the semantics of the afsicf api.  AFS_PORTSET_SERVER is now
zero.  Any other value is treated as a callback port.

Reviewed-on: http://gerrit.openafs.org/10776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 7760acc4570a306390f0b7e5acf4b21e8a8cc90d)

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

10 years agoWindows: cm_AddCellProc always call cm_NewServer
Jeffrey Altman [Fri, 31 Jan 2014 05:49:44 +0000]
Windows: cm_AddCellProc always call cm_NewServer

The current implementation of cm_NewServer handles races and
collisions.  There is no need to perform a cm_FindServer() check
first.  Just call cm_NewServer() for all server entries.

Move the logging of server creation and cell assignment to
cm_NewServer().

Reviewed-on: http://gerrit.openafs.org/10775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit dd9e59805b37a93f0f64c67cfa3ba4d80f1f358c)

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

10 years agoWindows: Add caching to cm_GetAddrsU
Jeffrey Altman [Mon, 27 Jan 2014 05:33:18 +0000]
Windows: Add caching to cm_GetAddrsU

Cache the results of VL_GetAddrsU queries and reuse the results
for subsequent calls when possible.

Reviewed-on: http://gerrit.openafs.org/10764
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3b5c636480cda73938a532ffd079ba040907f78f)

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

10 years agoWindows: cm_GetAddrsU wrapper for VL_GetAddrsU
Jeffrey Altman [Mon, 27 Jan 2014 05:30:20 +0000]
Windows: cm_GetAddrsU wrapper for VL_GetAddrsU

cm_GetAddrsU() is a wrapper for the VL_GetAddrsU() RPC.  The initial
version is a bare bones replacement for the VL_GetAddrsU() call from
cm_UpdateVolumeLocation().  Future changes will add caching.

Reviewed-on: http://gerrit.openafs.org/10763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 74982e6ae1919f81184d221b56aba7f153d188ed)

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

10 years agoWindows: replace cm_allServersp list with osi_queue
Jeffrey Altman [Mon, 27 Jan 2014 05:14:36 +0000]
Windows: replace cm_allServersp list with osi_queue

Replace the cm_allServersp list with an osi_queue.  This simplifies
the Add/Remove functionality which will be required in case of VLDB
server uniquifier changes.

Reviewed-on: http://gerrit.openafs.org/10762
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 311505170d59360b3c3dd67f789f395b7278bbbe)

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

10 years agoWindows: version 1.7.29 (1.7.2900.0) openafs-devel-1_7_29
Jeffrey Altman [Mon, 13 Jan 2014 23:57:24 +0000]
Windows: version 1.7.29 (1.7.2900.0)

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

10 years agoWindows: 1.7.29 (1.7.2900.0) ChangeLog
Jeffrey Altman [Mon, 13 Jan 2014 23:56:30 +0000]
Windows: 1.7.29 (1.7.2900.0) ChangeLog

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

10 years agoWindows: AFSCommonWrite STATUS_PENDING is Success
Jeffrey Altman [Thu, 9 Jan 2014 14:58:56 +0000]
Windows: AFSCommonWrite STATUS_PENDING is Success

AFSCommonWrite() can return STATUS_PENDING if the write has been
deferred.  In that case, the function exit must not:

 * Update the Valid Data Length

 * Purge the cache

 * or do anything else related to the request

Reviewed-on: http://gerrit.openafs.org/10685
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 2d5f0a971baa05fc1a79726265a8235a0ebca4c0)

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

10 years agoWindows: Mark Irp Pending before Deferring
Jeffrey Altman [Thu, 9 Jan 2014 14:57:33 +0000]
Windows: Mark Irp Pending before Deferring

After CcDeferWrite() is called we no longer have access to the
current Irp.  If we mark it deferred after calling CcDeferWrite()
we might mark the wrong thing.

Reviewed-on: http://gerrit.openafs.org/10684
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit d5bcff7429dd9972b17055a9abd98f3a590dee68)

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

10 years agoWindows: cm_ConnByServer fix search for replication
Jeffrey Altman [Tue, 7 Jan 2014 15:57:01 +0000]
Windows: cm_ConnByServer fix search for replication

Separate connection objects are maintained for use when accessing
replicated and single source volumes.   If the matching connection
type cannot be found while holding the cm_connLock shared a second
search is performed after the lock is upgraded to an exclusive lock.
This second connection search was not enforcing the replication criteria.

Reviewed-on: http://gerrit.openafs.org/10681
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 6995a56884f31974e9b5a7c0c50e9c1aa0351a45)

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

10 years agoWindows: cm_connLock not required for cm_GetUCell
Jeffrey Altman [Tue, 7 Jan 2014 15:53:37 +0000]
Windows: cm_connLock not required for cm_GetUCell

In cm_ConnByServer() there is no need to hold the cm_connLock across
the cm_GetUCell() call.  Obtain the cm_ucell_t object before the
cm_connLock is obtained.

Reviewed-on: http://gerrit.openafs.org/10680
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit cccb5e614212c341d2f5e799066d1c30e54ba494)

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

10 years agoWindows: Rewrite LargeSearchTime conversions
Jeffrey Altman [Wed, 27 Nov 2013 19:41:18 +0000]
Windows: Rewrite LargeSearchTime conversions

Use LARGE_INTEGER to avoid the need for shifting and DWORD casts.
Take into account the size of time_t.

Reviewed-on: http://gerrit.openafs.org/10673
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit da7adce6dddd39eb151576abfb1681c559e1e4e5)

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

10 years agoWindows: RDR_EvaluateNodeByName out of order param
Jeffrey Altman [Fri, 27 Dec 2013 03:02:50 +0000]
Windows: RDR_EvaluateNodeByName out of order param

The bHoldFid parameter is after the bNoFollow parameter.  The
two values were swapped resulting in unnecessary VLDB lookups.

Reviewed-on: http://gerrit.openafs.org/10636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit fd9d5318023e977793a4bf62f196e70b45049f10)

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

10 years agoWindows: cm_SetupStoreBIOD compute correct scanEnd
Jeffrey Altman [Wed, 18 Dec 2013 13:48:44 +0000]
Windows: cm_SetupStoreBIOD compute correct scanEnd

The algorithm used to ensure "chunk size" operations attempts to
enforce aligned chunks.  There are two problems:

 1. an aligned chunk range may extend beyond the end of the file.

 2. an aligned chunk might end before the requested length of the
    active write.

Protect against scanning beyond the end of the file and do not truncate
writes.

Reviewed-on: http://gerrit.openafs.org/10625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit fb6bc16b335d0e50b49ed85570dbe9fc9adfaee0)

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

10 years agoWindows: BUF_HASH use opr_jhash_int2
Jeffrey Altman [Wed, 18 Dec 2013 05:07:55 +0000]
Windows: BUF_HASH use opr_jhash_int2

BUF_HASH takes to 4-byte integers not three and therefore cannot use
the basic opr_jhash which assumes a minimum of three 4-byte integers.

Reviewed-on: http://gerrit.openafs.org/10624
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 4f1d4b63a90e85fd0c2edc592d18bdbe6a0b07f8)

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

10 years agoopr: Add opr_jhash_int2 function
Simon Wilkinson [Mon, 29 Oct 2012 19:02:03 +0000]
opr: Add opr_jhash_int2 function

Add a function to jhash that can be used to hash a pair of unsigned
integers (or other stuff that can cast to them) without having to build
up an array.

Provide a couple of tests for the new function

Reviewed-on: http://gerrit.openafs.org/8354
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 07372cf7e76acf62eb26908977e2682338c85ac1)

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

10 years agoopr: Add opr_jhash_opaque
Simon Wilkinson [Tue, 17 Jul 2012 16:20:13 +0000]
opr: Add opr_jhash_opaque

Add a function which can be used to obtain a hash of an arbitrary
opaque string of arbitrary length

Reviewed-on: http://gerrit.openafs.org/7978
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 3bb8e4c396d8894c7c0f71f121f5844f940516bf)

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

10 years agoopr: Convert jhash to use AFS types
Simon Wilkinson [Tue, 17 Jul 2012 16:15:15 +0000]
opr: Convert jhash to use AFS types

Convert the jhash.h header so that it uses afs types (afs_uint32)
rather than stdint types (uint32_t), so that we can use it in kernel

Reviewed-on: http://gerrit.openafs.org/7976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit b251b4057252163f3fad640cb5574c8dea9babc3)

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

10 years agoWindows: RXAFS_GetVolumeStatus no PRSFS_READ check
Jeffrey Altman [Thu, 5 Dec 2013 05:41:10 +0000]
Windows: RXAFS_GetVolumeStatus no PRSFS_READ check

Since d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a the file server no
longer performs a PRSFS_READ access check for the GetVolumeStatus RPC.
The cache manager should no longer test for PRSFS_READ as a means of
avoiding RPCs that are known to fail.

Reviewed-on: http://gerrit.openafs.org/10532
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 2c8d55bee128071807143db6e880a4a6afaea9ba)

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

10 years agoWindows: RDR capture Cc/Mm exceptions do not break
Jeffrey Altman [Wed, 27 Nov 2013 17:26:44 +0000]
Windows: RDR capture Cc/Mm exceptions do not break

All of the Cc and Mm functions are wrapped in try/except blocks.
The purpose is to ensure that Cc and Mm do not return an error as
an exception which could result in the afs redirector failing to
release a resource.   Instead of calling the AFS exception handler
just handle the exception with EXCEPTION_EXECUTE_HANDLER.  This permits
the __except block to capture the exception code.

The AFS exception handler will throw its own exception if the
AFSDebugFlags AFS_DBG_BUGCHECK_EXCEPTION bit is set.  This is helpful when
debugging exceptions thrown by errors in the afs redirector code.  It is
not helpful when a Cc function throws an exception.  For example,
CcReadCopy() will throw STATUS_DELETE_FILE as an exception if an attempt
to read from a deleted file is initiated.   This should simply fail the
read operation not BSOD the system.

Reviewed-on: http://gerrit.openafs.org/10524
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 9b6f79108725dc5b6d4cbea4697199e5e745dc99)

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

10 years agoWindows: AFSRDFSProvider NPOpenEnum vs no redirector
Jeffrey Altman [Tue, 26 Nov 2013 01:27:10 +0000]
Windows: AFSRDFSProvider NPOpenEnum vs no redirector

If there is no redirector device present, return WN_NO_NETWORK
to indicate that this network provider is not ready for browsing.

Reviewed-on: http://gerrit.openafs.org/10523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 1e24762a2cf6590798aa9ce483a1374466c7847b)

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

10 years agoWindows: Rationalize Freelance vs "fs flush*"
Jeffrey Altman [Tue, 26 Nov 2013 15:52:45 +0000]
Windows: Rationalize Freelance vs "fs flush*"

Background:

cm_scache_t objects representing Freelance volume (cell=-1, volume=-1)
are special because they are populated from the Freelance mountpoint
and symlink tables.  These tables are in turn generated from the
registry.  The tables are regenerated on-demand after the execution of
cm_noteLocalMountPointChange() which increments cm_data.fakeDirVersion
which becomes the new data version value for the (-1.-1.1.1) directory
object.

The next time that cm_GetSCache() is called for a Freelance object
the fake root directory is rebuilt by cm_InitFakeRootDir().  Since the
vnode values are not persistent with regards to directory entry names the
FileId unique is used to distinguish the various versions.
cm_data.fakeUnique is incremented with each call to cm_InitFakeRootDir().

Each time cm_noteLocalMountPointChange() is executed the afs redirector is
notified of the data version change which will force the redirector to
rebuild its view of the directory the next time a path evaluation requires
evaluation of the root (\afs).  In other words, on the next request.

If cm_noteLocalMountPointChange() is executed multiple times there is the
possibility of a race between the redirector and the service.  When the
race is lost the redirector receives an invalidation event for -1.-1.1.1
as it is in the process of rebuilding the directory contents.  The
redirector ends up believing it has the most recent data version when it
doesn't but the service no longer has Freelance mountpoint and symlink
tables representing the requested data version.  Hence, the mountpoints
and symlinks end up as CM_SCACHETYPE_INVALID.

fs flushfile and fs flushvolume both had explicit checks to prevent
flushing Freelance objects because each call to cm_FlushFile() on a
Freelance object would execute cm_noteLocalMountPointChange() triggering
the race.

The Problem:

fs flushall is not executed on a specific object (volume or file).
Therefore there was no explicit check to prevent execution against
Freelance objects.  For each cm_scache_t in the cache cm_FlushFile() is
processed.  If there are N Freelance mountpoints and symlinks, there will
be N+1 calls to cm_noteLocalMountPointChange() in quick succession.  Not
only does this risk losing the race described above but it is extremely
wasteful as the Freelance tables may be repeatedly regenerated.

This Patchset:

This patchset re-organizes the Freelance processing in the flush code
paths.  cm_FlushFile() and cm_FlushVolume() can simply no longer be
successfully executed against a Freelance object.  Both will return
CM_ERROR_NOACCESS.

"fs flush <file>" is not permitted against Freelance objects.

"fs flushvolume <path>" will execute cm_noteLocalMountPointChange() once if
the path is a Freelance object.

"fs flushall" continues to execute cm_FlushFile() on all cm_scache_t
objects.  The calls on Freelance object will fail.  After all cm_scache_t
objects are flushed then cm_noteLocalMountPointChange() will be executed
once to force the Freelance directory to be rebuilt.

This patchset does not address the race but significantly reduces the
likelihood the race will be lost.

Reviewed-on: http://gerrit.openafs.org/10521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 06fe2957348cfb2c571f2a0b099e09ef7e9fb3b0)

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

10 years agoWindows: Reset mp/symlink target during fs flush*
Jeffrey Altman [Tue, 26 Nov 2013 15:31:32 +0000]
Windows: Reset mp/symlink target during fs flush*

When processing a "fs flush*" command, reset the the cm_scache_t
mountPointStringp which contains the known mountpoint or symlink
target information.

Reviewed-on: http://gerrit.openafs.org/10520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 0e851b7fcb6f8c802106e5e76c601800867e65e1)

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

10 years agoWindows: 1.7.28 (aka 1.7.2800.0) openafs-devel-1_7_28
Jeffrey Altman [Wed, 20 Nov 2013 23:47:26 +0000]
Windows: 1.7.28 (aka 1.7.2800.0)

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

10 years agoWindows: 1.7.28 ChangeLog
Jeffrey Altman [Wed, 20 Nov 2013 23:46:46 +0000]
Windows: 1.7.28 ChangeLog

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

10 years agoWindows: cm_Analyze retries vs CM_REQ_NORETRY
Jeffrey Altman [Mon, 18 Nov 2013 04:03:43 +0000]
Windows: cm_Analyze retries vs CM_REQ_NORETRY

CM_REQ_NORETRY is set by threads that want all errors returned
immediately.  However, there are some errors that should never
be returned:

  RX_MSGSIZE
  RX_CALL_BUSY
  VNOSERVICE
  RX_CALL_IDLE
  RXKADEXPIRED
  VICECONNBAD
  VICETOKENDEAD

For these errors even if the thread has requested no retries a RPC
retry must be performed.

Reviewed-on: http://gerrit.openafs.org/10470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit a1b5a1d42280753de13094006dcc130fede978a1)

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

10 years agoWindows: cm_FindVolumeByFID
Jeffrey Altman [Fri, 15 Nov 2013 23:32:37 +0000]
Windows: cm_FindVolumeByFID

cm_GetVolumeByFID() does not query the vldb if the volume group
is not known to the cache manager.   cm_FindVolumeByFID() is to
be used in cases where the volume group data must be known for the
operation to successfully complete.

Reviewed-on: http://gerrit.openafs.org/10465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 0570d13a62c6f9416bed4fcbab5cf49a45b4dcc1)

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

10 years agoWindows: Fix out of range pointer validation
Jeffrey Altman [Tue, 12 Nov 2013 14:58:44 +0000]
Windows: Fix out of range pointer validation

The ACL, Stat, and Volume pointer validation checks did not take
into account that NULL is a valid pointer value.  As a result the
cache validation failed.

Reviewed-on: http://gerrit.openafs.org/10453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit dbedd62b7cb6c2203afea72d6f0ea32b0d623b10)

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

10 years agoWindows; GetSystemTimeAsFileTime
Jeffrey Altman [Mon, 4 Nov 2013 05:12:07 +0000]
Windows; GetSystemTimeAsFileTime

As per Raymond Chen's "The Old New Thing" blog

  http://blogs.msdn.com/b/oldnewthing/archive/2013/11/01/10462403.aspx

Calling GetSystemTime() followed by SystemTimeToFileTime() performs
two format translations which can be avoided by using
GetSystemTimeAsFileTime() directly.

Reviewed-on: http://gerrit.openafs.org/10430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 727e951d8c49a98d2c37378c863cd050b8d768eb)

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

10 years agoWindows: GiveUpAllCallBacks only if non-loopback
Jeffrey Altman [Wed, 30 Oct 2013 04:44:25 +0000]
Windows: GiveUpAllCallBacks only if non-loopback

If the only ip addresses are known to be loopback addresses, then
do not waste time by attempting to GiveUpAllCallBacks during suspend
or shutdown.

Reviewed-on: http://gerrit.openafs.org/10429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3f5f3013e91de3fddaee96598ef0311f8f2d5e22)

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

10 years agoWindows: RDRLib Worker Thread shutdown
Jeffrey Altman [Mon, 28 Oct 2013 05:06:47 +0000]
Windows: RDRLib Worker Thread shutdown

The thread waiting to unload the library is polling the state of
the AFS_WORKER_INITIALIZED flag in the PoolContext->State field
for each worker.  Ensure that the thread performs no actions other than
PsTerminateSystemThread() after clearing the AFS_WORKER_INITIALIZED flag.

Reviewed-on: http://gerrit.openafs.org/10383
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 064558a69281398d1dc6873453449eee9b3a8d8d)

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

10 years agoWindows: Uninitialized TargetNameLength/Offset
Jeffrey Altman [Tue, 29 Oct 2013 12:24:06 +0000]
Windows: Uninitialized TargetNameLength/Offset

In RDR_PopulateCurrentEntry it is possible for TargetNameLength and
TargetNameOffset to be uninitialized resulting in stack garbage being
returned to the redirector.  This can result in a blue screen.

Reviewed-on: http://gerrit.openafs.org/10373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit c0a33ddd82736d71faf2585495102fe1e4b88eb0)

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

10 years agoWindows: cm_NewSCache skip in hash recycled entries
Jeffrey Altman [Fri, 18 Oct 2013 23:26:56 +0000]
Windows: cm_NewSCache skip in hash recycled entries

If cm_RecycleSCache returns an in-hash entry it means that either
it wasn't recycled properly or somehow we raced this entry with
another thread.  Just skip it and keep searching.

Reviewed-on: http://gerrit.openafs.org/10353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 6e26922f68d2b0f692212e6150d7955a0d393929)

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

10 years agoWindows: cm_RemoveSCacheFromHashTable scp not found
Jeffrey Altman [Fri, 18 Oct 2013 23:14:00 +0000]
Windows: cm_RemoveSCacheFromHashTable scp not found

If the cm_scache_t has CM_SCACHEFLAG_INHASH flag set but cannot be
found in the CH_SCACHE_HASH(&scp->fid) hash chain then search the
entire hash table for the object.  At the end of the function we
will know that the CM_SCACHEFLAG_INHASH flag is safe to clear.

Reviewed-on: http://gerrit.openafs.org/10352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 05ecdb353a7c960a34133002a388889e9882d946)

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

10 years agoWindows: EOF for Synchronous Deferred Writes on XP/2003
Rod Widdowson [Sun, 20 Oct 2013 18:29:35 +0000]
Windows: EOF for Synchronous Deferred Writes on XP/2003

The Windows IO Manager is not supposed to issue multiple
outstanding cached writes to a file system for a synchronous
file object.  To do so would risk out of order application
of writes that extend the end of file and in turn risk data
corruption.  It turns out that on Server 2003 SP2 and more
than likely XP and 2000 as well, if a file system returns
STATUS_PENDING because a write was deferred due to the
Windows Cache Manager failing CcCanIWrite(), the IO Manager
will happily continue issue subsequent write requests.

On OSes older than Vista disable the use of deferred writes
and sit in a spin loop waiting for the Windows cache manager
to make room.  This is much less efficient and increases the
write latency but it is safe.

Reviewed-on: http://gerrit.openafs.org/10351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 7068836e6bab73e9edcb2c84727b92b25e1a6109)

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

10 years agoWindows: Store OS version as a global
Jeffrey Altman [Mon, 21 Oct 2013 15:26:16 +0000]
Windows: Store OS version as a global

In DriverEntry() RtlGetVersion() is used to obtain the OS version
information.  Store the result in a global structure that can be
used elsewhere to make run time decisions based upon the OS.

Reviewed-on: http://gerrit.openafs.org/10350
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit e1f75c1401c5391a123daa2f59af7544a3418195)

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

10 years agoWindows: Version 1.7.27 (1.7.2700) openafs-devel-1_7_27
Jeffrey Altman [Sat, 28 Sep 2013 02:52:11 +0000]
Windows: Version 1.7.27 (1.7.2700)

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

10 years agoWindows: 1.7.2700 ChangeLog
Jeffrey Altman [Sat, 28 Sep 2013 02:51:24 +0000]
Windows: 1.7.2700 ChangeLog

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

10 years agoWindows: fix libafscp build directory
Jeffrey Altman [Wed, 11 Sep 2013 14:44:37 +0000]
Windows: fix libafscp build directory

NTMakefile specifed the directory as libacl not libafscp

Reviewed-on: http://gerrit.openafs.org/10299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit d477118fbda470c6f9f890a1a3f45ad8bad97be5)

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

10 years agoWindows: Freelance Do not chase mount points
Jeffrey Altman [Wed, 4 Sep 2013 19:53:57 +0000]
Windows: Freelance Do not chase mount points

When adding mount points or symlinks do not chase mount points
when attempting to determine the FID of the added object.

Reviewed-on: http://gerrit.openafs.org/10298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 9132b7e474fce9c8c3513db5279feed6a9daba7c)

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

10 years agoWindows: cm_MergeStatus avoid lock recursion
Jeffrey Altman [Fri, 27 Sep 2013 22:02:52 +0000]
Windows: cm_MergeStatus avoid lock recursion

It is possible for cm_MergeStatus() to be called while the
cm_buf_t.mx is already held.  If it is a panic occurs.  Test for
refcount == 0 before acquiring the lock in addition to afterwards.
If the refcount is not zero, then we do not need to acquire the
lock in any case.

Reviewed-on: http://gerrit.openafs.org/10297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 4f266f14c0721111a9d453c3358cddf77eb2641a)

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

10 years agoWindows: AFSCreate avoid race leading to NULL dereference
Jeffrey Altman [Wed, 4 Sep 2013 17:11:24 +0000]
Windows: AFSCreate avoid race leading to NULL dereference

If a test for NULL is performed ahead of an assignment and then
use of the assigned value, there is a race which can result in
the assigned value being NULL if the value being assigned is
altered by another thread.

Perform the assignment first then test based upon that.

Reviewed-on: http://gerrit.openafs.org/10296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 7efd78539066bedeeb3b579a613d587d8aa6e623)

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

10 years agoWindows: KFW_AFS_get_cred fail on error
Jeffrey Altman [Tue, 3 Sep 2013 19:35:33 +0000]
Windows: KFW_AFS_get_cred fail on error

If KFW_AFS_klog() fails and there is no password set, then goto
cleanup.

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

10 years agoWindows: Do not leak activeRPC count
Jeffrey Altman [Tue, 3 Sep 2013 12:42:50 +0000]
Windows: Do not leak activeRPC count

If a callback race has been lost cm_MergeStatus is not executed.
In that case either the activeRPC count should not be incremented
or must be decremented to indicate that the current call has been
completed.

Reviewed-on: http://gerrit.openafs.org/10218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 28de757a65679bff74fb34e65d8cd78cb36d0fc9)

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

10 years agoWindows: Adjust setting of VERIFY_DATA flag
Jeffrey Altman [Mon, 2 Sep 2013 18:38:41 +0000]
Windows: Adjust setting of VERIFY_DATA flag

If the CcPurge operation fails or cannot be performed, in addition
to setting the purge on close flag, set the verify data flag.  This
ensures that the next attempt to access the file will retry the
purge.

Reviewed-on: http://gerrit.openafs.org/10217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 2a1035a49bfb67152f14b500d9c614e4df1013c8)

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

10 years agoWindows: Add trace to track setting VERIFY flag
Jeffrey Altman [Mon, 2 Sep 2013 18:34:32 +0000]
Windows: Add trace to track setting VERIFY flag

Add trace statements at each location the VERIFY flag is set or
cleared.

Reviewed-on: http://gerrit.openafs.org/10216
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 7c8eb2f2288706a75fda67acae52a5b89dc8343f)

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

10 years agoWindows: Skip Extent operations if Direct IO
Jeffrey Altman [Mon, 2 Sep 2013 18:31:38 +0000]
Windows: Skip Extent operations if Direct IO

If the redirector is using Direct IO servicing there are no extents
in use.  Skip the AFSFlushExtents, AFSTearDownExtents, and related
calls unless extent processing is in use.  This will reduce lock
contention and reduce cpu processing.

Reviewed-on: http://gerrit.openafs.org/10215
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 6de822d647c2d2707f4f0af149579101dd0071f8)

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

10 years agoWindows: Hold Fcb Resource across CcPurgeSection
Jeffrey Altman [Mon, 26 Aug 2013 00:07:44 +0000]
Windows: Hold Fcb Resource across CcPurgeSection

Now that the Fcb Resource and SectionObjectResource are held in
the FastIo pathway and the Trend Micro deadlock has been addressed
by holding a reference on the FileObject it is time to fix the
lock acquisition ordering.   For each CcPurgeSection call the
Fcb Resource will be held exclusive before the SectionObjectResource.

Reviewed-on: http://gerrit.openafs.org/10192
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 27311ca420c2ee29b38aa2994993cf24d7d769b1)

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

10 years agoWindows: Strip out unused ModWriter Fastio code
Rod Widdowson [Sun, 25 Aug 2013 20:20:28 +0000]
Windows: Strip out unused ModWriter Fastio code

The code is no longer used (the fcb->PagingIO resource is taken for
us by the modwriter) so we strip it out to save other making changes
and then remembering/discovering that this code isn't being used.

Reviewed-on: http://gerrit.openafs.org/10191
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 22d7c8461b16940c3606d63a0b7e232563871cd8)

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

10 years agoWindows: Take FCB resource in presection create.
Rod Widdowson [Sun, 25 Aug 2013 19:25:55 +0000]
Windows: Take FCB resource in presection create.

Fix a lock inversion in the paging query file information path (called
from within section create).

The query file takes the FCB resource, but that is a lower rank
lock than the SOP resource which is taken in AcquireFileForNtCreateSection,

We fix the inversion by grabbing the FCB resource in
AcquireFileForNtCreateSection.

Reviewed-on: http://gerrit.openafs.org/10190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 40d93cb9df62031f1dc5b185e690d11d2c2b9d0b)

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

10 years agoWindows: Pin the Cc FileObject during section create.
Rod Widdowson [Sun, 25 Aug 2013 16:16:39 +0000]
Windows: Pin the Cc FileObject during section create.

This means that if we purge the data cache while the section is being
created then the MJ_CLOSE will not happen until we unpin the FO.

Thus we can drop any embarsssing locks prior to the close and
meddling antivirus products can do odd stuff in the close path.

Note that there may not be a file object, but in that case there
will be no close on the purge since any CcInitialize operations
will wait on us dropping the SOP lock exe - hence the SOP cannot
be set up.

Also note that this only applies to the data section,
but we do not purge the image section.

Reviewed-on: http://gerrit.openafs.org/10189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 1dc051294c48bb81a92d152b2e3e5ae0fac00fae)

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

10 years agoWindows: AFSPerformObjectInvalidate FILE processing
Jeffrey Altman [Mon, 26 Aug 2013 00:02:51 +0000]
Windows: AFSPerformObjectInvalidate FILE processing

Refactor AFSPerformObjectInvalidate so that all of the non-DIRECT_IO
processing variables are in the Extents processing section.  Remove
all references to Extents processing from the DIRECT_IO block.

Reviewed-on: http://gerrit.openafs.org/10188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit cb53d414bbc4ecaf1b136b4a3c82bea3cc9044b6)

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

10 years agoWindows: AFSVerifyEntry get rid of bPurgeExtents
Jeffrey Altman [Sun, 25 Aug 2013 23:54:52 +0000]
Windows: AFSVerifyEntry get rid of bPurgeExtents

The logic in AFSVerifyEntry is such that bPurgeExtents is always
set to true so simplify the code by removing it.

Reviewed-on: http://gerrit.openafs.org/10187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b2713d121e360598fae5c4651d385e0a11ace05b)

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

10 years agoWindows: Fix trace messages in AFSSetEndOfFileInfo
Jeffrey Altman [Sun, 25 Aug 2013 00:20:54 +0000]
Windows: Fix trace messages in AFSSetEndOfFileInfo

The wrong function name was specified.

Reviewed-on: http://gerrit.openafs.org/10186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit e8226a2aec30bc003ccad4a9332c4d3c232b45de)

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

10 years agoWindows: AFSWrite comments
Jeffrey Altman [Fri, 23 Aug 2013 19:02:44 +0000]
Windows: AFSWrite comments

Add various comments regarding lock requirements

Reviewed-on: http://gerrit.openafs.org/10185
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit c7e8b75353e2cd0bb58b05c9faab21df14c73c69)

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

10 years agoWindows: Missing try..except in AFSCachedWrite
Jeffrey Altman [Fri, 23 Aug 2013 19:00:17 +0000]
Windows: Missing try..except in AFSCachedWrite

Wrap another cache manager call with try..except

Reviewed-on: http://gerrit.openafs.org/10184
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3f797fc71174a5779cf1cae3ba452f401a668881)

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

10 years agoWindows: Refactor AFSVerifyEntry AFSValidateEntry
Jeffrey Altman [Thu, 22 Aug 2013 21:50:39 +0000]
Windows: Refactor AFSVerifyEntry AFSValidateEntry

Inside a big switch statement it is hard to follow when there
are multiple 'break' exits within a 'case'.   Reorganize the code
so that there is only a single exit for the FILE type.  Unnecessary
blocks are removed as well.

Reviewed-on: http://gerrit.openafs.org/10183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 26276e602046c8dfe408e7c1d0a2ab80dbc7caa3)

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

10 years agoWindows: introduce Section Object Resource Trace Subsystem
Jeffrey Altman [Thu, 22 Aug 2013 21:46:19 +0000]
Windows: introduce Section Object Resource Trace Subsystem

Section Object Resource acquires and releases are lost in the
noise of all of the rest of the locks.  Introduce a dedicated
subsystem just for Section Objects.

Add missing entries at the same time.

Reviewed-on: http://gerrit.openafs.org/10182
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 7f706e6b59a04aef002bb3c29f8917b612f70ac1)

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

10 years agoWindows: afsredirlib afscommonwrite trace msg error
Jeffrey Altman [Thu, 22 Aug 2013 21:43:20 +0000]
Windows: afsredirlib afscommonwrite trace msg error

Specify the correct function name in the trace msg.

Reviewed-on: http://gerrit.openafs.org/10181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b4a996b8151322881ae82cee7ae85a6d47a7ba1e)

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

10 years agoWindows: Call AFSExeceptionFilter for all exceptions
Jeffrey Altman [Wed, 21 Aug 2013 16:27:35 +0000]
Windows: Call AFSExeceptionFilter for all exceptions

In many cases we capture exceptions record and the Exception Code
as ntStatus and move on with life.   This patchset changes that.
All exceptions are passed to AFSExceptionFilter so we do not miss
anything.

Reviewed-on: http://gerrit.openafs.org/10180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit cd07888265f372bb380ee68495e645f174586119)

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

10 years agoWindows: Delay MP Target evaluation until required
Jeffrey Altman [Sat, 17 Aug 2013 16:51:06 +0000]
Windows: Delay MP Target evaluation until required

Do not evaluate the Target FID of a mount point until such time
as the target directory must be accessed.

Reviewed-on: http://gerrit.openafs.org/10154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 0cd5c63ebeef7567c9965e1ded7f10c6f452f0c3)

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

10 years agoWindows: modify PopulateCurrentEntry follow mp rules
Jeffrey Altman [Sat, 17 Aug 2013 15:35:39 +0000]
Windows: modify PopulateCurrentEntry follow mp rules

It is always safe to read the mount point target data, it is not
always safe to evaluate the volume id since the VLDB might not be
reachable.

For directory enumerations do not evaluate the target Fid.  Only
do so for eval by name and by id requests.

Reviewed-on: http://gerrit.openafs.org/10153
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 0edbeb4a3ce86387dbc31b1745e5517accdb4823)

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

10 years agoWindows: update GetFileVersionInformation fail msg
Jeffrey Altman [Sat, 17 Aug 2013 15:33:45 +0000]
Windows: update GetFileVersionInformation fail msg

Include the module name in the error message if GetFileVersionInformation
fails.  Its failure means the module has no file version resource data.

Reviewed-on: http://gerrit.openafs.org/10152
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b7964e1814d3b7f1f92f0c20c34ad7166110f502)

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

10 years agoWindows: Cap Cache Size on X86
Jeffrey Altman [Sat, 17 Aug 2013 14:18:53 +0000]
Windows: Cap Cache Size on X86

Since we know the cache size cannot be arbitrary size because it
must fit into contiguous process memory and because it is difficult
to compute the actual size limit, cap the size to 716800KB.

Reviewed-on: http://gerrit.openafs.org/10151
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 1c0260c71185a41f1ec3d1c08f20c53c76f31cdd)

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

10 years agoWindows: do not return STATUS_RETRY for rx timeouts
Jeffrey Altman [Sat, 17 Aug 2013 04:08:30 +0000]
Windows: do not return STATUS_RETRY for rx timeouts

Report the RPC server unavailable instead.

Reviewed-on: http://gerrit.openafs.org/10150
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 7ce1997f01a964463c1c04816c63ef28d4dfcc23)

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

10 years agoWindows: np AddConnection error code
Jeffrey Altman [Sat, 10 Aug 2013 04:44:08 +0000]
Windows: np AddConnection error code

If AddConnection fails because DeviceIOcontrol fails, do not
return out of memory which is an unsupported error code.  Report
a network failure.

Reviewed-on: http://gerrit.openafs.org/10149
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 4bc62d6bd71ece7d1cb91e77d92ac40789f42ddf)

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

10 years agoWindows: Do not recycle deleted scache on refcnt 0
Jeffrey Altman [Fri, 16 Aug 2013 19:36:32 +0000]
Windows: Do not recycle deleted scache on refcnt 0

If the scache object with CM_SCACHEFLAG_DELETED set is recycled
then the deleted state is lost and the cache manager cannot prevent
unnecessary FetchStatus queries to the file server.

Reviewed-on: http://gerrit.openafs.org/10142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 3f163fad55fb7e88e8206139ab1c16fe4fbe1487)

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

10 years agoWindows: Do not remove scp from hash table on deletion
Jeffrey Altman [Fri, 16 Aug 2013 16:01:55 +0000]
Windows: Do not remove scp from hash table on deletion

If the CM_SCACHEFLAG_DELETED flag is going to have any benefit, the
cm_scache object must not be removed from the hash table in response
to a VNOVNODE error.  Otherwise, a new cm_scache object is allocated,
the CM_SCACHEFLAG_DELETED is not found, and a new callback request
is issued to the file server which in response returns VNOVNODE.

Do this enough times and the abort threshold is triggered and then
the application becomes very unhappy with performance.

Reviewed-on: http://gerrit.openafs.org/10141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit acad253a357c2c97fcd8f59c489ac2c7cacba7b7)

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

10 years agoWindows: CM_SCACHEFLAG_DELETED use InterlockedOr
Jeffrey Altman [Fri, 16 Aug 2013 16:01:02 +0000]
Windows: CM_SCACHEFLAG_DELETED use InterlockedOr

When setting CM_SCACHEFLAG_DELETED use InterlockedOr.

Reviewed-on: http://gerrit.openafs.org/10140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 0fb1e4762d2e5f04876726f487afeb224dd99140)

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

10 years agoWindows: buf_CleanLocked no callback for deleted file
Jeffrey Altman [Fri, 16 Aug 2013 15:58:18 +0000]
Windows: buf_CleanLocked no callback for deleted file

If the cm_scache flags indicate the object is CM_SCACHEFLAG_DELETED,
do not request a callback.  Simply invalidate the data in the buffer
and move on.

Reviewed-on: http://gerrit.openafs.org/10139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 17b45bb8dee9ac53ff22effa472c9c246b792198)

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

10 years agorxkad: remove warnings from der-protos.h
Jeffrey Altman [Tue, 9 Jul 2013 21:50:26 +0000]
rxkad: remove warnings from der-protos.h

der-protos.h was generated from Heimdal headers which in turn were
auto-generated.  The included a large number of function prototypes
of the form

  ret-type func(parm-list, type */* comment */);

where the combination of */* is ambiguous.  Does it mean an end comment
followed by a pointer declaration or a pointer declaration followed by
a begin comment.  This combination generates warnings on Windows.  The
bug was fixed in Heimdal's code generator.  Fixing it here by editing
the code.

Reviewed-on: http://gerrit.openafs.org/10101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 8b5d3a73f9f29d7952f7fda1c0d98aa14be4afc1)

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

10 years agoWindows: fix cm_ServerFindByUUID
Jeffrey Altman [Wed, 17 Jul 2013 00:22:59 +0000]
Windows: fix cm_ServerFindByUUID

opr_uuid_equal() returns non-zero if equal.

Reviewed-on: http://gerrit.openafs.org/10090
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit 1630ada4630a90aae64a63025f8e16dad1500490)

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

10 years agoWindows: fix cm_ServerEqual bug
Jeffrey Altman [Sun, 14 Jul 2013 01:29:19 +0000]
Windows: fix cm_ServerEqual bug

must check svr2 not svr1 in the second uuid check.

Reviewed-on: http://gerrit.openafs.org/10086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
(cherry picked from commit b5df669801b8406dacd5d16b25d4f01a14a473f1)

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

10 years ago1.7.26 (1.7.2600) version update openafs-devel-1_7_26
Jeffrey Altman [Tue, 23 Jul 2013 15:32:03 +0000]
1.7.26 (1.7.2600) version update

Change-Id: Ic234246c28afeb4816146b26108eb51afaa1faad

10 years agoWindows: 1.7.26 Change Log
Jeffrey Altman [Tue, 23 Jul 2013 15:20:48 +0000]
Windows: 1.7.26 Change Log

Change-Id: I4adc3d16a515bc776d3db45a4e2766af37ecfa88