Commit Graph

4173 Commits

Author SHA1 Message Date
Jeffrey Altman
37af6177ae DEVEL15-windows-notes-20070610
changes since 1.5.20.  not ready for 1.5.21 yet
2007-06-10 18:05:14 +00:00
Jeffrey Altman
0bc9a3b959 DEVEL15-windows-volume-status-tracking-20070610
* changed the enum values for cm_serverRef_t state info to use a
  private name space to avoid collisions (srv_)

* added a srv_deleted state for cm_serverRef_t objects.  This
  state is set when cm_FreeServerList() is called with the
  CM_FREESERVERLIST_DELETE flag set.  cm_FreeServerList() may
  not always delete the cm_serverRef_t from the list if it is
  still in use by another thread.  the srv_deleted state means
  the object's contents are no longer valid and it must be
  skipped.  It will be deleted the next time the object is
  freed and the refcount hits zero.

* the srv_deleted state is also used when a file server reports
  either VNOVOL or VMOVED instead of marking the cm_serverRef_t
  as offline.  This is done to prevent additional usage of the
  stale vldb data while waiting for the update volume request
  to complete.

* added a state field to the cm_volume_t object (enum volstate
  vl_ name space) that maintains the state of the volume based
  upon the states of all of the cm_serverRef_t and cm_server_t
  objects.

* modified cm_UpdateVolume() to set the state of the cm_volume_t
  RW, RO, and BK to either vl_alldown or vl_online.  There can't
  be any other states because cm_UpdateVolume() destroys any
  previous knowledge we might have had regarding busy or offline
  volume status

* modified cm_UpdateVolume() to update the volume name in the
  cm_volume_t to the volume base name if the previous value was
  a volume ID.

* modified cm_FollowMountPoint() to check to see if the volume
  name is a volume ID and if so call cm_GetVolumeByID instead
  of cm_GetVolumeByName.  This ensures that volume IDs are always
  looked up as numeric values.  There is no longer a need to
  maintain a separate cm_volume_t containing the string representation
  of the ID value.

* Added a flags parameter to cm_GetVolumeByName() and cm_GetVolumeByID().
  The first flag is a "CREATE" flag which is set by all existing
  calls.  The flag is not set by calls to cm_GetVolumeByID() from
  the server probe code when volume status is being updated.  We
  do not want the server probe operation to result in additional
  turnover in the cached volume data.  The second flag is NO_LRU_UPDATE
  which is set when the server probe code updates the volume status.
  This flag will be used to prevent the server probe operation from
  changing the order of the least recently used queue.

* Modified cm_GetVolumeByName to ensure that only one cm_volume_t is
  allocated for a given set of normal, readonly, and backup volumes
  regardless of whether or not the volume is accessed via name or
  ID number.  The cm_volume_t namep field is always the base name
  of the volume.

* Added a new volume state, vl_unknown.  This state is used as
  the initial state for all cm_volume_t when the cache manager starts,
  for each cm_volume_t at creation, and for each cm_volume_t when
  recycling.  The cache manager does not know the state of all
  volumes in the world, only those that are in the cache and for
  which it has queried the VLDB and hosting file servers.

* modified cm_GetVolumeByName() to initialize the state of a
  volume to vl_unknown.  The actual state will be set when a
  cm_VolumeUpdate() call completes successfully.

* changed name of scache hash table variables to avoid ambiguity
  when adding hash tables for volumes

* fix a buffer overrun in sys\pioctl_nt.c  pioctl().
  (thanks Asanka)

* modified cm_UpdateVolume() to handle the case in which there is
  no RW volume but there is are RO volumes for a given base name.
  This is done by querying for the ".readonly" volume name if the
  base name does not exist in the VLDB.  We never query for the
  .backup name because under the current usage model a .backup
  volume may only exist on the server that the read-write volume
  is located.  If there is no RW volume, there can be no .backup.

* Added four hash tables for cm_volume_t objects to improve the
  search time of cm_GetVolumeByID(), cm_GetVolumeByName() and
  cm_ForceUpdateVolume(). One each for Name, RWID, ROID, and
  BKID.  Three ID hash tables are necessary as long as it is
  desireable to maintain a single cm_volume_t containing all
  of the related RW, RO, and BK volume data.  Having the RW and
  RO volume data in the same object is necessary for the
  implementation of cm_GetROVolumeID() which returns either the
  RO or RW ID depending upon the existence of RO volume instances.

* Added a volume LRU queue so that volume reuse becomes fairer.
  This does not replace the all Volumes list which is used when
  it is desireable to walk a list of all the volumes whose order
  is not going to change out from underneath you which makes it
  safe to drop the cm_volumeLock.

* handles volume hash table updates where volume name to
  volume ID number changes.  The volume name remains
  constant in the cm_volume_t.  if a vos rename is performed,
  the name of the volume will change and the volume IDs will be
  updated.  Subsequent access to the old volume ID will create a
  new cm_volume_t with the new name.

* Added a daemon thread operation to query the state of volumes
  listed as busy or offline.  cm_CheckBusyVolumes() calls
  RXAFS_GetVolumeStatus() for each volume ID that is marked vl_busy
  or vl_offline.   If the volume is now online, the status on the
  volume is updated.  The default period is 600 seconds.  This can
  be configured with the BusyVolumeCheckInterval registry value.

* Added prototype for smb_IoctlPrepareRead() which was missing a
  return type in the function definition.

* Added volume id lists to the cm_server_t.  These lists are
  allocated in blocks of ~32 IDs.  When a cm_PingServer()
  detects a change in server state, the state of the cm_volume_t
  is updated.

* Added volID to the cm_serverRef_t object.  volID is used
  to identify the volume for which the object is a referral.
  cm_FreeServerList() uses the volID to remove the volume
  from the cm_server_t.

* In cm_Analyze, when VNOVOL or VMOVED are received,
  call cm_ForceVolumeUpdate() to force a refresh of the volume
  location data.

* Added cm_VolumeStatusNotification() which is used at the moment
  to log volume status changes to the trace log.  It will also
  be used as the access point to the File System Filter driver
  notification engine.

* Added an all cm_scache_t list to cm_data.  This replaces the use
  of the stat cache LRU queue when we need to enumerate all
  entries.  The LRU list order is not static and when using it to
  enumerate all entries it can result in items being missed or
  items being processed more than once.

* Modified cm_Analyze(). Instead of reseting the busy or offline
  state of a volume and forcing a retry of the operation
  cm_Analyze will defer to the background daemon thread that will
  update the state once every 600 seconds.

* Added the automatic generation of a Freelance ".root" read-write
  mountpoint that refers to the root.afs volume of the workstation
  cellname at the time the mountpoint is created.


(cherry picked from commit 66adaf3268)
2007-06-10 18:00:07 +00:00
Jeffrey Altman
3a3b98a865 DEVEL15-rxkad-badticket-20070610
In rxkad_CheckResponse, when checking the return value from tkt_CheckTimes,
the order is == 0, == -1, < -1, <= 0.  The <= 0 case is extraneous so
remove it. Both < -1 and <= 0 returned RXKADBADTICKET.


(cherry picked from commit f4bd260422)
2007-06-10 15:25:29 +00:00
Asanka Herath
1a04da568f DEVEL15-windows-pioctl-buffer-overrun-20070609
this patch protects against a buffer overrun in the client if the
server were to send more data than the receiving buffer can hold.


(cherry picked from commit 8a814a5596)
2007-06-10 06:55:42 +00:00
Derrick Brashear
6198de5c35 DEVEL15-linux-kmem-destroy-fix-20070609
don't destroy if create failed


(cherry picked from commit 18484f0fc6)
2007-06-10 06:43:11 +00:00
Derrick Brashear
b3b4978510 DEVEL15-vsprocs-avoid-bogus-error-20070606
don't EPRINT if it's not an error


(cherry picked from commit fcfdcc3cc1)
2007-06-06 18:56:19 +00:00
Derrick Brashear
2bd3175726 DEVEL15-lwp-linux-ucontext-20070606
to revert other changes which got pushed down here; make things like the head
2007-06-06 18:33:28 +00:00
Derrick Brashear
3461b32ff3 DEVEL15-aix-declare-setlim-20070606
maybe fix lwp.c compiling with modern aix


(cherry picked from commit cb18c5f802)
2007-06-06 18:22:05 +00:00
Derrick Brashear
c2ea6f568e DEVEL15-solaris-sparc-default-to-v8-insns-for-kmod-20070605
FIXES 23935

don't use the default instruction set since the compiler has changed over time


(cherry picked from commit a621049680)
2007-06-05 18:11:28 +00:00
Jeffrey Hutzelman
a8b6ff273d DEVEL15-fix-kbuild-linux-ppc64-20070604
The Linux 2.6 kbuild environment requires assembly files end in .S, not .s.


(cherry picked from commit e8493e06f9)
2007-06-05 04:54:29 +00:00
Jeffrey Altman
b00f7c3ffe DEVEL15-windows-release-notes-20070604
in the 1.5.9 release time frame sections 4 and 5 on debugging and bug
reporting got lost.  restore them.
2007-06-04 13:16:56 +00:00
Derrick Brashear
a50fd59679 DEVEL15-clone-dont-hold-vol-lock-20070516
same deal as purge. a transaction on the volume outstanding holds it. we don't need to preclude all access

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

same deal as purge. a transaction on the volume outstanding holds it. we don't n
eed to preclude all access

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

same deal as purge. a transaction on the volume outstanding holds it. we don't n
eed to preclude all access


(cherry picked from commit aa5d46b71b)
2007-05-18 06:53:56 +00:00
Derrick Brashear
ac143ab6a4 DEVEL15-openafs-1-5-20-20070518
make 1.5.20
2007-05-18 06:22:33 +00:00
Derrick Brashear
4e0f39a9fb DEVEL15-linux-posix-lock-file-has-wait-arg-now-20070517
FIXES 58590

hopefully this works, i can't actually try it now


(cherry picked from commit ad98eacdad)
2007-05-17 19:36:01 +00:00
Jeffrey Altman
4442abc3c1 DEVEL15-windows-notes-20070517
notes for 1.5.20
2007-05-17 17:19:03 +00:00
Jeffrey Altman
deb847316a DEVEL15-windows-version-20070517
1.5.2000.0 == 1.5.20
2007-05-17 17:12:52 +00:00
Arkadi Shishlov
31cee4f0ae DEVEL15-linux-sparc-arch-detection-20070517
FIXES 60288

use arch to figure out if we are sparc64


(cherry picked from commit 9352435f1c)
2007-05-17 07:51:27 +00:00
Derrick Brashear
4bbb0d3295 DEVEL15-linux-posix-lock-file-has-wait-arg-now-20070517
FIXES 58590

hopefully this works, i can't actually try it now


(cherry picked from commit 59eb3de5ea)
2007-05-17 07:36:42 +00:00
Rainer Toebbicke
e168323b55 DEVEL15-bucoord-dump-levels-20070517
FIXES 57246

dont use memory past what you've allocated


(cherry picked from commit 87a93241da)
2007-05-17 07:14:06 +00:00
Jeffrey Altman
10e4142c82 DEVEL15-windows-release-notes-20070516
updates to release notes for 1.5.20.
2007-05-16 23:37:08 +00:00
Lukas Hluze
fd05739e19 DEVEL15-libafs-common-placate-irix-make-20070516
FIXES 59153

irix make wants $@ to be $(@) inside other braces


(cherry picked from commit 5987e2923a)
2007-05-16 21:58:43 +00:00
Chaskiel M Grundman
abce1e5e1a DEVEL15-rx-ack-idle-comment-20070516
FIXES 60046

fix comment


(cherry picked from commit d143385ec6)
2007-05-16 21:49:56 +00:00
Chaskiel M Grundman
d88f6a70a7 DEVEL15-rx-tq-busy-20070516
FIXES 60046

abstract tq busy wait code


(cherry picked from commit 7a72e2445f)
2007-05-16 21:45:25 +00:00
Chaskiel M Grundman
e170715ecd DEVEL15-rx-send-req-ack-20070516
FIXES 60046

change reply code where appropriate


(cherry picked from commit a900fe3089)
2007-05-16 21:37:47 +00:00
Arkadi Shishlov
ba18a8244b DEVEL15-glibc24-jmp-buf-mangling-20070516
FIXES 60440

glibc 2.4 does jmp buf manging for "security"

whatever. deal.


(cherry picked from commit f550e3b3ff)
2007-05-16 21:22:30 +00:00
Marcus Watts
72eaa8d6fe DEVEL15-supergroup-cleanup-20070516
FIXES 60809

Problems fixed with this patch:
/1/ supergroup bug: when updating an entry in prdb, the logic in
pt_mywrite is supposed to unset flagged & found bitmap entries.
This failed on little-endian architecture machines.

/2/ warnings; a few fixes to eliminate some compiler noise.


(cherry picked from commit d608809c24)
2007-05-16 20:55:49 +00:00
Marcus Watts
c74b6b6a89 DEVEL15-ptserver-fix-bitmap-20070516
FIXES 60680

make sure bitmap code is correct else supergroups returns invalid answer

fix verify code to be correct on little endian hosts


(cherry picked from commit 62dc197541)
2007-05-16 20:44:12 +00:00
Jeffrey Altman
c17699da45 DEVEL15-windows-afsd-list-acl-only-dir-20070516
FIXES 60258

Do not return access denied when applying directory patches if the
user does not have read permission.  This is the case we want to
fake the directory entries for.  Also, make sure we set the directory
attribute on non-files so that the path can be accessed via the
Explorer Shell.


(cherry picked from commit 03e3b77553)
2007-05-16 16:55:16 +00:00
Jeffrey Altman
d0bd4c319f DEVEL15-windows-afsd-uninitialized-20070516
Do not use uninitialized variables in log messages

Do not dereference NULL pointers


(cherry picked from commit 82d2cc5b7f)
2007-05-16 16:51:05 +00:00
Jeffrey Altman
5a2e9b78a1 DEVEL15-windows-afsd-list-acl-only-dir-20070515
FIXES 60258

When the ACL on a directory is list only, attempts to read the status
of items in the directory will fail.  Therefore, it is pointless to try.
Instead, when we know the user ACL does not have read permission, we
should immediately lie about the status info.  That way we don't pound
the file server with requests that will produce an abort which in turn
will trigger force the file server to delay responses to the client.

This change has the added benefit that cached status info is no longer
leaked to callers that do not have appropriate permissions.

With this change the Explorer Shell is much more responsive.


(cherry picked from commit e02fa3e73b)
2007-05-16 04:44:44 +00:00
Jeffrey Altman
e1bfe6c97e DEVEL15-windows-aklog-20070515
FIXES 60938

do not copy an uninitialized field


(cherry picked from commit 60bbb56b54)
2007-05-16 04:34:58 +00:00
Jeffrey Altman
80af8e2ab7 DEVEL15-windows-fs-getcacheparms-20070515
fix output of cache parms now that they are 64-bit


(cherry picked from commit 11cec9e764)
2007-05-15 21:20:55 +00:00
Rainer Toebbicke
98c89db723 DEVEL15-namei-dont-randomly-full-salvage-20070514
FIXES 61300

trivial fix to clear forcep
(inode already does this)


(cherry picked from commit c78b4c61f7)
2007-05-14 22:43:43 +00:00
Chaskiel M Grundman
a5d011883c DEVEL15-getdcache-no-slowpass-enforcement-on-dynroot-20070514
don't enforce slowpass restriction on dynroot vcaches (and don't do unneeded work)

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

oops, another change slipped in


(cherry picked from commit 1b1c0eda5a)
2007-05-14 22:37:51 +00:00
Frank Cusack
f38b5888ca DEVEL15-fix-partition-check-20070510
oops


(cherry picked from commit 08cbee9b2d)
2007-05-10 23:42:33 +00:00
Derrick Brashear
1faf824b6d DEVEL15-vos-namelen-for-dump-restore-is-stupid-20070509
fixes bug reported by stephen joyce which i am too lazy to go get the RT number of


(cherry picked from commit f2761c4163)
2007-05-10 01:16:57 +00:00
Russ Allbery
828cd22651 DEVEL15-up-preserve-dir-mtime-20070507
FIXES 34522

Set the mtime on newly created directories to match the original directory.


(cherry picked from commit 1d4d8f5c4f)
2007-05-07 18:24:34 +00:00
Asanka Herath
2a80a69318 DEVEL15-windows-netidmgr-20070505
Only automatically add configuration for cell foo.com if the realm
of the cell matches the realm of the identity


(cherry picked from commit 958bbb77bf)
2007-05-05 22:14:48 +00:00
Jeffrey Altman
a04acfe9be DEVEL15-windows-checkvols-freelance-20070504
do not flush mount point values for freelance volume


(cherry picked from commit c8a3a0ecf2)
2007-05-04 07:06:13 +00:00
Jeffrey Altman
e358ddef88 DEVEL15-windows-wix-shell-ext-20070503
When installing on 64-bit Windows we need to install the 32-bit and 64-bit
shell extensions under different HKCR keys.  Otherwise, only one of the
explorer versions will get an extension handler.


(cherry picked from commit 2b442dbddb)
2007-05-04 03:49:57 +00:00
Jeffrey Altman
deabf0f531 DEVEL15-windows-wix-beta-upgrades-20070503
This change is not as important for OpenAFS as it was for KFW as
OpenAFS does not issue betas with the same build numbers as final
releases.  However, for users of daily builds when build numbers
are not being incremented it will provide benefit.

We modify the upgrade rules to include the current version number
and then block the uninstall if the currently installed package
is the one that is being installed.

The change applies to both the regular installer and the 32-bit
tools for WOW64 environments.


(cherry picked from commit 9f508ce443)
2007-05-04 00:13:31 +00:00
Jeffrey Altman
58cadc0eb8 DEVEL15-windows-flush-mountpoints-20070502
When flushing volume location information also flush the mount point
data.  This change results in behavior that matchs the Unix client.


(cherry picked from commit d9946ba827)
2007-05-03 01:45:58 +00:00
Jeffrey Altman
a13c67008e DEVEL15-windows-wix-html-installgd-20070426
FIXES 59827

The wix installer creates the wrong directory name for the IBM Quick Guide
Remember to specify the LongName.


(cherry picked from commit 113ccb9963)
2007-04-26 19:45:16 +00:00
Asanka Herath
a14a06945e DEVEL15-windows-dropbox-fix-20070426
FIXES 60161

A dropbox is a directory with ACLs 'li' that permits a user to create
a new file but not be able to read other files within the same directory.

The 1.5 Windows clients have not been able to write to dropboxes since
the addition of the locking code.  The lock acquisition test assumed
that if the user did not have PRSFS_LOCK or PRSFS_WRITE that it would
be unable to obtain a lock.  It did not take into account the special
treatment of PRSFS_INSERT by the file server and so never bothered to
ask.

As it turns out though, the locking situation is more complex than one
might think.  If the server is 1.4.1 or earlier, it will not grant
any locks for users with INSERT.  The PRSFS_LOCK privilege is required.

For 1.4.2 through 1.4.4, write locks will be granted if the user has
PRSFS_INSERT but a read lock will not be granted unless the user has
PRSFS_LOCK.  Therefore, if the server advertises the WRITELOCKACL
capability bit if the read lock is not granted a write lock can be
attempted.

For 1.4.5 and 1.5.20 and above, the file server will grant read locks
if the user has PRSFS_WRITE or PRSFS_INSERT.  (Insert only applies if
the user is the creator of the file).

This patch handles all of the above possibilities.  In the pre-1.4.2
case a read-lock request will be faked locally.


(cherry picked from commit bfed93d7fc)
2007-04-26 19:08:00 +00:00
Derrick Brashear
767daed0b8 DEVEL15-rx-call-abort-release-refcount-20070425
don't leak a call ref when doing a call abort


(cherry picked from commit 92ecfdd675)
2007-04-25 20:48:51 +00:00
Jeffrey Altman
c798298fc7 DEVEL15-viced-write-perm-grants-read-lock-20070423
the permission to obtain a write-lock is granted either by having the
"w" permission or the "i" when owning the file.  The permission to obtain
a read-lock has been granted by having the "k" permission.  However it
makes no sense that someone can obtain a write-lock but not a read-lock.
This patch grants permission to obtain read-locks to those who can obtain
write-locks.


(cherry picked from commit bb61e1dc67)
2007-04-24 01:28:28 +00:00
Jeffrey Altman
95a4a16f18 DEVEL15-windows-wix-html-installgd-20070420
FIXES 59827

The wix installer creates the wrong directory name for the IBM Quick Guide


(cherry picked from commit c5c23b7bc4)
2007-04-20 12:02:25 +00:00
Derrick Brashear
8bce945783 DEVEL15-openafs-1-5-19-20070419
make 1.5.19
2007-04-19 05:04:29 +00:00
Christopher Allen Wing
607b35e6df DEVEL15-linux-symlink-handling-avoid-crash-20070418
Background: OpenAFS is vulnerable to crashing in the linux kernel symlink
code when running on kernel versions between 2.6.10 to 2.6.12.  This also
includes all RHEL4 kernels, because RHEL4 includes the code from 2.6.10. The
problem is that the symlink text caching API, page_follow_link() et al, is
unsuitable for network filesystems where the page cache may be invalidated
in parallel with a path lookup.

This crash can be triggered easily by doing a bunch of path lookups
involving symlinks (e.g., stat() on various files pointed to through links),
while simultaneously running 'fs flushvol' on the volume containing the
symlinks.

The simplest way to fix this problem is to disable the use of symlink text
caching when the kernel does not provide a usable symlink API.


(cherry picked from commit 2d18bd1777)
2007-04-18 19:19:59 +00:00
Chaskiel M Grundman
9adb2ba313 DEVEL15-vmalloc-no-glock-20070418
Based on Chris Wing's analysis which stated in part:
GFP_NOFS tells the allocator not to recurse back into the filesystem if it's
necessary to free up memory.  However, vmalloc() does not have such an
option.  Therefore, calling osi_Alloc() to request more than a page of
memory may end up recursing back into AFS to try to free unused inodes or
dentries.

In this case, what happened was that osi_Alloc() is called within an
AFS_GLOCK(); osi_Alloc() calls vmalloc() which tries to free dentry objects,
which then calls back into the AFS module.  Unfortunately, AFS_GLOCK() is
already held and we deadlock.


(cherry picked from commit 9943fe1fd7)
2007-04-18 19:02:47 +00:00