Derrick Brashear [Wed, 30 Jun 2010 19:35:38 +0000 (15:35 -0400)]
update ticket5 from heimdal
includes updated instructions for updating.
note that gen_glue.c in lib/asn1 has a bug which omits
a needed newline in the "const struct units * asn1_%s_units(void);",
line.
Marc Dionne [Fri, 5 Nov 2010 21:30:02 +0000 (17:30 -0400)]
Linux: define llseek operations
With kernel 2.6.37 it is now mandatory to define the llseek operation
for files and directories. If these are not defined, no_llseek is
called, and any attempt to seek returns ESPIPE.
Most file systems use generic_file_llseek, but it seems safer to use
default_llseek which is what the vfs used to call for us by default.
In 2.6.37 these two functions are actually functionally identical.
Marc Dionne [Wed, 13 Oct 2010 23:11:25 +0000 (19:11 -0400)]
Linux: fix statfs configure test
The change to the statfs configure test that was made for 2.6.36
broke the test for older kernels. The new test is based on a call,
and that will generate a warning but not an error when the arguments
don't match the prototype.
Take another tack, and revert to the old style test, but with the
simple_statfs function instead of vfs_statfs.
Reviewed-on: http://gerrit.openafs.org/2975 Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 59927e20052c3f075e0269e46691bc94c3974f86)
Marc Dionne [Wed, 11 Aug 2010 22:20:59 +0000 (18:20 -0400)]
Linux: adapt to truncate sequence changes
As part of changes to the truncate sequence, inode_setattr() no
longer exists, and all filesystems have to define the setattr op
so we can assume that it is not NULL.
Introduce a compat inline function afs_inode_setattr that hides
the tests and the different versions from the main code.
Note that the existing test for the inode_setattr() return type
will fail, but the value is no longer used in that case.
Marc Dionne [Wed, 11 Aug 2010 21:18:32 +0000 (17:18 -0400)]
Linux: use %pI4 if NIPQUAD is not available
The definition of NIPQUAD has been removed from the kernel headers
in the mainline kernel. Replace it by using the %pI4 format
specifier which takes the IP address as a single argument.
Marc Dionne [Wed, 11 Aug 2010 22:55:29 +0000 (18:55 -0400)]
Linux: switch to evict_inode
In 2.6.36, the delete_inode and clear_inode inode operations
are replaced by evict_inode.
Rename our current clear_inode to evict_inode, and add a few
things that were previously handled by the generic delete_inode.
Marc Dionne [Wed, 11 Aug 2010 23:28:53 +0000 (19:28 -0400)]
Linux: Rework statfs super block operations configure test
The configure test to detect if the statfs super block operation
needs a dentry argument is based on vfs_statfs, and assumes that
its signature matches the one of the operation. In 2.6.36 this is
no longer true and the test fails.
Rework the test to actually test the operation we're interested in.
Simon Wilkinson [Thu, 22 Apr 2010 16:56:25 +0000 (17:56 +0100)]
Linux: RedHat packaging updates for RHEL6
Update our bundled spec file and related tools so they can be used
to build OpenAFS on the RHEL6 beta.
- Make kmodtool recognise el6 as having "modern" kernel naming
conventions
- Replace %{PACKAGE_VERSION} (which seems to have disappeared)
with the standard %{version} macro
Thanks to billings and phalenor on IRC for their testing efforts.
Andrew Deason [Wed, 1 Sep 2010 16:18:56 +0000 (11:18 -0500)]
RedHat: Find krb5-config in /usr/bin
In RHEL6, krb5-config is no longer in /usr/kerberos/bin/, but is in
just /usr/bin/. So, try to use /usr/bin/krb5-config if we cannot find
/usr/kerberos/bin/krb5-config and krb5config was not specified.
This is a 1.4-only change, as the 'configure' on more modern branches
should have the ability to find krb5-config automatically.
Reviewed-on: http://gerrit.openafs.org/2646 Tested-by: Andrew Deason <adeason@sinenomine.net> Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c2eba9d57adc79b05165fc8aebaf751ea89282f5)
Change-Id: I46c6f0e3d7c2ce427eacfbb82366a7da3156d9bd
Reviewed-on: http://gerrit.openafs.org/3514 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Russ Allbery [Mon, 22 Mar 2010 19:42:48 +0000 (12:42 -0700)]
Move non-executable stack assembly code to end of file
The non-executable stack annotation used for Linux works by adding
an additional section to the generated object. The annotation added
in 9bfd03d723a9cf17673f40513a7adde1d503bcbc was added to the beginning
of each assembly file. This caused build failures on Linux s390
because the remainder of the assembly code was then put in that
section, which was discarded during linking.
Add the annotation to the end of each assembly file instead, following
the instructions at:
Marc Dionne [Thu, 22 Apr 2010 21:22:37 +0000 (17:22 -0400)]
Initialize oldvtix
Initialize the variable to avoid compiler complaints that it
could be used uninitialized. Use a sentinel value and issue
a warning if we try to use the variable and we haven't set
it to a useful value.
Andrew Deason [Wed, 21 Apr 2010 17:41:21 +0000 (12:41 -0500)]
Recover from afs_GetVolSlot errors
afs_GetVolSlot can panic in a few different ways, such as failing to
read from or write to VolumeInfo. Instead of panic'ing, return an
error to the application. Adjust callers to deal with getting a NULL
volume returned.
Based on a patch by Mike Meffie.
Change-Id: Ibb301fed795ee9ee5906b8e7973945a06218b8f1
Reviewed-on: http://gerrit.openafs.org/1801 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry-picked from commit 80f05473428969ff71d1791cda8cb09d30223724)
Marc Dionne [Fri, 5 Mar 2010 22:54:42 +0000 (17:54 -0500)]
Linux: replace invalidate_inode_pages
This helper has been deprecated for a while, and gets removed
with 2.6.34.
Replace it with invalidate_remote_inode, which has been around for
all of 2.6's life, according to Chaskiel in RT #124377.
Change-Id: I8658b454e1c997c041f654ba55d06f713ea25459
Reviewed-on: http://gerrit.openafs.org/1523 Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit 80481fb14ea9301b0f6b3503d07ecaef39aef0d8) Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/1988
1.5 deals with this differently. for now, don't build fc_test (rx needs
libsys so it can deal with network config from userspace; the sys/rxkad
dependancies are circular if so. so, no)
OpenBSD 4.7 (currently in beta) removes the (dummy) VREF() macro from the
system header files. For at least as far back as OpenBSD 3.6, all this
macro does is expand to a call to a system routine by the same name in
lower case. This patch therefore replaces the single OpenBSD use of
VREF() with a direct call to the routine to which it expanded.
Claudio Bisegni [Mon, 1 Mar 2010 19:41:48 +0000 (20:41 +0100)]
OSXPreferencePane
checkAfsStatusForStartup method modification for search /afs volume for determinate if afs is on has been transfered into checkAfsStatus. checkAfsStatusForStartup method is used to check when afs start axitn system startup. Anyway these are only workaround we must use osx api or afs api to make this job.
A prior update (ChangeID: Ie6af2d3fd9c5166dd2d884c22d287c180b24fab1)
stops compile_et from being (p)installed into a separate directory.
Unfortunately, there's a second rule in the Makefile exhibiting the
same behaviour that was missed (the decision of which rule is used is
determined by whether a 'make install' or 'make dest' is requested).
This patch fixes the second ruleset as well.
Derrick Brashear [Wed, 24 Feb 2010 16:20:51 +0000 (11:20 -0500)]
remove dropbox attribute leak fix
change 6ec18461649d3e4f44b2476f886bcc480c456500, avoid leaking stat info,
appears to have side effects on at least macos, crashing the system
coreservicesd. revoke the change until the exact behavior we want is
better understood.
Anders Kaseorg [Sun, 21 Feb 2010 01:28:42 +0000 (20:28 -0500)]
Linux: Fix conversion of whole-file locks
An overflow bug in commit 49b7bbdd3b45df694fadbef48f9ed99d9bfe07b9
caused whole-file locks to be treated as byte-range locks, which fail
to be propagated to other machines.
Fix this by setting l_len = 0 for locks that range to the end of the
file.
Anders Kaseorg [Sat, 20 Feb 2010 18:28:59 +0000 (13:28 -0500)]
Linux: Use kbuild to check for UML
<linux/autoconf.h> is automatically included by kbuild; you aren’t
supposed to include it directly. That breaks in 2.6.33 because
<linux/autoconf.h> is moving to <generated/autoconf.h>.
Andrew Deason [Fri, 12 Feb 2010 23:44:31 +0000 (17:44 -0600)]
Check for HOSTDELETED before h_Hold_r
A few places h_Hold_r a host and later drop and reacquire H_LOCK without
checking if the hostFlags contains HOSTDELETED. This can cause a race
with h_TossStuff_r where we later reference a host that is about to be
freed or already has been freed.
Add checks for HOSTDELETED in these places, and skip over the deleted
hosts.
Andrew Deason [Fri, 12 Feb 2010 22:30:44 +0000 (16:30 -0600)]
Correct the h_Enumerate_r hostList safety check
Ide1e5aca7c2c4a4af3f62bc07821db694f2f9999 added safety checks for a few
traversals through hostList, including the traversal in h_Enumerate_r.
Unfortunately, h_Enumerate_r may not hold H_LOCK over its entire
traversal (h_Release_r can drop and reacquire it), so the value of
hostCount is not guaranteed to stay the same.
A host may be deleted during the loop, or right near the end, decreasing
hostCount to below our current running 'count' of hosts, triggering the
panic unnecessarily. So instead, remember the value of hostCount.
Derrick Brashear [Sun, 21 Feb 2010 22:15:26 +0000 (17:15 -0500)]
idledead client dont interrupt writes
allowing failover is nonsensical, there's nothing to fail to. keep trying to
write. if we want to change this, we need to handle it better than just this.
Simon Wilkinson [Tue, 9 Feb 2010 19:53:40 +0000 (19:53 +0000)]
Linux: Use current_creds() if stashed creds fail
If we can't use our stashed credentials (because SELinux hates us,
most likely), then fall back to trying the processes current credentials
instead of just oopsing.
afs_TruncateAllSegments() make sure correct afs_size_t comparison is
used when selecting dcache entries for truncation
Insure that afs_TruncateAllSegments() uses the correct [64-bit]
comparison when deciding whether to truncate chunks:
alen - AFS_CHUNKTOBASE(tdc->f.chunk) for a file > 2GB would fail
to be recognised negative with an "afs_int32 newSize", even with
alen = 0 and big tdc->f.chunk.
OpenBSD: don't use AFS_GLOBAL_SUNLOCK on single processor system
Put back the header directives that only turns on AFS_GLOBAL_SUNLOCK
when compiling for multiprocessors system. When enabled on a single
processor OpenBSD system, it is possible to put the entire system
into a lengthy (minutes) lock state when performing multiple AFS
activities. The system behaves MUCH better when AFS_GLOBAL_SUNLOCK
is not set (no problems encopuntered). This whole locking mechanism
needs a bit more examination on OpenBSD before this is useful in
single processor mode.
A shutdown or unmount of AFS on OpenBSD will invariably result in a kernel
panic. This is because the afs_unmount() routine does not (can not?) force
vnode releases if the vnode is still busy. However, it continues on
nonetheless and dies a horrible death a little later.
This update causes a return from afs_unmount() with EBUSY if all the vnodes
weren't released. This results in error messages on shutdown but the overall
process continues more reliably and reboots, for example, work.
There is likely a better solution to this but at least this is no worse than
a system crash and it doesn't require console (or power button) intervention
so it should do until I have the chance to explore further.
Starting with OpenBSD 4.2, the interface list returned by sysctl using
NET_RT_IFLIST contains multiple versions of the data. This really
messes up the rx_getAllAddr_internal() routine that returns a list of
valid interfaces for the system (to the point where none are returned).
This change adds a routine that cleans up the data returned by sysctl
so it returns only a single (the most current) version of the data.
That stops afsd (among others) from being cranky when it starts up.
The internal malloc memory types for IPv6 (M_IP6OPT, ...) conflict
with the type numbers used to designate AFS memory (M_AFSFID, etc.).
This change moves the AFS memory type to a new number that does not
conflict. This is not a serious issue but can create real confusion
when trying to debug or track memory issues, among other things.
When determining the volume type of a volume, vsu_GetVolumeID() checks
to see if the volume name ends in '.backup' or '.readonly' by backing
up the appropriate number of characters from the end of the name. It
does not, however, check to see if it skips past the beginning of the
volume name. This can result in a segmentation fault (which it has for
me on many occasions during a vos release) depending on where memory
is allocated or how/if memory is protected.
This patch corrects this behaviour by checking the volume name string
length prior to doing the string comparison.
Add config param header and sysname number for OpenBSD 4.6.
As well, add an additional parameter to a call to ifa_ifwithnet()
when looking up the MTU for an interface to indicate that the call
should use the default routing table. With the advent of OpenBSD
4.6, the system has started to make provisions for multiple routing
tables which included a change to the calling sequence for this
routine.
Code optimization can not be turned of using the configuration script
(--disable-optimize, etc.) because the compiler directive is associated
with the wrong makefile variable. This fixes it.
Simon Wilkinson [Tue, 2 Feb 2010 15:59:12 +0000 (15:59 +0000)]
Add a set of strings for the InstallationCheck
InstallationCheck needs a strings dictionary to turn its errors
into human readable content. Add such a dictionary, and use the
correct product name and version for each Mac OS X release.
Derrick Brashear [Sun, 17 Jan 2010 06:10:28 +0000 (01:10 -0500)]
create debugging kext package for MacOS
this creates and installs a debugging kext package for macos. it also
always installs the decode-panic script (which can be used even without
the debug kext)
Current versions of both MIT Kerberos and Heimdal disable DES enctypes
by default, but DES enctypes are still required for AFS service tickets.
Probe for either krb5_allow_weak_crypto() (MIT Kerberos 1.8) or
krb5_enctype_enable() (Heimdal) and, if found, call them to enable DES
enctypes. If neither is found, assume that the Kerberos libraries are
old enough that DES is enabled by default.
Russ Allbery [Fri, 22 Jan 2010 19:04:10 +0000 (11:04 -0800)]
Enable weak enctypes for aklog if supported by Kerberos
Current versions of both MIT Kerberos and Heimdal disable DES enctypes
by default, but DES enctypes are still required for AFS service tickets.
Probe for either krb5_allow_weak_crypto() (MIT Kerberos 1.8) or
krb5_enctype_enable() (Heimdal) and, if found, call them to enable DES
enctypes. If neither is found, assume that the Kerberos libraries are
old enough that DES is enabled by default.
Simon Wilkinson [Sat, 16 Jan 2010 15:52:58 +0000 (15:52 +0000)]
Don't double free call structure
If the rx_Read() of the number of bytes in the FetchData64 response
fails, then it sets code, and disposes of the call structure. However,
the length safety check that was added in c7b92a3018044f7aca4d9a77644e5c06ef64d1e9 executes regardless of whether
code is set, and the call has already been freed. So we end up calling
rx_Error with a NULL call structure, and panic.
Simon Wilkinson [Thu, 14 Jan 2010 16:57:15 +0000 (16:57 +0000)]
Don't install compile_et into its own directory
When pinstall sees that the basenames of its two arguments differ,
it assumes that its installing into a path, and creates the missing
directory. This meant that we got /usr/bin/afs_compile_et/compile_et
which wasn't the desired result.
Marc Dionne [Fri, 9 Oct 2009 01:53:03 +0000 (21:53 -0400)]
Linux: kmem_cache_create fix and cleanup
Fix the kmem_cache constructor function to match the current
expected prototype, and cleanup related code. This has been wrong
for a while, but since we were just passing extra parameters the
only effect was to generate a warning.
- Add a new configure test to detect the new constructor function
signature
- Define the older versions of the constructor in osi_compat.h,
making them call the current version
- Move a few compatibility #defines to osi_compat.h
Derrick Brashear [Thu, 31 Dec 2009 12:50:56 +0000 (07:50 -0500)]
viced host always hash on add
currently the openafs 1.4 code doesn't always add a host/port pair to the
hash when an interface address is being added. make the code match what exists
on the head
Change-Id: Ibf56a397b936abd1b0646c63c5dda88a59819538
Reviewed-on: http://gerrit.openafs.org/1053 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com> Tested-by: Alistair Ferguson <alistair.ferguson@mac.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Tested-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Michael Meffie [Wed, 23 Dec 2009 21:38:57 +0000 (16:38 -0500)]
viced: add then remove when changing addresses
When changing a host address, be sure to add the new interface
before removing the old to avoid having the host marked as
deleted if we removed the only valid address. This change was
pulled out of commit ca613599a2537756462a420ae1a632747a433226
viced-host-uuid-and-addr-hashing-corrections-20090530 by
Jeffrey Altman.
Simon Wilkinson [Wed, 23 Dec 2009 13:29:54 +0000 (13:29 +0000)]
Shout less about system call hooks when using keyrings
When keyrings are in use, the user doesn't really care whether or
not we manage to hook the system call table, and the current message
has proved confusing, as it seems to indicate something has gone wrong.
Tone down the warning that's produced when keyrings are in use. This is
1.4.x only, as we're going to completely disable system call probes when
keyrings are in use in 1.5.x
Marc Dionne [Thu, 10 Dec 2009 00:06:18 +0000 (19:06 -0500)]
Linux: deal with ctl_name removal
The binary sysctl interface will be removed in kernel 2.6.33 and
ctl_name will be dropped from the ctl_table structure.
Make the code that uses ctl_name conditional on a configure test.
Marc Dionne [Sun, 20 Dec 2009 03:22:05 +0000 (22:22 -0500)]
Linux: utsrelease.h is moving
In kernel 2.6.33, utsrelease.h has moved to include/generated.
Adapt the configure code to consider that location, and clean
up that section's indentation.
Simon Wilkinson [Sat, 19 Dec 2009 14:48:32 +0000 (14:48 +0000)]
Linux: Flush vcaches when a mount fails
GetVCache (well, really NewVCache) creates a new vcache, with an attached
inode, and links it into the VLRU queue, regardless of whether it is
successful in populating that vcache or not. The attached inode, on Linux,
contains a reference to the super block of the filesystem. If the created
vcache is for the root, however, and populating that vcache failes, then mount
fails, and the super block is disposed of. This leaves us with a vcache in
the VLRU queue which contains a reference to a non-existent inode.
When ShakeLooseVCaches comes along a few minutes later, it attempts to discard
this inode. However, doing so fails because the inode no longer has a valid
super block.
Avoid this trauma by ensuring all vcaches are disposed of before the super
block goes away, in the event of a mount failure.
Change-Id: I68864f1ea401d24adba76164905a17de6ab3e6ce
Reviewed-on: http://gerrit.openafs.org/1003 Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Tested-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from 994ef0e7cab95e2fc6f47fc8838490112e432ffd)
Reviewed-on: http://gerrit.openafs.org/1008 Tested-by: Derrick Brashear <shadow@dementia.org>
Andrew Deason [Thu, 17 Dec 2009 20:59:44 +0000 (14:59 -0600)]
Do not trust FetchData length from fileservers
Currently the Unix CM implicitly trusts that the length from a FetchData
request from a fileserver will always be less than the requested length.
If the fileserver sends more data than requested, we can use up more
cache space than we intended, possibly exceeding the cacheinfo cache
limits.
Add a check for this, and return EIO to the caller if the fileserver
responds with too much data.
Reviewed-on: http://gerrit.openafs.org/996 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit c7b92a3018044f7aca4d9a77644e5c06ef64d1e9)
Implementation of new dump tag and length standard
The implementation follows the specification from October 2007.
All old tags are accecpted as before.
New tags 0x06-0x60 (capital letters) are followed by a 1 byte length
field which may contain directly the length (up to 127) or the length
of the then following length field (max 8) ored with 0x80.
New tags 0x61-0x77a are directly followed by 4 bytes building a 32bit
integer.
0x7b-0xf are single-byte tags, 0x7e meaning next tag is critical.
On this basis unknown tags can be skipped unless they were marked
critical. In this case the restore is aborted.
in dump.h tags following the new standard are marked by an asterisk
Last update: added parameter types for HandleUnknownTag.
Andrew Deason [Fri, 20 Nov 2009 20:15:28 +0000 (14:15 -0600)]
Add safety checks on all hostList traversals
Currently, h_Enumerate checks that it doesn't enumerate over more than
hostCount hosts, in case the hostList has a cycle or is otherwise
corrupt. Add similar checks to all places in the code that loop over
hostList, to prevent the code from getting in an infinite loop under
H_LOCK in the case of a hostList cycle.
Also, ShutDownAndCore instead of assert'ing, so we try and detach
volumes first, possibly reducing salvaging time when we restart after
core'ing.
(cherry picked from 58258ba3b89732ea825e1aff2decab54347ab92e)
Change-Id: Ide1e5aca7c2c4a4af3f62bc07821db694f2f9999
Reviewed-on: http://gerrit.openafs.org/863 Tested-by: Andrew Deason <adeason@sinenomine.net> Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-on: http://gerrit.openafs.org/990 Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Simon Wilkinson [Wed, 22 Jul 2009 00:11:15 +0000 (01:11 +0100)]
Rename installed version of compile_et
Rename the installed version of compile_et to afs_compile_et to avoid
conflicts with other, more standard, users of com_err. Also rename the
man page to match
Simon Wilkinson [Wed, 4 Nov 2009 23:40:39 +0000 (23:40 +0000)]
Prevent VLRUQ race in ShakeLooseVCaches
When ShakeLooseVCaches is called from afs_Daemon, the xvcache lock
is not held. This means that if the GLOCK is dropped for any reason
(for example, whilst purging the dentry cache), then
ShakeLooseVCaches can be raced, end we can end up attempting to
flush the same vcache twice.
The symptoms of this in Linux are that we oops in clear_inode.
Get the xvcache lock in afs_Daemon(), before calling
ShakeLooseVCaches. Also, remove the conditional GLOCK code from
that function. If we don't have the GLOCK on entry, then we're really
in trouble (and both code paths - afs_Daemon and afs_NewVCache should
get the GLOCK for us, anyway)
Simon Wilkinson [Mon, 26 Oct 2009 18:52:52 +0000 (18:52 +0000)]
Remove hardcoded maximum time
When iterating across the buffer list, afs_newslot used a hardcoded
maximum time to find the oldest. Instead of using this, just use the
accesstime of the first unused buffer that we find as the oldest, and
continue as normal.
Sadly, similar changes were never made to afs/afs_buffer.c, so the
same problems remain in the cache manager.
The issue here is with two processes racing in afs_newslot. Calls to
afs_newslot protect buffers with a zero reference count using
afs_bufferLock. If we release afs_bufferLock, before we increase the
reference count of the vcache, then we can end up with newslot
picking the same buffer for two different purposes.
The GLOCK actually protects us from the worst of this, but this fix
is necessary both for correctness, and for symmetry with the file
server buffer code.
Rainer Toebbicke [Fri, 30 Oct 2009 11:10:21 +0000 (12:10 +0100)]
Correct diskused and files when cloning a volume
Recalculates a volume's disk space used and number of files upon
every clone where it is effortless. Even though tracked mostly
correctly, bugs and accidents leave their traces which only a
salvage would correct.
Jeffrey Altman [Tue, 20 Oct 2009 20:16:47 +0000 (16:16 -0400)]
prevent rx peer timeout from reaching 0.0 seconds
The rx peer timeout is computed from the round trip time
calculation. It traditionally has had a lowerbound of 350ms.
The computation in rxi_ComputeRoundTripTime() was incorrect
and instead used 350ms as an upperbound.
rxi_ComputeRoundTripTime() had a second problem wherein if
the actually RTT is shorter than the resolution of the clock
then the RTT would quickly approach 0.0 seconds. Enforce
a lowerbound of 1ms if the RTT for a given packet appears
to be 0.0 seconds.
Andrew Deason [Thu, 15 Oct 2009 18:15:44 +0000 (13:15 -0500)]
Fix a couple more unlink()s in vol-salvage.c
There are a couple more unlink() calls in vol-salvage.c that were using
relative paths. Fix them to use absolute paths and to log a warning if
the unlink() fails.