If MAKEDEBUGCALL is defined, build MakeDebugCall() even if RXDEBUG
is not defined.
Change-Id: I98d3216e8bf1e1f3b6b62c962d33db316d0f51ac
Reviewed-on: http://gerrit.openafs.org/2818
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ed25a920232cb659c2997c91c5bc92a659ff163a)
Reviewed-on: http://gerrit.openafs.org/2823
Tested-by: Derrick Brashear <shadow@dementia.org>
The previous value, 350ms, is historical. Now that networks are
so much faster, an artificially high timeout value when backed off
results in an extremely long delay before communication can resume.
Change-Id: I6207fb3e5c26a36704abc1f9210af53e0ff1fae6
Reviewed-on: http://gerrit.openafs.org/2815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c77f2f1369fead87acb440134213ebf6d23f8fd7)
Reviewed-on: http://gerrit.openafs.org/2824
Tested-by: Derrick Brashear <shadow@dementia.org>
1.4.x does not hold the call lock across memcpy operations in
rx_ReadProc, rx_ReadProc32, rx_WriteProc, rx_WriteProc32. The
claim is that the call curpos, curlen, and nLeft fields which
refer to the current packet being processed will not be touched
by any other thread. Therefore it is safe to drop the call lock
to permit another thread to add packets to the call while the memcpy
is performed in parallel.
This patchset continues to hold the call lock longer than the
original implementation but does drop it for the length of time
it takes to copy data from the packet buffer to the application
buffer.
Change-Id: I87dacdf541ba50db80ab55e500b38edab5126dc2
Reviewed-on: http://gerrit.openafs.org/2817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e197c19cedaafa0d2bb59212fb171083f2140041)
Reviewed-on: http://gerrit.openafs.org/2822
Export
rxi_nRecvFrags @2008 DATA
rxi_nSendFrags @2009 DATA
rx_initReceiveWindow @2010 DATA
rx_initSendWindow @2011 DATA
rx_intentionallyDroppedPacketsPer100 @2012 DATA
rx_intentionallyDroppedOnReadPer100 @2013 DATA
so they can be referenced from pthreaded builds of src/rx/test tools.
Exported variables must be present in both FREE and CHECKED builds.
Change-Id: Ia7f3ee0143679bab1ce74f71dc3a996cda1f18a8
Reviewed-on: http://gerrit.openafs.org/2779
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7ee80a853cebc472d9d9664dbfcccadd1d49d5fc)
Reviewed-on: http://gerrit.openafs.org/2814
When RXDEBUG is not defined, PrintTheseStats generates an error
even though the statistics are in fact available. The global
variable rx_packetTypes was not being defined without RXDEBUG.
Make rx_packetTypes defined always and permit statistics to
always be printed.
Change-Id: Ife708d34b5d56374c8aff9aa7c941d39b37ca4a1
Reviewed-on: http://gerrit.openafs.org/2778
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1183f16285be040b7150414c9563a9bceb53210)
Reviewed-on: http://gerrit.openafs.org/2813
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Function prototypes belong in rx_prototypes.h not in rx_globals.h.
Remove EXT macro from function prototypes as functions do not
require special treatment in order to be exported by a DLL on Windows.
Change-Id: Ieb617db634f2cfa57410e77e276c703311304547
Reviewed-on: http://gerrit.openafs.org/2777
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 00afdbed0ff474aaf45a49b157843af9cb8483ad)
Reviewed-on: http://gerrit.openafs.org/2812
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
The global dataPacketsReSent statistic should be the sum of all
peer->reSends and dataPacketsSent should not include the count of
resent packets. Prior to this patchset, dataPacketsSent included
the resent packets and dataPacketsReSent was computed as the number
of requests for Ack instead of the number of packets resent.
Change-Id: I969003f7ec1805d09c14ac342453f86fdb5df99a
Reviewed-on: http://gerrit.openafs.org/2776
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8549ebe0a81ac9a526d13f96ba63e048d8b77aa7)
Reviewed-on: http://gerrit.openafs.org/2811
Since tservice has been assigned to call->conn->service,
use it instead of call->conn->service when calling
executeRequestProc(call)
Change-Id: Id26c4c63f054bcd1e3ef5349900c910e3c9cf2be
Reviewed-on: http://gerrit.openafs.org/2775
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 72cadfd86a0efc0079639671d613005ff403ccc4)
Reviewed-on: http://gerrit.openafs.org/2810
If a packet is missing, the peer timeout is backed off to provide
a new starting point for timeout computation. The backoff state
must be stored in the peer object to ensure that multiple failures
do not result in more than one backoff before a successfully received
packet is available for recomputation.
Change-Id: I6794b3a020801ff421e4ed776afb581962b111a9
Reviewed-on: http://gerrit.openafs.org/2787
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 3b4cad3b78ec5df7253067c70e19c066552d7145)
Reviewed-on: http://gerrit.openafs.org/2808
Computing the bytes sent and received is an expensive operation.
If rx statistics collection has been disabled we should not collect
the peer data. The most expensive operation is the rx_FindPeer()
call that is performed during rxi_ReadPacket(). rxi_ReadPacket()
is processed by the rx listener thread which must be as fast as
possible.
Change-Id: I5403c88aa85f9049fe50a9c1f3dbaad7d8b802bd
Reviewed-on: http://gerrit.openafs.org/2782
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7d16c8b84ac8cc0251231819bfb0eefc2040322a)
Reviewed-on: http://gerrit.openafs.org/2807
rxi_ReceiveAckPacket can acquire and drop the conn_data_lock several
times and acquires and drops the peer_lock unnecessarily. This patchset
adds a variable to track whether the conn_data_lock is held in order
to avoid the need to drop it and reacquire it based upon conditional
operations. It also relocates the peer->maxPacketSize computations
in order to consolidate the work performed under the peer_lock.
Change-Id: I0bc9e42e8ef198a04315f9f2df529073ce9dfd03
Reviewed-on: http://gerrit.openafs.org/2781
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c59ce29602086f795d5fbaef6a5f88fae9dd2dea)
Reviewed-on: http://gerrit.openafs.org/2806
rxperf made assumptions that it was built against LWP, used buffer
sizes for read/write that were too small, made use of non-portable
types, and set signal handlers that are unsupported.
Change-Id: I55515cac0f441116df7fd0aaf100fb3ae99b220f
Reviewed-on: http://gerrit.openafs.org/2773
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 449976acd54ff46fd6cdb9a6e12acf3789665bcf)
Reviewed-on: http://gerrit.openafs.org/2805
rxperf is a test application. Move it to the tests directory
Change-Id: I946a8026760d860667ea5707d8a3e0d3b895d908
Reviewed-on: http://gerrit.openafs.org/2772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 5c3a1ed88de16db4c2081bbf1a4e397ce459bcf3)
Reviewed-on: http://gerrit.openafs.org/2804
Tested-by: Derrick Brashear <shadow@dementia.org>
Permit testclient and testserver to be built on Windows as
pthreaded applications.
Remove warnings. Fix prototypes. Remove variable declarations
for rx library variables defined in rx_globals.h.
Increase the buffer sizes. Disable use of packet dropping when
the library is built without RXDEBUG.
Change-Id: Ic8483eb64cbed4958baf8fd054e01c7c40832599
Reviewed-on: http://gerrit.openafs.org/2780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 7ded3209a2fbd8d0108f9322d708551e93b6ef76)
Reviewed-on: http://gerrit.openafs.org/2803
Tested-by: Derrick Brashear <shadow@dementia.org>
Calling BUG() panics the machine, so having a print statement with
further debugging information after it doesn't help much.
Swap the ordering, so we at least see the message.
Change-Id: I3aa3b8ba5faaa40cef7bb046093b322212eea2b8
Reviewed-on: http://gerrit.openafs.org/2754
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ff100901e0da8d236c7ae8b4d478600146d8f182)
Reviewed-on: http://gerrit.openafs.org/2802
We don't know if the buffer for pioctl data is aligned to anything, so
we can't just dereference the given pointer as an int or anything
else. So, just memcpy the data in for ints and such; conveniently,
afs_pd_getBytes and afs_pd_putBytes can do this for us, so just use
that.
Change-Id: Id1abdae55308db6fe1e13f541a5d776daa6af934
Reviewed-on: http://gerrit.openafs.org/2763
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 8fd83543b60aefb4b7c5a0116d1538a89f58bbb3)
Reviewed-on: http://gerrit.openafs.org/2801
Tested-by: Derrick Brashear <shadow@dementia.org>
Remove some variables that are set but never used in the vlserver
directory:
- n1,n2,n3 and n4 in vlclient.c appear to have never been used even
in the original IBM code
- some variables in vldb_check.c that are no longer used after some
recent changes
Spotted by gcc 4.6
Change-Id: Icd9e7da151b3a485c917ed5bd99eb26998dfa818
Reviewed-on: http://gerrit.openafs.org/2784
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit ee3538218d342bb74ab849763421b9ec075251b3)
Reviewed-on: http://gerrit.openafs.org/2800
Tested-by: Derrick Brashear <shadow@dementia.org>
When a transaction times out on a volume, delete the volume if it is a
temporary volume (destroyMe is set). This prevents half-created
volumes from accumulating, which can take up space and screw up
certain vol ops in some versions.
Change-Id: I94e9adc767b84a2a32d980f508af33b823560950
Reviewed-on: http://gerrit.openafs.org/2760
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit bc56f5cc97a982ee29219e6f258b372dbfe1a020)
Reviewed-on: http://gerrit.openafs.org/2799
Remove unused variable taskId
writeData() systematically returns 0, so make it void and adapt
call sites that assigned the return value but never used it.
Also move the function up in the file to avoid the need for a
forward declaration, and make it static since it's only used here.
Spotted by gcc 4.6
Change-Id: I2f61c0395796498175f2cb9131066b00657f99a7
Reviewed-on: http://gerrit.openafs.org/2785
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f1796b0f4ad0202ad32e06bb849f443984cf22b5)
Reviewed-on: http://gerrit.openafs.org/2798
Tested-by: Derrick Brashear <shadow@dementia.org>
pagsh and other code expect setpag() and pioctl() to behave like
a regular syscall or pioctl, that is to return -1 on error, with
errno set to the specific error code.
On Linux, the underlying emulation does a straight return of any
error code it gets from the ioctl, and errors are not properly
caught by the callers.
As an example, pagsh won't detect an error from setpag such as
exceeding a keyring quota limit. With this patch, the user
will see this:
$ pagsh
setpag: Disk quota exceeded
sh-4.1$
The code in proc_afs_syscall is modified to set errno to the error
code and to set errorcode to -1 in case of error.
proc_afs_sycall is reindented while we're changing code there.
FIXES 126230
Change-Id: I945f2d28eb0ae26c7f42502c90eb2e6e95c29a58
Reviewed-on: http://gerrit.openafs.org/2770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 0bc837f68a72ba1f75d940cc5dd057774d9f36bb)
Reviewed-on: http://gerrit.openafs.org/2797
minimize the impact of Rx packet tracking. in particular, do no
extra queue scans, which means the rest of the state which tracks
where a packet is now isn't of use. make it possible to re-enable.
Change-Id: I5b9ed039a0394edcea48bb46729cd2ce2f71d4b9
Reviewed-on: http://gerrit.openafs.org/2762
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 4bbf0dae237e01127f4d1a4d913f00e8dad859a3)
Reviewed-on: http://gerrit.openafs.org/2796
Tested-by: Derrick Brashear <shadow@dementia.org>
The return code from iod_Write is checked at every call site
in the file, except this one. Check it, and return VOLSERDUMPERROR
if appropriate.
Spotted by a set but unused warning from gcc 4.6
Change-Id: I84f38a4b3b1e37c25be9c76702b0d2818058454e
Reviewed-on: http://gerrit.openafs.org/2733
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit e0708617b8f5df625b6ad62920665e704f1374f7)
Reviewed-on: http://gerrit.openafs.org/2795
Failed Mac OS X debugging builds leave *.dSYM directories lying
around the tree, which just litter the contents of "git status".
So, ignore them.
Change-Id: Ic2b79f299d724b770bf83cb24f2aac7c4063efdb
Reviewed-on: http://gerrit.openafs.org/2744
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 290204c6e92d61c5b12b90d09e8202731caa0400)
Reviewed-on: http://gerrit.openafs.org/2793
When you end up explicitly regenerating chosen Makefiles by
running ../../config.status Makefile, the working tree ends up littered
with config.log files.
Currently, we only ignore config.log in the top directory - extend this
so that it's ignored across the tree.
Change-Id: If3cfec82fbf78e97ee769b36315ba23dcfe8a950
Reviewed-on: http://gerrit.openafs.org/2743
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 4a353545c3f0e91cc85d7feb379997a1eda9f6e3)
Reviewed-on: http://gerrit.openafs.org/2792
Make the RX sample client and server build again
Change-Id: I81ce12eadcb4150dd503e41f9a7fd1a850d31a11
Reviewed-on: http://gerrit.openafs.org/2737
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 71171262602d7f261adbffd5047266e94c4a6f92)
Reviewed-on: http://gerrit.openafs.org/2791
Use com_err to return a sensible string, rather than just an error code,
for errors with Ubik initialisation.
This has the specific benefit that the error when the database directory
doesn't exist, or isn't readable, becomes
Ubik init failed: file not found when processing dbase"
rather than
Ubik init failed with code 5382
Change-Id: I5f770377668a7f545cad7e422f28afd7c9f9888d
Reviewed-on: http://gerrit.openafs.org/2735
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 6380213d296c138349c77fa4a51655fac23cfeea)
Reviewed-on: http://gerrit.openafs.org/2790
The inc_header_word and set_header_word macros make repeated use of their
argument, which triggers many (~30) warnings with gcc 4.5, like this one:
./ptutils.c:473:6: warning: operation on ‘cheader.foreigncount’ may be undefined
Removing the cast to afs_int32 in the macros gets rid of the warning,
and should be safe since we're just getting a small positive integer value
- the offset of the member in the structure - and passing it to the
pr_Write function which expects an afs_int32.
Change-Id: Ie493520f874cddbb4b7f9f7ebe4b3922a848d0d0
Reviewed-on: http://gerrit.openafs.org/2729
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit d69914a5f0580f8048072d3b734558ea5b7b2df5)
Reviewed-on: http://gerrit.openafs.org/2789
Tested-by: Derrick Brashear <shadow@dementia.org>
The demand-attach fileserver binaries now have a "da" prefix. Adjust
the documentation in the man page for bos create accordingly, and add
the new binaries to SEE ALSO.
Change-Id: Ib70bad87aaf8bfc483ffbfe402db01c178e6c4e4
Reviewed-on: http://gerrit.openafs.org/2830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 82b7327b5ba66c6ddbc898ad383b4e5f2b08ec38)
Reviewed-on: http://gerrit.openafs.org/2845
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
The two commands are documented identically for right now, so just link
the dafssync-debug man page to the fssync-debug man page. Remove the
incorrect statement in the man page that fssync-debug only works with
demand-attach.
FIXES 128166
Change-Id: I812641ad7a345c7f5412c3c97ed1ba393e981639
Reviewed-on: http://gerrit.openafs.org/2836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 68d074d8aa98e76fb85289c69300d17695b98d0b)
Reviewed-on: http://gerrit.openafs.org/2847
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
libuafs used to #define user to usr_user, so that any references to
'struct user' would become 'struct usr_user'. However, none of the
kernel code uses struct user, and this #define conflicts with the
definitions in sys/user.h on Linux.
So, just remove it.
Thanks to Russ Allbery for the original problem report.
Change-Id: I7868c8ddade2df626f5ecae597144641dfc551b7
Reviewed-on: http://gerrit.openafs.org/2838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 200a9947f548eb7158e92de62ddaa76fcfe4ba46)
Reviewed-on: http://gerrit.openafs.org/2839
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: Russ Allbery <rra@stanford.edu>
make 1.5.77 in various places we need it
Change-Id: Ic7e487ce76f86f50d2565e75a3b2f7642ecadd87
Reviewed-on: http://gerrit.openafs.org/2713
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
the file propagation "out of band" changes should not hardcode recovery
on file 0, but instead work on any file the interface is acting on.
use the provided file number.
Reviewed-on: http://gerrit.openafs.org/2715
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit f8ff458ef02d5ef49bc467304e40571d871385c8)
Change-Id: I2cf324c9759f9878c5b37603480a9c803c041641
Reviewed-on: http://gerrit.openafs.org/2717
Replace STATUS_IO_TIMEOUT with RPC_NT_SERVER_TOO_BUSY for CM_ERROR_ALLBUSY.
Replace STATUS_PATH_NOT_FOUND with RPC_NT_SERVER_UNAVAILABLE for
CM_ERROR_ALLOFFLINE and CM_ERROR_ALLBUSY.
These errors provide a more meaningful message to end users when
a failure occurs.
LICENSE MIT
Change-Id: I34483f8f696285477fa0f8a8dac3b0ff33dee6b4
Reviewed-on: http://gerrit.openafs.org/2663
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit de441ba420b8fc38ce1b36bee06097f21cc6514b)
Reviewed-on: http://gerrit.openafs.org/2714
Depending on the authentication method, the smb session authenticated
name for the "local system" account may be the nul string. In this
case it is impossible to use the name to determine if the authenticated
entity is the "local system" account as required by smb_SetToken.
To work around this problem, smb_AuthenticateUserExt() will now obtain
the Security Identifier (SID) for the authenticated account. The string
representation of the SID will be used in place of the name by
smb_ReceiveV3SessionSetupX() when constructing the smb_user_t object.
A new flag, SMB_USERNAMEFLAG_SID, indicates when the name is in fact
a SID.
smb_userIsLocalSystem() checks for the SMB_USERNAMEFLAG_SID flag and
performs a SID comparison when it is set.
smb_SetToken() will accept either MACHINE\user or a SID string as
the smbname. It will obtain the SID if possible and create a SID-based
smb_user_t.
It is possible that a SYSTEM service will use an anonymous (S-1-5-7)
SMB connection. In that case, we also check the RPC Impersonation
SID to see if it is SYSTEM. If so, the RPC identity supercedes the
SMB identity for SetToken.
smb_IoctlRead, smb_IoctlV3Read and smb_IoctlRawRead are now all
consistent with regards to name processing.
Fixed a couple of comments as well.
FIXES 128022
LICENSE MIT
Change-Id: I8f9ccd4a4dddea52d151288855c7e129e2f31b28
Reviewed-on: http://gerrit.openafs.org/2709
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 19f50c13b4542cc84c33eaca4b2cc6ac0b75eb98)
Reviewed-on: http://gerrit.openafs.org/2711
The buf_CleanAsync() and buf_CleanAsyncLocked() signature does
not include a cm_scache_t pointer even though buf_CleanAsyncLocked()
needs a pointer to the matching cm_scache_t object. There are
some calls when the cm_scache_t object is already known. For those
cases it is more efficient to avoid the additional lookup especially
when buf_CleanAsync*() is being called on every buffer associated
with the cm_scache_t object.
At the same time add a flags field and a constant
CM_BUF_WRITE_SCP_LOCKED to permit the lock state of the cm_scache_t
to be passed in.
Finally, fix up the usage in buf_FlushCleanPages() which gains
the most from these changes.
LICENSE MIT
Change-Id: I3726441ff83a89e24d790174ca71396d633f1be6
Reviewed-on: http://gerrit.openafs.org/2662
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 1ef135110b7d850e2c40bbbb6b7de69c76872fa9)
Reviewed-on: http://gerrit.openafs.org/2708
The cm_buf_opts_t cm_BufStabilize() function was implemented
such that holding the cm_scache_t.rw lock had to be exclusively
held until cm_BufUnstablize() was called. Unfortunately, this
prevents using Stabilize/Unstabilize to protect the cm_scache_t
during Flush operations as the cm_scache_t.rw lock must be
acquired after the cm_buf_t mutex and not before it.
This patchset reimplements the synchronization logic using
the new CM_SCACHEFLAG_SIZESETTING flag and cm_SyncOp().
LICENSE MIT
Change-Id: Iaada83f7f3b75bb3b213b33b2399e900e48a2fbc
Reviewed-on: http://gerrit.openafs.org/2661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit fa961c02fbb7dc54fa4c02c38dfd07c44eb696d3)
Reviewed-on: http://gerrit.openafs.org/2707
If the readonly file attribute is set (stored as a unix mode)
then a CreateFile operation should fail if the file is opened
for DELETE in combination with any other privilege.
LICENSE MIT
Change-Id: Ie8ebb6d230cf65d9ce2411bab2fcc4e561081505
Reviewed-on: http://gerrit.openafs.org/2660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit ee26ce51f67c7a91d843184374240bbc29e1660b)
Reviewed-on: http://gerrit.openafs.org/2706
If the directory buffer contents are garbage we can crash
the service. Add some simple validation checks to ensure
that cm_dirEntry_t objects have the correct flag value and
that the name strings are not too long.
LICENSE BSD
Change-Id: If4a276007ff7a21a641825037a1035ea20db79c5
Reviewed-on: http://gerrit.openafs.org/2658
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 72584be7fb0b6eb01ca5cb9c0703e9bc1b92f547)
Reviewed-on: http://gerrit.openafs.org/2705
If the bulkStat errorCode indicates that a particular object
is inaccessible due to a VIO error, we must update the server
status appropriately in order to permit failover.
LICENSE MIT
Change-Id: I19ce3d2c5b138d519fb1c437f6d5109d7d8b1310
Reviewed-on: http://gerrit.openafs.org/2657
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 3f69933c4243d6861d5cce701c28f2dee088e6c2)
Reviewed-on: http://gerrit.openafs.org/2704
An RX_MSGSIZE error is returned by the new PMTU detection
code. It is critical that such an error result in a retry of
the operation that failed. Otherwise, the PMTU detection can't
work and the server will be marked down.
Secondly, it is important that such errors not leak to the
application layer. Map them to CM_ERROR_RETRY in all cases.
LICENSE MIT
Change-Id: I966fe259080bd31ec60fdb6715f54e18e190c790
Reviewed-on: http://gerrit.openafs.org/2656
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit b11ff643b5665ec252ca96dc19af1446fb72481f)
Reviewed-on: http://gerrit.openafs.org/2703
If we say we are printing the value of cm_OfflineROIsValid,
do so and not cm_deleteReadOnly.
LICENSE MIT
Change-Id: I8b0bc73798feea413f8ce79f9965664fc050ef76
Reviewed-on: http://gerrit.openafs.org/2655
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit 874c5ca8359d49703f1f37d7fb70204c182d0f86)
Reviewed-on: http://gerrit.openafs.org/2702