3645 Commits

Author SHA1 Message Date
Jeffrey Hutzelman
079f1aeb3b STABLE14-release-avoid-negative-time-20060124
avoid any possibility of time going negative when releasing incrementally


(cherry picked from commit 179b4c31d93b511a5762c818a47cddc0e364c9d3)
2006-01-25 03:49:53 +00:00
Derrick Brashear
d4f7d158b6 STABLE14-implement-vpeek-for-listvol-20060124
roll back for listonevolume (only)


(cherry picked from commit feccc2a98770fd48eee58d380671539e4bc1fdfb)
2006-01-25 03:25:49 +00:00
Chas Williams
b8fd4073eb STABLE14-usebuffer-macros-20060124
FIXES 25819

get rid of usebuffers macro usage warning


(cherry picked from commit 1c53d7f34db626f6f44821844912e7f7012e5bfb)
2006-01-24 17:41:20 +00:00
Jeffrey Altman
96a1aa8399 STABLE14-windows-notes-20060124
more updates for 1.4.1-rc5
2006-01-24 17:19:09 +00:00
Jeffrey Altman
becae29977 STABLE14-windows-continued-refcount-cleanup-20060124
* re-enable LogoffTokenTransferTimeout and LogoffTokenTransfer.
  Tokens are now destroyed at logoff based upon the values specified
  here.  Default is ON and 120 seconds.  Setting this to OFF will
  result in tokens never being destroyed.  This will leak memory.

* protect global queues with mutexes and avoid a variety of race
  conditions.


(cherry picked from commit 97304b84f76154d067717e3b34a3525abebc0cf7)
2006-01-24 17:16:05 +00:00
Chaskiel M Grundman
21bfb25d40 STABLE14-viced-grow-h_maxSlots-20060123
and jhutz@cs.cmu.edu

The size of h_maxSlots as computed based upon the value of
MAX_FILESERVER_THREAD is too small.   It is possible for h_lwpIndex
(in the pthread case) to have produce the same Slot value for multiple
threads.  In that case it is possible for the following to occur:

       X: h_Hold_r(host)
       X: H_UNLOCK
       ...
       E: H_LOCK
       E: Check h_Held_r(host); it is true, so don't hold
       E: H_UNLOCK
       X: H_LOCK
       X: h_Release_r(host)
       X: h_TossStuff_r(host)  [called by h_Release_r]
       X: H_UNLOCK
       E: CheckHost(host)

The end result would be a crash due to a reference to a null field
in the host processed by CheckHost.

This patch is a bit of a hack in that it solves the problem by increasing
the number of slots for threads and does not determine the correct number
of threads the process should be allowed to produce.


(cherry picked from commit 4a5dda84178842e3eaa61d03fecc96149333dd13)
2006-01-23 21:30:18 +00:00
Jeffrey Altman
713e30b7d2 STABLE14-check-host-optimize-20060123
There should never be a case where h_Enumerate calls CheckHost with a
host whose callback_rxcon that is NULL.  However, due to a bug it ended up
being the case that it happened.  An examination of the CheckHost code
showed that the check for the HOSTDELETED flag should take place before
a reference to callback_rxcon is obtained.  If HOSTDELETED were set, the
code would simply release the reference immediately.  However, the process
of obtaining and releasing the reference required dropping and obtaining
locks that would be a performance hit.


(cherry picked from commit ff40c87da3ce4c6a7a58c08eaa223e8760dc8f73)
2006-01-23 21:28:43 +00:00
Derrick Brashear
6867198aa1 STABLE14-fs-getfid-20060123
add a fs subcommand to get a fid


(cherry picked from commit db98b697fe4e1b38ac5e73d60dd101b2506e12a4)
2006-01-23 21:07:42 +00:00
Jeffrey Altman
33589811b6 STABLE14-windows-smb-logoff-or-abandonment-detection-20060121
This patch:

(1) removes the rest of the dead logoff code that was originally
    stripped of any meaning by DELTA
    winnt-win2000-win98-afs-client-updates-20010623.

(2) gives new meaning to smb_TokenTransfer and smb_TokenTransferTimeout.
    these variables now control how long a smb_username_t and its
    associated cm_user_t and its cm_cellinfo_t (including tokens)
    will be preserved after a logoff.

(3) adds logic to detect logoff conditions

(4) adds cm_CheckVCs().  This function probes the SMB client with a ECHO
    response to determine if the associated SMB virtual circuit is still
    valid.   This is executed once every five minutes by smb_Daemon()
    and whenever the machine's IP addresses change.  This allows
    abandoned VCs to be detected and the associated user credentials,
    file handles, and locks to be cleaned up.  This will also prevent
    the exhaustion of the limited number of SMB sessions.

====================
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.
====================

and remember to mark the session dead so it can be re-used

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

fix an error caused by patch conflict during pullup


(cherry picked from commit 7fde756a2c6f17e6a3b0db7659c6edcc2eaa0bd7)
2006-01-21 23:40:36 +00:00
Jeffrey Altman
448ed23b83 STABLE14-windows-notes-20060121
more notes for 1.4.1-rc5
2006-01-21 21:40:36 +00:00
Jeffrey Altman
dcd8fa10c5 STABLE14-h_gethost_r-hold-fix-20060121
fix hold errors


(cherry picked from commit 96100b6dea66ea5053956e545ada6228aabe2e4a)
2006-01-21 21:24:16 +00:00
Derrick Brashear
09ecb0253e STABLE14-openafs-stable-1_4_1-rc5-20060120
make 1.4.1-rc5
2006-01-20 06:32:22 +00:00
Chaskiel M Grundman
4618020dbc STABLE14-cached-lookup-mtpt-20060120
FIXES 25647

don't do lookups on the wrong vnode, if it's a mvstat=1 vnode, it's not useful


(cherry picked from commit a784c131709a8252fa1e8cb4ce49cb0c655dd7aa)
2006-01-20 05:21:02 +00:00
Tom Keiser
ef9d3c9292 STABLE14-aix-vm-rdwr-fix-20060120
FIXES 25650

avoid a loop in vm_rdwr on aix. also fix ifnet_flags macro


(cherry picked from commit f3a7aabbc523cc3e90b4cc11788523cc72e72822)
2006-01-20 05:06:57 +00:00
Derrick Brashear
24c5a56af9 STABLE14-cmdebug-no-zero-pad-output-20060119
length, dv and refcnt no longer 0 padded
2006-01-20 00:03:10 +00:00
Jeffrey Altman
a1e514c0f7 STABLE14-windows-integrated-logon-hack-fix-for-proper-refcounts-20060119
The Integrated Logon hack of setting a token for a smb name different
than the one associated with the current smb session fails when smb
virtual circuits, sessions and username objects are properly reference
counted.  When refcounts are not leaked the constructed smb_username_t
is destroyed immediately after the token is set since there are not
references to it from a current session.

The fix is to mark the smb_username_t object with a flag indicating that
it was created by the Network Provider.  This flag prevents the destruction
when the refcount is zero so that it will be available at the time the
smb session is created (just a moment or two later.)  During the binding
of the smb_username_t to the smb_vc_t the flag is cleared allowing the
tokens to be destroyed when the smb session is closed.


(cherry picked from commit 70b76b3a1cff1dabe9b10b8222cd84fc207b6704)
2006-01-19 23:08:44 +00:00
Derrick Brashear
45b7a7dc2b STABLE14-linux-vrefcount-macro-fix-20060118
thanks to jhutz@cmu.edu for making me consider this


(cherry picked from commit 0806f60ab8d3cdd092449126eb0102a0fcd5edd0)
2006-01-18 06:27:18 +00:00
Derrick Brashear
0181d2c934 STABLE14-linux-kernel-bug-macro-inline-20060117
force oops inline instead of calling bug, so we can printk


(cherry picked from commit 93efc4ae47cc942164c2dfee175df0760fbfca03)
2006-01-18 02:22:19 +00:00
Jeffrey Altman
a51692ee6d STABLE14-windows-truncate-after-lock-check-20060116
In smb_ReceiveNTCreateX the lock check, cm_CheckNTOpen(), must take place
before we allow the file to be truncated.


(cherry picked from commit d921ee381aa46e4385524f0c31ca5ad606aa920a)
2006-01-17 21:45:12 +00:00
Chaskiel M Grundman
1e8b8ffbfd STABLE14-darwin-use-kthreads-20060117
FIXES 25542

use kernel threads for afsd processes instead of forked pids


(cherry picked from commit 47d2ab228517deb7c3097ca4c5f46afd84e26098)
2006-01-17 17:09:47 +00:00
Chaskiel M Grundman
6392ea2d49 STABLE14-macos-locking-behavior-20060117
FIXES 25543

F_UNLCK is send as a command, remap to F_SETLK like everyone else


(cherry picked from commit b81d0cf8af1c5788de399b630545945004f65345)
2006-01-17 17:06:42 +00:00
Chaskiel M Grundman
39b8b95820 STABLE14-tiger-sysctl-20060117
FIXES 25327

implementation of sysctl for tiger


(cherry picked from commit ebf35c3f884b40616700b4b0b2462731cda290ae)
2006-01-17 16:08:20 +00:00
Peter Somogyi
eb72bfe0b2 STABLE14-newvcache-can-fail-now-20060116
FIXES 22260

allow newvcache to fail without ooping

sort of nasty, if you want more vcaches, say so.


(cherry picked from commit c19324c8574c66f18cd18f2df4beb486460205aa)
2006-01-17 05:00:21 +00:00
Jeffrey Altman
674823d88c STABLE14-windows-notes-20060116
updates for 1.4.1-rc5
2006-01-17 04:20:11 +00:00
Jeffrey Altman
f5f182e4ab STABLE14-windows-version-20060116
1.4.1-rc5
2006-01-17 04:00:46 +00:00
Jeffrey Altman
78ad3f7154 STABLE14-windows-afsmap-20060116
strcpy -> strncpy


(cherry picked from commit 4bb334ef6e40250630aec96b319de8db72619134)
2006-01-17 03:58:05 +00:00
Chaskiel M Grundman
07cef953c3 STABLE14-remove-dead-prototype-20060116
remove dead prototype for osi_iput()


(cherry picked from commit 8d158c1b615ec2625756b8f124a9eaff94a67799)
2006-01-17 03:33:41 +00:00
Chaskiel M Grundman
85edef5b61 STABLE14-h-enumerate-r-fix-for-real-20060116
FIXES 24196

make this not simply wrong


(cherry picked from commit 93e1cee7046984a81f0339484713649aceb25f3a)
2006-01-16 21:16:33 +00:00
Jeffrey Altman
26c7361f2b STABLE14-windows-rx-ehostunreach-20060116
another location where EHOSTUNREACH can be returned
such that we can timeout the request immediately


(cherry picked from commit f7b9cd54e50e553486c2ad850df1a8ecaee0d954)
2006-01-16 16:23:33 +00:00
Jeffrey Altman
0eeab1d675 STABLE14-windows-vc-locks-and-more-20060115
This patch fixes several issues:

 * the smb virtual circuits can be active and/or dead.   this patch
   improves the handling of vc's making the transition from active
   to dead

 * correct the refcounts on the smb_user_t and smb_vc_t objects

 * replace the deprecated GetCurrentTime() with GetTickCounts() which
   is the new name.  This function needs to be replaced with something
   else because its return value wraps after 49.7 days

 * hold the correct locks when adjusting the scp->fileLocksH queue


(cherry picked from commit 880a6b66a5477e092d5bb74febbf24639d786c64)
2006-01-16 02:06:58 +00:00
Jeffrey Altman
cdd514a350 STABLE14-windows-cmfinduserbyname-20060112
FIXES 25347

Fix invalid access after freeing newly allocated data structure


(cherry picked from commit af202cac551ad541a0a1ca4525b03c2ec05f6507)
2006-01-12 05:55:58 +00:00
Chas Williams
a74a50e10a STABLE14-linux-clean-up-stupidity-20060111
get some of an inadvertant misapplied patch, and get rid of a redundant check


(cherry picked from commit 3e8b96cfc4596c3e9c6c3802c1bdca1784f86271)
2006-01-11 21:38:30 +00:00
Jeffrey Altman
1eece0021e STABLE14-windows-stable-20060110
updates for 1.4.1-rc4
openafs-stable-1_4_1-rc4
2006-01-11 04:49:19 +00:00
Jeffrey Altman
d8bc561755 STABLE14-afs-sysnames-20060110
move allocations for SYS_NAME_ID_amd64_w2k and  SYS_NAME_ID_i64_w2k to avoid
conflicts


(cherry picked from commit fb6d1dacfc256386f32f59fe4335b546a7d368c3)
2006-01-11 04:47:10 +00:00
Derrick Brashear
391c1eaaf0 STABLE14-openafs-stable-1_4_1-rc4-20060110
make 1.4.1-rc4
2006-01-11 04:36:10 +00:00
Chaskiel M Grundman
a699f8d3c1 STABLE14-macos-avoid-ref-leak-20060110
FIXES 25302

fix for the earlier fix


(cherry picked from commit ab7cfe62ec128b1205193ede1c769ddb369cc563)
2006-01-11 04:26:44 +00:00
Chaskiel M Grundman
8dcdef73e4 STABLE14-macos-reclaim-20060110
FIXES 25165

avoid a vnode cleaning pnaic during recycle


(cherry picked from commit 29924c8302431a25d4889ef4500fc5f0eeb97b2e)
2006-01-11 04:24:39 +00:00
Derrick Brashear
fb0850a382 STABLE14-remove-vnop-mem-leak-20060110
avoid leaking mvid when we use .__afsXXXX renaming in remove


(cherry picked from commit 8a1d347b2e129a6085fb605f706917d88aa054b7)
2006-01-10 15:11:08 +00:00
Derrick Brashear
43de10c9cb STABLE14-remove-vnop-lock-order-20060110
FIXES 25118

finegrained dcache lock order not obeyed


(cherry picked from commit 39b23a0dc16f2e26abf3b7df53bfadb98377748d)
2006-01-10 15:04:40 +00:00
Jeffrey Altman
29a68de93b STABLE14-windows-smb-username-refcount-20060110
the smb_username_t objects are reference counted but they were never
released on their own accord.  Instead the smb_uid_t objects when
released were also cleaning up the smb_username_t.  Since the smb_username_t
is reused, now that smb_user_t objects are being cleaned up, this was
a problem.


(cherry picked from commit a9df3ca715f483a31c14b72bae3f548a4c9291d4)
2006-01-10 13:28:01 +00:00
Jeffrey Altman
d06884e28b STABLE14-windows-version-20060108
1.4.1-rc4 == 1.4.0094
2006-01-09 05:36:52 +00:00
Jeffrey Altman
27f8315f8e STABLE14-windows-relnotes-20060108
updates 1.4.1-rc4
2006-01-09 05:29:23 +00:00
Jeffrey Altman
249876e74e STABLE14-windows-notes-20060108
1.4.1-rc4
2006-01-09 05:26:35 +00:00
Asanka Herath
8f65c99214 STABLE14-windows-byte-range-locking-20060108
When SMB sessions are prematurely terminated as part of the tear down
of the virtual circuit we must clean up any remaining file handles,
tree connections, and user sessions.


(cherry picked from commit 78c40badbd8c65d82f6c384fdff8056c03100b67)
2006-01-09 04:49:17 +00:00
Jeffrey Altman
5b7d5d3d08 STABLE14-windows-byte-range-locks-fix-20060107
fix the SERVERLOCKS_ENABLED macro


(cherry picked from commit 36596b93e0b45cb1074b554e57c5f71171350f62)
2006-01-08 04:18:53 +00:00
Jeffrey Altman
395170a5a0 STABLE14-windows-byte-range-locking-20060107
* Update architectural documentation

* Allow locks to be obtained as soon as it is possible instead of
  enforcing a requirement that locks be granted in order.

* Fix other bugs

* Disable byte range lock processing


(cherry picked from commit f057d9515c72609e4ca9e51ff96f658689679497)
2006-01-08 00:39:56 +00:00
Derrick Brashear
76c8adf14b STABLE14-macos-104-change-access-enforcement-20060105
don't improperly enforce read attribute restriction on child instead of parent
when it's a directory

avoid screwing ourselves on mode 0 files, also


(cherry picked from commit e07a781b20272a629f73cf8b2377ee8e3bd6cd99)
2006-01-06 03:03:26 +00:00
Russ Allbery
2ba25fd3ee STABLE14-man-page-rxgen-cmdebug-20051227
Add man pages for rxgen and cmdebug.  The cmdebug man page was written from
scratch based on the source code.  The rxgen man page is a conversion of an
old TeX document to POD.


(cherry picked from commit 8863143052cb1a60de4fe90c1617df0bb3eca931)
2006-01-05 18:55:43 +00:00
Russ Allbery
e0cbf733ac STABLE14-man-page-misc-improvements-20051221
Add new man pages for livesys and voldump.  Fix the man page for sys to say
what it actually does, rather than implying that it works like livesys, and
to recommend livesys instead.  Fix a path error in the NetInfo
documentation.  Update the README for the current status, including
listing all installed commands that don't have man pages.  (There may still
be some subcommands that don't have man pages but aren't listed.)


(cherry picked from commit 90bc5c0092652b047c4eabffb5577e05859c80f4)
2006-01-05 18:55:18 +00:00
Russ Allbery
a50a4c4785 STABLE14-man-page-installation-20051221
On installation, substitute the configured paths into the man pages,
replacing the Transarc paths.  Also fix a problem with the way that
pinstall was being used to install man pages.  (Silly me, I was assuming
it had the same behavior as install.)

This is just a quick first pass.  Longer term, it's probably better to
replace all paths in the man pages with unambiguous tokens and then
replace those tokens instead of assuming that the man pages use Transarc
paths and replacing those paths specifically.  The current method has a
few minor problems, such as not being able to distinguish between the
various paths that make up /usr/afs/bin.  Still, the results of this method
are good enough to start with.


(cherry picked from commit 5fde2994348d1c7f6239f98aac355011125b06ad)
2006-01-05 18:54:50 +00:00