Commit Graph

4818 Commits

Author SHA1 Message Date
Simon Wilkinson
f637b6292d fakestat-access-for-nautilus-20080307
LICENSE IPL10

in order that nautilus' .directory checks can work without stat()ing every damn
thing, do what we do for the mac, basically.
2008-03-07 17:30:19 +00:00
Jeffrey Altman
5589875561 windows-smb-writedata-crash-20080307
LICENSE MIT
FIXES 88731

If an application opens a file for read only and then attempts to
write to it, we would attempt to release an scp mutex without having
obtained either the scp or the mutex within smb_WriteData

There was no check in smb_ReadData to ensure that the file was opened
for reading.  Add one.
2008-03-07 15:35:38 +00:00
Jeffrey Altman
fb154e60e3 windows-interlocked-volume-refcount-20080306
LICENSE MIT

Switch cm_volume_t objects to InterlockedIncrement/InterlockedDecrement
for reference counting.

Remove protections against null pointers being passed into cm_GetVolume()
Instead, do not call cm_GetVolume() if the pointer is NULL.

Fix a buffer data version comparison that should be bad version number
instead of <= 0.
2008-03-07 01:03:45 +00:00
Derrick Brashear
2137631fb4 dafs-restarting-error-change-20080306
LICENSE IPL10

on VSALVAGE the client will correctly resort its list and fail over to
other replicas, but only for RO where there is more than one replica,
obviously; since in dafs we expect to only delay on salvage this is the most
useful course of action
2008-03-06 16:54:33 +00:00
Derrick Brashear
f58e08baae pioctl-settoken-malloc-fail-check-20080206
LICENSE IPL10

avoid malloc failure panic (oops)
2008-03-06 16:41:14 +00:00
Jeffrey Altman
6a631075c4 windows-afsd-misc-20080306
LICENSE MIT

(1) an attempt to make better use of bandwidth from the BkgDaemon threads
    by preventing the thread from blocking on a vnode that is already
    storing data in another thread

(2) prevents CM_SCACHEFLAG_ASYNCSTORE from being reset on a write failure.

(3) fixes cm_EvaluateSysName to avoid accessing uninitialized memory

(4) prevents a lock leak if the symlink's mountpointstring is too long.
    (This could never actually happen but better to correct the code.)
2008-03-06 14:33:09 +00:00
Derrick Brashear
b651ece9bd large-partition-support-20080305
LICENSE IPL10
FIXES 88811

support partitions over 2tb
2008-03-05 21:51:19 +00:00
Jeffrey Altman
69f9b46e69 windows-scache-mx-to-rw-20080302
LICENSE MIT

Replace the cm_scache_t mutex with a rwlock permitting a small amount
of additional parallelization in places where it is safe to use read
locks instead of write locks.  All functions that eventually call
cm_SyncOp must use write locks.
2008-03-03 04:24:17 +00:00
Jeffrey Altman
ba94313f40 windows-cm_buf-20080302
LICENSE MIT

remove unused constants, data structures and fields
2008-03-02 21:53:42 +00:00
Jeffrey Altman
af2318cfde windows-asyncstore-again-20080301
LICENSE MIT

must write the entire asyncstoresize otherwise dirty buffers are left
for writing by buf_IncrSync thread.
2008-03-01 18:58:54 +00:00
Jeffrey Altman
b47407ae72 windows-buf-more-clean-vnode-speedups-20080301
LICENSE MIT

do not call buf_CleanAsync if you know the buffer isn't dirty
2008-03-01 18:56:23 +00:00
Jeffrey Altman
7083ceec5c windows-freelance-20080301
LICENSE MIT

when support for multiple valid buffer data versions was added
forget to remove the force dv change from the freelance code.
this broken automatic additions of new mount points.
2008-03-01 17:43:16 +00:00
Jeffrey Altman
fb3f10f329 windows-buf-mx-20080301
LICENSE MIT

further reductions in buffer mutex acquisition churn
2008-03-01 16:28:53 +00:00
Jeffrey Altman
3b5a1acef0 windows-eventlog2-20080301
LICENSE MIT

set the registry values on each start.  otherwise, we will never update
the incorrect entries left over from previous installs.
2008-03-01 15:59:07 +00:00
Jeffrey Altman
e4df679d1b windows-eventlog-20080301
LICENSE MIT

somewhere along the way Microsoft stopped opening Event Message files
explicitly.  Instead they search the PATH environment variable for
the specified file.  I think this is broken but simply registering
"afsd_service.exe" instead of the fully qualified path works.
2008-03-01 15:37:09 +00:00
Jeffrey Altman
b8cacec969 windows-smb-asyncstore-20080229
LICENSE MIT

fix it
2008-03-01 04:29:17 +00:00
Jeffrey Altman
114de458ca windows-cm-buf-misc-20080229
LICENSE MIT

(1) Add an undocumented store behind mode for use in testing.  Set
    EnableSMBAsyncStore to 2.  When set all smb_WriteData calls are
    background writes, all calls to cm_FSync are skipped and file close
    operations do not block for dirty buffers to be written.  This
    permits all writes to be performed in the buf_IncrSyncer thread.

(2) Do not use I64 in osi_Log() format strings as all parameters are
    converted to size_t which is 32-bit on 32-bit Windows.

(3) Reduce the number of times the cm_buf_t mutex is obtained, dropped,
    obtained, dropped in buf_IncrSyncer

(4) In buf_CleanAsyncLocked, request that a full chunk be written instead
    of just the current buffer.  cm_SetupStoreBIOD will stop at the
    first clean buffer.  This reduces the overall number of RPCs that
    must be performed.

(5) Define CM_BUF_VERSION_BAD and use it instead of -1.
2008-02-29 22:50:54 +00:00
Jeffrey Altman
fccf05a96d windows-dnlc-20080229
LICENSE MIT

even if dnlc is not going to be used, the data structures must
still be initialized as they are in the cache file.
2008-02-29 15:45:21 +00:00
Simon Wilkinson
737c03a75c configure-enable-warnings-20080228
LICENSE IPL10

add a switch to turn on warnings when using gcc
2008-02-29 15:07:08 +00:00
Kevin McBride
8ffc274282 checkauth-unlock-before-return-20080228
LICENSE IPL10

only matters once you have pthreads, but...
2008-02-29 04:41:50 +00:00
Jeffrey Altman
502aca9e8c windows-libadmin-closesocket-20080228
LICENSE MIT

On Windows close() does not apply to sockets, use closesocket()
instead.
2008-02-29 01:26:45 +00:00
Jeffrey Altman
0546641c0d windows-buf-deadlock-20080228
LICENSE MIT

avoid deadlock in buf_FlushCleanPages().
cannot obtain buffer mutex after a successful
Stabilize call because the scp will be be locked
and obtaining buffer mutex after scache mutex
is a lock order violation.
2008-02-28 18:21:53 +00:00
Jeffrey Altman
e9f7894e35 windows-smb-lock-timeouts-20080228
LICENSE MIT

Attempts to open files which are already write-locked by another
client took forever to return a lock not granted error.  This
was because cm_Analyze() would retry the lock request for up to
the RDRtimeout in response to the EAGAIN error.  The problem
was that cm_IntSetLock() was not setting the CM_REQ_NORETRY flag.

While examining this issue, discovered two other things:

(1) the infinite wait logic on lock request processing was broken
(2) the cancel outstanding lock request logic wasn't implemented
(3) cm_Analyze() would put the thread to sleep even when retries
    were not permitted.

Also removed a number of compile time warnings.
2008-02-28 17:16:28 +00:00
Derrick Brashear
023d3f3bae arm-lwp-adm-20080227
LICENSE IPL10

don't use ucontext lwp on arm linux
2008-02-27 22:26:31 +00:00
Jeffrey Altman
72687c02b6 windows-osi-convertRToW-and-logging-optimizations-20080227
LICENSE MIT

Add lock_convertRToW which permits a read-lock to be upgraded to a
write lock.  If the caller is the only reader it permits a fast
transition otherwise it adds the caller to the waiters queue.

In the osi_Log macros, check to see if the log is enabled before making
the function call.  This avoids significant function call overhead.

In the cache manager, make use of the above.
2008-02-27 17:03:30 +00:00
Jeffrey Altman
107899cefa windows-dnlc-20080226
LICENSE MIT

Remove race conditions in the statistics code by switching to
Interlocked functions.

Speed up cm_dnlcEnter() by searching first with a read lock and
then switching to a write lock if not found.

Add HKLM\SOFTWARE\OpenAFS\Client registry values "UseDNLC" and "Debug"DNLC".
I suspect with the B+tree code that the DNLC is unnecessary overhead but
leave it on by default for now.
2008-02-27 04:53:45 +00:00
Jeffrey Altman
428cac5d6d viced-cleanup-old-addresses-as-they-become-invalid-20080225
LICENSE IPL10

otherwise we can end up with stale addresses when a client uses then leaves an
address never to return
2008-02-26 04:13:16 +00:00
Jeffrey Altman
dd72e06bf1 windows-force-anon-vldb-20080225
LICENSE MIT

For organizations with krb5 aware file servers but transarc or old openafs
vldb servers, add force anonymous vldb lookup option

  HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
	DWORD	"ForceAnonVLDB"  (default is 0)
2008-02-25 22:19:49 +00:00
Jeffrey Hutzelman
f4f7ac048c threadquota-enforcement-fixes-20080225
LICENSE IPL10
FIXES 87416

correctly set and unset HWHO_INPROGRESS as we pass through host probing package.

also, do not block on lock checking for HOSTDELETED. instead, return a null host
and VBUSY; restructure code to allow returning a null host with prejudice.
2008-02-25 20:38:09 +00:00
Jeffrey Altman
d8c932ed73 windows-volume-logsavestring-20080225
LICENSE MIT

remember to save the volume name when logging
2008-02-25 19:34:44 +00:00
Jeffrey Altman
704fddccd0 windows-smb-asyncstoresize-20080225
LICENSE MIT

Further testing on the 115KB AT&T Edge connection shows that 128KB
provides reasonably robust performance with six simultaneous copies of
multi-MB files to AFS.
2008-02-25 15:31:21 +00:00
Jeffrey Altman
f95915a55a windows-smb-async-store-20080224
LICENSE MIT

Add two new configuration knobs to control the behavior of smb_WriteData.

HKLM\SOFTWARE\OpenAFS\Client
  DWORD EnableSMBAsyncStore  (default: 1)
  DWORD SMBAsyncStoreSize    (default: 32K)

Instead of tying the async store size to either the chunksize (too large)
or the buffer block size (too small) provide an intermediate value that
can be independently controlled.

In the future it would be desireable for the async store size to be
dynamically determined based upon measurable characteristics of the
network.  In the meantime, 32KB is an acceptable performance compromise
that should work well on 1Gbit networks and low-speed cellular networks.
2008-02-25 05:33:54 +00:00
Derrick Brashear
27dc7b13aa nulluuid-check-only-valid-input-20080224
LICENSE IPL10

as reported by jhutz@cmu.edu
2008-02-25 04:57:47 +00:00
Jeffrey Altman
f52c6e1bc0 windows-scache-clean-bufs-20080224
LICENSE MIT

In MergeStatus, only remove clean buffers from the hash table.
2008-02-24 15:33:52 +00:00
Jeffrey Altman
9e41258fad windows-buf-data-versions-20080224
LICENSE MIT

An implementation of Asanka's idea.

Avoid the need to update the data version number on each buffer associated
with a scache when MergeStatus is called after a StoreData by maintaining
a range of valid data versions as part of the cm_scache_t object.
2008-02-24 06:31:54 +00:00
Jeffrey Altman
812ac61cfd windows-optimize-access-20080224
LICENSE MIT

profiling shows large numbers of blocked calls in cm_HoldSCache
from cm_HaveAccess...   We can safely avoid the call so do so.
2008-02-24 06:27:38 +00:00
Asanka Herath
c73b73ee33 windows-checkntopen-20080223
LICENSE MIT

do not forget to call cm_SyncOpDone if cm_SyncOp succeeded
2008-02-23 21:35:56 +00:00
Jeffrey Altman
8bddb4892b windows-buf-createlock-20080223
LICENSE MIT

Do not leak a read lock on the bufCreateLock

Add logging to cm_CheckNTOpen[Done]
2008-02-23 21:12:54 +00:00
Jeffrey Altman
12c6cfd443 windows-buf-scache-interlock-20080222
LICENSE MIT

Improve parallelism by using InterlockedIncrement and InterlockedDecrement
to adjust the refCount fields of cm_buf_t and cm_scache_t objects.  This
permits read locks to be used for increments and decrements but requires
a write-lock to perform any actions based upon the refCount hitting zero.

Inline cm_FidCmp to further improve performance.

Remove unused variables.
2008-02-23 07:27:17 +00:00
Jeffrey Altman
dcef8fa4ad windows-afsd-20080222
LICENSE MIT

1. Change RxEnableHotThread default to 'on'

2. Add a 'hash' value to the cm_fid_t structure in order to speed up cm_FidCmp().
   Add cm_SetFid() for use in constructing a fid complete with the hash.

3. Redefine the BUF_HASH and BUF_FILEHASH in terms of the cm_fid_t hash which
   has a better distribution

4. Modify cm_ConsiderPrefetch to evaluate the amount of data in the most recent
   read request instead of the next chunkSize.  cm_chunkSize can be dozens or
   hundreds of buffers.  As a result too much time is spent performing the
   evaluation.

5. Fix the usage of cm_scache_t bufCreateLock.  The purpose of this lock is
   to prevent the creation of new buffers while a truncation is being performed.
   All references to bufCreateLock have been removed except in two places:
   i.  a write-lock surrounding the function that calls buf_Truncate()
   ii. a read-lock within buf_GetNewLocked() that actually allocates new
       buffers

6. Modify the CM_CONFIG_DATA_MAGIC value to include a CM_CONFIG_DATA_VERSION
   number which value be used to force the replacement of the cache file
   contents when incompatible changes are made between releases.

7. CM_SCACHESYNC_ASYNCSTORE should not be ordered by cm_SyncOpCheckContinue

8. Avoid calls to multi_Rx if nconns == 0

9. Modify smb_WriteData to perform background writes based upon the crossing
   of buf_blockSize boundaries instead of cm_chunkSize boundaries.  This will
   slow down writes from the SMB interface but will avoid the risk of
   the CIFS client disconnecting from the AFS client SMB server.
2008-02-23 00:15:22 +00:00
Derrick Brashear
cd9ce022ee debian-packaging-update-20080220
LICENSE IPL10

Russ' metadata, repacked into our tree
2008-02-20 21:31:02 +00:00
Derrick Brashear
49d77d8d4b vos-addsite-pod-error-20080220
LICENSE IPL10
Item is not item
2008-02-20 20:18:03 +00:00
Derrick Brashear
d5c32c97a0 urecovery-invalidate-without-truncate-20080220
LICENSE IPL10

critical to label the database invalid when we don't truncate so recovery finishes.

issue in 84609 remains.
2008-02-20 20:07:51 +00:00
Jeffrey Altman
d48e3d1e7a windows-smb-locking-20080220
LICENSE MIT

minor improvements to smb_rctLock usage.
2008-02-20 17:35:45 +00:00
Jeffrey Altman
dd4ecb4ca0 windows-rx_enable_hot_thread-20080220
LICENSE MIT

Add RxEnableHotThread registry option to permit rx_enable_hot_thread
to be set.  The default is off for the moment but turning it on does
provide significant performance benefits.
2008-02-20 17:32:53 +00:00
Jeffrey Altman
5067e6786d rx-osi_socket-20080220
LICENSE MIT

The portable type to be used for sockets is osi_socket not int.

On 64-bit Windows this caused failures when hot threads were enabled.
2008-02-20 17:17:21 +00:00
Jason Edgecombe
897c360274 man-page-updates-20080219
LICENSE IPL10
FIXES 86677

note 2tb limit, add fs minidump document
2008-02-19 15:25:17 +00:00
Mike Meffie
4bd64596ca s390x-not-s390-20080219
LICENSE IPL10

don't try to link multiple things to asm
2008-02-19 15:07:24 +00:00
Rainer Toebbicke
19b829d219 viced-rmdir-fid-leak-20080219
LICENSE IPL10
FIXES 86786
2008-02-19 14:29:42 +00:00
Derrick Brashear
c2de3a1623 windows-name-entries-20080218
LICENSE IPL10

restore the original behavior.  Fixes smb_ReceiveTran2SearchDir().
2008-02-19 04:10:44 +00:00