]> git.michaelhowe.org Git - packages/o/openafs.git/log
packages/o/openafs.git
9 years agoGenerate /usr/src/openafs.tar.bz2 reproducibly
Anders Kaseorg [Sat, 3 Dec 2016 18:39:24 +0000 (13:39 -0500)]
Generate /usr/src/openafs.tar.bz2 reproducibly

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoRespect SOURCE_DATE_EPOCH in cml_version_number
Anders Kaseorg [Sun, 4 Dec 2016 22:19:26 +0000 (17:19 -0500)]
Respect SOURCE_DATE_EPOCH in cml_version_number

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoAdd patches for Linux 4.9
Anders Kaseorg [Wed, 30 Nov 2016 09:52:56 +0000 (04:52 -0500)]
Add patches for Linux 4.9

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoAdd shake-harder patches
Anders Kaseorg [Wed, 30 Nov 2016 09:51:33 +0000 (04:51 -0500)]
Add shake-harder patches

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoBuild-Depend debhelper (>= 9.20160114~) for dh_strip --dbgsym-migration
Anders Kaseorg [Fri, 21 Oct 2016 06:42:56 +0000 (02:42 -0400)]
Build-Depend debhelper (>= 9.20160114~) for dh_strip --dbgsym-migration

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoRelease 1.6.20-1 to unstable debian/1.6.20-1
Benjamin Kaduk [Wed, 30 Nov 2016 21:52:35 +0000 (16:52 -0500)]
Release 1.6.20-1 to unstable

9 years agoRebase patches after new upstream version
Benjamin Kaduk [Wed, 30 Nov 2016 21:51:25 +0000 (16:51 -0500)]
Rebase patches after new upstream version

9 years agoFlesh out changelog for upstream changes
Benjamin Kaduk [Wed, 30 Nov 2016 20:55:01 +0000 (15:55 -0500)]
Flesh out changelog for upstream changes

Note both 1.6.19 and 1.6.20 changes.

9 years agoMerge tag 'upstream/1.6.20'
Benjamin Kaduk [Wed, 30 Nov 2016 21:46:19 +0000 (16:46 -0500)]
Merge tag 'upstream/1.6.20'

Upstream version 1.6.20

9 years agoNew upstream version 1.6.20 upstream/1.6.20
Benjamin Kaduk [Wed, 30 Nov 2016 21:46:03 +0000 (16:46 -0500)]
New upstream version 1.6.20

9 years agoChangelog entry for new upstream release
Benjamin Kaduk [Wed, 30 Nov 2016 20:36:36 +0000 (15:36 -0500)]
Changelog entry for new upstream release

9 years agodir: do not leak contents of deleted directory entries
Mark Vitale [Mon, 7 Nov 2016 19:16:50 +0000 (14:16 -0500)]
dir: do not leak contents of deleted directory entries

Deleting an AFS directory entry (afs_dir_Delete) merely removes the
entry logically by updating the allocation map and hash table.  However,
the entry itself remains on disk - that is, both the cache manager's
cache partition and the fileserver's vice partitions.

This constitutes a leak of directory entry information, including the
object's name and MKfid (vnode and uniqueid).  This leaked information
is also visible on the wire during FetchData requests and volume
operations.

Modify afs_dir_Delete to clear the contents of deleted directory
entries.

Patchset notes:
This commit only prevents leaks for newly deleted entries.  Another
commit in this patchset prevents leaks of partial object names upon
reuse of pre-existing deleted entries.  A third commit in this
patchset prevents yet another kind of directory entry leak, when
internal buffers are reused to create or enlarge existing directories.
All three patches are required to prevent new leaks.  Two additional
salvager patches are also included to assist administrators in the
cleanup of pre-existing leaks.

[kaduk@mit.edu: style nit for sizeof() argument]

Reviewed-on: https://gerrit.openafs.org/12460
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit f591f6fae3d8b8d44140ca64e53bad840aeeeba0)

Change-Id: I41f76649f4bed609793b944db32c5ae62aa07458
Reviewed-on: https://gerrit.openafs.org/12465
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: do not leak stale data in buffers
Benjamin Kaduk [Mon, 7 Nov 2016 05:29:22 +0000 (23:29 -0600)]
afs: do not leak stale data in buffers

Similar to the previous commit, zero out the buffer when fetching
a new slot, to avoid the possibility of leaving stale data in
a reused buffer.

We are not supposed to write such stale data back to a fileserver,
but this is an extra precaution in case of bugs elsewhere -- memset
is not as expensive as it was in the 1980s.

Reviewed-on: https://gerrit.openafs.org/12459
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit a26c5054ee501ec65db3104f6a6a0fef634d9ea7)

Change-Id: Id60559ed84581e2f6a50cd4313f64780b8a0bafd
Reviewed-on: https://gerrit.openafs.org/12464
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoMake OpenAFS 1.6.20
Benjamin Kaduk [Wed, 30 Nov 2016 16:55:55 +0000 (10:55 -0600)]
Make OpenAFS 1.6.20

Update version strings for the 1.6.20 security release.

Change-Id: I7f5ffa5e20173d399ed79dfb6358882caf05e27e
Reviewed-on: https://gerrit.openafs.org/12467
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoUpdate NEWS for 1.6.20
Benjamin Kaduk [Wed, 30 Nov 2016 15:28:18 +0000 (09:28 -0600)]
Update NEWS for 1.6.20

Change-Id: Id5bfbf5013f1ce7879473a1d40fea535314f6370
Reviewed-on: https://gerrit.openafs.org/12466
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agodir: fileserver leaks names of file and directories
Mark Vitale [Fri, 13 May 2016 04:01:31 +0000 (00:01 -0400)]
dir: fileserver leaks names of file and directories

Summary:
Due to incomplete initialization or clearing of reused memory,
fileserver directory objects are likely to contain "dead" directory
entry information.  These extraneous entries are not active - that is,
they are logically invisible to the fileserver and client.  However,
they are physically visible on the fileserver vice partition, on the
wire in FetchData replies, and on the client cache partition.  This
constitutes a leak of directory information.

Characterization:
There are three different kinds of "dead" residual directory entry
leaks, each with a different cause:

1. There may be partial name data after the null terminator in a live
directory entry.   This happens when a previously used directory entry
becomes free, then is reused for a directory entry with a shorter name.
This may be addressed in a future commit.

2. "Dead" directory entries are left uncleared after an object is
deleted or renamed.  This may be addressed in a future commit.

3. Residual directory entries may be inadvertently picked up when a new
directory is created or an existing directory is extended by a 2kiBi
page.  This is the most severe problem and is addressed by this commit.

This third kind of leak is the most severe because the leaked
directory information may be from _any_ other directory residing on the
fileserver, even if the current user is not authorized to see that
directory.

Root cause:
The fileserver's directory/buffer package shares a pool of directory
page buffers among all fileserver threads for both directory reads and
directory writes.  When the fileserver creates a new directory or
extends an existing one, it uses any available unlocked buffer in the
pool.  This buffer is likely to contain another directory page recently
read or written by the fileserver.  Unfortunately the fileserver only
initializes the page header fields (and the first two "dot" and "dotdot"
entries in the case of a new directory).  Any residual entries in the
rest of the directory page are now logically "dead", but still
physically present in the directory.  They can easily be seen on the
vice partition, on the wire in a FetchData reply, and on the cache
partition.

Note:
The directory/buffer package used by the fileserver is also used by the
salvager and the volserver.  Therefore, salvager activity may also leak
directory information to a certain extent.   The volserver vos split
command may also contribute to leaks.  Any volserver operation that
creates volumes (create, move, copy, restore, release) may also have
insignificant leaks.  These less significant leaks are addressed by this
commit as well.

Exploits:
Any AFS user authorized to read directories may passively exploit this
leak by capturing wire traffic or examining his local cache as he/she
performs authorized reads on existing directories.  Any leaked data will
be for other directories the fileserver had in the buffer pool at the
time the authorized directories were created or extended.

Any AFS user authorized to write a new directory may actively exploit
this leak by creating a new directory, flushing cache, then re-reading
the newly created directory.  Any leaked data will be for other
directories the fileserver had in the buffer pool within the last few
seconds.  In this way an authorized user may sample current fileserver
directory buffer contents for as long as he/she desires, without being
detected.

Directories already containing leaked data may themselves be leaked,
leading to multiple layers of leaked data propagating with every new or
extended directory.

The names of files and directories are the most obvious source of
information in this leak, but the FID vnode and uniqueid are leaked as
well.  Careful examination of the sequences of leaked vnode numbers and
uniqueids may allow an attacker to:
- Discern each layer of old directories by observing breaks in
  consecutive runs of vnode and/or uniqueid numbers.
- Infer which objects may reside on the same volume.
- Discover the order in which objects were created (vnode) or modified
  (uniqueid).
- Know whether an object is a file (even vnode) or a directory (odd
  vnode).

Prevent new leaks by always clearing a pool buffer before using it to
create or extend a directory.

Existing leaks on the fileserver vice partitions may be addressed in a
future commit.

Reviewed-on: https://gerrit.openafs.org/12458
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 70065cb1831dbcfd698c8fee216e33511a314904)

Change-Id: Ifa9d9266368ed3775898b7628ca980edcb230356
Reviewed-on: https://gerrit.openafs.org/12463
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agobos: allow salvage -salvagedirs with -all
Benjamin Kaduk [Sun, 6 Nov 2016 21:06:02 +0000 (15:06 -0600)]
bos: allow salvage -salvagedirs with -all

Allow the -salvagedirs option on bos salvage when invoked with the -all
option to salvage the whole server.   The -salvagedirs -all options will
rebuild every directory on the server.

Reviewed-on: https://gerrit.openafs.org/12457
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 1637c4d7c1ce407390f65509a3a1c764a0c06aa6)

[not actually cherry picked, but is the equivalent functionality]

Change-Id: I3978a5c4a704e0a0f2aab1cfad75573c16496a4d
Reviewed-on: https://gerrit.openafs.org/12462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agodafs: honor salvageserver -salvagedirs
Michael Meffie [Sun, 6 Nov 2016 20:31:22 +0000 (14:31 -0600)]
dafs: honor salvageserver -salvagedirs

Do not ignore the -salvagedirs option when given to the salvageserver.
When the salvageserver is running with this option, all directories will
be rebuilt by salvages spawned by the dafs salvageserver, including all
demand attach salvages and salvages of individual volumes initiated by
bos salvage.

This does not affect the whole partition salvages initiated by bos
salvage -all.

Reviewed-on: https://gerrit.openafs.org/12456
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 9e66234951cca3ca77e94ab431f739e85017a23a)

Change-Id: I121299a5524cb46a519aead7818b0a7bd2fd4f69
Reviewed-on: https://gerrit.openafs.org/12461
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoMake OpenAFS 1.6.19
Stephan Wiesand [Tue, 1 Nov 2016 13:27:04 +0000 (14:27 +0100)]
Make OpenAFS 1.6.19

Update version strings and NEWS for the 1.6.19 release.

Change-Id: Icf6052d0d482210555ebe1e2d375fee2662b60cd
Reviewed-on: https://gerrit.openafs.org/12426
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoMake OpenAFS 1.6.19pre1
Stephan Wiesand [Wed, 17 Aug 2016 12:14:15 +0000 (14:14 +0200)]
Make OpenAFS 1.6.19pre1

Update version strings for the first 1.6.19 prerelease.

Change-Id: I0c3fcb99f1d3154e11c32673683e3dc5f08ef30d
Reviewed-on: https://gerrit.openafs.org/12368
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoUpdate NEWS for 1.6.19pre1
Stephan Wiesand [Wed, 28 Sep 2016 10:39:26 +0000 (12:39 +0200)]
Update NEWS for 1.6.19pre1

Preliminary release notes for OpenAFS 1.6.19

Change-Id: Ida6c6a70f2c26f1ddaea6d0b12d3c72cfbde06a1
Reviewed-on: https://gerrit.openafs.org/12395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: afs_linux_write_end only commit copied
Yadav Yadavendra [Mon, 3 Oct 2016 19:25:08 +0000 (15:25 -0400)]
afs: afs_linux_write_end only commit copied

In afs_linux_write_end() only commit the number of bytes actually copied
to the page.

Reviewed-on: https://gerrit.openafs.org/12409
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 1cd86de2912af9ad709d2d7cf8aa35d5d28fb6b3)

Change-Id: I281078577cf3d90c1e052dacad9076cffe68586f
Reviewed-on: https://gerrit.openafs.org/12413
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agotests/util/ktime-t.c: Specify EST offset in TZ
Anders Kaseorg [Sun, 9 Oct 2016 10:39:12 +0000 (06:39 -0400)]
tests/util/ktime-t.c: Specify EST offset in TZ

This fixes test failures observed on new Debian build servers that no
longer install tzdata by default.  As the tests expect, EST is defined
as UTC−05:00 with no daylight saving time.

Reviewed-on: https://gerrit.openafs.org/12414
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit e17cd5df703b8a924591f92c76636dd9e0d9eaf9)

Change-Id: I392bfb2bb3d2bbf8ff73a87650ca0d7e1268b356
Reviewed-on: https://gerrit.openafs.org/12415
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoRelease 1.6.18.3-3 to unstable debian/1.6.18.3-3
Anders Kaseorg [Wed, 12 Oct 2016 22:04:23 +0000 (18:04 -0400)]
Release 1.6.18.3-3 to unstable

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoDepend lsb-base (>= 3.0-6) for init-functions
Anders Kaseorg [Wed, 12 Oct 2016 21:35:53 +0000 (17:35 -0400)]
Depend lsb-base (>= 3.0-6) for init-functions

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFix FTBFS with tzdata uninstalled
Anders Kaseorg [Sun, 9 Oct 2016 10:51:19 +0000 (06:51 -0400)]
Fix FTBFS with tzdata uninstalled

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoLINUX: Avoid 'wakeup' define
Andrew Deason [Mon, 24 Sep 2012 16:31:29 +0000 (11:31 -0500)]
LINUX: Avoid 'wakeup' define

Make 'wakeup' a static inline function instead of redefining 'wakeup',
so we can use the keyword 'wakeup' elsewhere.

Specifically, 'wakeup' is used in some Linux kernel structures, so
redefining it can confuse some things.

Reviewed-on: http://gerrit.openafs.org/8149
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 94115df4352b872ae096977d9a77fad935864688)

Change-Id: I6dadad579bf62677c76fd72be6a4ebe7e66a5c60
Reviewed-on: https://gerrit.openafs.org/12366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLINUX: Define printf/uprintf as variadic macros
Andrew Deason [Mon, 24 Sep 2012 18:03:34 +0000 (13:03 -0500)]
LINUX: Define printf/uprintf as variadic macros

Instead of defining the string 'printf' itself, make printf (and
uprintf) variadic macros. This avoids renaming printf to printk for
things like '__attribute__((format(printf,X,Y)))'.

Note that this is Linux-specific; compilers on other platforms may not
support variadic macros.

This avoids many warnings in the Linux kernel module build if we
include Linux headers after AFS headers.

Reviewed-on: http://gerrit.openafs.org/8150
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 179096d9b2c461f02236bbf670b46597ff2d4c3c)

Change-Id: I5c1c80cb5bd6996b0329969e16f9359fa1dcbc91
Reviewed-on: https://gerrit.openafs.org/12365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agotests: avoid passing NULL strings to vprintf
Michael Meffie [Mon, 22 Aug 2016 23:53:34 +0000 (19:53 -0400)]
tests: avoid passing NULL strings to vprintf

Some libc implementations will crash when NULL string arguments are given to
*printf.  Avoid passing NULL string arguments in the make check tests that did
so, and pass the string "(null)" instead.

Reviewed-on: https://gerrit.openafs.org/12377
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 2fe3a28c6ec0ff9d19ddec5500b3a5e69b483210)

Change-Id: Id8f1635444b5b49e3250addf36b64fccafd59941
Reviewed-on: https://gerrit.openafs.org/12396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoubik: Return an error from ContactQuorum when inquorate
Andrew Deason [Mon, 19 Sep 2016 01:29:34 +0000 (21:29 -0400)]
ubik: Return an error from ContactQuorum when inquorate

Currently, when we need to contact all other servers in the ubik
quorum (to create a write transaction, and send db changes, etc), we
call the ContactQuorum_* family of functions. To contact each server,
those functions follow an algorithm like the following pseudocode:

{
    int rcode = 0;
    int code;
    int okcalls = 0;

    for (ts = ubik_servers; ts; ts = ts->next) {
if (ts->up) {
    code = contact_server(ts);
    if (code) {
rcode = code;
    } else {
okcalls++;
    }
}
    }

    if (okcalls + 1 >= ubik_quorum) {
return 0;
    } else {
return rcode;
    }
}

This means that if we successfully contact a majority of ubik sites,
we return success, even if some sites returned an error. If most sites
fail, then we return an error (we arbitrarily pick the last error we
got).

This means that in most situations, a successful write transaction is
guaranteed to have been transmitted to a majority of ubik sites, so
the written data cannot be lost (at least one of the sites that got
the new data will be in a future elected quorum).

However, if a site is already known to be down (ts->up is 0), then we
skip trying to contact that site, but we also don't set any errors.
This means that if a majority of sites are already known to be down
(ts->up is 0), then we can indicate success for a write transaction,
even though the relevant data has not been written to a majority of
sites. In that situation, it is possible to lose data.

Most of the time this is not possible, since a majority of sites must
be 'up' for the sync site to be elected and to allow write
transactions at all. There are a few ways, though, in which we can get
into a situation where most other sites are 'down', but we still let a
write transaction go through.

An example scenario:

Say we have sites A, B, and C. All 3 sites come up at the same time,
and A is the lowest IP so it starts an election (after around BIGTIME
seconds). Right after A is elected the sync site, sites B and C will
have 'lastYesState' set to 0, since site A hasn't yet sent out a
beacon as the sync site.

A client can then start a write to the ubik database on site A, which
site A will allow since it's the sync site (and presumably all the
relevant recovery flags are set). Site A will try to contact sites B
and C for a DISK_Begin call, but lastYesState is set to 0 on those
sites. This will cause DISK_Begin to return UNOQUORUM
(urecovery_AllBetter will return 0, because uvote_HaveSyncAndVersion
will return 0, because lastYesState is not set).

So site A will get a UNOQUORUM error from sites B and C, and so site A
will set 'ts->up' to 0 for sites B and C, and will return UNOQUORUM to
the client. The client may then try to retry the call (because
UNOQUORUM is not treated as a 'global' error in ubikclient.c's
ubik_Call_New), or another client write request could come in. Now
that 'ts->up' is unset for both sites B and C, we skip trying to
contact any remote sites, and the ContactQuorum functions will return
success. So the ubik write will go through successfully, but the new
data will only be on site A.

At this point, if site A crashes, then sites B and C will elect a
quorum, and will not have the modifications that were written to site
A (so the data written to site A is lost). If site A stays up, then it
will go through database recovery, sending the entire database file to
sites B and C.

In addition, it's very possible in this scenario for a client to write
to the database, and then try to read back data and confusingly get a
different result. For example, if someone issues the following two
commands while triggering the above scenario:

    $ pts createuser testuser
    $ pts examine testuser

If the second command contacts site B or C, then it will always fail,
saying that the user doesn't exist (even though the first command
succeeded). This is because sites B and C don't have the new data
written to site A, at least temporarily. While this confusing behavior
is not completely avoidable in ubik (this can always happen
'sometimes' due to network errors and such), with the scenario
described here, it happens 100% of the time.

The general scenario described above can also happen if sites B and C
are suddenly legitimately unreachable from site A, instead of throwing
the UNOQUORUM error. All of the steps are pretty much the same, but
there is a bit of a delay while we wait for the DISK_Begin call to
fail.

To fix this, do not let 0 be returned if a quorum has not been
reached.  In some sense, UNOQUORUM could *always* be returned in
that case, but it is more in keeping with historical behavior to
return a "real" error if there is one available.

It is somewhat questionable whether we should even be propagating
errors received from calls like DISK_Begin/DISK_Commit to the ubik
client (e.g. if we get a -1 from trying to contact a remote site, we
return -1 to the client, so the client may think it couldn't reach the
site at all). But this commit does not change any of that logic, and
should only change behavior when a majority of sites have 'ts->up'
unset.  A later commit might effect the change to always return
UNOQUORUM and ignore the actual error values from the DISK_ calls,
but that is not needed to fix the immediate issue.

An important note:

Before this commit, there was a window of about 15 seconds after a
sync site is elected where a write to the ubik db would appear to be
successful, but would only modify the ubik db on the sync site.
(Details described above.) With this commit, writes during that
15-second window will instead fail, because we cannot guarantee that
we won't lose that data. If someone relies on 'udebug' data from the
sync site to let them know when writes will go through successfully,
this commit could appear to cause new errors.

[kaduk@mit.edu: transfer long commit message describing the issue
from an alternative fix, and tidy up accordingly]
Reviewed-on: https://gerrit.openafs.org/12289
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit fac0b742960899123dca6016f6ffc6ccc944f217)

Change-Id: Ic9b4ceada6c743dde49aba82217bb3a9f440bb69
Reviewed-on: https://gerrit.openafs.org/12389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@dson.org>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoFix compile error for PPC64 gcc 6.1.1
Matt K. Light [Tue, 13 Sep 2016 19:18:38 +0000 (14:18 -0500)]
Fix compile error for PPC64 gcc 6.1.1

Cast function pointer stubs to remove compile errors
on Fedora 24 PPC64 with ggcc 6.1.1

FIXES 133407

Reviewed-on: https://gerrit.openafs.org/12386
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 733dcec01784617e3354c2b8b29f50b09464a4bb)

Change-Id: Ic3af05a33a9df00449c5d68aa0c481167c23e60a
Reviewed-on: https://gerrit.openafs.org/12388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoSOLARIS: Support VSW_STATS
Andrew Deason [Wed, 8 Jan 2014 00:24:54 +0000 (18:24 -0600)]
SOLARIS: Support VSW_STATS

Specify the VSW_STATS flag to the vfsdef_t structure we give to
Solaris. This turns on statistics that can be retrieved via fsstat(1M)
and allows the fsinfo::: DTrace provider to work with AFS files.

We don't need to actually maintain these statistics; Solaris does that
for us. This flag just signifies that our vfs_t structure is capable
of storing the information. Since we get our vfs_t from Solaris (via
domount(), it gives us a vfs_t when it calls our afs_mount function)
and do not allocate a vfs_t ourselves, we are safe and this is fine to
do.

Reviewed-on: http://gerrit.openafs.org/10679
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit b0f433986ce344bf153cce1f6372de20750e052b)

Change-Id: I2403703f9caeb190563360d8571ee0be46890f4d
Reviewed-on: https://gerrit.openafs.org/12371
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoMake setting of CFLAGS_NOSTRICT make sense
Benjamin Kaduk [Thu, 20 Aug 2015 17:55:02 +0000 (13:55 -0400)]
Make setting of CFLAGS_NOSTRICT make sense

Previously, we would set -fno-strict-aliasing only when
--enable-checking was given to configure but not
--enable-checking=all.  The intent seems to have been to
only warn about strict aliasing violations when --enable-checking=all
is in use, but that there was no need to disable the strict-aliasing
diagnostics when -Werror was not enabled.

Unfortunately, -fno-strict-aliasing affects not only the diagnostics
emitted by the compiler, but also the code generation!  So we were
leaving the normal (no --enable-checking) case with the compiler
assuming C's strict aliasing rules.  The OpenAFS codebase has
historically not been strict-aliasing safe (for example,
commit 15e8678661ec49f5eac3954defad84c06b3e0164 refers to a
runtime crash using a certain compiler version, which is diagnosed
as the compiler using the C strict aliasing rules to make
optimizations that exposed the invalid program code.

To avoid futher surprises due to new compiler optimizations
that utilize the C strict aliasing rules, always disable
strict aliasing except when --enable-checking=all is used.

Reviewed-on: https://gerrit.openafs.org/11988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 687b4d8af07dbcf187dea685e75b420884727efd)

Change-Id: I03b64465a29243f2b4fdaa12e962f078c45ae344
Reviewed-on: https://gerrit.openafs.org/12308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoSquash a frightening number of warnings from XBSA-related code
Anders Kaseorg [Sat, 1 Aug 2015 07:15:39 +0000 (03:15 -0400)]
Squash a frightening number of warnings from XBSA-related code

Mostly missing prototypes and mismatched format strings, but also some
more disturbing bugs.

Reviewed-on: http://gerrit.openafs.org/11960
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
(cherry picked from commit 540050bbc893416fbd075ed5e349abaa5baaeba1)

Change-Id: I45711fb064490a51a5ecf316b89073dbfabab55b
Reviewed-on: https://gerrit.openafs.org/12357
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoubik: Don't RECFOUNDDB if can't contact most sites
Andrew Deason [Sun, 1 May 2016 16:24:30 +0000 (11:24 -0500)]
ubik: Don't RECFOUNDDB if can't contact most sites

Currently, the ubik recovery code will always set UBIK_RECFOUNDDB
during recovery, after asking all other sites for their dbversions.
This happens regardless of how many sites we were actually able to
successfully contact, even if we couldn't contact any of them.

This can cause problems when we are unable to contact a majority of
sites with DISK_GetVersion. Since, if we haven't contacted a majority
of sites, we cannot say with confidence that we know what the best db
version available is (which is what UBIK_RECFOUNDDB represents; that
we've found which database is the one we should be using). This can
also result in UBIK_RECHAVEDB in a similar situation, indicating that
we have the best db version locally, even though we never actually
asked anyone else what their db version was.

For example, say site A is the sync site going through recovery, and
DISK_GetVersion fails for the only other sites B and C. Site A will
then set UBIK_RECFOUNDDB, and will claim that site A has the best db
version available (UBIK_RECHAVEDB). This allows site A to process ubik
write transactions (causing the db to be labelled with a new epoch),
or possibly to send the db to the other sites via DISK_SendFile, if
they quickly become available during recovery. Ubik write transactions
can succeed in this situation, because our ContactQuorum_* calls will
succeed if we never try to contact a remote site ('rcode' defaults to
0).

This situation should be rather rare, because normally a majority of
sites must be reachable by site A for site A to be voted the sync site
in the first place. However, it is possible for site A to lose
connectivity to all other sites immediately after sync site election.
It is also possible for site A to proceed far enough in the recovery
process to set UBIK_RECHAVEDB before it loses its sync site status.

As a result of all of this, if a site with an old database comes
online and there are network connectivity problems between the other
sites and a ubik write request comes in, it's possible for the "old"
database to overwrite the "new" database. This makes it look as if the
database has "rolled back" to an earlier version.

This should be possible with any ubik database, though how to actually
trigger this bug can change due to different ubik servers setting
different network timeouts. It is probably the most likely with the
VLDB, because the VLDB is typically the most frequently written
database.

If a VLDB reverts to an earlier version, it can result in existing
volumes to appear to not exist in the VLDB, and can result in new
volumes re-using volume IDs from existing volumes. This can result in
rather confusing errors.

To fix this, ensure that we have contacted a majority of sites with
DISK_GetVersion before indicating that we have located the best db
version. If we've contacted a majority of sites, then we are
guaranteed (under ubik assumptions) that we've found the best version,
since previous writes to the database should be guaranteed to hit a
majority of sites (otherwise they wouldn't be successful).

If we cannot reach a majority of sites, we just don't set
UBIK_RECFOUNDDB, and the recovery process restarts. Presumably on the
next iteration we'll be able to contact them, or we'll lose sync site
status if we can't reach the other sites for long enough.

Reviewed-on: https://gerrit.openafs.org/12281
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit d3dbdade7e8eaf6da37dd6f1f53d9f1384626071)

Change-Id: I4f4e7255efd3e16e3acfec8f90bf2019cab1fb63
Reviewed-on: https://gerrit.openafs.org/12339
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoMark openafs-doc Multi-Arch: foreign
Anders Kaseorg [Thu, 15 Sep 2016 07:29:38 +0000 (03:29 -0400)]
Mark openafs-doc Multi-Arch: foreign

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoExtend BCP78 dual license Lintian override to debian/copyright
Anders Kaseorg [Thu, 15 Sep 2016 07:25:55 +0000 (03:25 -0400)]
Extend BCP78 dual license Lintian override to debian/copyright

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoDrop openafs-dbg in favor of automatic dbgsym packages
Anders Kaseorg [Thu, 15 Sep 2016 07:25:31 +0000 (03:25 -0400)]
Drop openafs-dbg in favor of automatic dbgsym packages

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoRelease 1.6.18.3-2 to unstable debian/1.6.18.3-2
Anders Kaseorg [Sun, 11 Sep 2016 21:15:47 +0000 (17:15 -0400)]
Release 1.6.18.3-2 to unstable

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agodebian/po/zh_CN.po: Fix headers
Anders Kaseorg [Sun, 11 Sep 2016 21:15:24 +0000 (17:15 -0400)]
debian/po/zh_CN.po: Fix headers

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoClean doxyen-generated documentation with dh_doxygen
Anders Kaseorg [Tue, 6 Sep 2016 02:36:56 +0000 (22:36 -0400)]
Clean doxyen-generated documentation with dh_doxygen

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoDrop hardening-wrapper in favor of passing flags via CC
Anders Kaseorg [Tue, 6 Sep 2016 02:35:41 +0000 (22:35 -0400)]
Drop hardening-wrapper in favor of passing flags via CC

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agotests: remove unused variable in tests/util/ktime-t.c
Marc Dionne [Mon, 9 Apr 2012 23:00:36 +0000 (19:00 -0400)]
tests: remove unused variable in tests/util/ktime-t.c

errors is set but not used - remove it.

Reviewed-on: http://gerrit.openafs.org/7142
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
(cherry picked from commit f971a36968bdcb224ff3ffb663929d4febcab5d5)

Change-Id: I72afced31735012b2832c46d0b4efd83c67c17e2
Reviewed-on: https://gerrit.openafs.org/12373
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agovenus: fix memory leak
Marcio Barbosa [Tue, 28 Jun 2016 15:48:06 +0000 (12:48 -0300)]
venus: fix memory leak

The fs getserverprefs command displays preference
ranks for file / volume location server machine
interfaces. In order to get the complete set of
preference ranks, the VIOC_GETSPREFS system call
might have to be called several times. If so, the
memory previously allocated should be released.

Reviewed-on: https://gerrit.openafs.org/12315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit d3b8a05d229a80100f40fca4dfdcd820313fcea8)

Change-Id: Iccd9b98aea1c7cf1d63ad20c470baabe09f7a0d7
Reviewed-on: https://gerrit.openafs.org/12340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: incorrect comments for afs_ClearStatus
Mark Vitale [Thu, 18 Jun 2015 19:32:36 +0000 (15:32 -0400)]
afs: incorrect comments for afs_ClearStatus

The brief description was identical to the one for afs_Analyze.

Update it to accurately describe afs_ClearStatus.

Reviewed-on: https://gerrit.openafs.org/12005
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 7f8af1b384cfdc2964a122953e4102b4d82e6cb1)

Change-Id: Icb99b61bb9ccf4d0362fc370aa4ab07cbf730b05
Reviewed-on: https://gerrit.openafs.org/12342
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: document missing afs_Analyze parm
Mark Vitale [Thu, 18 Jun 2015 19:54:28 +0000 (15:54 -0400)]
afs: document missing afs_Analyze parm

rxconn was missing from the comments; add it.

Reviewed-on: https://gerrit.openafs.org/12004
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit b3e85976936239e30d44da00bf28fbe8487f6998)

Change-Id: I8a56824b9e14971b7e04698ef449daf3d8422889
Reviewed-on: https://gerrit.openafs.org/12341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: fix memory leak
Marcio Barbosa [Thu, 3 Mar 2016 21:23:28 +0000 (18:23 -0300)]
afs: fix memory leak

An error code is returned by afs_ProcessOpCreate if
this function can not allocate memory for ttargetName.

This function should release the memory previously
allocated for tname and decrement the reference count
of tdp as well.

Reviewed-on: https://gerrit.openafs.org/12208
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit bc123573539084ffc5a16ef1efaaaced5b2be202)

Change-Id: Ia5a09fe860b7a110ad55c111551702e20367ba1b
Reviewed-on: https://gerrit.openafs.org/12309
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: remove commented out sleep in afs_call.c
Michael Meffie [Thu, 28 Apr 2016 21:23:23 +0000 (17:23 -0400)]
afs: remove commented out sleep in afs_call.c

The cell info setup was moved to the beginning of the startup sequence
and an unnecessary sleep commented out in the syscall in which the cell
info was set in commit 3fa5f389b2b7778cf0df5a506c91b427b147c4c2.

Clean up afs_call.c a bit by removing this commented out code.

Reviewed-on: https://gerrit.openafs.org/12277
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 591da537e22be88da23216b2640331a7338ce0ae)

Change-Id: I9964603d68feea840cb70056dafad96d2c6adea2
Reviewed-on: https://gerrit.openafs.org/12307
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: remove commented out AIX specific tweak
Michael Meffie [Thu, 28 Apr 2016 21:15:06 +0000 (17:15 -0400)]
afs: remove commented out AIX specific tweak

This AIX specific code block has been commented out since
openafs-ibm-1_0.  The comments seem to indicate this was a networking
tweak specific to AIX, but the kernel variables involved were not
exported.  Clean up afs_call.c by removing this dead code.

Reviewed-on: https://gerrit.openafs.org/12276
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
(cherry picked from commit 5277460eaa300fc973b59d007cd3eaea93d30873)

Change-Id: Idcf94dc5962a6bb183af3bfccead3b17cff2ee58
Reviewed-on: https://gerrit.openafs.org/12306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoafs: cleanup remnant afs_vfs_mount prototype in afs_call.c
Michael Meffie [Thu, 28 Apr 2016 20:52:42 +0000 (16:52 -0400)]
afs: cleanup remnant afs_vfs_mount prototype in afs_call.c

The call to afs_vfs_mount() in afs_call.c was removed in commit
a5ab24af71efe6b80eb0f78d1979c5ab1d1e594d.  Remove the remnant prototype
and the useless conditionals around it.

Reviewed-on: https://gerrit.openafs.org/12275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 91f5cecc937923e16c5feda675fccd36d2b95164)

Change-Id: I6463d012c0c00b4a2738fa1045e822cda5c3304a
Reviewed-on: https://gerrit.openafs.org/12305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoFix typo in kaserver appendix
Benjamin Kaduk [Sat, 14 May 2016 18:37:54 +0000 (13:37 -0500)]
Fix typo in kaserver appendix

Though it's very unlikely that someone would actually want to
set up a new kaserver installation, if we have documentation for
it, it ought to at least do what it claims to do.

Thus, change kinit to klog where it was intended.

Reported by Karl-Philipp Richter.

FIXES 133043

Reviewed-on: https://gerrit.openafs.org/12286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 4bd716223492aec23599a5ac01bce3cc47160bfd)

Change-Id: I0390a260e53a978e5a45aaff19b832c2d4dc4f9b
Reviewed-on: https://gerrit.openafs.org/12304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoFind Tivoli TSM headers in 64 bit location
Jonathon Weiss [Fri, 15 Apr 2016 23:29:58 +0000 (19:29 -0400)]
Find Tivoli TSM headers in 64 bit location

When building with --enable-tivoli-tsm locate the Tivoli TSM headers
if they are installed in the path used by the 64 bit Tivoli TSM
installation.

Reviewed-on: https://gerrit.openafs.org/12258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 9c6e6d4c34d867639ac90ba9a46084f3700b57d1)

Change-Id: I7d47304eed94e0bc2607309985ac9247d6908e0c
Reviewed-on: https://gerrit.openafs.org/12259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoRelease 1.6.18.3-1 to unstable debian/1.6.18.3-1
Anders Kaseorg [Thu, 4 Aug 2016 19:44:48 +0000 (15:44 -0400)]
Release 1.6.18.3-1 to unstable

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoSpell “directory” correctly in previous changelog entry
Anders Kaseorg [Wed, 3 Aug 2016 20:57:08 +0000 (16:57 -0400)]
Spell “directory” correctly in previous changelog entry

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFlesh out changelog for 1.6.18.3
Anders Kaseorg [Wed, 3 Aug 2016 20:56:27 +0000 (16:56 -0400)]
Flesh out changelog for 1.6.18.3

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoMerge tag 'upstream/1.6.18.3' into debian
Anders Kaseorg [Wed, 3 Aug 2016 20:54:27 +0000 (16:54 -0400)]
Merge tag 'upstream/1.6.18.3' into debian

Upstream version 1.6.18.3

9 years agoImported Upstream version 1.6.18.3 upstream/1.6.18.3
Anders Kaseorg [Wed, 3 Aug 2016 20:54:08 +0000 (16:54 -0400)]
Imported Upstream version 1.6.18.3

9 years agoAdd changelog entry for 1.6.18.3
Anders Kaseorg [Wed, 3 Aug 2016 20:52:32 +0000 (16:52 -0400)]
Add changelog entry for 1.6.18.3

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoMake OpenAFS 1.6.18.3
Stephan Wiesand [Wed, 3 Aug 2016 12:11:12 +0000 (14:11 +0200)]
Make OpenAFS 1.6.18.3

Update configure version strings for 1.6.18.2. Note that macos kext
can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha,
b beta, f final candidate so we have no way to represent 1.6.18.3.
Switch to 1.6.19 dev 3 for macos.

Change-Id: I30fed9209c101d290b8bd182c8f90efd83062caf
Reviewed-on: https://gerrit.openafs.org/12356
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoUpdate NEWS for 1.6.18.3
Stephan Wiesand [Wed, 3 Aug 2016 12:08:46 +0000 (14:08 +0200)]
Update NEWS for 1.6.18.3

Release notes for OpenAFS 1.6.18.3

Change-Id: I672d45d65db8bb133aa9f80394a86ccd68444975
Reviewed-on: https://gerrit.openafs.org/12355
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLinux 4.7: Follow key_alloc API change
Anders Kaseorg [Tue, 26 Jul 2016 01:04:59 +0000 (21:04 -0400)]
Linux 4.7: Follow key_alloc API change

Linux v4.7-rc1~124^2~2^2^2~9 adds an eighth optional argument
restrict_link.  The same commit adds a KEY_ALLOC_BYPASS_RESTRICTION
macro, which we test so we can avoid adding another configure test.

Reviewed-on: https://gerrit.openafs.org/12345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 83a0f2a9ef88e63fbd300fbb436c17ca80c245b4)

Change-Id: I1ba16468888e160fdedf90ff1a9007d90dce9c3b
Reviewed-on: https://gerrit.openafs.org/12348
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoSOLARIS: corrupted content of mmap'd files over 4GiB
Mark Vitale [Fri, 27 May 2016 20:44:17 +0000 (16:44 -0400)]
SOLARIS: corrupted content of mmap'd files over 4GiB

Many Solaris programs and utilities (notably mdb and cp) use mmap() in
their implementation.  When AFS files exceeding 4GiB are mmap'd, the
contents of the file will be incorrectly mapped into memory. Starting at
4GiB + 1, the first 4GiB will be repeated for the remainder of the file.
If the mmap'd file is written back to storage (AFS or otherwise), the
newly created file will also be corrupted.

This is due to a bug in the afs_map() routine that supports mmap() of
AFS files on Solaris.  The segvn_crarg.offset passed to the Solaris
virtual memory APIs is incorrectly cast to u_int, causing it to wrap at
4GiB.

Although Solaris passes the offset from fop_map() to afs_map() as type
offset_t, the destination segvn_crargs.offset is actually type
u_offset_t.  Existing examples of other Solaris filesystems (e.g.
zfs_map() ) cast the offset from offset_t to u_offset_t when assigning to
segvn_crargs.offset.  If it's good enough for ZFS, it's good enough for
AFS.

Correctly cast the offset to u_offset_t.

Thanks to Robert Milkowski for the report and diagnosis.

Reviewed-on: https://gerrit.openafs.org/12292
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit fa5af899319b69fa9542add78beca388521e3450)

Change-Id: I9c00afeb88c089fe34d25015dbbe02c50b7e9437
Reviewed-on: https://gerrit.openafs.org/12350
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoSOLARIS: support mmap() over 4GiB
Mark Vitale [Thu, 26 May 2016 20:53:47 +0000 (16:53 -0400)]
SOLARIS: support mmap() over 4GiB

When mmap() is issued for exactly 4GiB of a large AFS-resident file,
mmap() fails with ENOMEM.  This is because the AFS code is handling the
requested length as u_int instead of size_t, resulting in a 0 being
passed back to the caller.

When mmap() is issued for non-multiples of 4GiB, the subsequent mapping
will not contain all the requested pages, and for the same reason - the
mapped size has been truncated to 32 bits.  This results in SIGSEGV when
accessing the non-mapped page(s).

Fix the signature of afs_map() to specify the correct type for the length.

Thanks to Robert Milkowski for the report and diagnosis.

Reviewed-on: https://gerrit.openafs.org/12291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 75325fc9ab1cec4a338e1aaf1b32de1922492b12)

Change-Id: I8677aebf3afa6a6c0596f7d9afc06fe36d728fd3
Reviewed-on: https://gerrit.openafs.org/12349
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agomacos: pkgbuild.sh should not be tracked by git
Marcio Barbosa [Wed, 20 Jul 2016 19:09:43 +0000 (15:09 -0400)]
macos: pkgbuild.sh should not be tracked by git

The automatically generated pkgbuild.sh file should not be tracked by
git. To fix this problem, add the name of this file to the proper
.gitignore file.

Reviewed-on: https://gerrit.openafs.org/12343
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 19ffa2b7f09bffea816dda4713ad53f4d8cb93cb)

Change-Id: I581f09deea271dd26e065d35dbf12d6c8480bb8f
Reviewed-on: https://gerrit.openafs.org/12351
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agomacos: use pkgbuild to build the package on 10.10/10.11
Marcio Barbosa [Mon, 18 Jul 2016 15:27:19 +0000 (12:27 -0300)]
macos: use pkgbuild to build the package on 10.10/10.11

PackageMaker is no longer part of OS X. As a result, it
is not possible to build the package on OS X 10.10 and
OS X 10.11 using the existing code.

To solve this problem, a new script, along with a couple
of new files, are provided.

- pkgbuild.sh

This script uses the command line tools pkgbuild and
productbuild to build the package on OS X 10.10 and
OS X 10.11. By default, the package built by this
script will not be signed. Optionally, the package
might be signed.

- Distribution.xml

This file is nothing more than an XML file used by
productbuild. It is mainly used to configure how the
installer will look and behave.

- conclusion.txt

Contains the text that is displayed by Installer at
the end of the installation process. Only used by
El Capitan and further.

- Uninstall.14.15

This script can be used by OS X 10.10/10.11 users
to uninstall OpenAFS.

Notes:

- This work is based on a patch made by Brandon Allbery
  <ballbery@sinenomine.net> with fixes and updates from
  Andrew Deason <adeason@dson.org>.

- El Capitan and further prevent us from touching
  /usr/bin directly. As a result, /opt is used.

- If the package is not signed, the user will have
  to disable the OS X security protections. Otherwise,
  the client will not work.

- Now we have two different scripts to build the
  package on OS X. For OS X 10.10 and newer versions,
  pkgbuild.sh will be used. For older versions,
  the existing buildpkg.sh will be used.

Reviewed-on: https://gerrit.openafs.org/12239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 48ce41a447c354b8a20b769e4aa5b502ba5bcc09)

Change-Id: I292dfc49cbc541badcda0c450c941f88a5fbf306
Reviewed-on: https://gerrit.openafs.org/12335
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoRelease 1.6.18.2-1 to unstable debian/1.6.18.2-1
Anders Kaseorg [Mon, 25 Jul 2016 23:12:25 +0000 (19:12 -0400)]
Release 1.6.18.2-1 to unstable

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoBump Standards-Version to 3.9.8
Anders Kaseorg [Mon, 25 Jul 2016 23:04:15 +0000 (19:04 -0400)]
Bump Standards-Version to 3.9.8

No changes needed.  At some point we may want to move the documentation
in openafs-doc from /usr/share/doc/openafs-doc to
/usr/share/doc/openafs, but that is preferred and not required by
policy.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoUpdate CellServDB to the 2016-01-01 release
Anders Kaseorg [Mon, 25 Jul 2016 22:49:51 +0000 (18:49 -0400)]
Update CellServDB to the 2016-01-01 release

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFinish removing the defunct lpia architecture
Anders Kaseorg [Mon, 25 Jul 2016 00:52:34 +0000 (20:52 -0400)]
Finish removing the defunct lpia architecture

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFlesh out changelog for 1.6.18.2
Anders Kaseorg [Mon, 25 Jul 2016 00:28:19 +0000 (20:28 -0400)]
Flesh out changelog for 1.6.18.2

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoRevert patch for Linux 4.6, applied upstream
Anders Kaseorg [Mon, 25 Jul 2016 00:17:44 +0000 (20:17 -0400)]
Revert patch for Linux 4.6, applied upstream

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoMerge tag 'upstream/1.6.18.2' into debian
Anders Kaseorg [Mon, 25 Jul 2016 00:06:12 +0000 (20:06 -0400)]
Merge tag 'upstream/1.6.18.2' into debian

Upstream version 1.6.18.2

9 years agoImported Upstream version 1.6.18.2 upstream/1.6.18.2
Anders Kaseorg [Mon, 25 Jul 2016 00:05:54 +0000 (20:05 -0400)]
Imported Upstream version 1.6.18.2

9 years agoAdd changelog entry for 1.6.18.2
Anders Kaseorg [Mon, 25 Jul 2016 00:01:51 +0000 (20:01 -0400)]
Add changelog entry for 1.6.18.2

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoMake OpenAFS 1.6.18.2
Stephan Wiesand [Wed, 13 Jul 2016 12:25:58 +0000 (14:25 +0200)]
Make OpenAFS 1.6.18.2

Update configure version strings for 1.6.18.2. Note that macos kext
can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha,
b beta, f final candidate so we have no way to represent 1.6.18.2.
Switch to 1.6.19 dev 2 for macos.

Change-Id: I3bf417d8d304bb83a024b934ede9748ca15aa588
Reviewed-on: https://gerrit.openafs.org/12327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoUpdate NEWS for 1.6.18.2
Stephan Wiesand [Fri, 15 Jul 2016 11:48:07 +0000 (13:48 +0200)]
Update NEWS for 1.6.18.2

Release notes for 1.6.18.2

Change-Id: I7cc22fa5c8734454eac11a9645e2bb366c43d9d5
Reviewed-on: https://gerrit.openafs.org/12334
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLinux 4.6: rm PAGE_CACHE_* and page_cache_{get,release} macros
Joe Gorse [Thu, 9 Jun 2016 18:11:23 +0000 (14:11 -0400)]
Linux 4.6: rm PAGE_CACHE_* and page_cache_{get,release} macros

This is an automatic patch generated by Coccinelle (spatch) from the commit message of the linked commit:
https://github.com/torvalds/linux/commit/09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a

We will not add an autoconfig test because the PAGE_{...} macros should exist
where the PAGE_CACHE_{...} were previously.

The spatch used:
@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Reviewed-on: https://gerrit.openafs.org/12297
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit f14d263a73f0be75e4de92f62e836fb2e55680dd)

Change-Id: Id3973fc55db102d1472fa1dd0aa37c5d67664342
Reviewed-on: https://gerrit.openafs.org/12332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoredhat: Use a secure URL to retrieve CellServDB
Stephan Wiesand [Wed, 13 Jul 2016 14:55:11 +0000 (16:55 +0200)]
redhat: Use a secure URL to retrieve CellServDB

By default, makesrpm.pl will use wget to retrieve the CellServDB
as specified in the spec file. Even though the script need not and
thus should not be run by a privileged UID, make this a bit more
secure by specifying an https URL.

Reviewed-on: https://gerrit.openafs.org/12329
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 16463b602a210768f80bec9ef7c6896ea8a9909d)

Change-Id: I13d924d6a8e3b5ac31359a85b9a07ee041570b61
Reviewed-on: https://gerrit.openafs.org/12330
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoRevert "afs: shake harder in shake-loose-vcaches"
Stephan Wiesand [Wed, 6 Jul 2016 14:23:32 +0000 (16:23 +0200)]
Revert "afs: shake harder in shake-loose-vcaches"

This reverts commit 5ba144bcf9e4df4c0ac960b2dd885649c040be25 which
does fix a real problem but unfortunately unmasks another one.

This is a 1.6 only change. A proper fix will hopefully be developed
on the master branch and then backported.

Change-Id: I81d4af8c07dbd983ea693f5e1de112830c2b6794
Reviewed-on: https://gerrit.openafs.org/12323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoAdd sysname IDs for FreeBSD 10.2 and 10.3
Benjamin Kaduk [Tue, 5 Jul 2016 01:13:31 +0000 (20:13 -0500)]
Add sysname IDs for FreeBSD 10.2 and 10.3

While here, de-conflict the numbers for 10.0/10.1 and 7.2/7.3

Reviewed-on: https://gerrit.openafs.org/12321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit dda47aab6179b6940aa994a0cd7b88a4b0942fe6)

Change-Id: I434076ddd0a38ff052f977c7c0cb4feab1c533d3
Reviewed-on: https://gerrit.openafs.org/12322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoRelease 1.6.18.1-1 to unstable debian/1.6.18.1-1
Anders Kaseorg [Mon, 27 Jun 2016 00:17:15 +0000 (20:17 -0400)]
Release 1.6.18.1-1 to unstable

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoAdd Gerrit patch for Linux 4.6
Anders Kaseorg [Sun, 26 Jun 2016 22:38:31 +0000 (18:38 -0400)]
Add Gerrit patch for Linux 4.6

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoRemove patches applied upstream
Anders Kaseorg [Sun, 26 Jun 2016 22:41:43 +0000 (18:41 -0400)]
Remove patches applied upstream

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoFlesh out changelog for 1.6.18.1
Anders Kaseorg [Sun, 26 Jun 2016 22:33:52 +0000 (18:33 -0400)]
Flesh out changelog for 1.6.18.1

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoMerge tag 'upstream/1.6.18.1' into debian
Anders Kaseorg [Sun, 26 Jun 2016 22:31:25 +0000 (18:31 -0400)]
Merge tag 'upstream/1.6.18.1' into debian

Upstream version 1.6.18.1

9 years agoImported Upstream version 1.6.18.1 upstream/1.6.18.1
Anders Kaseorg [Sun, 26 Jun 2016 22:31:05 +0000 (18:31 -0400)]
Imported Upstream version 1.6.18.1

9 years agoAdd changelog entry for 1.6.18.1
Anders Kaseorg [Sun, 26 Jun 2016 22:27:43 +0000 (18:27 -0400)]
Add changelog entry for 1.6.18.1

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
9 years agoMake OpenAFS 1.6.18.1
Stephan Wiesand [Mon, 13 Jun 2016 08:51:13 +0000 (10:51 +0200)]
Make OpenAFS 1.6.18.1

Update configure version strings for 1.6.18.1. Note that macos kext
can be of form XXXX.YY[.ZZ[(d|a|b|fc)NNN]] where d dev, a alpha,
b beta, f final candidate so we have no way to represent 1.6.18.1.
Switch to 1.6.19 dev 1 for macos.

Change-Id: Ic696a691a693ac048ae6d4c6a8ac7810992d585a
Reviewed-on: https://gerrit.openafs.org/12303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoUpdate NEWS for 1.6.18.1
Stephan Wiesand [Mon, 13 Jun 2016 13:28:32 +0000 (15:28 +0200)]
Update NEWS for 1.6.18.1

Release notes for 1.6.18.1

Change-Id: I50d035f162af4c05471a98807835fa3b48e0674f
Reviewed-on: https://gerrit.openafs.org/12310
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLinux 3.13: Check return value from bdi_init
Marc Dionne [Tue, 3 Dec 2013 19:10:00 +0000 (14:10 -0500)]
Linux 3.13: Check return value from bdi_init

The use of the bdi_init function now gets a warning because the
return value is unused and the function is now defined with
the warn_unused_result attribute.

Assign and check the return value.

Reviewed-on: http://gerrit.openafs.org/10530
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit ccc5d3f7adceda4d8cf41f04fe02d5cfe376befd)

Change-Id: I2ccd9bbdce396a003030e3e09f9f6d75a1c4fa7c
Reviewed-on: https://gerrit.openafs.org/12274
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLinux 4.5: don't access i_mutex directly
Benjamin Kaduk [Sun, 1 May 2016 23:48:40 +0000 (19:48 -0400)]
Linux 4.5: don't access i_mutex directly

Linux commit 5955102c, in preparation for future work, introduced
wrapper functions to lock/unlock inode mutexes.  This is to
prepare for converting it to a read-write semaphore, so that
lookup can be done with only the shared lock held.

Adopt the afs_linux_*lock_inode() functions accordingly, and
convert afs_linux_fsync() to using those wrappers, since the
FOP_FSYNC_TAKES_RANGE case appears to be the current case.

Amusingly, afs_linux_*lock_inode() already have a branch to
handle the case when inode serialization is protected by a
semaphore; it seems that this is going to come full-circle.

Reviewed-on: https://gerrit.openafs.org/12268
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 360f4ef53c454494cd5212a5ea46c658bdb2879c)

Change-Id: I52f29cdb6f0bf85bcbb6624ed62e071b1f3807c9
Reviewed-on: https://gerrit.openafs.org/12302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLinux 4.5: get_link instead of follow_link+put_link
Chaskiel Grundman [Thu, 5 May 2016 16:35:08 +0000 (12:35 -0400)]
Linux 4.5: get_link instead of follow_link+put_link

In linux commit 6b255391, the follow_link inode operation was
replaced by the get_link operation, which is basically the same
but takes the inode and dentry separately, allowing for the
possibility of staying in RCU mode.

For now, only support this if page_get_link is available and we are
using the USABLE_KERNEL_PAGE_SYMLINK_CACHE

The previous test for USABLE_KERNEL_PAGE_SYMLINK_CACHE used a bogus,
undefined configure variable (ac_cv_linux_kernel_page_follow_link).
Remove it, as it was not needed

Reviewed-on: https://gerrit.openafs.org/12265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 2ef27ea1bb032cee8d26980e60e02b52a0805763)

Change-Id: I828823ad16f24bae583de9cf436844565217918d
Reviewed-on: https://gerrit.openafs.org/12301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoLinux 4.5: no highmem in symlink ops
Benjamin Kaduk [Sun, 1 May 2016 23:04:45 +0000 (19:04 -0400)]
Linux 4.5: no highmem in symlink ops

Symlink bodies in the pagecache should not be in highmem, as
upstream converted in commit 21fc61c73.

Reviewed-on: https://gerrit.openafs.org/12264
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit d9cfc1f3f5a75f1dbb14a56cd3da9db6b7a48065)

Change-Id: If1ef28955b08db4d95d6bd8a3b833895243f858a
Reviewed-on: https://gerrit.openafs.org/12300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
9 years agoRelease 1.6.18-1 to unstable debian/1.6.18-1
Benjamin Kaduk [Mon, 16 May 2016 02:19:44 +0000 (22:19 -0400)]
Release 1.6.18-1 to unstable

(Urgency high for the Linux 4.5 support, since that's an RC bug.)

9 years agoSet DefaultDependencies=no and pull in sysinit.target
Benjamin Kaduk [Mon, 16 May 2016 01:36:36 +0000 (21:36 -0400)]
Set DefaultDependencies=no and pull in sysinit.target

Try to avoid dependency cycles with other scripts that pull in
remote-fs.target.

9 years agoPull in patches from gerrit for Linux 4.5 support
Benjamin Kaduk [Mon, 16 May 2016 02:18:56 +0000 (22:18 -0400)]
Pull in patches from gerrit for Linux 4.5 support

9 years agoRemove Linux-4.4 patches that are in upstream 1.6.18
Benjamin Kaduk [Sun, 15 May 2016 23:15:47 +0000 (19:15 -0400)]
Remove Linux-4.4 patches that are in upstream 1.6.18

9 years agoFlesh out changelog for 1.6.18
Benjamin Kaduk [Sun, 15 May 2016 20:22:02 +0000 (16:22 -0400)]
Flesh out changelog for 1.6.18

9 years agoMerge tag 'upstream/1.6.18'
Benjamin Kaduk [Mon, 16 May 2016 02:16:12 +0000 (22:16 -0400)]
Merge tag 'upstream/1.6.18'

Upstream version 1.6.18

9 years agoImported Upstream version 1.6.18 upstream/1.6.18
Benjamin Kaduk [Mon, 16 May 2016 02:15:54 +0000 (22:15 -0400)]
Imported Upstream version 1.6.18