LICENSE MIT
During buf_Shutdown() all dirty buffers should be written to the file
server if they can be.
(cherry picked from commit ccdf50ade371de595abe20f5a6b0ff149ce9ae79)
LICENSE MIT
reorganize the service shutdown order to permit dirty buffers to be
flushed to the file server without competition from incoming requests.
(cherry picked from commit 2da64d02a2707a3c9220951a30b5cea8464b9ef9)
LICENSE MIT
Protect against a heap overwrite that could occur is the number of file
servers or vldb servers grows while the maximum number of connections
is computed and when the connection list is populated.
(cherry picked from commit e68255c12c444e36b7ca7f1864d964cd3a0bcda8)
LICENSE MIT
do not hold cm_server_t mutex when calling cm_FindVolumeByID because
the cm_volume_t lock must be obtained ahead of the cm_server_t mutex
(cherry picked from commit 0affa4b86a08c3be9cb4edc4c9f680ae02a2fcd8)
LICENSE MIT
plus and equal are not valid characters in short names.
we replace them with left and right brace in order to
minimize the instability in the file names.
(cherry picked from commit bef68684fd7bb4e58e621766a0f2abbdfd15af80)
LICENSE IPL10
FreeBSD 7.0 client support (and 8.0 support but that's a moving target)
(cherry picked from commit a123bd8ccde0d6baf04401201b1672b19e9778db)
LICENSE MIT
avoid a deadlock in cm_GiveUpAllCallbacks
log UAEEXIST / EEXIST in cm_Analyze
(cherry picked from commit e0380d54bad50582b6bc39e2b41e78d72117ec79)
LICENSE MIT
add more asserts to attempt to catch locks released in threads other
than the one that obtained them.
(cherry picked from commit cb455744d49f250c236ab24cdcfffda104ef3774)
LICENSE IPL10
FIXES 108703
go through and make servers able to take debug log level on command line;
add -jumbo; default to -nojumbo
(cherry picked from commit 12c8abc69030d3368194b148c692215c61b5da9c)
LICENSE MIT
smb_dirSearch_t refCount field is protected by smb_globalLock not the
smb_dirSearch_t mutex.
Do not hold the smb_fid_t mutex across calls to smb_NotifyChange()
(cherry picked from commit 24f8b1b4c327c3fb01a575ccb46d5ae6bf7edd36)
LICENSE MIT
Move cm_SyncOpDone(CM_SCACHESYNC_LOCK) from cm_CheckNTOpen to
cm_CheckNTOpenDone. This is necessary to synchronize lock operations.
(cherry picked from commit cc48a5a3b4d328127ca56c1a5845ec6cac136548)
LICENSE IPL10
FIXES 112681
safety check to make sure a conn's srvr is set before dereferencing it
(cherry picked from commit ea81e608bae42ea84d7bc85d289bfe6f24d8d383)
LICENSE MIT
1. In multi-threaded applications deadlocking is always a problem.
Deadlock avoidance requires a strict adherence to a documented
hierarchy. The lock hierarchy for OAFW is described in a file
called locks.txt. There are two problems. First, some of the
locks are not included in locks.txt. Second, it is nearly
impossible given the depth of function calls for any programmer
to identify all of the locks that are held at any given time
a function is called. This patch implements a new locking order
verification mechanism. Each lock is assigned a lock level at
initialization. Each thread maintains a queue of held locks.
Each time a lock is acquired the queue is checked to ensure that
no locks with a higher level than the requested lock has already
been acquired. If a violation occurs, the service panics.
2. When the service panics ensure that a minidump will always be generated.
3. Remove unused lock cm_bufGetMutex.
4. The lock order verifier identified approximately a dozen
lock order violations that are corrected.
5. A race condition within the function path cm_GetSCache() ->
cm_GetNewSCache() -> cm_RecycleSCache() permitted a cm_scache_t
object to be issued simultaneously to two threads. This would
eventually result in a panic due to the resulting under count.
6. Fix interpretation of the empty string as the ioctl path to
mean the current directory. "fs lsm", "symlink list", etc.
now return a "not a ..." error instead of "does not exist".
7. Add SMB_STRF_SRCNULTERM flag to smb_ParseStringXXX functions
to indicate that the input string is a nul terminated string.
Assign it when input strings are nul terminated.
8. The CIFS protocol specification for handling NT_TRANSACT_CREATE
does not match the observed behavior. The 'nameLength' is specified
in bytes not in characters. Fix the implementation to match.
9. The cm_HaveAccessRights() attempt at deadlock avoidance by calling
lock_TryRead() on the parent directory cm_scache_t rw-lock does not
avoid the deadlock. Avoid the deadlock by enforcing the lock order
of lowest vnode first. Then remove the infinite loop avoidance in
cm_SyncOp() that was returning an unwarranted access denied error.
(cherry picked from commit ef10390e12ffd697f9eaaacd1d7291e05d16c835)
LICENSE IPL10
right now, jumbograms can still be sent when -nojumbo is specified. make the
current macro a default and override when we're supposed to.
(cherry picked from commit 46dbd678714110002a36269beca8961e013650ac)
LICENSE MIT
Another casaulty of the Unicode transition, the return value of the
ListLink operation was not being convered from wchar to char before
it was copied into the output buffer.
(cherry picked from commit a00f706eb67c257af9892557cfb6ad35594144cf)
LICENSE MIT
When afsd_service.exe is not running as a service do not call the
Service Manager functions. Doing so causes invalid access exceptions
to be thrown in the kernel and can corrupt the heap.
(cherry picked from commit 9488898fdb22e8c999ad4f713bd656caba91fe1c)
LICENSE IPL10
FIXES 110943
right now this isn't set until a vnode update happens. technically creating
the root directory is an update, so let's set it to now.
(cherry picked from commit b080c5d82ba5c7641afeb6836961cacf283e4902)
LICENSE MIT
Make the default number of pre-allocated rx packets equal to the number
of threads times the rx window size.
(cherry picked from commit dbd98583d35d6aea57cb4d9c46790479dc1a137e)
LICENSE MIT
Use GetDriveType() to check if the current path is a local disk.
If it is, fail the pioctl attempt immediately. This should avoid
the reported 30 second delay in the AFS Shell Extension.
(cherry picked from commit ffbee95174ad1fffecff2889e80e168cea60a531)
LICENSE MIT
avoid a deadlock in cm_reInitLockMountPoints() and make the function
useful again by actually using the index value in the construction
of the FIDs
(cherry picked from commit 20d38bc268b13258e2358591756824d712cdb403)
LICENSE MIT
protect against a potential null pointer dereference of a cm_server_t
object
(cherry picked from commit 357223aefd86c007987333b2a8859faa33f21424)
LICENSE MIT
avoid a deadloc when freeing servers. cm_serverLock must be released
around cm_GCConnections()
(cherry picked from commit 06b5006517c77767a246df2b6d66a344a44cbea1)
LICENSE MIT
if a cell has been found with addresses and the next cell name
is reached before the EOF, return success.
If the cell has been found and there are no addresses, return -6
(cherry picked from commit 4e7e66d4dc14513e1beed465fc5180429571921b)
LICENSE IPL10
ensure, at least, that there is a filehandle for everything we check
(cherry picked from commit 04a25e0a4057b63cf7c700b17b1a6ab28e469547)
LICENSE IPL10
FIXES 111585
make the int64 macros work when the "64 bit" number to fill isn't.
use the correct variable type for length in salvager
(cherry picked from commit e5bf9b91eaf8cb930c6cf70419983901907db84d)