Ken Dreyer [Wed, 12 Dec 2012 17:37:47 +0000 (10:37 -0700)]
NEWS updates for 1.6.2
Add an entry for 1.6.2 with "in progress" instead of a date to hold the
release notes for 1.6.2pre4 rather than creating separate entries for
each release candidate. Users who track the release candidates can refer
to the public announcements, and this will be cleaner when reading
history later on.
Reviewed-on: http://gerrit.openafs.org/8750 Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com> Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit 265a4b542b717c14e810202078c3ce83e4d851f5)
Change-Id: I68d4e6983097a97caac660f740ea8a01f1a95caa
Reviewed-on: http://gerrit.openafs.org/8988 Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Andrew Deason [Fri, 18 Jan 2013 20:27:16 +0000 (14:27 -0600)]
SOLARIS: Use vn_renamepath as early as possible
Commit 6c509601 uses the vn_renamepath when we are building on Solaris
11. However, some recent patch level of Solaris 10 (more recent than
stock 10u10) has the same problem fixed by that commit, where
vn_setpath takes an additional argument. So instead, just test for the
existence of vn_renamepath itself, so we also use it on Solaris 10
when we can.
Derrick Brashear [Tue, 22 Jan 2013 20:00:29 +0000 (15:00 -0500)]
darwin: don't process incoming packets during rx shutdown
we have a chicken and egg problem because the kpi doesn't
let us kill the upcall before we close a socket. a more correct
fix (on master) uses atomics, but for 1.6 this is a minimally-invasive
fix, macos only and strictly better than before.
FIXES 131577
Change-Id: I6003679f709284ae28f51bf5de8deff873346819
Reviewed-on: http://gerrit.openafs.org/8937 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Andrew Deason [Tue, 8 Jan 2013 23:50:57 +0000 (17:50 -0600)]
SOLARIS: Avoid open count cleanup for Solaris 11
The comments in here no longer apply to Solaris, as of OpenSolaris
commit 11736:63a134e1f09c by Donghai Qiao (4492533 Filesystems may
need VOP_CLOSE() for executables following a VOP_OPEN()). This means
that this workaround should no longer be necessary for any Solaris 11
release, any illumos release, and anything else based off of
OpenSolaris. So, stop doing it.
Thanks to Frank Batschulat for pointing this out, and providing all of
the details.
Andrew Deason [Tue, 8 Jan 2013 23:41:21 +0000 (17:41 -0600)]
SOLARIS: Use vn_renamepath when available
In Solaris 11.1, the signature of vn_setpath changes; it gains an
extra boolean_t argument called 'force'. Instead of trying to adapt to
it, call vn_renamepath() instead, which will do the correct thing and
call vn_setpath &co for us. vn_renamepath has existed since Solaris 10
Update 8, and is in all releases of Solaris 11. Only call it in
Solaris 11, since it makes the ifdefs easier, and there are no
problems with calling vn_setpath on Solaris 10.
Thanks to Frank Batschulat for all of the relevant information.
Andrew Deason [Fri, 4 Jan 2013 19:18:40 +0000 (14:18 -0500)]
SOLARIS: Look for ncurses in ncurses/ncurses.h
Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there.
Without this, on Solaris 11.1 we will detect libncurses automatically
(because it lives in /usr/lib), but not ncurses.h (since it is in
ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h,
but will try to link to libncurses, which, as you might guess, fails
with various undefined symbols.
Andrew Deason [Fri, 4 Jan 2013 18:47:35 +0000 (13:47 -0500)]
SOLARIS: Avoid areq and auid conflict
On new Solaris (11.1), nfs/auth.h #defines areq and auid to access
some elements inside the nfsauth_arg structure more easily. We have a
lot of functions that use those names as parameters, so the compiler
throws an error (since we have a decl like "struct vrequest
*areq_u.areq").
We cannot avoid including that header, since we need some NFS-related
headers for the NFS xlator, and they pull in nfs/auth.h
unconditionally. So, work around this by undefining areq and auid
afterwards.
Russ Allbery [Thu, 3 Jan 2013 21:57:02 +0000 (13:57 -0800)]
Ensure MIN/MAX are defined in userspace builds of rx
The include of <sys/param.h> was removed from rx_packet.h on
Linux 2.6 and later to fix kernel builds with 3.7, which doesn't
have that header in kernel space. However, while kernel space
always provides MIN/MAX defines, userspace relied on the header.
On at least powerpc, no other include chain includes sys/param.h,
so MIN/MAX were left undefined.
Fix this by only skipping the include of <sys/param.h> on Linux
if building in kernel mode.
Andrew Deason [Fri, 28 Dec 2012 21:39:15 +0000 (16:39 -0500)]
afs: Avoid unnecessary panic in ShakeLooseVCaches
afs_vcount can change as we traverse the loop. If we successfully
evict something from the cache, afs_vcount goes down, but our loop
variable 'i' stays incremented. For example, if afs_vcount was 100 at
the start of the loop and we kicked out 50 things, by the time we
traverse the entire VLRU, we could have iterated over the loop 100
times, but afs_vcount would still be just at 50.
So, remember what afs_vcount was at the start of the loop, and use
that for our loop limit. Note that vcaches cannot be added to the VLRU
during the execution of this loop, since we're just kicking stuff out.
And nobody else can modify the VLRU but us, since we're holding
afs_xvcache, and if we drop afs_xvcache, we restart the whole eviction
process.
The bug here was introduced by commit bc6dd950, but usually did not
affect Linux until commit 696db866.
FIXES 131553
Reviewed-on: http://gerrit.openafs.org/8849 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 1cee097b5bf44b0d8273712f0074b541f0f3f96e)
Change-Id: I1bdbe41980e03522905217e55f745a96fb2bdc2d
Reviewed-on: http://gerrit.openafs.org/8867 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Do not call afs_MarinerLog when afs_mariner is not set
When mariner log is not set up (afs_mariner=0), do not call afs_MarinerLog,
otherwise a osi_NetSend() to hostaddress=0 is tried, which will give you
ICMP messages in the socket error queue.
Do not call afs_AddMarinerName, when afs_mariner is not set.
Simon Wilkinson [Fri, 6 Apr 2012 22:56:30 +0000 (23:56 +0100)]
shlibafsauthent: Add a load more objects
The perl-AFS module needs to link against a pthreaded, PIC, library
that contains all of the routines that it provides perl shims for.
At the moment, libafsrpc_pic and libafsauthent_pic are the only such
libraries that OpenAFS provides.
Add all of the necessary objects to libafsauthent_pic such that the
2.6.2 version of perl-AFS can build with a minimal set of patches.
Minimise the damage by only making these available through the static
version of the libafsauthent_pic library.
Reviewed-on: http://gerrit.openafs.org/7070 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
This is a 1.6 version of this change, which adds some additional
symbols and objects to cater for differences between master and 1.6
The changes aren't relevant to master, as the whole shared library
situation there is now completely different.
Change-Id: Iad596cd92bc883e47c5d261886db61e9c7482112
Reviewed-on: http://gerrit.openafs.org/8811 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Andrew Deason [Wed, 19 Dec 2012 22:57:20 +0000 (16:57 -0600)]
ihandle: Avoid FD cache in ih_sync_all
If an ihandle is IH_REALLYCLOSE'd immediately before or during the
IH_OPEN call in ih_sync_all, ih_sync_all can open a new file handle
after the IH_REALLYCLOSE is complete. For a volume that has gone
offline, this means that ih_sync_all can hold a file open for a volume
that has gone offline, and is possibly being manipulated or deleted by
an external program (e.g. the volserver for a clone operation).
While the FdHandle_t is open, or after the handle has been closed and
returned to the FD cache, another caller in the fileserver could try
to open the same file and get back the cached FdHandle_t. If the file
has been deleted by the volserver, this means the fileserver is
writing to the 'wrong' file, as it has been deleted. This can result
in a CopyOnWrite operation causing a file from the clients' point of
view to suddenly become empty, or to revert to a previous version.
To avoid this, prevent ih_sync_all from interacting with the FD cache
entirely, and just open a file descriptor directly from the IHandle_t.
This should prevent it from causing any problems with other users of
the FD cache.
This change is not intended for the master branch. The current
intention for the master branch and future versions is to eliminate
ih_sync_all entirely.
FIXES 131530
Change-Id: I809a0e3ebfe4692eab01671fdf83bf58676453f6
Reviewed-on: http://gerrit.openafs.org/8796 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Reviewed-by: Derrick Brashear <shadow@your-file-system.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Simon Wilkinson [Wed, 3 Aug 2011 18:08:20 +0000 (19:08 +0100)]
libafsauthent: Add volser and vldb
Add the volser and vldb families of functions to libafsauthent. This
allows applications such as perl-AFS which are building pthreaded
clients to use a single library, rather than trying to mix LWP and
pthreaded code within the same process.
Simon Wilkinson [Fri, 21 Dec 2012 09:35:28 +0000 (09:35 +0000)]
tubik: Don't install ubik.h or ubik_int.h
Both ubik and tubik try to install ubik.h and ubik_int.h. This leads
to a race during which the header file may be missing, which upsets
parallel builds. Just don't install them from tubik to solve this
issue.
Michael Laß [Fri, 14 Dec 2012 16:06:30 +0000 (17:06 +0100)]
Update configure help msg to match actual defaults
The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in
acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating
the output of ./configure --help. Change the description of
linux-kernel-headers and linux-kernel-build to show the correct defaults.
Stephan Wiesand [Sat, 15 Dec 2012 14:36:24 +0000 (15:36 +0100)]
Linux: Restructure kernel header detection
As of kernel 3.7, version.h has moved, and hence utsrelease.h was
no longer found. Loop over candidate directories and locations
within, and look for the files we're actually after.
FIXES 131525
Reviewed-on: http://gerrit.openafs.org/8761 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de> Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit 3f9d982ec25aa5f9cf32a1268d6883a9afa70b12)
Change-Id: Ia9653405195d4c5f6592960375340553de1267c5
Reviewed-on: http://gerrit.openafs.org/8804 Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Andrew Deason [Thu, 13 Dec 2012 22:36:20 +0000 (16:36 -0600)]
LINUX: Avoid infinite d_invalidate loop
If a reference is grabbed after we d_invalidate() a dentry, but before
we dput() that dentry, the dentry can still be on the alias list for
its inode. This will cause us to loop forever, since we'll get the
same dentry back from d_find_alias, and d_invalidate() will return
success, since it is a no-op.
Avoid this by just limiting the number of times we loop. Leaving
dentry aliases around is non-critical as long as we clear some each
time.
This change is not applicable to master, which will get a more robust
fix for this issue. This change was discussed during the 19 Dec 2012
release-team meeting.
Change-Id: Ief22ae9f8f6de62518604383c421772c25c5dc26
Reviewed-on: http://gerrit.openafs.org/8795 Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: BuildBot <buildbot@rampaginggeek.com>
Jeffrey Altman [Thu, 7 Jun 2012 13:27:00 +0000 (09:27 -0400)]
Windows: handle KRB5KRB_AP_ERR_REPEAT errors
This patchset adds logic to handle a KRB5KRB_AP_ERR_REPEAT error
sent by a KDC for the Windows aklog and the afskfw library. The
KRB5KRB_AP_ERR_REPEAT is sent when the KDC detects a replay.
However, the KDC replay detection is known to generate many false
positives. If KRB5KRB_AP_ERR_REPEAT is received, wait one second
and retry the request.
This patchset does not apply to 'master' due to Kerberos
Compatibility SDK conversion.
Derrick Brashear [Thu, 29 Mar 2012 14:44:53 +0000 (10:44 -0400)]
linux: update spec requirements
don't require things which don't exist on el5. do require them
in el6. require kernel-devel if building modules
don't do anything involving the kernel if not building modules
if we can figure out that we don't have 2.4 based on the version,
avoiding the need to depend on kernel-devel just to build an srpm.
Michael Meffie [Fri, 17 Aug 2012 17:25:17 +0000 (13:25 -0400)]
LINUX: make d_automount work properly on rhel5 kernels
Recent centos/rhel 5 kernels (2.6.18-308.*) started providing the
d_automount operation, but renamed the DCACHE_NEED_AUTOMOUNT flag to
DMANAGED_AUTOMOUNT.
Reviewed-on: http://gerrit.openafs.org/8006 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 5daa08ea263b2a82b4a85abd61d72d4d1f48bbb6)
Change-Id: I1ebc2a3cab52ff7294b03e1e82680a99d62013fc
Reviewed-on: http://gerrit.openafs.org/8790 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Andrew Deason [Wed, 29 Aug 2012 16:39:01 +0000 (11:39 -0500)]
LINUX: Use struct vfs_path on RHEL5
Some revisions of the kernel from RHEL5 (2.6.18-308.* and possibly
others) renamed 'struct path' to 'struct vfs_path'. So, use
'struct vfs_path' when it exists.
This introduces the afs_linux_path_t typedef, which is defined as
either a struct path, or struct vfs_path.
Reviewed-on: http://gerrit.openafs.org/8019 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit 74c1881dff1593f4a8920ba8d8a2400760899fa5)
Change-Id: I6eaf17ebe9a35b345c1fd5cebd490f8095a1b22b
Reviewed-on: http://gerrit.openafs.org/8789 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de> Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Arne Wiebalck [Thu, 6 Dec 2012 15:23:05 +0000 (16:23 +0100)]
Update 'vos shadow' man page
Change the 'vos shadow' man page to say that updating the
VLDB with shadow volumes does only work if the VLDB entries
for the corresponding source volumes are deleted first.
Reviewed-on: http://gerrit.openafs.org/8652 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Dan van der Ster <daniel.vanderster@cern.ch> Tested-by: Dan van der Ster <daniel.vanderster@cern.ch> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
(cherry picked from commit 83ccb62012d7b3b696dd48e05feb8adeb203463a)
Change-Id: I59eacb7406e8bec9e5736afe32564a04be7ff72a
Reviewed-on: http://gerrit.openafs.org/8786 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
the whole of the api used for icon handling when you steal it
from a resource fork is deprecated in new macos. fine. we'll just make
an app bundle by cheating, move andy into a standalone icns file,
install him into the "bundle" and open it the macos way.
Simon Wilkinson [Sat, 14 May 2011 07:37:31 +0000 (08:37 +0100)]
rxperf: -S takes an argument
The -S option to rxperf (which permits the maximum number of server
threads to be set) takes a parameter. Update the getopt string so
that we can give it one.
Jeffrey Altman [Sat, 8 Dec 2012 23:39:40 +0000 (18:39 -0500)]
Windows: cm_RecycleSCache remove from hash table
Remove the cm_scache_t object from the hash table during recycling.
This step is performed on master and on 1_7_x. Did not get pulled
onto 1.6.x previously.
Jeffrey Altman [Sun, 18 Nov 2012 02:44:52 +0000 (21:44 -0500)]
Windows: buf_CleanLocked protect against NULL bp->userp
The cm_buf_t.userp field should never be NULL if the CM_BUF_DIRTY
flag is set but apparently it sometimes is. cm_BufWrite() requires
that the userp parameter be non-NULL. Otherwise, an assertion fails
and afsd_service.exe panics. If bp->userp is NULL, use cm_rootUserp.
The worst that will happen is the write will fail due to an access
denied error.
Jeffrey Altman [Sun, 18 Nov 2012 02:39:50 +0000 (21:39 -0500)]
Windows: do not adjust deleted scache LRU ordering
Instead of moving deleted scache objects so that they are next
in line to be recycled, do not move them at all. Making them
next to be recycled results in the CM_SCACHEFLAG_DELETED flag
value being lost.
Jeffrey Altman [Tue, 13 Nov 2012 22:59:06 +0000 (17:59 -0500)]
Windows: Do not reset cm_buf.offset on error
When an error occurs the cm_buf_t is not removed from the
hash tables. Since the scacheHashTable hash is built from
the fid and the offset it is not safe to reset the offset field.
Resetting the offset field results in an assertion failure
during buffer recycling.
Jeffrey Altman [Tue, 6 Nov 2012 11:39:39 +0000 (06:39 -0500)]
Windows: call MIDL_user_allocate instead of calloc
In the RPC service routines do not call calloc() directly.
All memory will be deallocated by a call to MIDL_user_free()
so use MIDL_user_allocate() to perform the allocation.
Modify MIDL_user_allocate() to call calloc() instead of malloc()
to ensure that the memory is initialized to NUL bytes.
Jeffrey Altman [Mon, 29 Oct 2012 14:33:18 +0000 (10:33 -0400)]
Windows: mark server reference offline for VOFFLINE
cm_Analyze() was not marking the cm_ServerRef_t reference to
a volume instance as srv_offline in response to a VOFFLINE error.
As a result the same volume instance is tried again and again.
In commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb strdup()
was replaced by xdr_alloc() and memcpy(). Unfortunately,
the patch was wrong and the pointer to which the result of
xdr_alloc() was assigned was overwritten with zero.
commit f716962ab41847af4450d0a361f5de9195b32ed0
inadvertently broke the offline .readonly is valid functionality
when readonly volume versioning is disabled. Restore it.
Jeffrey Altman [Sun, 25 Nov 2012 01:10:49 +0000 (20:10 -0500)]
rx: set abort client_initiated flag to match direction
In a recent incident involving packet reflection back to the
file server, aborts were being sent by the file server in response
to a server sent packet. The aborts sent in response also failed
to set the CLIENT_INITIATED flag in the header which permitted the
the actual client to confuse the Abort as applying to its client
initiated connection.
in rxi_SendRawAbort, set the CLIENT_INITIATED flag to the opposite
of the packet the abort is being sent in response to.
Jeffrey Altman [Wed, 21 Nov 2012 23:08:35 +0000 (18:08 -0500)]
Windows: smb_ReceiveTran2QFileInfo Pioctl support
Similar to the QueryPathInfo support for _._AFS_IOCTL_._ the
QueryFileInfo interface must respond to pioctl queries. When
GetFileAttributes() on XP is called from the afslogon.dll the
QFileInfo path is used instead of the QPathInfo path.
Jeffrey Altman [Wed, 6 Jun 2012 03:07:40 +0000 (23:07 -0400)]
Windows: SMB GetFileAttributes support
commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41 added a
GetFileAttributes query to the pioctl interface to protect
against printing pages on printers with a broken smb protocol
implementation. This patchset adds support for GetFileAttribute
on _._AFS_IOCTL_._ files to the SMB implementation.
Jeffrey Altman [Sun, 6 May 2012 00:46:08 +0000 (20:46 -0400)]
Windows: Make CM resilient to transient VNOVOL
The 1.6.0 and 1.6.1 file servers send transient VNOVOL errors which
are no indicative of the volume not being present. For example,
VNOVOL can be sent during a transition to a VBUSY state prior to
salvaging or when cloning a .backup volume instance. As a result
the cache manager must attempt at least one retry when a VNOVOL is
receive but there are no changes to the volume location information.
This patchset records the VNOVOL error in the cm_req_t structure
If the volume is replicated, the volume's server reference into a busy state.
If the volume is not replicated, the thread is paused for two seconds.
In both cases, the request is retried. If the VNOVOL error is received
a second time from the same server, the volume server reference is
deleted as before. This is done to prevent repeated requests to the
VLDB server and the file server that are expected to fail. The server
reference will be restored to the volume on the next volume location
update.
Jeffrey Altman [Sun, 25 Nov 2012 00:47:01 +0000 (19:47 -0500)]
rx: RX_INVALID_OPERATION abort unknown service only
Patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the
sending of RX_INVALID_OPERATION aborts for connection attempts
requesting a service not offered by the rx peer. By sending aborts
for all failures of rxi_FindConnection() the set of incoming packets
that are responded to is broader than simply those with non-matching
serviceIds. This patchset restricts the transmission of
RX_INVALID_OPERATION aborts only to the explicit case in which
rxi_FindConnection() attempted to find a service and either failed
to find a match or couldn't apply the requested security class/level
to that service.
Andrew Deason [Fri, 16 Nov 2012 20:18:32 +0000 (14:18 -0600)]
afs: Fix VLRU traversal sanity check
On non-Linux, the number of vcaches in the VLRU can easily exceed
afs_maxvcount, since we allocate new vcaches when we run out. So,
assume we only have afs_vcount vcaches on the VLRU, instead of
assuming we have at most afs_maxvcount vcaches.
Tom Keiser [Tue, 10 Apr 2012 20:26:42 +0000 (16:26 -0400)]
libafs: use kthread_run when available
Use the kthread_run interface on linux to create kernel
threads. This interface allows all the cpus to schedule
afsd threads, instead of just inheriting the cpu affinity of
the main afsd thread.
Andrew Deason [Wed, 14 Nov 2012 04:46:34 +0000 (22:46 -0600)]
rx: Generate BUSY packets for error call channels
Currently, if a call is error'd out but still active, we won't
generate BUSY packets if another call comes in on the same channel.
This is because we bail out earlier, here, before we get to the BUSY
processing.
The comments suggest that this is for if we enter an error state while
waiting for TQ to clear. So, only do this if our error has changed.
Michael Meffie [Thu, 3 Nov 2011 21:09:28 +0000 (17:09 -0400)]
vol: rate-limit volume usage updates
Add threshold and time rate-limit parameters for volume usage
updates to disk. This reduces the amount of i/o needed for
volume usage statistics on very busy fileservers. Set the
default to limit updates to one every 5 seconds per volume.
Reviewed-on: http://gerrit.openafs.org/5803 Reviewed-by: Derrick Brashear <shadow@dementix.org> Reviewed-by: Tom Keiser <tkeiser@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 639ca379e47fbe550d090fff9e635ad24e8e34f0)
Change-Id: I29b8240515afe5585b3eef000dbf40110fd4620f
Reviewed-on: http://gerrit.openafs.org/8582 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com> Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com> Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Michael Meffie [Thu, 30 Aug 2012 15:48:34 +0000 (11:48 -0400)]
bozo: dont lie when binding to any address
Do not log the bosserver listening to just the loopback when it is
actaully listening on any address. The loopback address is still
written to the bosserver.rxbind file in this case to give local
scripts an simple way to contact the bosserver.
Marc Dionne [Thu, 15 Nov 2012 22:49:53 +0000 (17:49 -0500)]
Linux 3.7: remove use of param.h and ioctl.h
Header files param.h and ioctl.h have moved as part of the userspace
API restructuring of header files. Nothing in those files is
currently needed by the source, so just drop the includes.
Marc Dionne [Thu, 15 Nov 2012 03:12:13 +0000 (22:12 -0500)]
Linux: change test for new putname API
Replace the existing test with a more robust one that checks for
the existence of the new filename structure. Since older kernels
are expected to fail this test, we'll get the correct result even
if there is unrelated failure, for instance a missing/different
header file.
Michael Meffie [Wed, 1 Aug 2012 15:42:34 +0000 (11:42 -0400)]
bozo: avoid canceling the sigkill timer for hung processes
A sigkill signal is sent to fileserver processes when a timeout is
exceeded for shutting down processes for the fs/dafs bnode.
(Currently 30 minutes for the fileserver, 1 minute for the other
server processes.)
If the bnode goal is set to run before this timeout expires, the
timer is incorrectly stopped, and a wedged process is never killed.
Fix this by not canceling the timer when a fs/dafs process has been
signaled to shutdown, regardless of the current goal.
Andrew Deason [Wed, 14 Nov 2012 00:27:11 +0000 (18:27 -0600)]
afs: Handle VNOSERVICE as a timeout
For whatever reason, the fileserver uses VNOSERVICE to indicate that
an Rx call was killed due to an idledead timeout. It is not used for
any volume errors, so treat it like the idle dead error codes.
Andrew Deason [Wed, 14 Nov 2012 00:15:21 +0000 (18:15 -0600)]
afs: Slight restructuring in afs_Analyze
We test for acode < 0 && acode != VRESTARTING, but then immediately
test for specific values for acode. Move this conditional down, and
remove a level of indentation for the next couple of acode checks.
This commit should introduce no functional change.
Andrew Deason [Tue, 31 Jul 2012 18:40:41 +0000 (14:40 -0400)]
LINUX: Always hold afs_xuser for unixuser read
We were failing to hold the afs_xuser lock when we entered our
unixuser traversal for the first time (when the given position is 0).
This means we can release the lock without acquiring it, causing all
kinds of weird behavior.
Just always grab afs_xuser on entry. We could possibly do some tricks
to avoid grabbing this lock until after we've printed the column
headers, but it does not seem worth it.