Commit Graph

3065 Commits

Author SHA1 Message Date
Jeffrey Altman
1d83f0e3b7 windows-pioctl-debug-20050909
log the pioctl path provided by the caller
2005-09-09 13:51:43 +00:00
Jeffrey Altman
9e348b344d windows-fs-flushall-20050907
"fs flushall" is like "fs flushvolume" but flushes all data in the cache

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

typo
2005-09-07 20:19:10 +00:00
Chas Williams
6d6789345e linux-root-fix-reval-20050907
FIXES 21390

revalidate the root vnode correctly so if we become replicated we don't lose
2005-09-07 18:38:56 +00:00
Jeffrey Altman
d154b54b55 windows-uuid-note-20050907
Warn users to remove AFSCache file when cloning machines with AFS installed
2005-09-07 18:17:04 +00:00
Chas Williams
46e69c1502 linux-root-no-reval-20050905
don't revalidate the root afs vnode, so if root.afs becomes replicated out from under us we don't lose.
2005-09-05 17:28:39 +00:00
Jeffrey Altman
e32a568a96 windows-install-notes-20050904
updated install notes
2005-09-04 05:53:27 +00:00
Jeffrey Altman
d9a958998c windows-updates-20050904
most recent change descriptions
2005-09-04 05:50:17 +00:00
Chas Williams
fed9b0844c linux-remove-reval-shortcut-20050903
don't skip revalidation work so we don't end up with bogus directory dates
2005-09-04 05:10:14 +00:00
Nathan Neulinger
fd8bfddd5e shlibafsrpc-objdir-20050902
FIXES 21312

make objdir builds work again
2005-09-03 00:38:16 +00:00
Jeffrey Hutzelman
599b57ed78 rx-propagate-error-20050902
if we have an error propagate it to new calls
2005-09-02 23:48:35 +00:00
Jeffrey Altman
d04a62e641 windows-pioctl-20050902
support '/' as well as '\\' in pioctl calls
2005-09-02 18:23:50 +00:00
Asanka Herath
001f9b9732 windows-loopback-20050831
As stated in the afs-install-notes, the MS Client for Networks should
be enabled on the loopback adapter, so enable it.

Prevent an install failure by not calling CoInitialize twice in the same
thread.
2005-09-01 02:55:01 +00:00
Jeffrey Altman
69a98684f0 windows-gui2fs-20050831
Apply AFS Client Admins group protect to AFS Shell Extension

Add support for \\afs\<name> to most commands except the symlink methods.
2005-09-01 01:00:41 +00:00
Jeffrey Altman
27b81213df windows-cell-expiration-20050831
When updating cell information from DNS, be sure to set a new timeout.
When obtaining cell information from a file, check every two hours to
see if it changed.
2005-09-01 00:52:03 +00:00
Derrick Brashear
36c57c994a volser-audit-setids-fix-20050831
FIXES 21263

type is an int, not a string
2005-08-31 22:35:40 +00:00
Jeffrey Altman
682f5ffb21 windows-freelance-fs-symlink-20050831
Add support to allow use of \\AFS\<foo> where <foo> is either a mount
point or symlink.   As <foo> is normally treated as a share name, we
transform it into \\AFS\all\<foo> for processing.
2005-08-31 11:59:06 +00:00
Eric Williams
0b74a7d25c windows-afslogon-code-init-20050829
Init 'code' to prevent false errors when integrated logon is disabled
and the service is not running
2005-08-29 20:39:56 +00:00
Jim Rees
920dc9dfc4 obsd-krb5flags-20050828
KRB5CFLAGS and KRB5LIBS for OpenBSD
2005-08-29 19:58:05 +00:00
Jeffrey Altman
308ed8fecb windows-notes-20050828
updates
2005-08-28 21:48:25 +00:00
Derrick Brashear
e03a1b954f aklog-no-gmake-20050828
FIXES 21031

make aklog Makefile not use gmake/non standard make += syntax
2005-08-28 20:59:55 +00:00
Jeffrey Altman
b9fc404bdf windows-default-trace-log-off-20050827
Now that OAFW is ready for a stable series, we will default "fs trace"
to off on non-Debug builds.   It can be set to on via the TraceOption
registry value.  (see registry.txt)
2005-08-28 04:43:55 +00:00
Jeffrey Altman
c0fea63408 windows-add-tid-to-mutex-20050827
Add to mutex objects the ID of the thread that holds the lock.  This
will make future debugging much easier.
2005-08-28 04:32:44 +00:00
Jeffrey Altman
6620b9452b windows-scache-deadlock-fix-20050827
It was reported that Microsoft Word when editing files stored in AFS
would cause OAFW to fail to respond.  It was determined that a scp->mx
lock was not being released in buf_WaitIO if the no one was waiting
on the scp.

This patch corrects the deadlock and fixes some debugging messages.
2005-08-28 04:29:31 +00:00
Jeffrey Altman
ee937439ad windows-remove-log-messages-20050826
The log message added to buf_LockedCleanAsync() during the debugging
post 1.3.8201 is output for 1/10th of all buffers once every 5 seconds.
This is a huge performance hit.  Move the message so that it is only
output for buffers that are actually dirty.

Also, change the algorithm so that the sqrt() of the number of buffers
are checked every 5 seconds instead of 1/10th.   This will do a better
job with very large cache sizes.
2005-08-26 14:46:11 +00:00
Jeffrey Altman
48b0320b20 windows-trace-log-to-dbgview-20050820
Added a new option for viewing the trace log data in real time

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

Include the Thread ID in the output to make it usable for debugging
deadlocks.

====================

alter the afsd_init.log tag for the TraceOption to not be
Windows Event Log specific.
2005-08-26 14:39:31 +00:00
Jim Rees
f4471a8f18 recommended-bsd-options-20050822
Document recommended build options for Open and FreeBSD.
2005-08-22 15:22:58 +00:00
Jeffrey Altman
84e761d850 windows-afscreds-deadlock-20050820
found a deadlock in the expiration check if a MessageBox dialog is
being displayed
2005-08-21 00:22:59 +00:00
Asanka Herath
df72c49fba windows-dfs-support-disable-20050820
remove the trailing 1
2005-08-20 23:58:21 +00:00
Jeffrey Altman
1a21722759 windows-better-vol-missing-messages-20050819
Use a different message for each vol error code instead of one for all
2005-08-20 02:27:48 +00:00
Stefaan De Roeck
3e6b71d7aa dirpath-canonical-should-be-local-20050819
FIXES 20954

ConstructLocalPath only checks
the first argument (cpath) for needed translation from canonical to
local, but not the relativeTo path, which is simply prepended when
cpath doesn't begin with a '/'.
2005-08-19 20:34:34 +00:00
Derrick Brashear
aec3c2b192 fix-busyat-enforcement-20050819
FIXES 20659

enforce busyat in the other half of the if
2005-08-19 20:20:44 +00:00
Chas Williams
49802c76b1 rmdir-dont-hold-kernel-lock-20050819
potentially fix one of the deadlocks people have been seeing
2005-08-19 16:32:24 +00:00
Tom Keiser
e14ef50cd5 des-nostats-20050818
FIXES 20921

just yank for now, we'll fix for 1.4.1
2005-08-18 05:55:00 +00:00
Chas Williams
caa4c12b71 linux-inactive-in-place-of-remunlink-20050818
FIXES 20912

call afs_InactiveVCache() instead of afs_remunlink()
for unlink, the "inactive" refcount is 1 now instead of 0.
2005-08-18 05:11:59 +00:00
Derrick Brashear
1bc0250ec0 irix-gop-lookupname-20050817
irix of course won't build when your function doesn't match the prototype
2005-08-17 20:25:29 +00:00
Jeffrey Altman
e465ee95b0 windows-dfs-support-disable-20050817
disable dfs processing until we get the Unicode CIFS support
2005-08-17 19:50:18 +00:00
Niklas Edmundsson
9d396c4916 cache-autotune-20050817
This patch tries to implement the afsd default tuning parameters
discussed in the thread starting at
https://www.openafs.org/pipermail/openafs-devel/2005-May/012158.html

I took the liberty of adding chunksize-tuning to the memcache too,
with the motivation that people using large memcaches usually wants
better bulk performance too.

It seems to work for me using both disk cache and memcache of various
sizes.
2005-08-17 17:16:50 +00:00
Jeffrey Altman
c9bba4c460 windows-freelance-admin-20050817
When testing for IsFreelance() use the right path for symlink rm and
fs rmmount.
2005-08-17 17:06:26 +00:00
Jeffrey Altman
128ec84945 windows-version-1-5-20050817
Development version to 1.5.xxxx
2005-08-17 11:38:55 +00:00
Jeffrey Altman
adbded1213 windows-version-1-4-20050817
Update version to 1.4.0000   Yay!!!!!
2005-08-17 11:22:50 +00:00
Derrick Brashear
cc2c8c3a8e kasadmin-prototyping-20050816
FIXES 20766

make kasadmin module prototyping correct again
2005-08-16 19:09:49 +00:00
Derrick Brashear
68f5f09832 sgistuff-missing-files-20050816
FIXES 20766

these were overzealously killed (by me)

fix
2005-08-16 18:58:27 +00:00
Jim Rees
23e9aff4c9 reindent-afsd-c-20050816
reindent
2005-08-16 17:59:12 +00:00
Asanka Herath
14408c7e88 windows-byte-range-locks-20050816
Byte range locks:

   The OpenAFS Windows client has to fake byte range locks given no
   server side support for such locks.  This is implemented as keyed
   byte range locks on the cache manager.

   Keyed byte range locks:

   Each cm_scache_t structure keeps track of a list of keyed locks.
   The key for a lock is essentially a token which identifies an owner
   of a set of locks (referred to as a client).  The set of keys used
   within a specific cm_scache_t structure form a namespace that has a
   scope of just that cm_scache_t structure.  The same key value can
   be used with another cm_scache_t structure and correspond to a
   completely different client.  However it is advantageous for the
   SMB or IFS layer to make sure that there is a 1-1 mapping between
   client and keys irrespective of the cm_scache_t.

   Assume a client C has key Key(C) (although, since the scope of the
   key is a cm_scache_t, the key can be Key(C,S), where S is the
   cm_scache_t.  But assume a 1-1 relation between keys and clients).
   A byte range (O,+L) denotes byte addresses (O) through (O+L-1)
   inclusive (a.k.a. [O,O+L-1]).  The function Key(x) is implemented
   through cm_generateKey() function for both SMB and IFS.

   The cache manager will set a lock on the AFS file server in order
   to assert the locks in S->fileLocks.  If only shared locks are in
   place for S, then the cache manager will obtain a LockRead lock,
   while if there are any exclusive locks, it will obtain a LockWrite
   lock.  If the exclusive locks are all released while the shared
   locks remain, then the cache manager will downgrade the lock from
   LockWrite to LockRead.

   Lock states:

   A lock exists iff it is in S->fileLocks for some cm_scache_t
   S. Existing locks are in one of the following states: ACTIVE,
   WAITLOCK, WAITUNLOCK, LOST, DELETED.

   The following sections describe each lock and the associated
   transitions.

   1. ACTIVE: A lock L is ACTIVE iff the cache manager has asserted
      the lock with the AFS file server.  This type of lock can be
      exercised by a client to read or write to the locked region (as
      the lock allows).

      1.1 ACTIVE->LOST: When the AFS file server fails to extend a
        server lock that was required to assert the lock.

      1.2 ACTIVE->DELETED: Lock is released.

   2. WAITLOCK: A lock is in a WAITLOCK state if the cache manager
      grants the lock but the lock is yet to be asserted with the AFS
      file server.  Once the file server grants the lock, the state
      will transition to an ACTIVE lock.

      2.1 WAITLOCK->ACTIVE: The server granted the lock.

      2.2 WAITLOCK->DELETED: Lock is abandoned, or timed out during
        waiting.

      2.3 WAITLOCK->LOST: One or more locks from this client were
        marked as LOST.  No further locks will be granted to this
        client until al lost locks are removed.

   3. WAITUNLOCK: A lock is in a WAITUNLOCK state if the cache manager
      receives a request for a lock that conflicts with an existing
      ACTIVE or WAITLOCK lock.  The lock will be placed in the queue
      and will be granted at such time the conflicting locks are
      removed, at which point the state will transition to either
      WAITLOCK or ACTIVE.

      3.1 WAITUNLOCK->ACTIVE: The conflicting lock was removed.  The
        current serverLock is sufficient to assert this lock, or a
        sufficient serverLock is obtained.

      3.2 WAITUNLOCK->WAITLOCK: The conflicting lock was removed,
        however the required serverLock is yet to be asserted with the
        server.

      3.3 WAITUNLOCK->DELETED: The lock is abandoned or timed out.

      3.5 WAITUNLOCK->LOST: One or more locks from this client were
        marked as LOST.  No further locks will be granted to this
        client until all lost locks are removed.

   4. LOST: A lock L is LOST if the server lock that was required to
      assert the lock could not be obtained or if it could not be
      extended, or if other locks by the same client were LOST.
      Effectively, once a lock is LOST, the contract between the cache
      manager and that specific client is no longer valid.

      The cache manager rechecks the server lock once every minute and
      extends it as appropriate.  If this is not done for 5 minutes,
      the AFS file server will release the lock.  Once released, the
      lock cannot be re-obtained without verifying that the contents
      of the file hasn't been modified since the time the lock was
      released.  Doing so may cause data corruption.

      4.1 LOST->DELETED: The lock is released.

      4.2 LOST->ACTIVE: The lock is reassertd.  This requires
        verifying that the file was not modified in between.

      4.3 LOST->WAITLOCK: All LOST ACTIVE locks from this client were
        reasserted.  The cache manager can reinstate this waiting
        lock.

      4.4 LOST->WAITUNLOCK: All LOST ACTIVE locks from this client
        were reasserted.  The cache manager can reinstate this waiting
        lock.

   5. DELETED: The lock is no longer relevant.  Eventually, it will
      get removed from the cm_scache_t. In the meantime, it will be
      treated as if it does not exist.

      5.1 DELETED->not exist: The lock is removed from the
        cm_scache_t.

   6* A lock L is ACCEPTED if it is ACTIVE or WAITLOCK.
      These locks have been accepted by the cache manager, but may or
      may not have been granted back to the client.

   7* A lock L is QUEUED if it is ACTIVE, WAITLOCK or WAITUNLOCK.

   8* A lock L is EFFECTIVE if it is ACTIVE or LOST.

   9* A lock L is WAITING if it is WAITLOCK or WAITUNLOCK.

   Lock operation:

   A client C can READ range (Offset,+Length) of cm_scache_t S iff:

   1. for all _a_ in (Offset,+Length), one of the following is true:

       1.1 There does NOT exist an ACTIVE lock L in S->fileLocks such
         that _a_ in (L->LOffset,+L->LLength) (IOW: byte _a_ of S is
         unowned)

         AND

         For each LOST lock M in S->fileLocks such that
         _a_ in (M->LOffset,+M->LLength), M->LockType is shared AND
         M->key != Key(C).

         (Note: If this is a different client from one whose shared
         lock was LOST, then the contract between this client and the
         cache manager is indistinguishable from that where no lock
         was lost.  If an exclusive lock was lost, then the range is
         considered unsafe for consumption.)

       1.3 There is an ACTIVE lock L in S->fileLocks such that: L->key
         == Key(C) && _a_ in (L->LOffset,+L->LLength) (IOW: byte _a_
         of S is owned by C under lock L)

       1.4 There is an ACTIVE lock L in S->fileLocks such that _a_ in
         (L->LOffset,L->+LLength) && L->LockType is shared (IOW: byte
         _a_ of S is shared) AND there is no LOST lock M such that _a_
         in (M->LOffset,+M->LLength) and M->key == Key(C)

   A client C can WRITE range (Offset,+Length) of cm_scache_t S iff:

   2. for all _a_ in (Offset,+Length), one of the following is true:

       2.1 Byte _a_ of S is unowned (as above) AND for each LOST lock
         L in S->fileLocks _a_ NOT in (L->LOffset,+L->LLength).

       2.2 Byte _a_ of S is owned by C under lock L (as above) AND
         L->LockType is exclusive.

   A client C can OBTAIN a lock L on cm_scache_t S iff:

   3. for all _a_ in (L->LOffset,+L->LLength), ALL of the following is
      true:

       3.1 L->LockType is exclusive IMPLIES there does NOT exist a QUEUED lock
         M in S->fileLocks such that _a_ in (M->LOffset,+M->LLength).

         (Note: If we count all QUEUED locks then we hit cases such as
         cascading waiting locks where the locks later on in the queue
         can be granted without compromising file integrity.  On the
         other hand if only ACCEPTED locks are considered, then locks
         that were received earlier may end up waiting for locks that
         were received later to be unlocked. The choice of QUEUED
         locks were made so that large locks don't consistently get
         trumped by smaller locks which were requested later.)

       3.2 L->LockType is shared IMPLIES for each QUEUED lock M in
         S->fileLocks, if _a_ in (M->LOffset,+M->LLength) then
         M->LockType is shared.

   4. For each LOST lock M in S->fileLocks, M->key != Key(C)

         (Note: If a client loses a lock, it loses all locks.
         Subsequently, it will not be allowed to obtain any more locks
         until all existing LOST locks that belong to the client are
         released.  Once all locks are released by a single client,
         there exists no further contract between the client and AFS
         about the contents of the file, hence the client can then
         proceed to obtain new locks and establish a new contract.)

   A client C can only unlock locks L in S->fileLocks which have
   L->key == Key(C).

   The representation and invariants are as follows:

   - Each cm_scache_t structure keeps:

       - A queue of byte-range locks (cm_scache_t::fileLocks) which
         are of type cm_file_lock_t.

       - A record of the highest server-side lock that has been
         obtained for this object (cm_scache_t::serverLock), which is
         one of (-1), LockRead, LockWrite.

       - A count of ACCEPTED exclusive and shared locks that are in the
         queue (cm_scache_t::sharedLocks and
         cm_scache_t::exclusiveLocks)

   - Each cm_file_lock_t structure keeps:

       - The type of lock (cm_file_lock_t::LockType)

       - The key associated with the lock (cm_file_lock_t::key)

       - The offset and length of the lock (cm_file_lock_t::LOffset
         and cm_file_lock_t::LLength)

       - The state of the lock.

       - Time of issuance or last successful extension

   Semantic invariants:

       I1. The number of ACCEPTED locks in S->fileLocks are
           (S->sharedLocks + S->exclusiveLocks)

   External invariants:

       I3. S->serverLock is the lock that we have asserted with the
           AFS file server for this cm_scache_t.

       I4. S->serverLock == LockRead iff there is at least one ACTIVE
           shared lock, but no ACTIVE exclusive locks.

       I5. S->serverLock == LockWrite iff there is at least one ACTIVE
           exclusive lock.

       I6. If a WAITUNLOCK lock L exists in S->fileLocks, then all
           locks that L is waiting on are ahead of L in S->fileLocks.

       I7. If L is a LOST lock, then for each lock M in S->fileLocks,
           M->key == L->key IMPLIES M is LOST or DELETED.

   --asanka

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================

Byte range locks added to change list

====================

should improve error codes, and allow lock promotions and demotions
by releasing locks.

====================

More improvements to the byte range locking.  Handle errors caused
by a failure to have locking privs; report sharing violations when
opening files; lie about locks on read-only volumes; implement
shared read/write file creation in the smb layer.

====================

remove assertion

====================

must reference count local references to objects if the lock
is being released

====================

Do not use a variable until you assign it a value

====================

remove an unwanted assertion and move the resetting of scp->serverLock
to -1 into cm_LockMarkSCacheLost() so that others do not forget to set
it.  cm_LockMarkSCacheLost() is always called when the scp->mx is held
so it is ok to do so.
2005-08-16 17:17:13 +00:00
Jim Rees
a09b27d0a0 openbsd-pthread-20050815
Build pthread servers for OpenBSD.
There is some evidence they might even work.
2005-08-15 23:30:47 +00:00
Jim Rees
cdb51cf261 automate-freebsd-systype-20050815
Determine freebsd systype automatically too.
Thanks to "Todd T. Fries" <todd@fries.net>
2005-08-15 21:36:53 +00:00
Jeffrey Altman
fab147e843 afssyscalls-declarations-20050815
declare lsetpag() and lpioctl() since they are exported
2005-08-15 18:35:05 +00:00
Jeffrey Altman
eb00f91374 windows-smb-error-codes-20050815
Do not return error codes from the SMB/CIFS server that can be interpretted
by the SMB/CIFS client as meaning that the AFS Client Service is not
available.
2005-08-15 18:27:52 +00:00
Klas Lindfors
1b0b0945ca vos-format-cleanup-20050815
FIXES 20783

make sure partition name actually gets printed
2005-08-15 16:54:50 +00:00
Niklas Edmundsson
e4ca2e597c aix-afsdb-20050815
FIXES 20801

make afsdb work on aix.
use storage as thread-local when it is
2005-08-15 16:51:29 +00:00