OpenAFS Master Repository branch, openafs-stable-1_8_x, created. openafs-stable-1_8_0pre1-82-ge739eaa
Gerrit Code Review
gerrit@openafs.org
Sat, 5 Aug 2017 19:05:41 -0400
The branch, openafs-stable-1_8_x has been created
at e739eaa650ee30dcce54d05908b062839eafbf73 (commit)
- Shortlog ------------------------------------------------------------
commit e739eaa650ee30dcce54d05908b062839eafbf73
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Apr 14 20:38:27 2017 -0400
redhat: move bosserver and fssync-debug man pages
Move the bosserver and fssync-debug/dafssync-debug man pages to the
openafs-server package, which distributes those programs.
Change-Id: I9c84ad485834177fd43b28acd444d3d54c648cc8
Reviewed-on: https://gerrit.openafs.org/12601
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5b79f95f7457f203213a9170389b17ffcc0208f7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 13 21:48:06 2017 -0400
redhat: kauth client and server sub-packages
Move the kaserver and kauth client programs to conditionally built
packages called openafs-kauth-server and openafs-kauth-client.
Packagers can build these by specifying '--with kauth'. They are not
built by default to discourage use.
This commit subsumes the openafs-kpasswd package into the
openafs-kauth-client package.
Change-Id: I1322f05d7fe11d466c9ed71a5059c21b759d95ab
Reviewed-on: https://gerrit.openafs.org/12600
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 54e478328fa24aa2629398c5ddfad7b50d353dd7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 10 15:06:02 2017 -0400
redhat: do not package kauth by default
Do not package kaserver and related programs by default to discourage
use. Add the '--with kauth' rpmbuild option to allow packagers to
continue include the kauth programs for compatibility.
Change-Id: I8bf9f6dc221afc22ed6c9a33cf101d705e6c4920
Reviewed-on: https://gerrit.openafs.org/12597
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 6d59b7c4b4b712160a6d60491c95c111bb831fbb
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Jul 30 20:57:05 2017 -0500
Default to crypt mode for unix clients
Though the protection offered by rxkad, even with rxkad-k5 and rxkad-kdf, is
insufficient to protect traffic from a determined attacker, it remains the
case that the internet is not a safe place for user data to travel in the
clear, and has not been for a long time. The Windows client encrypts by
default, and all or nearly all the Unix client packaging scripts set crypt
mode by default. Catch up to reality and default to crypt mode in the
Unix cache manager.
Change-Id: If0061ddca3bedf0df1ade8cb61ccb710ec1181d4
Reviewed-on: https://gerrit.openafs.org/12668
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f7ccf0aa00459cda4579a3838b5bd59ba69c03ea
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Mon Jul 31 15:27:10 2017 -0400
ubik: remove useless signal call
The current version does not have a corresponding LWP_WaitProcess call
for the beacon_globals.ubik_amSyncSite global. As a result, the
LWP_NoYieldSignal(&beacon_globals.ubik_amSyncSite) signal call can be
safely removed.
Change-Id: I72c4ccfe8e68551673dc728dd699ba8c561d76d1
Reviewed-on: https://gerrit.openafs.org/12673
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b4c3baa2e24890face6433fcb160e85b7409df4c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Aug 2 15:25:45 2017 -0400
doc: add a document to describe rx debug packets
This document gives a basic description of Rx debug packets, the
protocol to exchange debug packets, and the version history.
Change-Id: Ic040d336c1e463f7da145f1a292c20c5d5f215df
Reviewed-on: https://gerrit.openafs.org/12677
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit b8e8145fa97e3edb6e4157f0d60d3d5e8db597fe
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Aug 1 20:36:18 2017 -0400
doc: add kolya's rx-spec to doc/txt
Add rx protocol spec and rx debug spec written by Nickolia Zeldovich.
Rx protocol specification draft (2002)
Nickolai Zeldovich, kolya@MIT.EDU
Change-Id: I65a9a83a8889503f3a82c8fde7a87f84d2736c8d
Reviewed-on: https://gerrit.openafs.org/12676
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit c6f5ebc4cf95b0f1d3acc7a0a8678ba0d4378243
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Aug 1 20:10:32 2017 -0400
doc: relocate notes from arch to txt
The doc/txt directory has become the de facto home for text-based
technical notes. Relocate the contents of the doc/arch directory to
doc/txt. Relocate doc/examples to doc/txt/examples.
Update the doc/README file to be more current and remove old work in
progress comments.
Change-Id: Iaa53e77eb1f7019d22af8380fa147305ac79d055
Reviewed-on: https://gerrit.openafs.org/12675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 57d32c29146167ff54d3221ed761a5973776ae93
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Aug 1 20:50:37 2017 -0500
Add NEWS entry for recent ubik changes
Of the ubik-fix-write-after-recovery topic, this seems like the most
noteworthy portion, with the other bits wrapped up in the preface.
Change-Id: Icc1afb9f851ef2d7ade49c2382cc023997f1bf26
Reviewed-on: https://gerrit.openafs.org/12679
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit da704137f4bf766250ca87dbdc5a85c2024cb0a6
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Thu Jul 20 23:02:15 2017 -0400
ubik: update epoch as soon as sync-site is elected
The ubik_epochTime represents the time at which the coordinator first
received its coordinator mandate. However, this global is currently not
updated at the moment when a new sync-site is elected. Instead,
ubik_epochTime is only updated at the very end of the first write
transaction, when a new database label is written (in udisk_commit).
This causes at least 2 different issues:
For one, this means that we change ubik_epochTime while a remote
transaction is in progress. If VOTE_Beacon is called after
ubik_epochTime is updated, but before the remote transaction ends, the
remote sites will detect that the transaction id in ubik_currentTrans is
wrong (via urecovery_CheckTid(), since the epoch doesn't match), and
they will abort the transaction. This means the transaction will fail,
and it may cause a loss of quorum until another election is completed.
Another issue is that ubik_epochTime can be 0 at the beginning of a
write transaction, if this is the first election that this site has won.
Since ubik_epochTime is used to construct transaction ids, this means
that we can have different transactions that originate from different
sites at different times, but they have the same epoch in their tid.
For example, say a write transaction starts with epoch 0, but the
originating site is killed/interrupted before finishing. That write
transaction will linger on remote sites in ubik_currentTrans with an
epoch of 0 (since the originating site will never call
DISK_ReleaseLocks, or DISK_Abort, etc). Normally the sync site will kill
such a lingering transaction via urecovery_CheckTid, but since the epoch
is 0, and the election winner's epoch is also 0, the transaction looks
valid and may never be killed. If that transaction is holding a lock on
the database, this means that the database will forever remain locked,
effectively preventing any access to the db on that site.
To fix both of these issues, update ubik_epochTime with the current
time as soon as we win the election. This ensures that the epoch is not
updated in the middle of a transaction, and it ensures that all
transactions are created with a unique epoch: the epoch of the election
that we won.
Note that with this commit, we do not ever set ubik_epochTime to the
magic value of '2' during database init. The special '2' epoch only
needs to be set in the database itself, and it is never an actual epoch
that represents a real quorum that went through the election process.
The database will be labelled with a 'real' epoch after the first write,
like normal.
[kaduk@mit.edu: comment the locking strategy in ubeacon_Interact()]
Change-Id: I6cdcf5a73c1ea564622bfc8ab7024d9901af4bc8
Reviewed-on: https://gerrit.openafs.org/12609
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 32ddf88547f921b33dd93473883928051faab950
Author: Joe Gorse <jhgorse@gmail.com>
Date: Thu Jul 6 15:47:24 2017 -0400
LINUX: afs_create infinite fetchStatus loop
For a file in a directory with the CStatd bit cleared, we can get
an infinite fetchStatus loop.
In afs_create(), afs_getDCache() may return NULL due to an error.
If unchecked it will loop which may produce multiple fetchStatus()
calls to the fileserver.
Credit: Yadav Yadavendra for identifying and analysing this issue.
Change-Id: Iecd77d49a5f3e8bb629396c57246736b39aa935f
Reviewed-on: https://gerrit.openafs.org/12651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 18fabf9aecf358e0f45e25f6249685f7f2e32485
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Aug 2 19:31:17 2017 -0500
Update NEWS for volume stats default change
Change-Id: I1a184bf638609866f6f7f1d11c224dfee1113eef
Reviewed-on: https://gerrit.openafs.org/12678
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8e1ca72b1cbed930d3661dee5cb742cab52737e9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Aug 1 17:21:13 2017 -0400
volser: preserve volume stats by default
Commit dfceff1d3a66e76246537738720f411330808d64 added the
-preserve-vol-stats flag to the volume server. This enabled a change in
the volume server to preserve volume usage statistics during reclone and
restore operations. Otherwise, volume usage counters of read-only
volumes are cleared when volumes are released, making it difficult to
track usage with the volume stats.
Make this feature the default behavior of the volume server and provide
the option -clear-vol-stats to use the old behavior if so desired. This
change makes the -preserve-vol-stats the default, and keeps it as a
hidden flag for sites which may already have that flag set in the
BosConfig.
Since this changes a default behavior of the volume server, this change
is only appropriate on a major or minor release boundary, not in the
middle of a stable series.
Change-Id: I3706ede64b7b18a80b39ebd55f2e1824bb7dbc57
Reviewed-on: https://gerrit.openafs.org/12674
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 7c7085061580ccce7b2d9c17df5604e5e97fcd81
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Mon May 22 12:55:32 2017 -0400
ubik: avoid early DISK_Begin calls we know will fail
Currently, we can start a write transaction on a site immediately after
it is elected as the sync site. However, after commit d47beca1,
SDISK_Begin on remote sites will fail right after an election occurs
(since lastYesState is not set, and so urecovery_AllBetter will fail).
And after commit fac0b742, this error is always noticed and propagated
back to the application.
As a result, when we try to write immediately after a sync site is
elected, the transaction will fail with UNOQUORUM, the remote sites will
be marked as down, and we may lose quorum and require another election
to be performed. This can easily happen repeatedly for a site that
frequently tries to make changes to a ubik database.
To avoid marking other sites down and going through another election
process, do not allow write transactions until we know that lastYesState
is set on the remote sites. We do this by waiting until the next wave of
beacons are sent, which tell the remote sites that we are the sync site.
In other words, only allow write transactions after the sync site knows
that the remote sites also know that the sync site has been elected.
With this commit, a write transaction immediately after an election
will still fail with UNOQUORUM, but we avoid triggering an error on the
remote sites, and avoid losing quorum in this situation.
Change-Id: I9e1a76b4022e6d734af1165d94c12e90af04974d
Reviewed-on: https://gerrit.openafs.org/12592
Reviewed-by: Andrew Deason <adeason@dson.org>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8f46ca082653116c9c42a69e2535be1bb2f0a2a9
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Wed Jun 21 17:42:37 2017 -0300
ubik: allow remote dbase relabel if up to date
When a site is elected the sync-site, its database is not immediately
relabeled. The database in question will be relabeled at the end of the
first write transaction (in udisk_commit). To do so, the dbase->version
is updated on the sync-site first (1) and then the versions of the
remote sites are updated through SDISK_SetVersion() (2).
In order to make sure that the remote site holds the same database as
the sync-site, the SDISK_SetVersion() function checks if the current
version held by the remote site (ubik_dbVersion) is equal to the
original version stored by the sync-site (oldversionp). If
ubik_dbVersion is not equal to oldversionp, SDISK_SetVersion() will
fail with USYNC.
However, ubik_dbVersion can be updated by the vote thread at any time.
That is, if the sync site calls VOTE_Beacon() on the remote site between
events (1) and (2), the remote site will set ubik_dbVersion to the new
version, while ubik_dbase->version is still set to the old version. As
a result, ubik_dbVersion will not be equal to oldversionp and
SDISK_SetVersion() will fail with USYNC. This failure may cause a loss
of quorum until another election is completed.
To fix this problem, let SDISK_SetVersion() relabel the database when
ubik_dbase->version is equal to oldversionp. In order to try to only
affect the scenario described above, also check if ubik_dbVersion is
equal to newversionp.
Change-Id: I97e6f8cacd1c9bca0b4c72374c058c5fe5b638b3
Reviewed-on: https://gerrit.openafs.org/12613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3c12ff9fbb2724b6e430f3eeeb2c2a1d2ae3f884
Author: Joe Gorse <jhgorse@gmail.com>
Date: Wed May 10 11:38:25 2017 -0400
afs: fix repeated BulkStatus calls for directories.
There is a filetype comparison check in afs_DoBulkStat just after
BulkFetch RPC. This check will fail for directories even though
bulkStatus was done for directories.
This code is apparently necessary for Darwin, but it causes this problem
otherwise. Thus it is removed from the rest of the builds using the
AFS_DARWIN_ENV preprocessor variable.
Credit: Yadav Yadavendra for identifying and analysing this issue.
Change-Id: I9645f0e7a3327cb5f20cdf3ba2bf1cc5b1509bb5
Reviewed-on: https://gerrit.openafs.org/12610
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 90acda692a589eb177dc5dee99490947106f8141
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jul 20 00:12:05 2017 -0400
relocate old afs docs to doc/txt
Move the afs/DOC files to the top-leve doc/txt directory, since this has
become the home for developer oriented documentation.
Change-Id: I128d338c69534b4ee6043105a7cfd390b280afe3
Reviewed-on: https://gerrit.openafs.org/12662
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5a88209a0ff0cefb7ec1a810e25011ee9795d2fe
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jul 19 23:48:42 2017 -0400
Incorporate old release notes into NEWS
Cleanup the doc/txt directory by incorporating the old release
notes into the NEWS file.
Change-Id: I63911fc5cb0b476e201148c6d3fa3441f4746ab7
Reviewed-on: https://gerrit.openafs.org/12661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3629ae4a682d648d6830bf551ed78faaa4cfc477
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jul 19 22:39:51 2017 -0400
Update NEWS for 1.8.0pre2
Change-Id: I5f83e81f25177bde1ea691e756359563e80ee3f2
Reviewed-on: https://gerrit.openafs.org/12660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1d5b255ff68af03da891a0babefdadd85f48def0
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jul 19 23:09:01 2017 -0400
Import NEWS from openafs-stable-1_6_x
Import change descriptions for 1.6.20.1, 1.6.20.2, 1.6.21.
Change-Id: Ib4f06c7046eb6e1bb0a1ccfb9f6c45191154fe0e
Reviewed-on: https://gerrit.openafs.org/12659
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 77c5e4f3fba57c85fd664f64dba2c44a44a4fb5c
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Wed Jul 26 15:18:08 2017 +0200
Linux: fix whitespace in osi_sysctl.c
Remove dozens of trailing spaces and make consistent use of tabs
for indentation throughout the file.
Change-Id: Ibbd17d2b9828590ffd84b76aac70646e9fe9cb2c
Reviewed-on: https://gerrit.openafs.org/12665
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b0461f2def17fe3d3f49e51e3c4a1df81a921eee
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 15 15:32:41 2017 -0500
LINUX: Workaround d_splice_alias/d_lookup race
Before Linux kernel commit 4919c5e45a91b5db5a41695fe0357fbdff0d5767,
d_splice_alias in some cases can d_rehash the given dentry without
attaching it to the given inode, right before the dentry is unhashed
again. This means that for a few moments, that negative dentry is
visible to __d_lookup, and thus is visible to path lookup and can be
given to afs_linux_dentry_revalidate.
Currently, afs_linux_dentry_revalidate will say that the dentry is
valid, because d_time and other fields are set; it's just not attached
to an inode. This causes an ENOENT error on lookup, even though the
file is there (and no OpenAFS code said otherwise).
Normally this race is rare, but it can be frequently exercised if
we access the same directory via different names at the same time.
This can happen with multiple mountpoints to the same volume, or by
accessing an @sys directory via its abbreviated and expanded forms.
To get around this, make afs_linux_dentry_revalidate check negative
'dentry's to see if they are unhashed. We also lock the parent inode,
in order to guarantee that a problematic d_splice_alias call isn't
running at the same time (and thus, we know the dentry will not be
unhashed immediately afterwards). This slows down
afs_linux_dentry_revalidate for valid negative 'dentry's a little, but
it allows us to use negative dentry's at all.
Linux kernel commit 4919c5e45a91b5db5a41695fe0357fbdff0d5767 fixes
this issue, which was included in 2.6.34, so don't do this workaround
for 2.6.34 and on.
Change-Id: I8e58ebed4441151832054b1ef3f1aa5af1c4a9b5
Reviewed-on: https://gerrit.openafs.org/12638
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d55b41072ce873210481baa4cae5c7143011869b
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Mon Jul 24 11:37:54 2017 +0200
Linux 4.13: use designated initializers where required
struct path is declared with the "designated_init" attribute,
and module builds now use -Werror=designated-init. Cope.
And as pointed out by Michael Meffie, struct ctl_table has
the same requirement now, so use a designated initializer
for the final element of the sysctl table too.
Change-Id: I0ec45aac961dcefa0856a15ee218085626a357c7
Reviewed-on: https://gerrit.openafs.org/12663
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 030a9849e22f443492342794f436e2c86c98a903
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jul 7 11:11:12 2017 -0400
afs: fix afs_xserver deadlock in afsdb refresh
When setting up a new volume, the cache manager calls afs_GetServer() to
setup the server object for each fileserver associated with the volume.
The afs_GetServer() function locks afs_xserver and then, among other
things, calls afs_GetCell() to lookup the cell info by cell number.
When the cache manager is running in afsdb mode, afs_GetCell() will
attempt to refresh the cell info if the time-to-live has been exceeded
since the last call to afs_GetCell(). During this refresh the AFSDB
calls afs_GetServer() to update the vlserver information. The afsdb
handler thread and the thread processing the volume setup become
deadlocked since the afs_xserver lock is already held at this point.
This bug will manifest when the DNS SRV record TTL is smaller than the
time the fileservers respond to the GetCapabilities RPC within
afs_GetServer() and there are multiple read-only servers for a volume.
Avoid the deadlock by using the afs_GetCellStale() variant within
afs_GetServer(). This variant returns the memory resident cell info
without the afsdb upcall and the subsequent afs_GetServer() call.
Change-Id: Iad57870f84c5e542a5ee20f00ea03b3fc87683a1
Reviewed-on: https://gerrit.openafs.org/12652
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a6ad67485bf23084c06e1de1a424b2e375ee70f3
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jul 11 08:51:08 2017 -0400
afs: restore force_if_down check when getting connections
Commit cb9e029255420608308127b0609179a46d9983ad removed the
force_if_down check in afs_ConnBySA, which effictively turned on
force_if_down flag for every call to afs_ConnBySA. This caused
afs_ConnBySA to always return connections, even for server addresses
marked down and force_if_down set to 0.
One serious consequence of this bug is the cache manager will retry the
preferred vlserver indefinitely when it is unreachable. This is because
the loop in afs_ConnMHosts always tries hosts in preferred order and
expects afs_ConnBySA to return a NULL if the server address has no
connections because it is marked down.
Restore the check for server addresses marked down to honor the
force_if_down flag again so we do not get connections for down servers
unless requested.
Change-Id: Ia117354929a62b0cedc218040649e9e0b8d8ed23
Reviewed-on: https://gerrit.openafs.org/12653
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a1c072ac562ccf74e5afb8449db1bcef86aef362
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 10 14:23:12 2017 -0400
redhat: fix rpmbuild command line option defaults
Fix the handling of default values for the various rpmbuild options
which can be given. These have been broken as code was shuffled around
over the years.
Remove obsolete comments about detecting what to build based on the
architecture.
Provide the '--without authlibs' option to disable the openafs-authlibs
package.
Change-Id: I6c8db1f3163ee241f9a4d1282345a0ddeabd284c
Reviewed-on: https://gerrit.openafs.org/12596
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit a5bedda935c8147517bcbb56858dd88288fdf9da
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Tue Jul 18 12:04:11 2017 +0200
mkvers: fix potential buffer overflow
The space allocated for outputFileBuf is only 2 bytes larger than
sizeof(VERS_FILE). But we add potentially 4 extra bytes like
".txt" or ".xml". Just allocate enough space for all file suffices.
Change-Id: Ic0f97590be208deaf9c4a5c25e21056ea9d2cd6f
Reviewed-on: https://gerrit.openafs.org/12657
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d7211350eec18b30e9ccf30f5e95fb58162c637d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 15 15:29:17 2017 -0500
afs_linux_lookup: Avoid d_add on afs_lookup error
Currently, afs_linux_lookup looks roughly like this pseudocode:
{
code = afs_lookup(&vcp);
if (!code) {
ip = AFSTOV(vcp);
error = process_ip(ip);
if (error) {
goto done;
}
}
process_dp(dp);
newdp = d_splice_alias(ip, dp);
done:
cleanup();
}
Note that if there is an error while processing the looked-up inode
(ip), we jump over d_splice_alias. But if we encounter an error from
afs_lookup itself, we do not jump over d_splice_alias. This means that
if afs_lookup encounters any error, we initialize the given dentry
(dp) as a negative entry, effectively telling the Linux kernel that
the requested name does not exist.
This is correct for ENOENT errors, of course, but is incorrect for any
other error. For non-ENOENT errors we later return an error from the
function, but this does not invalidate the generated dentry. The
result is that when afs_lookup encounters an error, that error will be
propagated to userspace, but subsequent lookups for the same name will
yield an ENOENT error (until the dentry is invalidated). This can
easily cause a file to seem to mysteriously disappear, if a transient
error like network problems caused the afs_lookup call to fail.
To fix this, treat ENOENT as a non-error, like the comments already
suggest. In our case, ENOENT is not really an error; it just means we
populate the given dentry differently. So if we get ENOENT from
afs_lookup, set our vcache to NULL and clear the error, and continue.
This also has the side effect of not treating ENOENT errors from
afs_CreateAttr identically to ENOENT errors from afs_lookup. That
shouldn't happen, but there have been abuses of the ENOENT error code
in the past, so it is probably better to be cautious.
Many thanks to Gaja Sophie Peters for assistance in tracking down and
testing fixes for this issue, including providing access to test systems
experiencing the buggy behavior.
FIXES 133654
Change-Id: Ia9aab289d5c041557ab6b00f1d41de2edfc97a89
Reviewed-on: https://gerrit.openafs.org/12637
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
commit 5dd2ce2043f53e80e1ded25abcfd565b4071a3ad
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 15 15:29:48 2017 -0500
LINUX: Rearrange afs_linux_lookup cleanup
Currently, the cleanup and error handling in afs_linux_lookup is
structured similar to this pseudocode:
if (!code) {
if (!IS_ERR(newdp)) {
return no_error;
} else {
return newdp_error;
}
} else {
return code_error;
}
The multiple different nested error cases make this a little complex.
To make this easier to follow for subsequent changes, alter this
structure to be more like this:
if (IS_ERR(newdp)) {
return newdp_error;
}
if (code) {
return code_error;
}
return no_error;
There should be no functional change in this commit; it is just code
reorganization.
Technically the ordering of these checks is changed, but there is no
combination of conditions that actually results in different code
being hit. That is, if 'code' is nonzero and IS_ERR(newdp) is true,
then we would go through a different path. But that cannot happen,
since if 'code' is nonzero, we have no inode and so IS_ERR(newdp)
cannot be true (d_splice_alias cannot return an error for a NULL
inode). So there is no functional change.
Change-Id: I94a3aef5239358c3d13fe5314044dcc85914d0a4
Reviewed-on: https://gerrit.openafs.org/12636
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
commit d0b64a4a1b61b5e22f0e3fe509f8facd30bc2b74
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Jun 29 16:57:42 2017 +0200
doc: Add introduction and credits to ubik.txt
Credit where it's due. And the remainder of the introduction may
provide some useful context too.
Change-Id: I99c7e599363126c581ae1ac00da67c33acc3687f
Reviewed-on: https://gerrit.openafs.org/12644
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d1c4dbf28ae28bbfac3d8bc96d0fa5ae3d422bfd
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Jun 25 13:56:04 2017 -0500
Put jhutz's ubik analysis in doc/txt
A file in the source tree is much easier to locate than an old
mailing list post; it's quite handy to have this at hand as a
reference.
Change-Id: I5267a2f86b36e92b05249364085bdd33aeb28d1b
Reviewed-on: https://gerrit.openafs.org/12642
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 0327ead297e3cf395cced1e6690b901e445f074c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 23 17:20:11 2017 -0500
afs: Improve "Corrupt directory" warning
This warning is a bit confusing to see, since it doesn't say anything
about AFS (making it unclear where it's coming from), and it lacks a
trailing newline (making it ugly). Fix both of these.
Change-Id: I92a3d07fd193bf99b545aef9b21f52d23c356a2d
Reviewed-on: https://gerrit.openafs.org/12641
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit cdb92f94598e5b25fbcdfc6fb1650218ec05d63f
Author: Jeffrey Altman <jaltman@auristor.com>
Date: Thu Jun 1 22:25:49 2017 -0400
vol: modify volume updateDate upon salvage change
If the salvager changed the volume, set the VolumeDiskData.updateDate
field so that
1. the change is visible via "vos examine"
2. backup services will backup the corrected volume
Teradactyl pointed out the problem which forces cell administrators
to manually trigger a backup for each volume that has been salvaged.
Change-Id: I9a35b92e8abbe3b54b08e64ac13de44442736c72
Reviewed-on: https://gerrit.openafs.org/12629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f5491119ff7d422b1c0c311a50e30bec1c15296c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jun 2 15:19:26 2017 -0400
bozo: do not fail silently on unknown bosserver options
Instead of failing silently when the bosserver is started with an
unknown option, print an error message and exit with a non-zero value.
Continue to exit with 0 when the -help option is given to request the
usage message.
This change should help make bosserver startup failures more obvious
when an unsupported option is specified. Example systemd status message:
systemd[1]: Starting OpenAFS Server Service...
bosserver[32308]: Unrecognized option: -bogus
bosserver[32308]: Usage: bosserver [-noauth] ....
systemd[1]: openafs-server.service: main process exited,
code=exited, status=1/FAILURE
Change-Id: I8717fb4a788fbcc3d1e2d271dd03511c5b504f10
Reviewed-on: https://gerrit.openafs.org/12630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit aaa47dc1077f0dd5b0040006c831f64cc8a303b5
Author: Jeffrey Altman <jaltman@auristor.com>
Date: Sat May 27 14:59:04 2017 -0400
rx: wake up send after 'twind' has been updated
Beginning in AFS 3.4 and 3.5 the ack trailer includes the size of the
peer's receive window. This value is used to update the sender's
transmit window (twind). When the twind is increased the application
thread is signaled to indicate that more packets can be sent.
This change wakes the application thread after twind is updated by
the peer's receive window instead of beforehand. Failure to do so
can result in 100ms transmit delays when the receive window transitions
from closed to open.
Change-Id: Id129ea93e94612a4b8cce9f8cbddde9c779ff26b
Reviewed-on: https://gerrit.openafs.org/12625
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 63e530e7df0b8013bcc4421b0bba558d4f1d2d57
Author: Joe Gorse <jhgorse@gmail.com>
Date: Tue May 16 07:29:30 2017 +0000
LINUX: Switch to new bdi api for 4.12.
super_setup_bdi() dynamically allocates backing_dev_info structures
for filesystems and cleans them up on superblock destruction.
Appears with Linux commit fca39346a55bb7196888ffc77d9e3557340d1d0b
Author: Jan Kara <jack@suse.cz>
Date: Wed Apr 12 12:24:28 2017 +0200
Change-Id: I67eed0fcb8c96733390579847db57fb8a4f0df3e
Reviewed-on: https://gerrit.openafs.org/12614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit b47dc5482da614742b01dcc62d5e11d766a9432f
Author: Joe Gorse <jhgorse@gmail.com>
Date: Wed May 10 19:46:38 2017 +0000
LINUX: CURRENT_TIME macro goes away.
Check if the macro exists, define it if it does not.
Change-Id: I9990579f94bfba0804e60fa6ddcc077984cc46c3
Reviewed-on: https://gerrit.openafs.org/12611
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7af9554bed2d906615e0f5a94537d3d553ca2d1e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 6 22:50:41 2017 -0400
redhat: update rpm spec file
Update the spec file to keep up with accumulated changes.
* Correct installation location of db check programs.
* Install afsd to the legacy location to avoid breaking
init scrips and systemd configs.
* Exclude yet another duplicated copy of kpwvalid.
* libubik_pthread.a is gone.
* Install the kpwvalid man page.
* Continue to remove the obsolete kdb program.
* Update the names of the pam_afs symlinks.
* Add libkopenafs to authlibs.
* Package dafssync-debug man pages.
* Package opr/queue.h in devel.
* Package akeyconvert and man page.
* Do not package fuse version of afsd. A separate sub-package
for afsd.fuse is warrented, since it adds new libfuse
dependencies.
* Package new server man pages, including dafsssync-* pages.
* Package libafsrfc3961.a as a devel lib.
* Continue to package kauth programs.
Change-Id: I875c3b8dee53abbc67b0f05f8b291bb58abf41a5
Reviewed-on: https://gerrit.openafs.org/12595
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit dd80f081663c50f93618da7a309b390f2fbdbc59
Author: Tim Creech <tcreech@tcreech.com>
Date: Sun Mar 5 18:13:45 2017 -0500
FBSD: build fix for FreeBSD 11
r285819 eliminated b_saveaddr from struct buf, while r292373 changed the
arguments to VOP_GETPAGES. The approach used by this patch to address
these changes was inspired by FreeBSD's nfs and samba clients.
Change-Id: Ibcf6b6fde6c86f96aa814af2bca08f1a8b286740
Reviewed-on: https://gerrit.openafs.org/12575
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit dcfebc7ca2923c1f93df9105e493bd4228ea8a0e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Apr 5 16:48:36 2017 -0400
redhat: convert rpm spec file to make install
Convert the build and install from the deprecated 'make dest' to the
modern 'make install' method.
* Clarify the install section by unrolling the shell scripts,
reorganizing, and improving the comments.
* Remove the gzip glob of the man pages; rpmbuild automatically
compresses the man pages and will handle symlinks correctly.
* Remove the generated temporary list file and specify files directly.
* Remove the extra tar commands to install the man pages out of the doc
directory; 'make install..' installs the man pagess.
* Remove code in the install section which determines the sysname. This is
no longer needed during the install.
* Update the kernel module install commands to accommodate the
conversion from 'make dest'.
Change-Id: I97ec80185a2b11704b27ea74941b50ff4a5aca8c
Reviewed-on: https://gerrit.openafs.org/12594
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit bd8bec5b474315cd28df5a4741c1e07d48c7250a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 25 18:34:47 2017 -0400
redhat: fix whitespace errors in the rpm spec file
Remove trailing whitespace characters that have crept into
the rpm spec file over the years.
Change-Id: I08c7ad926ddb524d6938b26513963c28c70b4195
Reviewed-on: https://gerrit.openafs.org/12606
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 6b7b4239ab22fbb301e3b50e2ca4072445ba4e9e
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Tue Apr 11 11:58:55 2017 +0200
Linux: only include cred.h if it exists
Commit c89fd17df1032ec2eacc0d0c9b73e19c5e8db7d2 introduced an explicit
include of linux/cred.h since the latest kernel no longer includes it
implicitly in sched.h. Alas, older kernels (like 2.6.18) don't have this
file. Add a configure test for the existence of cred.h and only include
it if actually present.
Change-Id: Ia7e38160492b1e03cdb257e4b2bef4d18c4a28fb
Reviewed-on: https://gerrit.openafs.org/12593
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c89fd17df1032ec2eacc0d0c9b73e19c5e8db7d2
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Mar 23 18:36:44 2017 -0700
Linux v4.11: cred.h is no longer included in sched.h
With Linux commit e26512fea5bcd6602dbf02a551ed073cd4529449, cred.h is no
longer included in sched.h.
Several components of libafs which require cred.h were picking it by
including sched.h.
Instead, explicitly add an include for cred.h. cred.h begins with a
customary one-shot to prevent multiple loads:
#ifndef _LINUX_CRED_H
#define _LINUX_CRED_H
Therefore we don't need a new autoconf test or preprocessor conditional
to prevent redundant includes on older Linux releases.
Change-Id: Ifc496c83141d2cfbd417133feb6d87c1146e5014
Reviewed-on: https://gerrit.openafs.org/12574
Tested-by: Mark Vitale <mvitale@sinenomine.net>
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>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
commit ad001550949b612ff6b4899fa8da50ee58f87533
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Mar 23 15:10:03 2017 -0700
Linux v4.11: signal stuff moved to sched/signal.h
In Linux commit c3edc4010e9d102eb7b8f17d15c2ebc425fed63c, signal_struct
and other signal handling declarations were moved from sched.h to
sched/signal.h.
This breaks existing OpenAFS autoconf tests for recalc_sigpending() and
task_struct.signal->rlim, so that the OpenAFS kernel module can no
longer build.
Modify OpenAFS autoconfig tests to cope.
Change-Id: Ic9f174b92704eabcbd374feffe5fbeb92c8987ce
Reviewed-on: https://gerrit.openafs.org/12573
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>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
commit de5ee1a67d1c3284d65dc69bbbf89664af70b357
Author: Joe Gorse <jhgorse@gmail.com>
Date: Mon Mar 20 14:30:46 2017 +0000
Linux v4.11: getattr takes struct path
With Linux commit a528d35e8bfcc521d7cb70aaf03e1bd296c8493f
statx: Add a system call to make enhanced file info available
The Linux getattr inode operation is altered to take two additional
arguments: a u32 request_mask and an unsigned int flags that indicate
the synchronisation mode. This change is propagated to the
vfs_getattr*() function.
- int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
+ int (*getattr) (const struct path *, struct kstat *,
+ u32 request_mask, unsigned int sync_mode);
The first argument, request_mask, indicates which fields of the statx
structure are of interest to the userland call. The second argument,
flags, currently may take the values defined in
include/uapi/linux/fcntl.h and are optionally used for cache coherence:
(1) AT_STATX_SYNC_AS_STAT tells statx() to behave as stat() does.
(2) AT_STATX_FORCE_SYNC will require a network filesystem to
synchronise its attributes with the server - which might require
data writeback to occur to get the timestamps correct.
(3) AT_STATX_DONT_SYNC will suppress synchronisation with the server in
a network filesystem. The resulting values should be considered
approximate.
This patch provides a new autoconf test and conditional compilation to
cope with the changes in our getattr implementation.
Change-Id: Ie4206140ae249c00a8906331c57da359c4a372c4
Reviewed-on: https://gerrit.openafs.org/12572
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit c666bfee8848183ccbc566c9e0fa019088e56505
Author: Jonathon Weiss <jweiss@mit.edu>
Date: Thu Nov 10 17:06:18 2016 -0500
Prevent double-starting client on RHEL7
On RHEL7 if the AFS client is stopped with 'service openafs-client
stop', but that fails for some reason (most commonly because some
process has a file or directory in AFS open) systemd will decide that
the openafs-client is in a failed state when it is actually running.
If one then runs 'service openafs-client start' systemd will start a
new AFS client. At this point AFS access will continue to work until
the functional AFS client is (successfully) stopped, at which point a
reboot is required to recover.
Have systemd check the status of 'fs sysname' before starting the
AFS client, so we avoid getting into a state that requires a reboot.
Change-Id: I28a5cca746823d69183ea5ce65c10e1725009c5c
Reviewed-on: https://gerrit.openafs.org/12443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d2721be299c124d76b611ab2980c51be148fa1a7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Feb 20 22:18:09 2017 -0600
XBSD: do not claim AFS_VM_RDWR_ENV
The AFS_VM_RDWR_ENV configuration parameter (defined or not defined
in each platform's param.h) is undocumented, but appears to be an
indication of a property of the platform OS's VFS layer, or perhaps just
of the complexity of the read/write vnops that we implement for it.
That is, AFS_VM_RDWR_ENV is defined when the read/write vnops implement
partial write logic (and presumably when they interact with the OS VM
layer in ways not expressed by the afs_write() abstraction); systems
that do not define AFS_VM_RDWR_ENV can use the afs_write() function
fairly directly as the vnode operation. Use of AFS_VM_RDWR_ENV
evolved over time, with the original (AFS 3.2/3.3-era) code using a
simple scheme that handled partial writes directly in afs_write()
and avoided complexity in callers. In AFS 3.4, sunos and solaris
gained a more complicated read/write vnop that incorporated the
afs_DoPartialWrite() call itself, and eventually in 3.6 we see the
behavior established at the original IBM import, with all the (Unix)
OSes supported at that time defining AFS_VM_RDWR_ENV.
When DARWIN support was brought in in commit
a41175cfbbf4d06ccfe14ae54bef8b7464ecd80b, its param.h properly did
not define AFS_VM_RDWR_ENV, as OS X uses a VFS interface that shares
some level of abstraction with the traditional BSD VFS and its
read/write/getpages/putpages operations, so the afs_write() behavior
was natural and no extra complications needed for integration with the
VM layer or other optimizations.
However, when the initial FreeBSD support came in a few months later,
it seems to have taken inspiration from the OSes that were supported
in the initial IBM import, and kept the AFS_VM_RDWR_ENV definition.
This was then propagated to all the later BSDs as they were added.
Perhaps the most noticeable consequence of this definition is that
the calls to afs_DoPartialWrite() from afs_write() are bypassed, with
a comment that "[i]f write is implemented via VM, afs_DoPartialWrite()
is called from the high-level write op" (and calls to afs_FakeOpen()
and afs_FakeClose() are similarly skipped). This means that attempting
to write a file larger than the local cache will hang waiting for
more space to be freed, which will never happen as the vcache remains
locked and will not be written out in the background.
In the absence of a documented meaning for AFS_VM_RDWR_ENV, this
also gives us a proxy that can be used to indicate whether a given
OS's support intended to claim the AFS_VM_RDWR_ENV -- such platforms
will actually contain the call to afs_DoPartialWrite() in the
appropriate vnode operation. This can be used to sanity-check the
places where AFS_VM_RDWR_ENV is removed by this commit. Interestingly,
HP-UX does not call afs_DoPartialWrite() but also is clearly in a VFS
that uses a rdwr()-based approach, as the corresponding vnode operation
is implemented by mp_afs_rdwr(), so leave it unchanged for now.
Tim Creech is responsible for noting the lack of calls to
afs_DoPartialWrite() on FreeBSD, and Chaskiel Grundman for the
historical research into pre-OpenAFS AFS behavior.
Designing and implementing more complicated BSD read/write vnops that
incorporate afs_DoPartialWrite() and other improvements is left for
future work.
Change-Id: I8e89855ac31303934f97d0753b64899fb7e3867c
Reviewed-on: https://gerrit.openafs.org/12520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Antoine Verheijen <apv@ualberta.ca>
Reviewed-by: Tim Creech <tcreech@tcreech.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 2421da2bf327525216ec7e79b9aa81fa2c4f77d5
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Tue Jan 31 11:43:18 2017 -0300
vol: detach offline volumes on dafs
Taking a volume offline always clears the inService bit. Taking a
volume out of service also takes it offline. Therefore, if the
inService flag is false, the volume in question should be offline.
On dafs, an offline volume should be unattached.
The attach2() function does not change the state of the volume received
as an argument to unattached when the inService flag is false. Instead,
this function changes the state of the volume in question to
pre-attached and returns VNOVOL to the client. As result, subsequent
accesses to this volume will make the server try and fail to attach
this offline volume over and over again, writing to the FileLog each
time.
To fix this problem, detach the volume received as an argument if the
inService flag is false. Since the new state of this volume will be
unattached, subsequent accesses will not hit attach2().
This situation where a volume is not offline but is also not in service
can occur if a volume is taken offline with vos offline and some time
later the DAFS fileserver is shutdown and restarted; the volume is
placed into the preattach state by default when the server restarts.
Each access to the volume by clients then causes the fileserver to
attempt to attach the volume, which fails, since the in-service flag in
the volume header is false from the previous vos offline. The
fileserver will log a warning to the FileLog on each attempt to attach
the volume, and this will fill the FileLog with duplicate messages
corresponding to the number of attempted accesses.
Change-Id: Ifce07c83c1e8dbf250b88b847d331234bdaa9df5
Reviewed-on: https://gerrit.openafs.org/12515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 22d841a45fff7026318b529a41dd957ce8bb0ddf
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Feb 28 18:02:39 2017 -0500
SOLARIS: prevent BAD TRAP panic with Studio 12.5
Starting with Solaris Studio 12.3, it is documented that Solaris kernel
modules (such as libafs) must not use any floating point, vector, or
SIMD/SSE instructions on x86 hardware. However, each new Studio
compiler release (12.4 and especially 12.5) is more likely to use these
types of instructions by default.
If the libafs kernel module includes any forbidden kernel instructions,
Solaris will panic the system with:
BAD TRAP: type=7 (#nm Device not available)
Provide a new autoconfig test to specify the required compiler options
(-xvector=%none -xregs=no%float) when building the OpenAFS kernel module
for Solaris, so that no invalid x86 instructions are used.
In addition, reinstate default kernel module optimization for Solaris.
It had been disabled in commit 80592c53cbb0bce782eb39a5e64860786654be9f
to address this same issue in Studio 12.3 and 12.4. However, Studio
12.5 started using some SSE instructions even with no optimization.
This commit has been tested with OpenAFS master and Studio 12.5 at all
optimization levels (none, -xO1 through -xO5) and verified to contain no
XMM register instructions via the following command:
$ gobjdump -dlr libafs64.o | grep xmm | wc -l
Change-Id: Ic3c7860f7d524162fd9178a1dab5dd223722ee43
Reviewed-on: https://gerrit.openafs.org/12558
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 38a3f51fb8b3910ecdd7cacb06f35ec681990aea
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Feb 20 20:16:47 2017 -0500
DAFS: do not save or restore host state if CPS in progress
If a fileserver is shutdown while one or more PR_GetHostCPS calls
are in progress, this state is saved in the fsstate.dat file as
hostFlags HCPS_WAITING, HCPS_INPROGRESS. Other hosts that are
merely waiting will have HCPS_WAITING recorded.
However, it makes no sense to restore host structs in this state,
because the GetCPS calls will no longer be in progress. Once these
hosts become active, they will block server threads and quickly cause
all server threads to be exhausted as other CPS requests are blocked
behind them.
Instead, exclude these states from both save and restore.
Change-Id: I3fad67b70c96dc967d6f8e3a7b393cfda076c91d
Reviewed-on: https://gerrit.openafs.org/12561
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bd15a5f56fde98983464acf5fd4cdd731d206d9f
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Mar 2 12:52:10 2017 +0100
doc: clarify the fs wscell manpage
What's displayed by fs wscell is not necessarily the current content
of ThisCell, but that at the time of starting the client. Say so.
FIXES 133339
Change-Id: Id3351f1236e5061340eb07041d4ce3e4de69a1a1
Reviewed-on: https://gerrit.openafs.org/12537
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d39e7c7af77b4e1b043611e1a6e78267f5f956ef
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Thu Mar 2 18:01:48 2017 -0300
osx: build afscell only for active architecture
The InstallerPlugins framework provided by the MacOSX10.12.sdk does not
define symbols for architecture i386. As a result, the OpenAFS code
cannot be built on OS X 10.12.
To fix this problem, build the afscell xcode project only for active
architecture.
Change-Id: I2a2bd5694826b668fceb7402567fba1d0f128479
Reviewed-on: https://gerrit.openafs.org/12531
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2a13973985bc7e190364d208c590ec42dbccf81b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 11 13:14:27 2015 -0400
libafs: vldb cache timeout option (-volume-ttl)
The unix cache manager caches VLDB information for read-only volumes as
long as a volume callback is held for a read-only volume. The volume
callback may be held as long as files in the read-only volume are being
accessed. The cache manager caches VLDB information for read/write
volumes as long as volume level errors (such as VMOVED) are not returned
by a fileserver while accessing files within the volume.
Add a new option to set the maximum amount of time VLDB information will
be cached, even if a callback is still held for a read-only volume, or
no volume errors have been encounted while accessing files in read/write
volumes.
This avoids situations where the vldb information is cached indefinitely
for read-only and read/write volumes. Instead, the VL servers will be
periodically probed for volume information.
Change-Id: I5f2a57cdaf5cbe7b1bc0440ed6408226cc988fed
Reviewed-on: https://gerrit.openafs.org/11898
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3893ed397283b0c3605def102004a645a325d476
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 27 01:40:51 2017 -0500
SOLARIS: update convert from ancient _depends_on
Commit 37db7985fde9e6a5e71ae628d0b7124a27bf31c3 modernized how we
declare module dependencies on Solaris 10 and newer.
Instead of explicitly specifying recent Solaris version numbers, specify
old versions for the old method. This should be more future proof.
Thanks to Ben Kaduk for the suggestion.
Change-Id: I7b3c90803825e2c0736548b56deb354183e81b15
Reviewed-on: https://gerrit.openafs.org/12529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 69aadea298825f1f224406064b83d1a947abf96b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Feb 25 20:33:00 2017 -0500
build: update search paths for solaris cc
Move the macros to search for the solaris cc to a separate macro and
update the search paths to keep up with released versions.
Change-Id: Iaba816f1acf5f45d4e147ae517e73949eb8fe949
Reviewed-on: https://gerrit.openafs.org/12528
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6ea6c182c7fb6c22dafbbf203abcc23726e06cba
Author: Sergio Gelato <Sergio.Gelato@astro.su.se>
Date: Wed Feb 22 13:55:33 2017 -0800
LINUX: Debian/Ubuntu build regression on kernel 3.16.39
Now that kernel 4.9 has hit jessie-backports, it becomes desirable to
also backport the associated openafs patches.
Unfortunately, Linux-4.9-inode_change_ok-becomes-setattr_prepare.patch
causes a build failure against jessie's current default kernel,
3.16.39-1, due to the fact that setattr_prepare() is available (it was
cherrypicked to address CVE-2015-1350) but file_dentry() is not (it was
introduced in kernel 4.6).
This makes it difficult to have a version of openafs for jessie that
supports both kernels.
To deal with this, follow the implementation of file_dentry() in 4.6,
and simplify it to account for the lack of d_real() support in older
kernels.
Note that inode_change_ok() has been added back to 3.16.39-1 to avoid
ABI changes. That means the current openafs packages in jessie continue
to work with kernel 3.16.39-1 since they do not include
Linux-4.9-inode_change_ok-becomes-setattr_prepare.patch.
Originally reported at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855366
FIXES RT134158
Change-Id: I157aa2ff25945c1c6e3b8e4a600557125711a681
Reviewed-on: https://gerrit.openafs.org/12523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 789319bf0f2b26ad67995f8cbe88cee87a1bbdc0
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Dec 7 11:11:45 2016 -0500
Linux 4.10: have_submounts is gone
Linux commit f74e7b33c37e vfs: remove unused have_submounts() function
(v4.10-rc2) removes have_submounts from the tree after providing a
replacement (path_has_submounts) for its last in-tree caller, autofs.
However, it turns out that OpenAFS is better off not using the new
path_has_submounts. Instead, OpenAFS could/should have stopped using
have_submounts() much earlier, back in Linux v3.18 when d_invalidate
became void. At that time, most in-tree callers of have_submounts had
already been converted to use check_submounts_and_drop back in v3.12.
At v3.18, a series of commits modified check_submounts_and_drop to
automatically remove child submounts (instead of returning -EBUSY if a
submount was detected), then subsumed it into d_invalidate. The end
result was that VFS now implicitly handles much of the housekeeping
previously called explicitly by the various filesystem d_revalidate
routines:
- shrink_dcache_parent
- check_submounts_and_drop
- d_drop
- d_invalidate
All in-tree filesystem d_revalidate routines were updated to take
advantage of this new VFS support.
Modify afs_linux_dentry_revalidate to no longer perform any special
handling for invalid dentries when D_INVALIDATE_IS_VOID. Instead, allow
our VFS caller to properly clean up any invalid dentry when we return 0.
Change-Id: I0c4d777e6d445857c395a7b5f9a43c9024b098e9
Reviewed-on: https://gerrit.openafs.org/12506
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 961cee00b8f5c302de5f66beb81caa33242c7971
Author: Joe Gorse <jhgorse@gmail.com>
Date: Thu Feb 16 18:01:50 2017 -0500
LINUX: Bring debug symbols back to the Linux kernel module.
Starting with 4.8 Linux kernels our existing build script
generator, make_kbuild_makefile.pl, does not pass the debugging
symbols CFLAGS that were present when building for previous kernels.
This fix appends the $(KERN_DBG) variable which will only be defined
when the configuration includes the --enable-debug-kernel option.
Change-Id: I9a85dc0311a3a706239bc9e471b2d7197ebe1946
Reviewed-on: https://gerrit.openafs.org/12519
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9bc6fd9312a2be591cc831d9b0afd91e53eec6fc
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 10 10:39:09 2017 -0500
build: add --without-swig to override swig check
Add the --without-swig option to disable the automatic swig detection
and disable the optional features which depend on swig. This allows
builders to avoid swig even if present on the build system.
Also, add the --with-swig option to force the check and fail if not
detected. This allows builders to declare the swig features are
mandatory.
The default continues to be to check for swig, and if present, build the
optional features which require swig.
To disable the automatic check for swig and disable the features which
depend on swig:
./configure --without-swig # or --with-swig=no
To force the check and fail if swig is not present on the system:
./configure --with-swig # or --with-swig=yes
If --with-swig is given and swig is not detected, then configure will
fail with the message:
configure: error: swig requested but not found
The Perl 5 bindings for libuafs is the only feature which requires swig
at this time.
Change-Id: I0726658a9cc7b1b2a9d5e5d306adb6e36ad3c0f6
Reviewed-on: https://gerrit.openafs.org/12518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit dd97cb7a7447313dbc1da65104786fe03ede7c8d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 10 01:29:28 2017 -0600
PERLUAFS: Modernize lang-specific swig typemaps
Currently, our swig bindings for PERLUAFS define a couple of typemaps
like so:
%typemap(in, numinputs=1, perl5) (char *READBUF, int LENGTH) {
[...]
}
Embedding the target language name in the typemap arguments is a very
old way of specifying what language the typemap is for; they were
removed after swig 1.1. With swig 3.0.x releases (and possibly
others), the specific combination of this deprecated syntax and some
other features we're using causes a segfault. That's clearly a bug in
swig, but we shouldn't be using the deprecated syntax anyway.
Update this to instead use preprocessor symbols to specify
language-specific typemaps (#ifdef SWIGPERL). We only actually define
these for perl right now, so make sure to throw an error if we're not
running for perl.
FIXES 134103
Change-Id: I14264a2dfada53d99413808ed5d60b79b1ee44f3
Reviewed-on: https://gerrit.openafs.org/12517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5dc53812df9e5a42fa822c9b890c1b8a442bed64
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue Dec 6 10:48:31 2016 -0500
AFS_component_version_number.c: Respect SOURCE_DATE_EPOCH if set
To improve build reproducibility, if the SOURCE_DATE_EPOCH environment
variable is set, use it to deterministically replace the embedded build
date, and do not include the username or hostname in this case.
https://wiki.debian.org/ReproducibleBuilds/TimestampsProposal
Change-Id: I9ba951f1836385ffd14aad95f071bf8c672a01bb
Reviewed-on: https://gerrit.openafs.org/12471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 872a63bbfb04addbdc17dc5c09ec018bb9ddf515
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jan 9 23:55:32 2017 -0500
redhat: move the klog.krb5 man page to openafs-krb5
Move the klog.krb5 man page to the openafs-krb5 package, which
distributes the klog.krb5 binary, instead of the general openafs
package.
Change-Id: I6dc3896f330bb0c639cc75155f611ddaf11b9b75
Reviewed-on: https://gerrit.openafs.org/12509
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit b146c2d54ff3bd99f2c4674eb88d5af417a194d7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jan 12 12:27:36 2017 -0500
SOLARIS: fix for AFS_PAG_ONEGROUP_ENV for Solaris 11
Fix a bug introduced in commit aab1e71628e6a4ce68c5e59e2f815867438280d1
in which a pointer was incorrectly checked for a NULL value.
Fixes a crash when a PAG is set on Solaris.
# mdb unix.1 vmcore.1
> ::status
...
panic message:
BAD TRAP: type=e (#pf Page fault) rp=fffffffc802ba8f0 addr=0 occurred in
module "afs" due to a NULL pointer dereference
> ::stack
pag_to_gidset+0x145()
setpag+0xcc()
AddPag+0x3a()
afs_setpag+0x58()
Afs_syscall+0x115()
The crash occurs since gidslot is NULL during the assignment:
*gidslot = pagvalue;
Change-Id: Ic4d50c6b046d10faa49cd4363692e0302707583d
Reviewed-on: https://gerrit.openafs.org/12508
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a92a3a0675d941536103b60d708a6b3305b9b8fa
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Wed Jan 11 06:05:04 2017 -0800
osx: let prefpane knows where binaries can be found
Starting from OS X 10.11, the OpenAFS binaries were moved to the
following directories: /opt/openafs/bin and /opt/openafs/sbin. However,
the OpenAFS prefpane is not aware of the change mentioned above. As a
result, some functionalities provided by the OpenAFS prefpane are not
working properly.
To fix this problem, add the new paths to the proper environment
variable.
Change-Id: Idaa2f0329af2092cf9ad1d63f1a01300b150227a
Reviewed-on: https://gerrit.openafs.org/12507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 19599b5ef5f7dff2741e13974692fe4a84721b59
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Sat Jan 7 06:22:47 2017 -0500
LINUX: eliminate unused variable warning
Commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286 added routine
osi_TryEvictDentries and included new logic for D_INVALIDATE_IS_VOID.
Unfortunately, this new code path no longer uses dentry; it also should
have been made conditional at that time.
Wrap the declaration of dentry in #ifndef D_INVALIDATE_IS_VOID to
eliminate the unused variable warning.
Change-Id: I89c1430ba984539ca775da2540ea966030de0701
Reviewed-on: https://gerrit.openafs.org/12505
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 2207dcdaad40beed29b0326153dbb76bdf91564d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jan 3 14:41:36 2017 -0500
cleanup afs_args.h
Collect the syscall op code (AFSOP_) defines in one section and cleanup
the use of whitespace and tabs.
This should be a non-functional change.
Change-Id: I1ba763a445b938fcb3677a388a703e1405ee166e
Reviewed-on: https://gerrit.openafs.org/12501
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit aab1e71628e6a4ce68c5e59e2f815867438280d1
Author: Andrew Deason <adeason@dson.org>
Date: Sat Aug 8 16:49:50 2015 -0500
SOLARIS: Use AFS_PAG_ONEGROUP_ENV for Solaris 11
On Solaris 11 (specifically, Solaris 11.1+), the supplemental group
list for a process is supposed to be sorted. Starting with Solaris
11.2, more authorization checks are done that assume the list is
sorted (e.g., to do a binary search), so having them out of order
can cause incorrect behavior. For example:
$ echo foo > /tmp/testfile
$ chmod 660 /tmp/testfile
$ sudo chown root:daemon /tmp/testfile
$ cat /tmp/testfile
foo
$ id -a
uid=100(adeason) gid=10(staff) groups=10(staff),12(daemon),20(games),21(ftp),50(gdm),60(xvm),90(postgres)
$ pagsh
$ cat /tmp/testfile
cat: cannot open /tmp/testfile: Permission denied
$ id -a
uid=100(adeason) gid=10(staff) groups=33536,32514,10(staff),12(daemon),20(games),21(ftp),50(gdm),60(xvm),90(postgres)
Solaris sorts the groups given to crsetgroups() on versions which
required the group ids to be sorted, but we currently manually put our
PAG groups in our own order in afs_setgroups(). This is currently
required, since various places in the code assume that PAG groups are
the first two groups in a process's group list.
To get around this, do not require the PAG gids to be the first two
gids anymore. To more easily identify PAG gids in group processes, use
a single gid instead of two gids to identify a PAG, like modern Linux
currently uses (under the AFS_PAG_ONEGROUP_ENV). High-numbered groups
have been possible for quite a long time on Solaris, allegedly further
back than Solaris 8. Only do this for Solaris 11, though, to reduce
the platforms we affect.
[mmeffie@sinenomine.net: Define AFS_PAG_ONEGROUP_ENV in param.h.]
Change-Id: I44023ee8aa42f3f69bb0c8a8e9178abd513951a1
Reviewed-on: https://gerrit.openafs.org/11979
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 97fec642e591762391e6d453874ff9b5c9ba0c1e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Dec 26 12:15:35 2016 -0600
afsd_kernel: remove gratuitous OS dependence
Commit 94c15f62 in 2010 gave NetBSD and only NetBSD the debug
printing of errno and the strerror() output, with no justification
in the commit message. In the interest of unifying behavior and
avoiding unnecessary OS dependence, give all platforms the errno
and strerror() behavior.
[mmeffie@sinenomine.net: print errno iff syscall returns -1.]
Change-Id: If3c4e0ded54bbd4d5c2573f7d7ee1c82ee3e7223
Reviewed-on: https://gerrit.openafs.org/12500
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 481047d2a2660609091dc04253d136f527469ceb
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 12 22:21:59 2016 -0400
afsd: print syscalls on separate lines with afsd -debug
afsd prints information to standard out for testing and debugging when the
-debug option is given. However, syscall tracing is emitted without trailing
newlines on all platforms except netbsd, creating an unreadable wall of text.
# afsd -debug
...
afsd: Forking 4 background daemons.
SScall(183, 28, 0)=0 183, 28, 6583200)=0 SScall(183, 28, 6583
200)=0 SScall(183, 28, 6583200)=0 SScall(183, 28, 6583200)=0 S
Scall(183, 28, 6583200)=0 SScall(183, 28, 6583200)=0 SScall(18
...
Make the syscall call tracing usable by printing each one on a separate line.
# afsd -deubg
...
afsd: Forking 4 background daemons.
SScall(183, 28, 0)=0 183, 28, 6583200)=0
SScall(183, 28, 6583200)=0
SScall(183, 28, 6583200)=0
...
Change-Id: Ic9208243c1e05352744fb6f575384e00d0e3e59c
Reviewed-on: https://gerrit.openafs.org/12385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9c0db059b6585959e151f7acce845de280952c55
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 26 11:19:13 2016 -0400
vol: convert vnode macros to inline functions
Convert the vnode macros to inline functions to fix integer overflows
for very large vnode numbers (and generally improve the code robustness
and readability).
The macro version of vnodeIndexOffset() will evaluate to an incorrect
offset for very large vnode numbers due to 32-bit integer overflow. The
vnode index file will then be corrupted when writing to the incorrect
offset.
In code paths where the vnode number incorrectly defined as a signed
32-bit integer, this change prevents vnodeIndexOffset() from evaluating
to a negative result when a vnode number is larger than 2^31.
Thanks to Mark Vitale for reporting and providing analysis.
Change-Id: Ia6e0f2d2f97fa1091e0b5a4029d40098692ee681
Reviewed-on: https://gerrit.openafs.org/12397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 0ae62bfa99df8ef5d85b4848783f59a041f82828
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jun 3 15:33:19 2016 -0400
doc: add the PtLog man page
Clone the VLLog man page to create a man page for ptserver log as well.
Fix the spelling of the PtLog file and add a link to the new PtLog man
page in the ptserver man page.
Add the missing PtLog log file name to the bos getlog man page.
Change-Id: I95ad4a2cf380077780160ec78fd1f9bdec132ba7
Reviewed-on: https://gerrit.openafs.org/12294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9ec765d8b4a327ae36c26e38a84dae215d3a2664
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Dec 16 02:43:48 2016 -0500
opr: Make opr_uuid_hash endian-independent
And also make sure it doesn’t use unaligned accesses. Fixes a ‘make
check’ failure on big-endian architectures.
Change-Id: I490174f8d1eecb5f20969b4ef12ff16d0dd3806a
Reviewed-on: https://gerrit.openafs.org/12495
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
commit 5151c03351e8a4d2bd1e212720d7ec9144bf23f0
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Dec 16 03:04:18 2016 -0500
opr: Make opr_jhash_opaque consistent with opr_jhash
Change-Id: I42e1030f8c841dcb974476012a774b91c87d3fb0
Reviewed-on: https://gerrit.openafs.org/12494
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 958120b89d62c8567ab00bc697c4fabdfecd46b4
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Dec 16 02:16:20 2016 -0500
opr: Make opr_jhash_opaque endian-independent
gcc -O2 produces exactly the same code for this on little-endian
systems, but now big-endian systems have a chance of passing ‘make
check’.
Change-Id: Ifc6350648355a0a9f79184439e3f9522cd6f2ffa
Reviewed-on: https://gerrit.openafs.org/12493
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit eb7d3ac4bbd30fc31741cea74fe2b23577deb61e
Author: Anders Kaseorg <andersk@mit.edu>
Date: Wed Dec 14 17:52:35 2016 -0500
opr: ExitHandler: re-raise the signal instead of exiting with that code
This fixes a ‘make check’ failure introduced by commit
803d15b6aa1e65b259ba11ca30aa1afd2e12accb “vlserver: convert the vlserver
to opr softsig”:
$ make check
…
volser/vos..............FAILED 6
…
$ cd tests
$ ./libwrap ../lib ./runtests -o volser/vos
1..6
ok 1 - Successfully got security class
ok 2 - Successfully built ubik client structure
ok 3 - First address registration succeeds
ok 4 - Second address registration succeeds
ok 5 - vos output matches
Server exited with code 15
# wanted: 0
# seen: -1
not ok 6 - Server exited cleanly
# Looks like you failed 1 test of 6
afstest_StopServer has a check for the process terminating with signal
15 (SIGTERM), but not for the process exiting with code 15.
Change-Id: I022965ea2b5440486ea1cf562551d3bbd0516104
Reviewed-on: https://gerrit.openafs.org/12489
Tested-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit eee532ac13a680bfb4cc857485cbaf5e454ab492
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Dec 16 00:29:21 2016 -0500
doc/man-pages/Makefile.in: mkdir man[158] in case we did regen.sh -q
Fixes this error:
$ git clean -xdf
$ ./regen.sh -q
$ ./configure
$ make
[…]
make[3]: Entering directory '/…/openafs/doc/man-pages'
rm -f man*/*.noinstall
if [ "no" = "no" ] ; then \
for M in man1/klog.1 man1/knfs.1 […] man8/kpwvalid.8 man1/klog.krb.1; do \
touch $M.noinstall; \
done; \
fi
touch: cannot touch 'man1/klog.1.noinstall': No such file or directory
touch: cannot touch 'man1/knfs.1.noinstall': No such file or directory
[…]
touch: cannot touch 'man8/kpwvalid.8.noinstall': No such file or directory
touch: cannot touch 'man1/klog.krb.1.noinstall': No such file or directory
Makefile:34: recipe for target 'prep-noinstall' failed
make[3]: *** [prep-noinstall] Error 1
make[3]: Leaving directory '/…/openafs/doc/man-pages'
Change-Id: I95098fb2b27f1d87fc9769497b225e9f91f72266
Reviewed-on: https://gerrit.openafs.org/12492
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 93a7e754a44c333140e75e93cac09f61320f7cc9
Author: Anders Kaseorg <andersk@mit.edu>
Date: Wed Dec 14 15:47:21 2016 -0500
tests/opr/softsig-t: Avoid hanging due to intermediate sh -c
If the build directory happened to contain shell metacharacters, like
the ~ in /build/openafs-vb8tid/openafs-1.8.0~pre1 used by the Debian
builders, Perl was running softsig-helper via an intermediate sh -c,
which would then intercept the signals we tried to send to
softsig-helper. Use the list syntax to avoid this sh -c.
Change-Id: I054b9c8f606e197accb414bfe3f89719255c62c4
Reviewed-on: https://gerrit.openafs.org/12488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9fd396adabaa1868517fdb3d7cfcbe9412c35b0b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Dec 15 22:12:01 2016 -0600
tests: use exec to call libwrap'd executables
No need to leave the shell process hanging around.
In particular, if we are manually running softsig-helper under
libwrap to debug test failures, the child process of the shell is
another shell, which interprets some signals that we wanted to
be passed through, like SIGTERM. On the other hand, once the
softsig-helper is exec()'d, you basically need another shell to
terminate it, which is a different problem....
Change-Id: Iff7c519886a018cb68e692746d40c427b6299457
Reviewed-on: https://gerrit.openafs.org/12490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8b2c4665aabece187759157bda0e26c4b566dd2f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Aug 16 12:56:47 2016 -0400
tests: fix signo to signame lookup in opr/softsig tests
Fix the loop condition when scanning the signal number to name table to
convert a signal number to a name. Instead of looping sizeof(size_t)
times, loop for the number of elements in the table.
This bug was masked on 64 bit-platforms, since the signal number to name
table table currently has 8 elements, which is coincidently the same as
sizeof(size_t) on 64-bit platforms. The bug becomes apparent on 32-bit
systems; only the first 4 elements of the table are checked.
Example error output before this fix:
$ cd tests
$ ./libwrap ../lib ./runtests -o opr/softsig
1..11
ok 1
ok 2
ok 3
ok 4
ok 5
not ok 6
# Failed test in ./opr/softsig-t at line 57.
# got: 'Received UNK
# '
# expected: 'Received TERM
# '
not ok 7
# Failed test in ./opr/softsig-t at line 60.
# got: 'Received UNK
# '
# expected: 'Received USR1
# '
not ok 8
# Failed test in ./opr/softsig-t at line 63.
# got: 'Received UNK
# '
# expected: 'Received USR2
# '
ok 9 - Helper exited on KILL signal.
ok 10 - Helper exited on SEGV signal.
ok 11 # skip Skipping buserror test; SIGBUS constant is not defined.
# Looks like you failed 3 tests of 11.
Change-Id: I863cc9f3650c4a5e9ac9159d90e063b986a8460a
Reviewed-on: https://gerrit.openafs.org/12367
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1d8cb56999a4ab25ae4cbc8e8a688b8100aedd3b
Author: Neale Ferguson <neale@sinenomine.net>
Date: Thu Dec 8 11:47:09 2016 -0500
s390: desupport 32-bit Linux kernels on s390/s390x
Remove the obsolete and custom lwp assembler for the s390 and s390x
architectures. That assembler is no longer needed since 32-bit
mainframe Linux distributions are no longer supported and are very
unlikely to be in use.
The generic process.default.s is sufficient for modern 64-bit Linux
distributions on s390/s390x.
[mmeffie@sinenomine.net: commit message wording]
Change-Id: I654b10dfc257e7de90c9a50048982427276f4d61
Reviewed-on: https://gerrit.openafs.org/12475
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit b5e4e8c14130f601bbf43dee5927222ebf7613fa
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Jan 12 18:06:51 2016 -0500
afs: fs getcacheparms miscounts dcaches for large files
fs getcacheparms issued with the -excessive option tabulates in-memory
dcaches ("DCentries") by size. However, any dcache with validPos > 2^31
is miscounted in the 4k-16k bucket. This is caused by a type mismatch
between 'validPos' (afs_size_t) and 'size' (int) which leads to a
negative value for size by sign-extension. The size comparison "sieve"
fails for negative numbers; it skips the first bucket (0-4K) and dumps
them in the second one (4k-16k).
Move the declaration of 'size' closer to its use, and declare it with
the same type as 'validPos' (afs_size_t) so the comparison sieve
correctly places these dcaches in the last (>=1M) bucket.
Change-Id: Ib0d973da92865043a4f1c068de5e9b81bcde2b9a
Reviewed-on: https://gerrit.openafs.org/12347
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit c966c0b8414ef0a041b1a8d5261c9eccd4d39d99
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Jan 12 17:50:36 2016 -0500
afs: fs getcacheparms miscounts zero-length dcaches
When fs getcacheparms is issued with the -excessive option, it
tabulates all in-memory dcaches ("DCentries") by size.
dcaches with validPos == 0 were being tabulated in the 4k-16k bucket.
Fix the first comparison in the 'sieve' so these dcaches will be counted
in the correct 0-4k bucket instead.
Introduced by commit 176c2fddb95ced6c13e04e7492fc09b5551f273c
Change-Id: I60acb0f115dad9f7951f0b17e5b3e37dc94321b9
Reviewed-on: https://gerrit.openafs.org/12346
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7442752ba6ad618bcdf2185f699d90c56838e89e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Dec 5 18:11:22 2016 -0600
Make OpenAFS 1.8.0pre1
Update version strings for the first 1.8.0 prerelease.
Change-Id: I4f534c9934f6eb1baac9a784fb7c357b19924fb0
Reviewed-on: https://gerrit.openafs.org/12470
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit edcafa93b6c4744e0747842a2e115df27e20fd93
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 23 00:22:22 2016 -0500
Update NEWS for 1.8
[kaduk@mit.edu: adjust sorting, rewrap, reword a few entries and
remove some entries that will not be applicable]
Change-Id: Ifbadc31e3f201e05617a26c12e5e725a5f3c9195
Reviewed-on: https://gerrit.openafs.org/12393
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 37c47e5da1cfcceb3b14e5a0c4064a6ca5806bd0
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 23 00:14:09 2016 -0500
Import NEWS from openafs-stable-1_6_x
The 1.6.x changelog entries have been going directly on the
openafs-stable-1_6_x branch for ease of maintenance.
However, we don't want to skip those changes when mentioning changes
in OpenAFS 1.8, so pull back a copy onto master before adding
things for 1.8.
Change-Id: I545c19db9854300a84295d3ca8b1f301756c38b0
Reviewed-on: https://gerrit.openafs.org/12392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 35f2b8cd49477b10cf358d853f5864b8ad24ba03
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Dec 6 17:07:40 2016 -0500
Update libafsdep files for in-kernel fortuna
Commit 0d67b00ff9db added heimdal's rand-fortuna PRNG to the kernel
module on all architectures, even though it is only needed on the small
subset that do not provide a cryptographically strong random number
generator to kernel module consumers. This was done to ensure that
the build infrastructure for it gets regularly exercised by developers.
However, not all build infrastructure was exercised at the time of
that submission; in particular, the make_libafs_tree.pl script was
not tested. This led to a situation where the libafs tree generated
by that script omitted several files that were now referenced by
the kernel build due to the fortuna import.
To remedy the situation, list the additional files that are needed,
so that they will be copied into the build area for this class of
kernel module builds.
Since the libafs-tree functionality is used to build the Debian
kernel-module source packages, this fix is needed in order to have
a tree that can be built into debian packages without patching.
Change-Id: I81502fb61d7fc718d337c5f73a51b88f6a433d6a
Reviewed-on: https://gerrit.openafs.org/12473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 85c7d31cf2dacdbcd8a053fdc3f66952e7126528
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue Dec 6 10:53:40 2016 -0500
src/cf/roken.m4: Escape buildtool_roken correctly
Fixes these errors from configure:
./configure: line 32154: LDFLAGS_roken: command not found
./configure: line 32154: LIB_roken: command not found
Change-Id: I63b9ade5c8f55948ea2a3f7ae023de4ed9f62341
Reviewed-on: https://gerrit.openafs.org/12472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 4c03e42f91b36a0bf59398b0f649aa0b31b02975
Author: Andrew Deason <adeason@dson.org>
Date: Wed Oct 26 16:04:51 2016 -0500
rx: Add rxi_FlushWriteLocked
Currently, a couple of places in Rx do this:
MUTEX_EXIT(&call->lock);
rxi_FlushWrite(call);
MUTEX_ENTER(&call->lock);
This is a little silly, because if rxi_FlushWrite has anything to do,
it just acquires/drops call->lock again.
This seems like a very minor performance penalty, but in the right
situation it can become more noticeable. Specifically, when an Rx call
on the server ends successfully, rx_EndCall will rxi_FlushWrite (to
send out the last Rx packet to the client) before marking the call as
finished. If the client receives the last Rx packet and starts a new
Rx call on the same channel before the server locks the call again,
the client can receive a BUSY packet (because it looks like the
previous call on the server hasn't finished yet). Nothing breaks, but
this means the client waits 3 seconds to retry.
This situation can probably happen with various rates of success in
almost any situation, but I can see it consistently happen with 'vos
move' when running 'vos' on the same machine as the source fileserver.
It is most noticeable when moving a large number of small volumes
(since you must wait an extra 3+ seconds per volume, where nothing is
happening).
To avoid this, create a new variant of rxi_FlushWrite, called
rxi_FlushWriteLocked. This just assumes the call lock is already held
by the caller, and avoids one extra lock/unlock pair. This is not the
only place where we unlock/lock the call during the rx_EndCall
situation described above, but it seems to be easiest to solve, and
it's enough (for me) to avoid the 3-second delay in the 'vos move'
scenario. Ideally, Rx should be able to atomically 'end' a call while
sending out this last packet, but for now, this commit is easy to do.
Note that rxi_FlushWrite previously didn't do much of note before
locking the call. It did call rxi_FreePackets without the call lock,
but calling that with the call lock is also fine; other callers do
that.
Change-Id: I8f71e86f6c1f6019abea21c205d2b26b7da0d808
Reviewed-on: https://gerrit.openafs.org/12421
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f413fd927af14a9a87034e47125a78eec63e599e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Jan 13 21:39:57 2015 -0500
pts: add some sanity checks in ptuser.c
Double-check that when we're expecting two entries back, we
actually got two entries, in addition to the RPC return value.
Change-Id: I34631ac542667c337ed3268153eb61c70e3fa87e
Reviewed-on: https://gerrit.openafs.org/11668
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 32901c58b29ba4ac666f1dba9915cae2c1f03b52
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Mar 9 18:01:29 2015 -0500
LINUX: Don't compile syscall code with keyrings
osi_syscall_init() is not currently called if we have kernel keyrings
support, since we don't need to set up or alter any syscalls if we
have kernel keyrings (we track PAGs by keyrings, and we use ioctls
instead of the AFS syscall now).
Since we don't call it, this commit makes us also not compile the
relevant syscall-related code. This allows new platforms to be added
without needing to deal with any platform-specific code for handling
32-bit compat processes and such, since usually we don't need to deal
with intercepting syscalls.
To do this, we just define osi_syscall_init and osi_syscall_cleanup as
noops if we have keyrings support. This allows us to reduce the #ifdef
clutter in the actual callers.
Note that the 'afspag' module does currently call osi_syscall_init
unconditionally, but this seems like an oversight. With this change,
the afspag module will no longer alter syscalls when we have linux
keyrings support.
Change-Id: I219b92d89303975765743712587ff897b55a2631
Reviewed-on: https://gerrit.openafs.org/11936
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a6e96a8f10df738eb9b69227d344a72eb830e02e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Nov 30 08:48:06 2016 -0500
vos: fix vos release -verbose output
Fix incorrect vos release -verbose messages introduced by commit
9f4684cd5fac5eacf571b882e965150943383170.
The commit 9f4684cd5fac5eacf571b882e965150943383170 did not take into
account the change from commit 3fc800be9c702c1a40869908831a9895602909cb
in which a partial commit is performed when just new sites are added and
the read-write volume was not changed since the previous release.
Change-Id: If4b3ab81cd810df2e866d6eca0152f475c5448d6
Reviewed-on: https://gerrit.openafs.org/12455
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5b28061fb593f5f48df549b07f0ccd848348b93c
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Mon Nov 28 09:42:44 2016 -0500
afs: release the packets used by rx on shutdown
When the OpenAFS client is unmounted on DARWIN, the blocks of packets
allocated by RX are released. Historically, the memory used by those
packets was never properly released.
Before 230dcebcd61064cc9aab6d20d34ff866a5c575ea, only the last block of
packets used to be released:
...
struct rx_packet *rx_mallocedP = 0;
...
void
rxi_MorePackets(int apackets)
{
...
getme = apackets * sizeof(struct rx_packet);
p = rx_mallocedP = (struct rx_packet *)osi_Alloc(getme);
...
}
...
void
rxi_FreeAllPackets(void)
{
...
osi_Free(rx_mallocedP, ...);
...
}
...
As we can see, ‘rx_mallocedP’ is a global pointer that stores the
first address of the last allocated block of packets. As a result, when
‘rxi_FreeAllPackets’ is called, only the last block is released.
However, 230dcebcd61064cc9aab6d20d34ff866a5c575ea moved the global
pointer in question to the end of the last block. As a result, when the
OpenAFS client is unmounted on DARWIN, the ‘rxi_FreeAllPackets’
function releases the wrong block of memory. This problem was exposed
on OS X 10.12 Sierra where the system crashes when the OpenAFS client
is unmounted.
To fix this problem, store the address of every single block of packets
in a queue and release one by one when the OpenAFS client is unmounted.
Change-Id: Ibd6bd1a8bc45bb4802f9381a8e600c20ee85a59e
Reviewed-on: https://gerrit.openafs.org/12427
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f591f6fae3d8b8d44140ca64e53bad840aeeeba0
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Nov 7 14:16:50 2016 -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]
Change-Id: Iabaafeed09a2eb648107b7068eb3dbf767aa2fe9
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>
commit a26c5054ee501ec65db3104f6a6a0fef634d9ea7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Nov 6 23:29:22 2016 -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.
Change-Id: I344e772e9ec3d909e8b578933dd9c6c66f0a8cf6
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>
commit 70065cb1831dbcfd698c8fee216e33511a314904
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri May 13 00:01:31 2016 -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.
Change-Id: Ia980ada6a2b1b2fd473ffc71e9fd38255393b352
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>
commit 1637c4d7c1ce407390f65509a3a1c764a0c06aa6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Nov 6 15:06:02 2016 -0600
bos: re-add -salvagedirs for use with -all
The MR-AFS support code had a -salvagedirs option that was passed
through to the salvager (when running, and when -all was used),
that was removed in commit a9301cd2dc1a875337f04751e38bba6f1da7ed32
along with the rest of the MR-AFS commands and options.
However, it is useful in its own right, so add it back and allow
the use of -salvagedirs -all to rebuild every directory on the server.
Change-Id: Ifc9c0e4046bf049fe04106aec5cad57d335475e3
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>
commit 9e66234951cca3ca77e94ab431f739e85017a23a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Nov 6 14:31:22 2016 -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.
Change-Id: I4dd515ffa8f962c61e922217bee20bbd88bcd534
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>
commit 3704fc6f2e6716d95446cd10aa2ec798be13472c
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:17:32 2016 -0400
Remove NULL checks for AFS_NONNULL parameters
Recent GCC warns about opr_Assert(p != NULL), where p is an
__attribute__((__nonnull__)) parameter, just like clang did before those
clang warnings were silenced by 11852, 11853.
Now, we could go and add more autoconf tests and pragmas to silence the
GCC versions of these warnings. However, I maintain that silencing the
warnings is the wrong approach. The asserts in question have no
purpose. They do not add any safety, because GCC and clang are
optimizing them away at compile time (without proof!—they take the
declaration at its word that NULL will never be passed). Just remove
them.
Fixes these warnings (errors with --enable-checking) from GCC 6.2:
In file included from casestrcpy.c:17:0:
casestrcpy.c: In function ‘opr_lcstring’:
casestrcpy.c:26:31: error: nonnull argument ‘d’ compared to NULL [-Werror=nonnull-compare]
opr_Assert(s != NULL && d != NULL);
^
/…/openafs/include/afs/opr.h:28:15: note: in definition of macro ‘__opr_Assert’
do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
^~
casestrcpy.c:26:5: note: in expansion of macro ‘opr_Assert’
opr_Assert(s != NULL && d != NULL);
^~~~~~~~~~
casestrcpy.c:26:18: error: nonnull argument ‘s’ compared to NULL [-Werror=nonnull-compare]
opr_Assert(s != NULL && d != NULL);
^
/…/openafs/include/afs/opr.h:28:15: note: in definition of macro ‘__opr_Assert’
do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
^~
casestrcpy.c:26:5: note: in expansion of macro ‘opr_Assert’
opr_Assert(s != NULL && d != NULL);
^~~~~~~~~~
casestrcpy.c: In function ‘opr_ucstring’:
casestrcpy.c:46:31: error: nonnull argument ‘d’ compared to NULL [-Werror=nonnull-compare]
opr_Assert(s != NULL && d != NULL);
^
/…/openafs/include/afs/opr.h:28:15: note: in definition of macro ‘__opr_Assert’
do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
^~
casestrcpy.c:46:5: note: in expansion of macro ‘opr_Assert’
opr_Assert(s != NULL && d != NULL);
^~~~~~~~~~
casestrcpy.c:46:18: error: nonnull argument ‘s’ compared to NULL [-Werror=nonnull-compare]
opr_Assert(s != NULL && d != NULL);
^
/…/openafs/include/afs/opr.h:28:15: note: in definition of macro ‘__opr_Assert’
do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
^~
casestrcpy.c:46:5: note: in expansion of macro ‘opr_Assert’
opr_Assert(s != NULL && d != NULL);
^~~~~~~~~~
casestrcpy.c: In function ‘opr_strcompose’:
/…/openafs/include/afs/opr.h:28:12: error: nonnull argument ‘buf’ compared to NULL [-Werror=nonnull-compare]
do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
^
/…/openafs/include/afs/opr.h:37:25: note: in expansion of macro ‘__opr_Assert’
# define opr_Assert(ex) __opr_Assert(ex)
^~~~~~~~~~~~
casestrcpy.c:98:5: note: in expansion of macro ‘opr_Assert’
opr_Assert(buf != NULL);
^~~~~~~~~~
kalocalcell.c: In function ‘ka_CellToRealm’:
/…/openafs/include/afs/opr.h:28:12: error: nonnull argument ‘realm’ compared to NULL [-Werror=nonnull-compare]
do {if (!(ex)) opr_AssertionFailed(__FILE__, __LINE__);} while(0)
^
/…/openafs/include/afs/opr.h:37:25: note: in expansion of macro ‘__opr_Assert’
# define opr_Assert(ex) __opr_Assert(ex)
^~~~~~~~~~~~
kalocalcell.c:117:5: note: in expansion of macro ‘opr_Assert’
opr_Assert(realm != NULL);
^~~~~~~~~~
Change-Id: I6fd618ed49255d7b3de2f8f3424d9659890829c0
Reviewed-on: https://gerrit.openafs.org/12442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 822ca15a0e760ad9f2c04cd177ca5634f85ee8d6
Author: Dave Botsch <botsch@cnf.cornell.edu>
Date: Thu Nov 17 13:22:17 2016 -0500
Mac OS Sierra deprecates syscall()
The syscall() function has been deprecated in MacOS 10.12 - Sierra. After
discussions with developers, it would appear that syscall() isn't really
needed, anymore, so we can just do away with it.
Change-Id: I60e4220168b097bbae7a5ebaceb2d32276aad3e5
Reviewed-on: https://gerrit.openafs.org/12452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 74f837fd943ddfa20d349a83d6286a0183cb4663
Author: Dave Botsch <botsch@cnf.cornell.edu>
Date: Thu Nov 3 12:22:21 2016 -0400
Define OSATOMIC_USE_INLINED to get usable atomics on DARWIN
In Mac OS 10.12, legacy interfaces for atomic operations have been
deprecated. Defining OSATOMIC_USE_INLINED gets us inline implementations
of the OSAtomic interfaces in terms of the <stdatomic.h> primitives.
This is a transition convenience.
Also indent preprocessor directives within the main DARWIN block to
improve readability.
Change-Id: Id10ae007d5427486f1b0a307a04a90f263201150
Reviewed-on: https://gerrit.openafs.org/12433
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f5f057ce8198480fb9c67f2a8c8eee906f8a7c4a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jul 7 15:51:18 2016 -0400
doc: update information about vlserver logging
Mention the vlserver -d option can be used to set the initial logging
level.
Thanks to Mark Vitale for the suggestion.
Change-Id: Ia17a2063432343c2cf78e1b01c5897751625aae8
Reviewed-on: https://gerrit.openafs.org/12324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 37db7985fde9e6a5e71ae628d0b7124a27bf31c3
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Nov 5 12:42:19 2016 -0400
SOLARIS: convert from ancient _depends_on to ELF dependencies
The ancient way of declaring module dependencies with _depends_on has
been deprecated since SunOS 2.6 (circa 1996). The presence of the old
_depends_on symbol triggers a warning message on the console starting
with Solaris 12, and the kernel runtime loader (krtld) feature of using
the _depends_on symbol to load dependencies may be removed in a future
version of Solaris.
Convert the kernel module from the ancient _depends_on method to modern
ELF dependencies. Remove the old _depends_on symbol and specify the -dy
and -N <name> linker options to set the ELF dependencies at link time,
as recommended in the Solaris device driver developer guidelines [1].
This commit does not change the declared dependencies, which may be
vestiges of ancient afs versions.
[1]: http://docs.oracle.com/cd/E19455-01/805-7378/6j6un037u/index.html#loading-16
Change-Id: Ic5abd82108cd59c0796a8d7659ddaffa791dbeee
Reviewed-on: https://gerrit.openafs.org/12453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3af0460a4a6d7bf22e1789fd9e375659e20c3a55
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Nov 21 13:25:40 2016 -0500
doc: correct help for 'bos getlog' -restricted mode
Commit f085951d39c0d6c1e6a626177c30235704317600 introduced an error in
the bos getlog helpfile.
Modify the helpfile to describe the actual restrictions imposed by
-restricted mode.
Change-Id: I8d8fedb558a1bdbd55d80046b2011f3aacc71b3f
Reviewed-on: https://gerrit.openafs.org/12454
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit c3bbf0b4444db88192eea4580ac9e9ca3de0d286
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Aug 4 18:42:27 2016 -0400
LINUX: do not use d_invalidate to evict dentries
When working within the AFS filespace, commands which access large
numbers of OpenAFS files (e.g., git operations and builds) may result in
active files (e.g., the current working directory) being evicted from the
dentry cache. One symptom of this is the following message upon return
to the shell prompt:
"fatal: unable to get current working directory: No such file or
directory"
Starting with Linux 3.18, d_invalidate returns void because it always
succeeds. Commit a42f01d5ebb13da575b3123800ee6990743155ab adapted
OpenAFS to cope with the new return type, but not with the changed
semantics of d_invalidate. Because d_invalidate can no longer fail with
-EBUSY when invoked on an in-use dentry. OpenAFS must no longer trust it
to preserve in-use dentries.
Modify the dentry eviction code to use a method (d_prune_aliases) that
does not evict in-use dentries.
Change-Id: I1826ae2a89ef4cf6b631da532521bb17bb8da513
Reviewed-on: https://gerrit.openafs.org/12363
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9d4be0bd01696768602a313f627a802b358b5885
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Fri Nov 11 13:21:58 2016 -0800
macos: do not quit prefpane unexpectedly
If the user opens the OpenAFS preference pane and choose the Mounts
tab, the preference pane crashes.
To fix the problem, do not assume that we can cast a NSdictionary
object to NSMutableDictionary.
Change-Id: I3b5f6cb324a6b53c6b53606f71185f61450ee793
Reviewed-on: https://gerrit.openafs.org/12446
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3e8529b6efec4625a4c67e6779fc8367291461a0
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed May 18 00:36:12 2016 -0400
salvager: fix error message for invalid volumeid
If the specified volumeid is invalid (e.g. volume name was specified
instead of volume number), the error is reported via Log(). However,
commit 24fed351fd13b38bfaf9f278c914a47782dbf670 moved the log opening
logic from before this check to after it, effectively making this Log()
call a no-op.
Instead, use fprintf to issue the error message.
Change-Id: I488bc93b178c7973e48d7c9ef4e7ecde9ba62696
Reviewed-on: https://gerrit.openafs.org/12288
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit e8f066dede63648d7d54c632e0e257c80db6effa
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:48:02 2016 -0400
src/tools/rxperf/rxperf.c: Fix misleading indentation
Fixes these warnings (errors with --enable-checking) from GCC 6.2:
rxperf.c: In function ‘rxperf_server’:
rxperf.c:930:4: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (ptr && *ptr != '\0')
^~
rxperf.c:932:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
break;
^~~~~
rxperf.c: In function ‘rxperf_client’:
rxperf.c:1102:4: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (ptr && *ptr != '\0')
^~
rxperf.c:1104:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
break;
^~~~~
Change-Id: I4e8e1f75ec14fa9f95441275cfc136adbb448e9e
Reviewed-on: https://gerrit.openafs.org/12440
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 85cf397ec18ecfde36433fb65e5d91ecd325b76e
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:46:22 2016 -0400
src/gtx/curseswindows.c: Fix misleading indentation
Fixes these warnings (errors with --enable-checking) from GCC 6.2:
curseswindows.c: In function ‘gator_cursesgwin_drawchar’:
curseswindows.c:574:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (params->highlight)
^~
curseswindows.c:576:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (code)
^~
curseswindows.c:579:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (params->highlight)
^~
curseswindows.c:581:9: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (code)
^~
curseswindows.c: In function ‘gator_cursesgwin_drawstring’:
curseswindows.c:628:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (params->highlight)
^~
curseswindows.c:630:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (code)
^~
curseswindows.c:633:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (params->highlight)
^~
curseswindows.c:635:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
if (code)
^~
Change-Id: Ib53eb5755eebb5e22a5414ced8a2540825b41e15
Reviewed-on: https://gerrit.openafs.org/12439
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 86153c65cad10b0459d0f87bbe227a1ebe40f4ea
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:44:00 2016 -0400
src/afsd/afsd.c: Fix misleading indentation
Fixes these warnings (errors with --enable-checking) from GCC 6.2:
afsd.c: In function ‘afsd_run’:
afsd.c:2176:6: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (enable_rxbind)
^~
afsd.c:2178:3: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
afsd_syscall(AFSOP_ADVISEADDR, code, addrbuf, maskbuf, mtubuf);
^~~~~~~~~~~~
afsd.c:2487:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (afsd_debug)
^~
afsd.c:2490:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
afsd_syscall(AFSOP_GO, 0);
^~~~~~~~~~~~
Change-Id: Ic4769046dc06bb58d61428ac08ea12a2f70743e9
Reviewed-on: https://gerrit.openafs.org/12438
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 38040db3bb7b5ae4d5b2c710da17ba60abe39935
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:39:34 2016 -0400
src/ubik/uinit.c: Fix misleading indentation
Fixes this warning (error with --enable-checking) from GCC 6.2:
uinit.c: In function ‘internal_client_init’:
uinit.c:96:2: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (code)
^~
uinit.c:98:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
return code;
^~~~~~
Change-Id: Ib03c4128e206194fa5c34fa3c49bb06beb70e6d0
Reviewed-on: https://gerrit.openafs.org/12437
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0aeb8c17a2701169ddb7397d951c73cf361087c8
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:38:08 2016 -0400
src/rx/rx_packet.c: Fix misleading indentation
Fixes these warnings (errors with --enable-checking) from GCC 6.2:
rx_packet.c: In function ‘rxi_ReceiveDebugPacket’:
rx_packet.c:2009:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (rx_stats_active)
^~
rx_packet.c:2011:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
s = (afs_int32 *) & rx_stats;
^
rx_packet.c:2017:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (rx_stats_active)
^~
rx_packet.c:2019:6: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
rxi_SendDebugPacket(ap, asocket, ahost, aport, istack);
^~~~~~~~~~~~~~~~~~~
Change-Id: Iaecedf63e9ed393607b8700b892aea7678c774b3
Reviewed-on: https://gerrit.openafs.org/12436
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bd70a176c19c09c49c6c3c01ea088ca947c45966
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:36:51 2016 -0400
src/rxgen/rpc_parse.c: Fix misleading indentation
Fixes this warning (error with --enable-checking) from GCC 6.2:
rpc_parse.c: In function ‘analyze_ProcParams’:
rpc_parse.c:861:5: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation]
if (tokp->kind != TOK_RPAREN)
^~
rpc_parse.c:863:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
*tailp = decls;
^
Change-Id: Ia63311c20eb8cd96123ba97b0bf7621b82956e79
Reviewed-on: https://gerrit.openafs.org/12435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a7cc505d3be81e6aaf755bcc83d0dbcab85dbdad
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Nov 4 20:18:52 2016 -0400
regen.sh: Use libtoolize -i, and .gitignore generated build-tools
Recent libtoolize actually deletes build-tools/missing, which Git was
treating as a change to the working copy. Besides, we should let
libtoolize copy in its more recent version of config.guess, config.sub,
and install-sh.
Change-Id: If21f22649e1e1015ad3bcfbf6d34f297b56993a1
Reviewed-on: https://gerrit.openafs.org/12434
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 22933e02e2510f25b79230964f135571c7bfe710
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Oct 27 17:27:26 2016 -0500
Reformat src/afs/LINUX/osi_vcache.c
Apply the GNU indent options from CODING, with manual adjustments
to leave jump labels in column zero.
Also rename and mark static a function-local helper function.
Change-Id: I50b8300b675b2a3f76ae743136b204473ac0c8b0
Reviewed-on: https://gerrit.openafs.org/12422
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 742643e306929ac979ab69515a33ee2a3f2fa3fa
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Aug 4 18:18:15 2016 -0400
LINUX: split dentry eviction from osi_TryEvictVCache
To make osi_TryEvictVCache clearer, and to prepare for a future change
in dentry eviction, split the dentry eviction logic into its own routine
osi_TryEvictDentries.
No functional difference should be incurred by this commit.
Change-Id: I5b255fd541d09159d70f8d7521ca8f2ae7fe5c2b
Reviewed-on: https://gerrit.openafs.org/12362
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
commit 0bed87a15db11bccb693b3a54f704ee5751ae553
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Sun Oct 23 12:52:49 2016 -0700
macos: packaging support for MacOS X 10.12
This commit introduces the new set of changes / files required to
successfully create the dmg installer on OS X 10.12 "Sierra".
Change-Id: I8e715240c4b230c39c26c418324c0184268e1f73
Reviewed-on: https://gerrit.openafs.org/12420
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 0bdf750a962a81b9b2e61387d7a3340dabb13395
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Tue Oct 25 19:33:38 2016 -0700
macos: add support for MacOS 10.12
This commit introduces the new set of changes / files required to
successfully build the OpenAFS source code on OS X 10.12 "Sierra".
Change-Id: I42326cd271d84735188f9e3003e292afe5ee34be
Reviewed-on: https://gerrit.openafs.org/12419
Reviewed-by: Joe Gorse <jhgorse@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8aeb711eeaa5ddac5a74c354091e2d4f7ac0cd63
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Oct 20 00:49:37 2016 -0400
Linux 4.9: inode_change_ok() becomes setattr_prepare()
Linux commit 31051c85b5e2 "fs: Give dentry to inode_change_ok() instead
of inode" renames and modifies inode_change_ok(inode, attrs) to
setattr_prepare(dentry, attrs).
Modify OpenAFS to cope.
Change-Id: I72f8dfbdbd25d7c775e9c35116e323ea4359e95c
Reviewed-on: https://gerrit.openafs.org/12418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f21e3ef8ce5093b4e0578d29666f76bd99aef1a2
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Sep 16 19:01:19 2016 -0400
Linux 4.9: inode_operation rename now takes flags
In Linux 3.15 commit 520c8b16505236fc82daa352e6c5e73cd9870cff,
inode_operation rename2() was added. It takes the same arguments as
rename(), with an added flags argument supporting the following values:
RENAME_NOREPLACE: if "new" name exists, fail with -EEXIST. Without
this flag, the default behavior is to replace the "new" existing file.
RENAME_EXCHANGE: exchange source and target; both must exist.
OpenAFS never implemented a .rename2() routine because it was optional
when introduced at Linux v3.15.
In Linux 4.9-rc1 the following commits remove the last in-tree uses of
.rename() and converts .rename2() to .rename().
aadfa8019e81 vfs: add note about i_op->rename changes to porting
2773bf00aeb9 fs: rename "rename2" i_op to "rename"
18fc84dafaac vfs: remove unused i_op->rename
1cd66c93ba8c fs: make remaining filesystems use .rename2
e0e0be8a8355 libfs: support RENAME_NOREPLACE in simple_rename()
f03b8ad8d386 fs: support RENAME_NOREPLACE for local filesystems
With these changes, it is now mandatory for OpenAFS afs_linux_rename()
to accept a 5th flag argument.
Add an autoconfig test to determine the signature of .rename(). Use this
information to implement afs_linux_rename() with the appropriate number
of arguments. Implement "toleration support" for the flags option by
treating a zero flag as a normal rename; if any flags are specified,
return -EINVAL to indicate the OpenAFS filesystem does not yet support
any flags.
Change-Id: I165d2b7956942446d97beda8504ac1ed5185a036
Reviewed-on: https://gerrit.openafs.org/12391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8e81b182e36cde28ec5708e5fcbe56e4900b1ea3
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Sep 14 18:01:22 2016 -0400
Linux 4.9: deal with demise of GROUP_AT
Linux commit 81243eacfa40 "cred: simpler, 1D supplementary groups"
refactors the group_info struct, removing some members (which OpenAFS
references only through the GROUP_AT macro) and adding a gid member.
The GROUP_AT macro is also removed from the tree.
Add an autoconfigure test for the new group_info member gid and define a
replacement GROUP_AT macro to do the right thing under the new regime.
Change-Id: I85a52c0ae0d91fc141a523f443a4ffc05eb72a2b
Reviewed-on: https://gerrit.openafs.org/12390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit e17cd5df703b8a924591f92c76636dd9e0d9eaf9
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sun Oct 9 06:39:12 2016 -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.
Change-Id: Ida8cb33687b5d87761cb0422e446afd99246d47a
Reviewed-on: https://gerrit.openafs.org/12414
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1cd86de2912af9ad709d2d7cf8aa35d5d28fb6b3
Author: Yadav Yadavendra <yadayada@in.ibm.com>
Date: Mon Oct 3 15:25:08 2016 -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.
Change-Id: I3576a28302d35917019d369adc9d1013ad5870c5
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>
commit 0fdbc0754be58a50f60e3187fc4b34f057faf198
Author: Daria Phoebe Brashear <dariaphoebe@auristor.com>
Date: Sun Sep 25 19:45:48 2016 -0400
git: add a mailmap file
I'd like the source tree to stop deadnaming me, so, sharing this change to do it
Change-Id: Iee65d1c8e7e695ea939485db5b148615e052f953
Reviewed-on: https://gerrit.openafs.org/12394
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 2fe3a28c6ec0ff9d19ddec5500b3a5e69b483210
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Aug 22 19:53:34 2016 -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.
Change-Id: I65f11a3eef88d1c7b210c867ae0c40018160f55a
Reviewed-on: https://gerrit.openafs.org/12377
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4e0bc086d6d09db66b3dd26d221ff712ff351386
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Aug 6 10:41:24 2016 -0400
afsd: fix afsd -help crash
afsd crashes after the usage is displayed with the -help option.
$ afsd -help
Usage: ./afsd [-blocks <1024 byte blocks in cache>] [-files <files in cache>]
...
Segmentation fault (core dumped)
The backtrace shows the crash occurs when calling afsconf_Open() with an
invalid pointer argument, even though afsconf_Open() is not even needed
when -help is given.
(gdb) bt
#0 __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
#1 0x00007ffff726fc36 in *__GI___strdup (s=0x0) at strdup.c:42
#2 0x0000000000408383 in afsconf_Open (adir=0x0) at cellconfig.c:444
#3 0x00000000004054d5 in afsd_run () at afsd.c:1926
#4 0x0000000000407dc5 in main (argc=2, argv=0x7fffffffe348) at afsd_kernel.c:577
afsconf_Open() is called with an uninitialized pointer because commit
d72df5a18e0bb8bbcbf23df3e8591072f0cdb770 changed the libcmd
cmd_Dispatch() to return 0 after displaying the command usage when the
-help option is specified. (That fix was needed for scripts which use
the -help option to inspect command options with the -help option.)
The afsd_kernel main function then incorrectly calls the afsd_run()
function, even though mainproc() was not called, which sets up the afsd
option variables. The afsconf_Open() is the first function we call in
afsd_run().
Commit f77c078a291025d593f3170c57b6be5f257fc3e5 split afsd into afsd.c
and afsd_kernel.c to support libuafs (and fuse). This split the parsing
of the command line arguments and the running of the afsd command into
two functions. The mainproc(), which originally did both, was split
into two functions; one (still called mainproc) to check the option
values given and setup/auto-tune values, and another (called afsd_run)
to do the actual running of the afsd command. The afsd_parse() function
was introduced as a wrapper around cmd_Dispatch() which "dispatches"
mainproc.
With this fix, take the opportunity to rename mainproc() to the now more
accurately named CheckOptions() and change afsd_parse() to parse the
command line options with cmd_Parse(), instead of abusing
cmd_Dispatch().
Change the main fuction to avoid running afsd_run() when afsd_parse()
returns the CMD_HELP code which indicates the -help option was given.
afsd.fuse splits the command line arguments into afsd recognized options
and fuse options (everything else), so only afsd recognized arguments
are passed to afsd_parse(), via uafs_ParseArgs(). The -help argument is
processed as part of that splitting of arguments, so afsd.fuse never
passes -help as an argument to afsd_parse(). This means we to not need
to check for CMD_HELP as a return value from uafs_ParseArgs(). But
since this is all a bit confusing, at least check the return value in
uafs_ParseArgs().
Change-Id: If510f8dc337e441c19b5e28685e2e818ff57ef5a
Reviewed-on: https://gerrit.openafs.org/12360
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 644d3b6ec4afb5e9c0f35f48058d20f791806a9d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Aug 2 16:52:42 2016 -0400
revert: "LINUX: Fix oops during negative dentry caching"
Commit fd23587a5dbc9a15e2b2e83160b947f045c92af1 was done to fix an oops
when parent_vcache_dv() was called without the GLOCK held. Since the
lockless code paths have been removed, and parent_vcache_dv() is always
called with the GLOCK held, revert the extra locked flag argument and
the calls obtain and release the GLOCK within parent_vcache_dv().
Change-Id: I21c3272ec4ed5d4fa1a746a0f783cccfc14e0c22
Reviewed-on: https://gerrit.openafs.org/12354
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 74d4fea1683ccd5b4db53709fc2b5053062ea052
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Mar 4 14:10:23 2015 -0600
Revert "Lockless path through afs_linux_dentry_revalidate"
This reverts commit 3ecd65d3375f0a4fa4c28f9b59cdf6a1f6fd51b8.
This commit made it possible to execute afs_linux_dentry_revalidate
without taking the GLOCK under some circumstances. However, it
achieved this by examining structure members outside of the GLOCK that
were previously only examined under the GLOCK (such as vcp->f.states
and vcp->f.m.DataVersion).
While that does of course improve performance, it is not known to be
completely safe. Revert this commit so we may implement a fastpath
through afs_linux_dentry_revalidate using more trusted lockless
techniques (atomics, RCU, etc).
Change-Id: Ia3ca2cf53f97244e4e548db7c1caf218c16aca5c
Reviewed-on: https://gerrit.openafs.org/11793
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a13ea7038ebe262ba1e5387f4a3b12897bd8822b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 13 13:11:09 2015 -0600
opr: Add opr_StaticAssert
Add a static assert macro, for asserting that certain build-time
expressions are true.
Change-Id: I33b0e7168f041e8e8406710d05689e044af45fad
Reviewed-on: https://gerrit.openafs.org/11792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 7b99f2e4a8b7071930a5851c5f6c6ab6ddc0dd57
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 26 15:47:46 2014 -0700
afs: Create afs_SetDataVersion
Several different places in the codebase change avc->f.m.DataVersion
for a particular vcache, when we've noticed that the DV for the vcache
has changed. Consolidate all of these occurrences into a single
afs_SetDataVersion function, to make it easier to change what happens
when we notice a change in DV number.
This should incur no behavior change; it is just simple code
reorganization.
Change-Id: I5dbf2678d3c4b5a2fbef6ef045a0b5bfa8a49242
Reviewed-on: https://gerrit.openafs.org/11791
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Thomas Keiser <tkeiser@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fac0b742960899123dca6016f6ffc6ccc944f217
Author: Andrew Deason <adeason@dson.org>
Date: Sun May 22 21:54:30 2016 -0500
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]
Change-Id: If6842d7122ed4d137f298f0f8b7f20350b1e9de6
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>
commit 64cc7f0ca7a44bb214396c829268a541ab286c69
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed May 14 19:56:58 2014 -0500
afs: Create afs_StaleVCache
In numerous different places in the code, we do something like this to
mark a vcache as stale:
ObtainWriteLock(&afs_xcbhash, somenumber);
avc->f.states &= ~CStatd;
afs_DequeueCallback(avc);
ReleaseWriteLock(&afs_xcbhash);
if (avc->f.fid.Fid.Vnode & 1 || (vType(avc) == VDIR))
osi_dnlc_purgedp(avc);
There are some variations here and there, but all locations usually
involve at least some code like that. But they all do the same general
thing: invalidate a vcache so we hit the net the next time we need
that vcache.
In order to make it easier to modify what happens when we invalidate a
vcache, and just to improve the code, take all of these instances and
put the functionality in a single function, called afs_StaleVCache,
which marks the vcache as 'stale'.
To handle a few different situations that must be handled, we have
some flags that can also be passed to the new function. These are
primarily necessary to handle variations in the circumstances under
which we hit this code path; for instance, we may already have
afs_xcbhash locked, or we may be invalidating the entire osidnlc (if
we're invalidating vcaches in bulk, for example).
This should result in the same general behavior in all cases. The only
slight differences in a few cases is that we hold locks for a few more
operations than we used to; for example, we may clear an osidnlc entry
while holding the vcache lock. But these are minor and shouldn't
result in any actual differences in behavior.
So, this commit should just be code reorganization and should incur no
behavior change. However, this reorganization is complex, and should
not be considered a simple risk-free refactoring.
[kaduk@mit.edu: implement Tom Keiser's suggestion of a third argument
to afs_StaleVCacheFlags, add AFS_STALEVC_CLEARCB and
AFS_STALEVC_SKIP_DNLC_FOR_INIT_FLUSHED]
Change-Id: I2b2f606c56d5b22826eeb98471187165260c7b91
Reviewed-on: https://gerrit.openafs.org/11790
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 733dcec01784617e3354c2b8b29f50b09464a4bb
Author: Matt K. Light <mklight@gmail.com>
Date: Tue Sep 13 14:18:38 2016 -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
Change-Id: I59a191f7f8123ce17bfa6175b989ae14b5eab5a4
Reviewed-on: https://gerrit.openafs.org/12386
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f2f5a7bca5e77971ef71bf2ddabf93868fe79f1d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Aug 17 10:57:48 2016 -0400
CODING: one-line if statements should not have braces
Update the style guide with a declaration of the prevailing and
preferred brace style for one-line if statements and loops. Provide an
example and counter-example.
Change-Id: Iafeea977203b76c0e67385779fb4ed57f3c6699a
Reviewed-on: https://gerrit.openafs.org/12370
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f0fa5a5327c7440070d34127a124d6b7eb4bd32d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 11 11:25:51 2015 -0400
libafs: update the volume setup time when the vldb is rechecked
The vldb is rechecked when the fileserver returns certain error codes,
such as VMOVED. When the vldb is rechecked, update the volume
setupTime to reflect the most recent time the volume vldb information
is known to be correct.
Be sure the VRecheck flag is cleared after checking the vldb, since
the volume write lock was dropped after finding the volume.
Change-Id: I0ba389ee408de602e0059fbe8013012501c337d3
Reviewed-on: https://gerrit.openafs.org/11897
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>
commit ee08dbe37d9db4fe314bd88b9280bf73c92c37bd
Author: Andrew Deason <adeason@dson.org>
Date: Sat Aug 8 16:13:54 2015 -0500
afs: Make ONEGROUP_ENV not Linux-specific
The functionality in AFS_LINUX26_ONEGROUP_ENV does not really need to
be Linux-specific (it's just only implemented for Linux right now).
Rename it to AFS_PAG_ONEGROUP_ENV, and remove some Linux-specific
checks when checking for "onegroup" PAG GIDs.
[mmeffie@sinenomine.net: Move AFS_PAG_ONEGROUP_ENV to param.h]
Change-Id: I01d29fff309337ae95b9b6c65db3d2212cf4bf89
Reviewed-on: https://gerrit.openafs.org/11978
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b39095c3a7e1c631bb17816b7e707bc21a6b8c71
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 9 16:23:46 2016 -0400
afs: define NUMPAGGROUPS once
Define the number of groups per PAG in one place. Prefix the define
with AFS_ to avoid name conflicts in the future (unlikely as it may be).
Fix the misnamed AFSPAGGGROUPS symbol in linux implementation of two
groups per PAG.
Change-Id: I78bb42913f2a5d84c9f323f17dc36d800d8acb84
Reviewed-on: https://gerrit.openafs.org/12382
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0028ea92ad3e7aac6a4c51f63703a4d9d7b9dcd6
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Apr 29 12:00:24 2015 -0400
afs: add afsd -inumcalc option
This commit adds the afsd -inumcalc command line switch to specify the
inode number calculation method in a platform neutral way.
Inode numbers reported for files within the AFS filesystem are generated
by the cache manager using a calculation which derives a number from a
FID. Long ago, a new type of calculation was added which generates inode
numbers using a MD5 message digest of the FID. The MD5 inode number
calculation variant is computationally more expensive but greatly
reduces the chances for inode number collisions.
The MD5 calculation can be enabled on the Linux cache manager using the
Linux sysctl interface. Other than the sysctl method of selecting the
inode calculation type, the MD5 inode number calculation method is not
specific to Linux.
This change introduces a command-line option which accepts a value to
indicate the calculation method, instead of a simple flag to enable MD5
inode numbers. This should allow for new inode calculation methods
in the future without the need for additional afsd command-line flags.
Two values are currently accepted for -inumcalc. The value of 'compat'
specifies the legacy inode number calculation. The value 'md5' indicates
that the new MD5 calculation is to be used.
Change-Id: I0257c68ca1a32a7a4c55ca8174a4926ff78ddea4
Reviewed-on: https://gerrit.openafs.org/11855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit c17d14223044936a5de5007052eff3488350e9d4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Aug 6 12:57:59 2016 -0400
CODING: update style guide for multiline comments
Document the preferred style for multiple line comment blocks and give an
example.
Change-Id: I73d6183da9014a943316e5aea1d43be2acc81ad7
Reviewed-on: https://gerrit.openafs.org/12361
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit aca8ac83bd456862815a7f247e9a7b89583517a8
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Jul 13 18:23:50 2016 -0500
Document minimum supported compiler versions
Pick some fairly old versions of clang and gcc and document them
as the minimum supported version. This will let us make assumptions
about compiler features that are available when using those compilers.
Change-Id: Ibb8df72c9b12cc7adff39ece9708a428975ba703
Reviewed-on: https://gerrit.openafs.org/12331
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 83a0f2a9ef88e63fbd300fbb436c17ca80c245b4
Author: Anders Kaseorg <andersk@mit.edu>
Date: Mon Jul 25 21:04:59 2016 -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.
Change-Id: I83e27b54ba5711124dccaa41de7155be77054f47
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>
commit fa5af899319b69fa9542add78beca388521e3450
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri May 27 16:44:17 2016 -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.
Change-Id: Id25363255ec011f2ad7e003ca3e4a1385bebff7e
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>
commit 75325fc9ab1cec4a338e1aaf1b32de1922492b12
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu May 26 16:53:47 2016 -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.
Change-Id: I8a9f0cb04ff9b80de5516e14d0679b06ef0b3f9a
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>
commit 19ffa2b7f09bffea816dda4713ad53f4d8cb93cb
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Wed Jul 20 15:09:43 2016 -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.
Change-Id: I9bdbad8e7cc02926de61e337ccb94d8a2c27ae43
Reviewed-on: https://gerrit.openafs.org/12343
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 7f8af1b384cfdc2964a122953e4102b4d82e6cb1
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Jun 18 15:32:36 2015 -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.
Change-Id: I70ceca41342c1b47950c35f567f8ae5a2566f925
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>
commit d3dbdade7e8eaf6da37dd6f1f53d9f1384626071
Author: Andrew Deason <adeason@dson.org>
Date: Sun May 1 11:24:30 2016 -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.
Change-Id: I84f745b5e017bb62d93b538dbc9c7de845bee1bd
Reviewed-on: https://gerrit.openafs.org/12281
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3e531db9ce50dd41f0c64a11ab3bfcf0239ba0cd
Author: Andrew Deason <adeason@dson.org>
Date: Thu May 12 21:34:31 2016 -0500
vlserver: rx_SetRxDeadTime before ubik init
Currently, vlserver calls rx_SetRxDeadTime to set the default rx
deadtime to 50 seconds, but it does so after calling
ubik_ServerInitByInfo. ubik_ServerInitByInfo creates several rx
connections before it returns, and so these connections get the
default rx deadtime (12 seconds), instead of the 50 seconds vlserver
tries to set.
When ubik detects that a remote site is down, ubik recreates the rx
connections for that site, and this new connection gets the new
deadtime of 50 seconds.
This means that ubik behavior can have different timings in the
vlserver, depending on if any remote sites have ever been detected as
being 'down' or not. This can result in seemingly-inconsistent or
confusing behavior, since some sequences of operations that appear
identical can produce different results, depending on if the 12-second
timeout or the 50-second timeout is being used.
This behavior is not directly to blame for any problems, but it can be
very confusing, especially when trying to diagnose or reproduce bugs.
So to make things more consistent, just call rx_SetRxDeadTime earlier,
so all conns always get the 50-second timeout.
In order to do this, though, we must also ensure that rx_Init is
called before rx_SetRxDeadTime (otherwise, rx_Init will overwrite our
configured deadtime). So also call rx_Init earlier; rx_Init is
idempotent, so it's okay that it may be called again after or before
this.
Note that vlserver is currently the only ubik server that sets a
deadtime of 50 seconds, and it's not clear why. Another way to solve
this is to just remove the call to rx_SetRxDeadTime, to make vlserver
behave more similar to ptserver. But this commit takes a conservative
approach to result in a deadtime that is probably the most common in
current use. Since, most long-running vlservers will probably
eventually lose contact with remote sites at one time or another, and
so will eventually use a deadtime of 50 seconds.
Change-Id: I49430144d9a62eb8cad1509c1aeafc9fcc927f8e
Reviewed-on: https://gerrit.openafs.org/12285
Tested-by: Andrew Deason <adeason@dson.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 48ce41a447c354b8a20b769e4aa5b502ba5bcc09
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Fri Jul 15 12:22:11 2016 -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.
Change-Id: If8320666c553b82af450c0263f5e80a00c33e3b8
Reviewed-on: https://gerrit.openafs.org/12239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1bfc24dda0f391b88d7617c6947d03216abb0d80
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Wed Jul 6 09:56:26 2016 -0300
pam: avoid warning messages
In order to avoid some warning messages, do not
ignore the code returned by some functions.
Change-Id: Ie01fa98b54010d566fb5b980b001d58989ef9a67
Reviewed-on: https://gerrit.openafs.org/12298
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a0417565a3ab7e6a49d7c48efd72d62bdeb4436c
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 28 18:35:13 2012 -0400
ptuser: guarantee that all names are valid C strings
The prname type is represented in XDR as a vector[PR_MAXNAMELEN]
of char, not as a string, which means that the XDR (de)serializer
will not guarantee null-termination. Guarantee that all buffers
used in the public protection server API are in fact valid strings
by disallowing any names that are exactly PR_MAXNAMELEN (64)
characters long. DO NOT silently truncate names that are even
longer than this. Consistently use the prname typedef in
declarations to reinforce the length limitation to those reading
the header file. Introduces a new protection error code,
PRNAMETOOLONG, which will be returned if either IN or OUT parameters
would exceed the limit.
[kaduk@mit.edu convert macro to static_inline function and expand
at call sites; add string_ wrapper to add checking to viced and libadmin;
export the string_ wrapper from libafsauthent for the windows build]
Change-Id: I65f850afcfea2fd2bc0110ca7b7f6ecca247dd58
Reviewed-on: https://gerrit.openafs.org/7896
Reviewed-by: Chas Williams <3chas3@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f14d263a73f0be75e4de92f62e836fb2e55680dd
Author: Joe Gorse <jhgorse@gmail.com>
Date: Thu Jun 9 14:11:23 2016 -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)
Change-Id: Iabe29b1349ab44282c66c86eced9e5b2056c9efb
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>
commit 16463b602a210768f80bec9ef7c6896ea8a9909d
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Wed Jul 13 16:55:11 2016 +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.
Change-Id: I0f14bbac35e7dc30a6e194f8706f7f3674d15a3f
Reviewed-on: https://gerrit.openafs.org/12329
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8b57f9fc423c6a69a0fb8147d0621cb703e1374e
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Thu Jun 9 15:04:18 2016 -0300
build-sys: do not capitalize value of HAVE_PAM
The value assigned to HAVE_PAM should not be capitalized.
If so, the PAM source files will not be compiled.
To fix this problem, convert to lowercase one of the values
assigned to HAVE_PAM.
Change-Id: I4973394f8d398bbea0f578fadb04aedee6fd1fc0
Reviewed-on: https://gerrit.openafs.org/12296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a443accfdf8771b90e2b06da04e7e3d1e88028fd
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 11 11:02:20 2015 -0400
libafs: rename volume accessTime to setupTime
Since OpenAFS 1.0, the struct volume accessTime member has been the time
time the volume structure is setup, not the last time the volume was
used (as indicated by the comments). This time stamp is only used to
find the oldest available volume slot in the disked backed volume cache.
(Perhaps in pre-OpenAFS this was updated each time the volume was
referenced.)
Rename this structure member and update the comments for it.
Change-Id: I33a6371e8800b2d0f7b2700db0785fc365a8649e
Reviewed-on: https://gerrit.openafs.org/11896
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c5b52c815972b4f623defaec9e0d8c235228b7b8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 4 12:35:11 2016 -0400
vlserver: --enable-ubik-read-while-write configure option
Commit a0f416e3504929b304fefb5ca65e2d6a254ade2e unconditionally turned
on the new ubik_BeginTransReadAnyWrite functionality for the vlserver,
which allows us to read data from ubik during a conflicting ubik write
lock.
This feature is not ready for production use. Make it a build time
option, marked as experimental, until more testing can be done.
Change-Id: If64702e7a7ed2340066df5faf82ce8b0875fc610
Reviewed-on: https://gerrit.openafs.org/12240
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit cd52915b3e8c8249c5af1cfebd57276cd34a00b9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Oct 7 17:17:08 2014 -0400
LWP fileserver is no more
Don't mention it in the man pages.
Change-Id: I8a6d706f055545642116af5a98fa8c04f533b990
Reviewed-on: https://gerrit.openafs.org/11529
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 43a66de66c40171fedcf0450e9fa93b47c0d9f2e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jun 5 10:09:54 2015 -0400
libafs: avoid resetting the dynroot volume every 10 minutes
The dynroot volumes are synthetic, so do not need to be reset every time
the background daemon checks the volumes.
The results of osi_Time() is a signed 32-bit integer, and the volume
expireTime is an signed 32-bit integer, so use signed 32-bit integers
for the expiry check.
Change-Id: Ib92157686c1d8b84a63d409cb148155705953b6d
Reviewed-on: https://gerrit.openafs.org/11895
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b3e85976936239e30d44da00bf28fbe8487f6998
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Jun 18 15:54:28 2015 -0400
afs: document missing afs_Analyze parm
rxconn was missing from the comments; add it.
Change-Id: I8c0cf212ca2952d3a23c3bb5db1857dfd9a8f41e
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>
commit dda47aab6179b6940aa994a0cd7b88a4b0942fe6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jul 4 20:13:31 2016 -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
Change-Id: I87697587359a26258298f4710c7232bea417f807
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>
commit 683acaed17da90455aab0cbb3d1539c51415b137
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun May 15 13:51:56 2016 -0500
viced: make -vhashsize usable for non-DAFS
The ability to set the size of the volume hash table was added
at the same time that DAFS was introduced, and got caught up
in the same preprocessor conditional. However, -vhashsize can
be useful for the traditional fileserver as well (even though
we recommend DAFS over the traditional fileserver), so let it
be used in that case.
Update the man pages accordingly and fix some grammar while here.
Noted by Mark Vitale.
Change-Id: Ic3282c9d661d60cf36f9ffb197e723a3f71da167
Reviewed-on: https://gerrit.openafs.org/12287
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d3b8a05d229a80100f40fca4dfdcd820313fcea8
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Tue Jun 28 12:48:06 2016 -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.
Change-Id: I8491117ead626e70aac40343923d52284f274efd
Reviewed-on: https://gerrit.openafs.org/12315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 360f4ef53c454494cd5212a5ea46c658bdb2879c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun May 1 19:48:40 2016 -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.
Change-Id: Ia5a194acc559de21808655ef066151a0a3826364
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>
commit 2ef27ea1bb032cee8d26980e60e02b52a0805763
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Thu May 5 12:35:08 2016 -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
Change-Id: I2d7851d31dd4b1b944b16fad611addb804930eca
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>
commit d9cfc1f3f5a75f1dbb14a56cd3da9db6b7a48065
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun May 1 19:04:45 2016 -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.
Change-Id: I1e4c3c51308df096cdfa4d5e7b16279e275e7f41
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>
commit 49106a54993a0c9c64b407f05deaabe8f64e742d
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Fri Aug 1 02:48:21 2014 -0400
Use rxkad_crypt for inter-volser traffic, if asked
Add a -s2scrypt option to the volume server, with possible options:
* never -- the existing behavior
* always -- switch to using afsconf_ClientAuthSecure, which uses
rxkad_crypt, for ForwardVolume calls.
* inherit -- encrypt inter-server traffic if the causal client
connection is encrypted. This has the effect of "inheriting" the
"-encrypt" flag given to "vos release", for example.
Thanks to Jeffrey Altman for pointers and to Andrew Deason for noting
the existence of rxkad_GetServerInfo.
[mmeffie@sinenomine.net fix assertion and style update.]
Change-Id: Ia295ba3f29a8494c8250a480fb26594468d2116a
Reviewed-on: https://gerrit.openafs.org/11349
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Thomas Keiser <tkeiser@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 4bd716223492aec23599a5ac01bce3cc47160bfd
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sat May 14 13:37:54 2016 -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
Change-Id: I478a42931fa863c11b4acca7624bcabc14e561b1
Reviewed-on: https://gerrit.openafs.org/12286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 74413d886d047073b2dd396fbf8f606fd1b263a0
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu May 12 22:23:36 2016 -0400
salvageserver: unable to write child log: out of memory
Changes to salvageserver logging in commit
24fed351fd13b38bfaf9f278c914a47782dbf670
introduced a new bug in SalvageLogCleanup; the test for calloc() failure
was inadvertently inverted.
Fix the sense of the test.
Change-Id: Id0ee4ac3e60d7285163a9ab0b32bd7d48e570ac0
Reviewed-on: https://gerrit.openafs.org/12284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit bf17a719e3443502e2b4bdb7f6b9d2f0c1e39510
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue May 10 22:51:38 2016 -0400
salvageserver: segfault in DoSalvageVolume
A typo in the recent logging changes for salvageserver
ad455347bc99d1bd499535995958b5f77c2388ff
caused a bad address to be passed to memset.
Correctly memset the log options as intended.
Change-Id: Ifef46defcc6da56df4e58f8ed9029717a77c0b39
Reviewed-on: https://gerrit.openafs.org/12282
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 562efa7e4c303acadf5c1df35c72674a3743c577
Author: Andrew Deason <adeason@dson.org>
Date: Thu May 5 00:01:22 2016 -0500
ubik: Don't clear ubik_lastYesTime on startup
In uvote_Init, we set ubik_lastYesTime to the current time just a few
lines before. It is important to set ubik_lastYesTime to the current
time, since that prevents us from voting for anyone in an ubik
election for at least BIGTIME seconds.
If we clear ubik_lastYesTime to 0, that means restarting a ubik server
could cause it to immediately start voting for a different site than
it was voting for before it started. This violates one of the ubik
invariants; as mentioned in the comments in SVOTE_Beacon, we cannot
promise sync site support to more than one site within BIGTIME
seconds. So initializing ubik_lastYesTime to 0 could cause two
different sites to be voted sync site simultaneously, if our restart
caused a premature change in vote.
Change-Id: I410fbefa8d699aac1c900d1fdd4e355b87917ad7
Reviewed-on: https://gerrit.openafs.org/12279
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3c7a315b635fc4ee2118ee541f1169cf147622d5
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Jul 7 09:55:44 2014 -0400
auth: Allow subnet ranges in NetInfo and NetRestrict
Add the ability to specify a range of addresses in both NetInfo and
NetRestrict.
Change-Id: Iecdcca8587aa2e6e7cd56cbbebb63eb41b5d6f40
Reviewed-on: https://gerrit.openafs.org/11313
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 88f10280f8d9f39c76e63fbaa9023c09d7c3f0d7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon May 12 12:35:44 2014 -0400
export some kauth symbols for libadmin sample apps
These functions are used, so they should be in the library's
export list.
Even though no one should be using kauth anymore.
Change-Id: I3ad936c5b898f38194a461c7147792e2fe6f36b2
Reviewed-on: https://gerrit.openafs.org/11139
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
commit b0e6dd60b79e17a391dfdf1bcbb91f972f5c46b9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue May 3 20:31:41 2016 -0400
afs: retire HAVE_LINUX_COMPLETION_H conditionals
Now that support for linux 2.4 has been sunset, as of commit
ccf353ede6ef5cce7c562993d1bea0d20844bdb7, it is no longer necessary to
put conditional compilation checks around the linux wait-for-completion
functions, which were introduced sometime during the linux 2.4 series
and have been available since.
Also, remove the remnant LINUX_COMPLETION_H_EXISTS autoconf macro, which
was removed from use in commit ef8bd5a29b937a1211540aa60398ee966470a712.
Change-Id: Iea974236f73eef8c567a897d6a473254edf95379
Reviewed-on: https://gerrit.openafs.org/12278
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 591da537e22be88da23216b2640331a7338ce0ae
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 28 17:23:23 2016 -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.
Change-Id: I8ef0ddce4e1d327032b54ecebb48e9fdfe7767b4
Reviewed-on: https://gerrit.openafs.org/12277
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5277460eaa300fc973b59d007cd3eaea93d30873
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 28 17:15:06 2016 -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.
Change-Id: Ieb66573c410199d590bfcccf942dca28547ed1e0
Reviewed-on: https://gerrit.openafs.org/12276
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 91f5cecc937923e16c5feda675fccd36d2b95164
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 28 16:52:42 2016 -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.
Change-Id: I032ab5971a6e18df203f799c3a6e4f683a66d726
Reviewed-on: https://gerrit.openafs.org/12275
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8fb11c599270e6cc335258f3473ea4d10f22b85e
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Tue Jan 6 17:47:19 2015 -0500
rw: Properly cleanup LWP environment
Change-Id: I344d2081bdcfc2bd383e30bcf9a53f003356e9cb
Reviewed-on: https://gerrit.openafs.org/11663
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fd26f09d770c5d16cc2c8b45ac697876d41c91e3
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Dec 31 07:39:15 2014 -0500
lwp: fix bug in rw with assigning reader id
Change-Id: I101202a49f14142cf503a64b45f9168a907bbace
Reviewed-on: https://gerrit.openafs.org/11651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5731d3459c16ab7c6a706b4f738028875aed2287
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Tue Dec 23 09:59:05 2014 -0500
lwp: fix some warnings for rw.c
Change-Id: I5459353649e3896b3ade3300403d4b88c85d6084
Reviewed-on: https://gerrit.openafs.org/11650
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8c6bfb61922241b06f5c1467f3df0cf70d08e376
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Tue Dec 23 10:39:10 2014 -0500
lwp: remove preemption support
This feature of lwp is basically unused and inconsistently implemented.
Change-Id: Icf5c04b3bbd71af2c3d1b22dc4bfbe051952d80b
Reviewed-on: https://gerrit.openafs.org/11649
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a9945c22185cfa22270a7b66d6ba356c2d9d8841
Author: Chas Williams <3chas3@gmail.com>
Date: Fri Dec 25 06:37:06 2015 -0500
LINUX: dcache updates for mkdir and sillyrename
Commit d075b0549d62e4a81b7543b9c2f5dac242074909 introduced
parent_vcache_dv() to get the data version from fakestat mount points.
.mkdir (essentially .create for directories) should use this when
updating ->d_time.
In sillyrename, __dp is a negative dentry that should be forced to
revalidate since the new name in dentry now exists.
Change-Id: I5b112ce0437bfb061479024fee745b46821e599c
Reviewed-on: https://gerrit.openafs.org/12141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 687b4d8af07dbcf187dea685e75b420884727efd
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Aug 20 13:55:02 2015 -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.
Change-Id: Ib5d3bbd7c88686bd9a878b6b2c5e7c2b4eeccc04
Reviewed-on: https://gerrit.openafs.org/11988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit bc123573539084ffc5a16ef1efaaaced5b2be202
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Thu Mar 3 18:23:28 2016 -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.
Change-Id: Ic771b1d57080df6ee562a7327762030afdd5b08c
Reviewed-on: https://gerrit.openafs.org/12208
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2a68f7a1c374789961fdfc6de1c228f4f33a8132
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Dec 20 13:33:36 2015 -0600
Partially unifdef afs_pag_call.c
This file is only built on linux, for afspag.ko. There is no
need to retain the artifiacts of its historical origin that include
conditionals for SUN5 or HPUX or the like.
Change-Id: Icbb2390d261f2f51766b392968fe332c4fb8aa6c
Reviewed-on: https://gerrit.openafs.org/12134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8d244c4a52b2111030e74fd32f79136aca5b8904
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 1 13:28:20 2014 -0500
vos: Remove redundant " done" messages
In 1.4, a 'vos backup' command looked like this:
$ vos backup root.cell -verbose
Re-cloning backup volume 537351386 ... done
Created backup volume for root.cell
As of 1.6.1, this output now looks like this:
$ vos backup root.cell -verbose
Re-cloning backup volume 537351386 ... done
done
Created backup volume for root.cell
Note the extra " done". This change can break scripts that parse "vos"
output, but mainly it just looks confusing and doesn't make any sense.
This extra " done" appeared in verbose output for 'vos backup', 'vos
backupsys', and 'vos clone'. It was introduced by commit 13a4f2b1,
which added a VDONE to DoVolClone. This new VDONE call does make
sense, as this does make DoVolClone more self-contained, but the old
VDONE messages were not removed, so an extra " done" got printed.
In addition, commit 13a4f2b1 introduced a new call to DoVolDelete
followed by a VDONE, even though DoVolDelete calls VDONE itself,
causing another redundant " done".
To get rid of all of these redundant " done" messages, remove some
extra VDONE calls in UV_BackupVolume and UV_CloneVolume.
Almost all other calls to VDONE in vsprocs.c are matched by a
preceding message that says what we are doing. The sole exception is
UV_ChangeLocation, which outputs a " done" without any preceding
message. However, this is the behavior that UV_ChangeLocation (and
thus 'vos changeloc') has always has since it was introduced in
0c03f860.
Thanks to Jakub Moscicki of CERN, who originally reported this issue
at EAKC 2014.
Change-Id: I6a13c85e73deb59b511086207a296f4017f799dc
Reviewed-on: https://gerrit.openafs.org/10980
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a62cbc209673632ec5124572304b5ee718ad1708
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Mon May 11 13:54:25 2015 +0200
redhat: remove leftover legacy kmod code from spec
Commit ec706b21530240d7fb66bad2f08513eff8f7c335 removed support
for Linux 2.4 and legacy kernel modules, but missed a few more
occurances of the latter. Remove those too.
Change-Id: I449f0303ec916d597f65790c6f6a564d2f58ce48
Reviewed-on: https://gerrit.openafs.org/11866
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
commit c5e8d594e6809aedac1e6615f65e7e63652528ba
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sat Feb 13 13:02:55 2016 -0600
doc: set use.id.as.filename for chunk.xsl
The deployed documentation on docs.openafs.org uses html file names
that match the id element for the XML elements in question. On
recent Debian systems, rebuilding these documents uses different
names for the files, based on their position within the document
hierarchy.
For consistency with past usage, and to avoid breaking direct links
when possible, set the xsl parameter use.id.as.filename to go back
to the old naming scheme.
Change-Id: I6d3fa2b74e319d1375891170817760d027e82f03
Reviewed-on: https://gerrit.openafs.org/12189
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 170b584b3f0fb0e5121df7ded55364bb4df5abb1
Author: Steve Simmons <scs@umich.edu>
Date: Tue Sep 13 13:41:19 2011 -0400
Reconciliation of src/{afs,vol}/voldefs.h
Bring these two files back into synchronization. Fix
possible bug on very old SysV hosts where volume
header file extension could be handled inconsistently.
Overall differences reduced by about 50%. HPUX/AIX
differences now correctly managed in both versions.
Comment formats and whitespace in both modified to
remove differences and follow openafs standards.
Change-Id: I8fdf9941a0ee6ad7a091be38740bc2796f2b1d18
Reviewed-on: https://gerrit.openafs.org/5405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d3e043189abee8a6bd43a92a6e8c8ed7f578055e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Dec 24 18:17:34 2015 -0600
Add extra parentheses to macro bodies
In order to avoid surprises due to operator precedence, the bodies
of macros that are intended to be used as values should always
be enclosed in an outer set of parentheses, if they contain more than
one term.
Change-Id: If175b1977b9452a7507c5906e4e611eccafb4d67
Reviewed-on: https://gerrit.openafs.org/12143
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9c08ab654846b701557d89107e60cc8a96dc6d3a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Apr 30 11:32:14 2016 -0400
git ignore akeyconvert
Tell git to ignore the new akeyconvert binary added in commit
6f4bdc8cb3cd020cf4b499c352ec4c4811b5a267.
Change-Id: I4b9473e455319ac8ec378169a911c0619ab1fced
Reviewed-on: https://gerrit.openafs.org/12263
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 066ef66648f0d955aa310d0991d888afea9b68d7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 4 13:34:53 2015 -0500
configure: check for some more krb5 functions
We will want to create a krb5_principal object that is used
as a sigil for comparison against, and need to do so in a portable
fashion. krb5_parse_name and krb5_unparse_name have been around
for a long time, but the counterpart krb5_free_unparsed_name is
not always available, so provide compatibility for it.
krb5_free_keytab_entry_contents is only a symbol in MIT krb5;
we will need a compat macro on Heimdal systems where it is not present.
Change-Id: I1cfe12910adac39216b8c7dd337b7e22d73555ed
Reviewed-on: https://gerrit.openafs.org/11785
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
commit 6f4bdc8cb3cd020cf4b499c352ec4c4811b5a267
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Mar 2 17:29:56 2015 -0500
Add akeyconvert, for rxkad.keytab to KeyFileExt conversion
A simple utility to help with the 1.6-->1.8 upgrade by
bulk-converting keys, with some sanity checking.
Change-Id: Ibae9a1ea3b7c3bbad5ffbc02410fa7a4ff6c4d7f
Reviewed-on: https://gerrit.openafs.org/11786
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8bf89fdbc251822b6a3149088f5634bb40e5c225
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Nov 5 16:29:05 2015 -0500
roken: do not include the rk_rename() implementation on unix
libroken provides roken/rename.c for platforms where the native rename()
implementation does not replace the target if it already exists. As designed,
rk_rename() should be used instead of rename() everywhere and rk_rename()
is #defined to be rename() on platforms where this fix is not necessary.
Do not include the rk_rename() implementation on platforms which do not need
the rk_rename since it is not used on those platforms.
Note: This fix also avoids a recursive rename(). As currently implemented, the
rk_rename() function is redefined to rename() within the roken/rename.c module
when RENAME_DOES_NOT_UNLINK is not defined. This can mask the standard library
rename() and leads to a recursive call to rename().
Change-Id: I47a1fcd21939b161aaa7df7ffab26dc84e7b75ed
Reviewed-on: https://gerrit.openafs.org/12091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 40dfd90a9f29ea56a871449172f809c4ae3cd4f6
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 6 11:33:48 2015 -0500
externalize log rotation
Do not create new server log files when servers are restarted by
default. External log rotation tools may be used to rotate the logs by
renaming log files and then signaling server processes to reopen
log files.
Add the -transarc-logs option to each server to provide backward
compatibility with the traditional Transarc-style logging. When
-transarc-logs is given, log files are renamed to an ".old" file
(overwriting the existing ".old" file) and the previous the log file is
truncated.
Change-Id: I2eeb67e3db32b2f75fe685b68dab1159e62061e9
Reviewed-on: https://gerrit.openafs.org/11731
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 79c8b36e11073c40fde2918ae9ee80cc5c3b8efe
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 6 10:56:43 2015 -0500
util: reopen server logs on SIGUSR1 for external log rotation
Claim the SIGUSR1 signal for reopening server log files. A server
process will reopen the log file when the SIGUSR1 signal is received.
If the log file does not exist, the server process will create a new,
empty log file.
This allows external log rotation programs to rotate log files by
renaming an existing log file then sending a SIGUSR1 signal to the
corresponding server process. Any messages written to the log after the
log file was renamed but before the SIGUSR1 signal is received will
continue to be written to the renamed log file. The server process will
write messages to the new log file after handling the SIGUSR1 signal.
The SIGUSR1 signal is used to reopen the log file instead of the more
commonly used SIGHUP signal, since SIGHUP is already used for resetting
the logging level.
The retirement of Linux 2.4 support, in particular the desupport of
LinuxThreads, in commit ccf353ede6ef5cce7c562993d1bea0d20844bdb7 allows
for the use of SIGUSR1 in OpenAFS.
Change-Id: Ie3ff52ae4986eae30c7420b5f05ff1eacdfe7596
Reviewed-on: https://gerrit.openafs.org/11727
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5892473c2381b40a2be375a1b04ddae080711e12
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 12 18:54:43 2016 -0500
util: doxygenate server logging functions
Provide doxygen style comment blocks for the server logging functions
and module variables.
Change-Id: Iacb49ce5d221f9219290e2479df8fa9a54a88fa7
Reviewed-on: https://gerrit.openafs.org/12221
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ad455347bc99d1bd499535995958b5f77c2388ff
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 6 17:06:54 2016 -0500
Remove server logging globals
Remove the global variables used to setup server logging and replace
with an argument to OpenLog.
Keep the LogLevel variable as a global for use by the logging macros,
but provide an inline function for applications which check the log
level to dump more information when the log level is increased.
Provide consistency by adding syslog tags to processes that did not
previously set one (salvageserver, salvager, and volserver).
[kaduk@mit.edu: update commit message, use old-style log rotation for
kalog, minor commenting fixes]
Change-Id: I11cffbdd1418304d33f0be02dd7e600955c4a8bb
Reviewed-on: https://gerrit.openafs.org/12168
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4bfb874d19135e1e5dfe96edbba8e8968cae32b0
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Dec 2 22:56:57 2015 -0600
Add comment about serverlog locking
The lock protects global state such as the logging FD and the
syslog-related variables.
Change-Id: I5ea1b6945c10047da14d35b948a6a0ea53b55add
Reviewed-on: https://gerrit.openafs.org/12123
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a8c9997e93ba0fd36b0b71601157e4a0e9f3b9f5
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Feb 5 16:59:52 2015 -0500
Reopen the correct filename when -logfile is given
The name of the log file passed to ReOpenLog() may not match the name
given in the initial OpenLog() call. This can happen when the -logfile
option is given to the fileserver or volume server.
Since the name given to ReOpenLog() must match the original name, change
ReOpenLog() to use the name previously given to OpenLog() and update all
callers.
Change-Id: Ie6fa4cb6e3c03f853efe0207bbec5d8412c6fe59
Reviewed-on: https://gerrit.openafs.org/11723
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d92ef173bc6ab7dd85bd2cbadbb2a089a9d4bacf
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Feb 4 12:19:32 2015 -0500
util: always reopen the log file
Reopen the log file even if the filename exists. This fixes the
situation where an external program moves or deletes the log
file, then creates a new file with the same log file name.
Change-Id: I3b98d6fc0d05c7ab231f84e9a271f925506ab51f
Reviewed-on: https://gerrit.openafs.org/11725
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 02b228bc4c778645efbbc3d3bb12586a0424c1cd
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Feb 5 10:47:32 2015 -0500
util: refactor OpenLog and ReOpenLog
Non-functional changes and cleanups in preparation for fixes and
enhancements.
Move the duplicated code to redirect the stdio/stderr streams to a common
static function. Add a helper function to check for named pipes. Move the
code to rename files when opening logs to a separate static function.
Change-Id: I5b56b80a7e799b6605cfad7b58ac8249ac93acc8
Reviewed-on: https://gerrit.openafs.org/11721
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ac5346b3612e4f7dc3f97a57990959794b18c3a7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Dec 20 22:11:23 2015 -0600
util: Remove undocumented magic of mrafs-style logs
The MR-AFS-style logs would always include the thread number in
log entries with the timestamp; now that we are trying to rebrand
this feature as "timestampped logs", having this bonus feature
is unexpected.
Thread ids are still used at higher log levels, as enabled by SIGTSTP.
Change-Id: Ie8c276e47a34d729ccce685ddf27bfa9e7a8f9f1
Reviewed-on: https://gerrit.openafs.org/12136
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4b698db3198d30aa1cf1028d3cb7856211792f18
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Feb 5 15:42:16 2015 -0500
util: fix file descriptor leak in mrafs-style logging
When MR-AFS style logging is in effect, the SIGHUP signal handler will rename
then create a new, empty server log file to support log rotation.
Unfortunately, the old log file descriptor is not closed, so each SIGHUP
signal will leak one file descriptor.
Be sure to close the current log file descriptor before opening the log again.
The OpenLog() routine will move the current log file to a new file, with a
timestamp string appended to the log file, then open the server log file with
truncate flag to start a new log file.
Change-Id: Ic3f29607fa50ed868b9245865e375dedde438471
Reviewed-on: https://gerrit.openafs.org/11722
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit db74758924b4d889e1c713a46be898d47f4ae6a9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 13 17:27:59 2016 -0400
util: fix log file renaming of mrafs-style logs
Do not make timestamped log files with an invalid number of seconds when
renaming old mrsafs-style log files, i.e., more than 59 seconds in the
seconds field.
Replace the goto used in the mrafs-style make file name retries with a
regular, bounded loop.
Change-Id: I16d032197e4b1e227b1f005fbc395a013e099561
Reviewed-on: https://gerrit.openafs.org/12220
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 721c3737c7f308c777a7f05cf014e4502c607eb2
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Feb 4 20:53:52 2015 -0500
util: remove unused printLocks variable from mrafs-style logs
Remove the unused printLocks variable, which was added in commit,
86f1dc2117e6b6c8abb55ccbc8621743969b8996 "mrafs-server-log-handling-20010212"
but never used.
Change-Id: I64459cf93e86352ef16d9526e46847cbb4997f10
Reviewed-on: https://gerrit.openafs.org/11719
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 340ec2f79208ee21c3130c4b1c13995947ce426c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 14 16:09:56 2016 -0400
util: allocate log filename buffers
Allocate the ourName buffer to save the log filename during OpenLog(),
instead of trying to copy the log filename to a fixed size buffer.
Deallocate this buffer when the log is closed with CloseLog(). Save the
log file name even when MR-AFS style logging is not effect to allow
ReOpenLog() to use the saved filename in a later commit.
Dynamically allocate a buffer when formatting a file name for log
rotation instead of using a fixed size buffer on the stack. Allocate
the buffer for both traditional Transarc-style log file renaming
(appending ".old" to the log filename) and the MR-AFS style logging
(appending a timestamp to the log filename).
Change-Id: Ie217a93b271b48ccfc7b5244ad3a8c949d55ef54
Reviewed-on: https://gerrit.openafs.org/12219
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1a72f4a917f14c97ab067eb303252e3244cb59d1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 13 16:55:48 2016 -0400
util: open mrafs-style logs with O_APPEND too
Commit b71a041364d28d6a56905a770cd20d1497ee26ec added the O_APPEND flag when
opening the log file to allow sites to use logrotate's "copy and truncate"
feature.
Add the O_APPEND to MR-AFS style logs as well so MR-AFS style logs can also be
handled correctly with logrotate, we have consistent open flags, and can remove
a duplicate call to open the log file descriptor.
Change-Id: I8370838e1e2c7ddaa042508d6b9cbe1299339f68
Reviewed-on: https://gerrit.openafs.org/12218
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 22da8ad7afa12313efdfba4eb6118c3496906275
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Feb 1 16:53:26 2015 -0500
util: remove obsolete SETVBUF_REVERSED
Commit 8af5762909714367c1cc764b3f491c06c2bcd5d0 "Clean up some
obsolete Autoconf code" removed the obsolete autoconf check
AC_FUNC_SETVBUF_REVERSED and one use of the results, but
overlooked another instance; remove it.
Change-Id: Id62a2a96b911c0d16d51d8cce0966ae3736bde87
Reviewed-on: https://gerrit.openafs.org/11718
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5e49cb98ac09b85d830f443a4c006d91764d2e35
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 3 21:07:34 2015 -0500
util: always initialize the server log mutex
Be sure to always initialize the server log mutex. Use pthread_once to
ensure the mutex is initialized only once.
Before this change the server log mutex was not properly initialized
with pthread_mutex_init when logging to the syslog.
Change-Id: Ief2ee6b373f7309bc05061f7413b6ff623b86e31
Reviewed-on: https://gerrit.openafs.org/11717
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 661f73beeb8cc61c24e1d53003d310e835c48a45
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 12 18:12:06 2015 -0400
util: fix server log fd validity checks
Do not assume the server log file descriptor cannot be zero.
Thanks to Chas Williams for spotting this bug.
Change-Id: I0d264828926bf8cd765b45db4e529233b8686404
Reviewed-on: https://gerrit.openafs.org/11797
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ee1e344cef437dd43610cd421e80df2f21001b80
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 2 17:22:16 2015 -0400
util: remove util/softsig
Remove the old util/softsig implementation, which has been replaced by
opr/softsig.
Change-Id: Ie32f04129dd0b09a8baf9f6739abf53fbf1b98eb
Reviewed-on: https://gerrit.openafs.org/11998
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 83fcf5d69800f6ba3c5733cb8cc0007f8b2c9dbc
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 2 16:33:46 2015 -0400
ptserver: convert the ptserver to opr softsig
Convert the ptserver from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: I43d345517c75e275d6896154a979a908181a1f39
Reviewed-on: https://gerrit.openafs.org/11997
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 803d15b6aa1e65b259ba11ca30aa1afd2e12accb
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 2 16:32:54 2015 -0400
vlserver: convert the vlserver to opr softsig
Convert the vlserver from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: Ic9bd841c4796bd64b603505541da7e767afda83e
Reviewed-on: https://gerrit.openafs.org/11996
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e0d7f9b591db66fd33b7e98f669b2e4ff9decf1c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 2 16:28:43 2015 -0400
volser: convert the volume server to opr softsig
Convert the volume server from regular signal handling to the opr soft
signal handling when built with pthreads. This makes it safe to call
pthread functions within signal handlers.
Change-Id: I25b9a9184c526f4ce9b6e2abb25ae9135cc97ec6
Reviewed-on: https://gerrit.openafs.org/11995
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 093fdd6c4cdaeb31a2d9078bd0db5b2e1030b335
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 31 16:40:40 2016 -0400
viced: convert the fileserver to opr softsig
Convert the fileserver from the obsolete softsig routines to the modern opr
softsig routines for pthreaded programs.
Change-Id: I9e98e402f73ebca05fcaf0f852055b9a5ad93632
Reviewed-on: https://gerrit.openafs.org/11994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 97d02926d3d82bf49ad0f53b85c186e0c6a96530
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jun 29 11:03:16 2015 -0400
viced: remove old signal handler wrappers
Remove remnants of old lwp thread signal handler wrapper functions from
the fileserver. The lwp softsig handlers required a function which was
passed a void pointer argument and returned a void pointer. Tidy the
code by removing the unneeded wrappers and use the signal handler
functions directly.
Change-Id: I3d52efe659b03ee9a9484ec7a9d74404f1970278
Reviewed-on: https://gerrit.openafs.org/11921
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b5c2d7d3d574514fd8d4c602f8b01cb7bfa41091
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 31 16:39:48 2016 -0400
util: softsig version of function to setup logging signal handlers
Provide a new routine to setup the server log signals which registers
soft signal handlers for the common log management signals (SIGTSTP and
SIGHUP). Keep the old SetupLogSignals() routine around while lwp still
exists.
Change-Id: Ic9151c7ad25528e8e4008a4567836e4196cbe8c3
Reviewed-on: https://gerrit.openafs.org/12238
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 524d92b497e525bb7bc0929385e722a0c4157890
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 31 16:38:29 2016 -0400
Windows: opr_softsig.h
Make the opr softsig header file available in the windows builds
so it can be included unconditionally in the code base.
Change-Id: I19a75ce060e20b525d83ec5bed42d3168362d852
Reviewed-on: https://gerrit.openafs.org/12237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 22030429fc680959d4d222f20b0756b82eb56d4c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 31 16:37:42 2016 -0400
procmgmt: wrappers for softsig handlers
Provide procmgmt wrappers for Windows environments which match the opr_softsig
functions. This allows builds of the windows servers continue to use the
existing process management signal handling functions, without introducing
additional conditional compilation in the server code.
Change-Id: I0ac287bde294996fb7f32c19370f2992a0af2a58
Reviewed-on: https://gerrit.openafs.org/12236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 24fed351fd13b38bfaf9f278c914a47782dbf670
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 9 21:26:23 2015 -0400
salvager: convert salvager and salvagerserver to libutil logging
Use the libutil logging facility in the salvager and DAFS salvageserver
in order to have consistent logging features and time stamp formats with
the other OpenAFS servers.
Change-Id: I8352d7e16b4a9f96b814a3b5c0b3b79a7c48e4bc
Reviewed-on: https://gerrit.openafs.org/12003
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9c6e6d4c34d867639ac90ba9a46084f3700b57d1
Author: Jonathon Weiss <jweiss@mit.edu>
Date: Fri Apr 15 19:29:58 2016 -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.
Change-Id: I4f114a4ada1babcbe1e52f451f10e78d861b7fd0
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>
commit 5c136c7d93ed97166f39bf716cc7f5d579b70677
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 27 13:06:05 2015 -0400
afs: shake harder in shake-loose-vcaches
Linux based cache managers will allocate vcaches on demand and
deallocate batches of vcaches in the background. This feature is called
dynamic vcaches.
Vcaches to be deallocated are found by traversing the vcache LRU list
(VLRU) from the oldest vcache to the newest. Up to a target number of
vcaches are attempted to be evicted. The afs_xvcache lock protecting
the VLRU may be dropped and re-acquired while attempting to evict a
vcache. When this happens, it is possible the VLRU may have changed, so
the traversal of the VLRU is restarted. This restarting of the VLRU
transversal is limited to 100 iterations to avoid looping indefinitely.
Vcaches which are busy cannot be evicted and remain in the VLRU. When a
busy cache was not evicted and the afs_xvache lock was dropped, the VLRU
traversal is restarted from the end of the VLRU. When the busy vcache is
encountered on the retry, it will trigger additional retries until the
loop limit is reached, at which point the target number of vcaches will
not be deallocated.
This can leave a very large number of unbusy vcaches which are never
deallocated. On a busy machine, tens of millions of unused vcaches can
remain in memory. When the busy vcache at the end of the VLRU is finally
evicted, the log jam is broken, and the background deamon will hold the
afs_xvcache lock for an excessively long time, hanging the system.
Fix this by moving busy vcaches to the head of the VLRU before
restarting the VLRU traversal. These busy vcaches will be skipped when
retrying the VLRU traversal, allowing the cache manager to make progress
deallocating vcaches down to the target level.
This was already done on the mac osx platform while attempting to evict
vcaches. Move the code to move busy vcaches to the head of the VLRU up
the the platform agnostic caller.
Thanks to Andrew Deason for the initial version of this patch.
Change-Id: I7768d00604e56d8d5369ac5215f7c2ab7996c4eb
Reviewed-on: https://gerrit.openafs.org/11654
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@dson.org>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 961875cbedc2c91cdba6dc34a43c6136ea9797fb
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Feb 25 18:49:20 2016 -0500
LINUX: hold vcache while dropping dcache refs
Hold a reference on a vcache while attempting to evict the inode from
the dcache. Since the afs_xvcache lock is dropped, it could be possible
for the vcache to be flushed during this time, making it unsafe to use
the vcache after the eviction attempt.
Change-Id: I9d91db98387b7aaa986ed915420c6cafb4f12438
Reviewed-on: https://gerrit.openafs.org/12206
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@dson.org>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3609ebcfa3f70ca7612364c0cc2345b1d7f1096b
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Apr 7 10:58:30 2016 +0200
Linux: Fix misleading indentation and other whitespace
Commit 7edc6694e7632c9736bd1516935604a638165313 introduced a
misleading indentation of a line in afs_linux_prefetch. Correct
it, and once here remove trailing whitespace throughout the file.
Change-Id: Idab888bb72c782bfd25c7fc81316eb1b65c0d128
Reviewed-on: https://gerrit.openafs.org/12253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 808b156bd890cd78dc59b443b4ebe32e98d440d4
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Apr 5 12:53:48 2016 -0500
Fix typo in cm_dcache.c
Commit b85c5f9339e20d3de9b1316217dadbea41ad537e introduced a new
memset() but left out a prenthesis.
In the absence of a windows build machine, this error went unnoticed.
Reported by Mark Vitale.
Change-Id: Ie250163029132896cd70dc822c6170913e83dafe
Reviewed-on: https://gerrit.openafs.org/12241
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a3fa6dabf481cf0e79bdddaab315e801f213a46b
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Mon Mar 28 15:50:16 2016 -0300
doc: add missing angle bracket
The options -logfile and -config should be enclosed
by angle brackets.
Change-Id: I9e5767b7e43753b37dbc8d86c5346c778f8bab8d
Reviewed-on: https://gerrit.openafs.org/12233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ae5f411c3b374367ab8ae69488f78f8e0484ce48
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Tue Mar 8 14:15:17 2016 +0100
Linux 4.4: Do not use splice()
splice() may return -ERESTARTSYS if there are pending signals, and
it's not even clear how this should be dealt with. This potential
problem has been present for a long time, but as of Linux 4.4
(commit c725bfce7968009756ed2836a8cd7ba4dc163011) seems much more
likely to happen.
Until resources are available to fix the code to handle such errors,
avoid the riskier uses of splice().
If there is a default implementation of file_splice_{write,read},
use that; on somewhat older kernels where it is not available,
use the generic version instead.
[kaduk@mit.edu: add test for default_file_splice_write]
Change-Id: Ib4477cdfb2cd0f49f516da75edc3cb9d1a8817dc
Reviewed-on: https://gerrit.openafs.org/12217
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 58d82226a555d3781a5cb45e5cc177727628ebd8
Author: Michael Laß <lass@mail.uni-paderborn.de>
Date: Mon Jan 18 19:58:00 2016 +0100
Linux 4.4: Use locks_lock_file_wait
The locks API was changed in Linux 4.4, introducing locks_lock_file_wait
(e55c34a66f87e78fb1fc6b623b78c5ad74b475af) and removing
flock_lock_file_wait (616fb38fa7a9599293e05ae1fa9acfaf73922434).
locks_lock_file_wait can be used as a drop-in replacement so define
flock_lock_file_wait as an alias for it.
Change-Id: Iba89a43c651737c86cbf519a933289d97c25a467
Reviewed-on: https://gerrit.openafs.org/12170
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5067ee3ae11932a3f1c972c8f88b20afbd9e1d88
Author: Michael Laß <lass@mail.uni-paderborn.de>
Date: Mon Jan 18 18:29:00 2016 +0100
Linux 4.4: key_payload has no member 'value'
In Linux 4.4 (146aa8b1453bd8f1ff2304ffb71b4ee0eb9acdcc) type-specific and
payload data have been merged. The payload is now accessed directly and has
no 'value' member anymore.
FIXES 132677
Change-Id: Id26c40c80314a0087ecc0735029412787058ef07
Reviewed-on: https://gerrit.openafs.org/12169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 279f9c54b4ccd8a55812ac8423a153d5c2deb0ab
Author: Chas Williams <3chas3@gmail.com>
Date: Mon Nov 23 14:19:38 2015 -0500
Remove automated casting in rxgen
We should let the compiler warn us when we attempt to convert types that
should not be converted.
Change-Id: Ie9f5f6ab5d5978bbe5e741b1a20bfb4d36fb314c
Reviewed-on: https://gerrit.openafs.org/12116
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9823c576229f74fe4c308b5164149873e0fddbaf
Author: Chas Williams <3chas3@gmail.com>
Date: Mon Nov 23 14:15:08 2015 -0500
rxgen: Don't use size_t in struct rx_opaque with XDR
OpenAFS's XDR doesn't support size_t at this time. For now, use a
temporary stack variable to avoid 32/64-bit issues and copy back the
returned value upon success.
Change-Id: Ia3dd8abd665a19e04aa611f940728d088a8f87b7
Reviewed-on: https://gerrit.openafs.org/12115
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5aa6d4a26a5b84389ecb22bc8c6cd69dee8e4ca4
Author: Chas Williams <3chas3@gmail.com>
Date: Mon Nov 23 12:29:31 2015 -0500
Refactor printing arguments to the xdr routines
This makes some future changes a bit easier to read and implement.
Change-Id: I48eafa67659739865f43a0bcfe1f8a897a7a8940
Reviewed-on: https://gerrit.openafs.org/12114
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f99c1ec32bb6e8d31ac517173ff7502dbd85aa05
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Mar 18 10:22:33 2016 -0400
doc: fs examine no longer requires read rights on the volume root vnode
Update the man page to reflect the current access rights required for fs
examine. Historically, fs examine required read access on the root
vnode of the volume housing the directory or file being examined. This
access check was relaxed in commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a,
since the information returned by the file server is already available
anonymously by other means.
Change-Id: If62b625bce8a260b98fb56a6feec49c674f2de53
Reviewed-on: https://gerrit.openafs.org/12223
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 02a393de6b30a500b77f276011c70d41eff363b5
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 16 16:16:49 2016 -0500
Add param files for FreeBSD 10.2, 10.3
FreeBSD 10.3 is in the beta stage now; better get ready for it.
Change-Id: I2a6b6144916f13768bfad27af5eb5340e039939b
Reviewed-on: https://gerrit.openafs.org/12222
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit e63c2570f9d95bee7c7a00dd578a6971c6e733b9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Mar 14 23:15:20 2016 -0500
OPENAFS-SA-2016-002 ListAddrByAttributes information leak
The ListAddrByAttributes structure is used as an input to the GetAddrsU
RPC; it contains a Mask field that controls which of the other fields
will actually be read by the server during the RPC processing.
Unfortunately, the client only wrote to the fields indicated by the
mask, leaving the other fields uninitialized for transmission on the
wire, leaking some contents of client memory.
Plug the information leak by zeroing the entire structure before use.
FIXES 132847
Change-Id: I9ccf814ceff206ddb3a74da97dc50b7e1e3c2014
commit c12b3fee2fabd92c57d92fc945d70acba9f53ab3
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Mar 14 23:15:20 2016 -0500
OPENAFS-SA-2016-002 VldbListByAttributes information leak
The VldbListByAttributes structure is used as an input to several
RPCs; it contains a Mask field that controls
which of the other fields will actually be read by the server
during the RPC processing. Unfortunately, the client only
wrote to the fields indicated by the mask, leaving the other
fields uninitialized for transmission on the wire, leaking
some contents of client memory.
Plug the information leak by zeroing the entire structure before use.
FIXES 132847
Change-Id: I14964e98a57ba6ef060c6e392497f1ebd3afe042
commit 67646c7c901a1f346d78666f432b673c5b341380
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Mar 14 23:15:20 2016 -0500
OPENAFS-SA-2016-002 AFSStoreVolumeStatus information leak
The AFSStoreVolumeStatus structure is used as an input to the
RXAFS_SetVolumeStatus RPC; it contains a Mask field that controls
which of the other fields will actually be read by the server
during the RPC processing. Unfortunately, the client only
wrote to the fields indicated by the mask, leaving the other
fields uninitialized for transmission on the wire, leaking
some contents of kernel memory.
Plug the information leak by zeroing the entire structure before use.
FIXES 132847
Change-Id: Ib309e6b00b95bc4178740352899d7f940f2eb1ea
commit b85c5f9339e20d3de9b1316217dadbea41ad537e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Mar 13 12:56:24 2016 -0500
OPENAFS-SA-2016-002 AFSStoreStatus information leak
Marc Dionne reported that portions of the AFSStoreStatus structure
were not written to before being sent over the network for
operations such as create, symlink, etc., leaking the contents
of the kernel stack to observers. Which fields in the request
are used are controlled by a flags field, and so if a field was
not going to be used by the server, it was sometimes left
uninitialized.
Fix the information leak by zeroing out the structure before use.
FIXES 132847
Change-Id: I84a5a10442732ebbcb5d5067ca22030fb795168b
commit d853866c56a114616ecb68f06a914aaea0e5c7c7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 9 20:38:10 2016 -0600
OPENAFS-SA-2016-001 group creation by foreign users
CVE-2016-2860:
In AFS 3.3 as part of the addition of the cross-cell support for foreign
user auto-registration a bug was introduced that permits foreign users
to create arbitrary groups as if they were system administrators. This
permits the groups to be created without any group quota checks, and
using group names that non-administrators would not normally be able to
create, such as groups with the "system:" prefix or groups with no colon
(that is, in the namespace for users).
Additionally, all entries created using the auto-registration service
were marked as being created by system:administrators. This behavior
should not be changed on the stable release branch, but for the next
release the behavior will change to show these entries as being
self-created, to better reflect reality.
FIXES 132822
[kaduk@mit.edu: reword commit message, minor style adjustments]
Change-Id: I54ddca3e4e1339f76ed320f0d6c53d8820aed89c
commit e3bb92c2a0883ae2922ac6019eed543201dbc2ec
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 9 22:34:55 2016 -0600
ptserver: fix pt_util creation of groups
In commit 53ac98931adf9f04c150d9bc084cae31f3913476 the adjustment of
owner id was moved from CreateEntry() into CreateGroupName(). This was
done for two reasons:
1. to reuse the computation of "is administrator" within
CreateGroupName() in order to permit the owner id to be set
to the invalid values 0 and ANONYMOUSID.
2. to allow the owner id to be altered in ChangeEntry().
Unfortunately, CreateEntry() needs to be able to alter the owner id
when creating users not only groups.
This change moves the computation of "is administrator" and the
owner id assignment to CreateEntry() and ChangeEntry().
Change-Id: I0d37f5a43ea5919d1bbc3ba6d82b2924ab38befc
commit b702ab5da216976ed01ad3b1c474ecd4cc522ff2
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Feb 24 16:57:11 2016 -0500
LINUX: ifconfig is deprecated
ifconfig is deprecated and is no longer installed by default on RHEL 7 and
Centos 7. Use the replacement ip command in the init script for linux.
Fallback to ifconfig in the event the ip command is not available.
Thanks to Ben Kaduk for pointing out the hash built-in command.
Change-Id: I7ffe272eb712cd83a70a7d880d239f72b40cb5df
Reviewed-on: http://gerrit.openafs.org/12192
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d833ba768064a32a19c6b0b94ffb0d8a3a40a089
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Mar 27 06:36:59 2014 -0400
DAFS: large volume support - fileserver crash after "addled bitmap"
Any DAFS fileserver operation that allocates a new vnode but fails
to update the vnode index will crash:
"Fatal Rx error: assertion failed: --vp->nWaiters >= 0,
file: ../vol/volume.c, line: nnnn"
Note: This crash was exposed by other bugs (to be addressed in future
commits) in OpenAFS large volume support. However, there may
be other failure paths (unrelated to large volumes) that expose
this error as well.
When VAllocVnode() must allocate a new vnode but fails while
updating the vnode index file (e.g. an "addled bitmap" due to other
bugs in working with a vnode index larger than 2^31 bytes), it branches
to common recovery logic at label error_encountered:.
Part of this recovery is to call VFreeBitmapEntry_r(). Commit
08ffe3e81d875b58ae5fe4c5733845d5132913a0 added a VOL_FREE_BITMAP_WAIT
flag to VFreeBitmapEntry() in order to prevent races with VAllocBitmapEntry().
If the caller specifies VOL_FREE_BITMAP_WAIT, VFreeBitmapEntry_r will
call VCreateReservation_r() and VWaitExclusiveState_r(). However, the
exit from VFreeBitmapEntry_r() calls VCancelReservation_r() unconditionally.
This works correctly with the majority of callers to VFreeBitmapEntry_r,
which do specify the VOL_FREE_BITMAP_WAIT flag.
However, the VAllocVnode() error_encountered logic must specify 0 for
this flag because the thread is already in an exclusive state
(VOL_STATE_VNODE_ALLOC). This correctly causes VFreeBitmapEntry_r() to
forgo both the reservation and wait-for-exclusive-state. However, before
exit it erroneously calls VCancelReservation_r(). We now have unbalanced
reservations (nWaiters); this causes an assert when the VAllocVnode()
error_encountered recovery code later calls VCancelReservation_r()
for what it believes is its own prior reservation.
Modify VFreeBitmapEntry_r() to make its final VCancelReservation_r()
conditional on flag VOL_FREE_BITMAP_WAIT.
Change-Id: Id6cf6b1279b11e6dfc4704bba5739912f663beca
Reviewed-on: http://gerrit.openafs.org/11983
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@auristor.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit cc79ca882d180fddadb785f65279c4340210d5d0
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Sat Jul 18 01:12:51 2015 -0400
bozo: allow start of fs and dafs bnodes with options
fs_create() and dafs_create() issue stat() to verify
the existence of each executable specified in the bnode.
However, commit fda2bc874751ca479365dc6389c0eebb41a0bda1
inadvertently removed the code that stripped any command
arguments before the stat(). Therefore, any bnode that
specifies arguments (e.g. /usr/afs/bin/dafileserver -d 5),
causes the stat() to fail and the bnode will not start.
Rename function AppendExecutableExtension() to a less
"window-ish" name: PathToExecutable().
Modify the Windows version of PathToExecutable()
to properly strip arguments.
Reimplement the Unix macro as function PathToExecutable()
that properly strips arguments.
Change-Id: I04f7ce2afb8211bd12b9063db1335738bff1cc1e
Reviewed-on: http://gerrit.openafs.org/11934
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 44349d0694c7a185fae4c55c75cb01196d109a26
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Feb 16 14:55:03 2016 -0500
viced: incorrect FID audit of BulkStatus and InlineBulkStatus
The audit code for object AUD_FIDS is off by one - we list the
first FID twice and skip the last FID.
Repair so all FIDs are properly audited.
Change-Id: I99f4687e25031eb26ccd7e07b732217b098005de
Reviewed-on: http://gerrit.openafs.org/12191
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit c0876aa6b5edb2796330d786660ed4f2075a1fcf
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 8 10:10:32 2016 -0500
test: skip buserror test when SIGBUS is not defined in perl POSIX module
Older versions of the perl POSIX module do not define the SIGBUS symbol, which
causes the opr/softsig-t perl test to fail to compile. Instead of trying to
defined SIGBUS, which may be platform dependent, skip the buserror unit test on
these older platforms.
Change-Id: Ib8cfd77215ea43566e9d47b501d4989556b83734
Reviewed-on: http://gerrit.openafs.org/12186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 378eae1d534d61d357a0ad681b57b5e203f814ad
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 8 12:12:22 2016 -0500
CellServDB update 01 Jan 2016
Update all remaining copies of CellServDB in the tree, and make the
Red Hat packaging use it by default too.
Change-Id: Idf9d97151b8e9075fefa7aece58fd023bfd857ff
Reviewed-on: http://gerrit.openafs.org/12187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ed52d65fe98549e13023e0a8997da479b626085a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jan 30 12:20:10 2015 -0500
volser: detect eof in dump stream while reading acl
Detect an EOF condition while reading the ACL in a dump stream
and return a restore error, instead of filling the ACL with
0xFF and then failing the restore due to an invalid tag.
Change-Id: If7a71946c81f47ac68ed2f7afdfca1023bad3baf
Reviewed-on: http://gerrit.openafs.org/11703
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 97150150e6d12cbbc0c4a5af3424c9bf1e56918c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Nov 22 14:23:49 2015 -0600
cellconfig: check for invalid dotted quads
IP addresses entered into the CellServDB with components larger
than 255 would silently be trucated down to 8-bit unsigned integer
representations. This could cause confusing behavior with
occasional hangs.
FIXES 131794
Change-Id: I44834cb4662e178fdb4be2eeb03ad58d2fa7c556
Reviewed-on: http://gerrit.openafs.org/12109
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 11845765c75a2f15404ac55a882358c3f88595b9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sat Apr 11 20:51:09 2015 -0500
afs: Log abnormally large chunk files
Any chunk in our cache for a regular file should be smaller than or
equal to our configured chunksize. If someone sets a chunk to be
larger than that, it is very strange and may cause other confusing
issues. Specifically, afs_DoPartialWrite determines if our cache is
"too full" by counting the number of dirty chunks. If we have a dirty
chunk that is much larger than the chunksize, it can throw off the
afs_DoPartialWrite calculation.
This is only true for dcaches backing regular files, though. For
directories, we fetch the entire directory into a single chunk file,
and the size of a directory blob can easily exceed the chunksize
without issues. The aforementioned issue with afs_DoPartialWrite does
not apply, since directory chunks cannot be dirty (we only locally
modify the chunk if we modify the dir on the server, and the DVs
match).
Anyway, it should not be possible to get a chunk for a regular file
larger than the chunksize. Log a message if it does occur, to help
assist anyone in tracking down issues when this does occur.
[mmeffie@sinenomine.net remove unnecessary casts in afs_warn args.]
Change-Id: I5cf58e3659dc04255c62fa56b044d5bc1c7ce877
Reviewed-on: http://gerrit.openafs.org/11831
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 775b8873f45ef563b5caaae9911acd91232f9966
Author: Chas Williams <3chas3@gmail.com>
Date: Sat Apr 25 16:53:43 2015 -0400
opr: Use opr_Assert() instead of silently failing
These routines should never be passed a NULL. If this happens it
is a serious issue that needs to be addressed.
Change-Id: I9728dcd67bc9f8e9927bed1674fc0ee83567df1a
Reviewed-on: http://gerrit.openafs.org/11853
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 04661c4139b3f0bc7d44a43160c9a0ac1405ca5e
Author: Chas Williams <3chas3@gmail.com>
Date: Sat Apr 25 16:38:12 2015 -0400
opr: Disable some warnings during opr assertions
Detect _Pragma(), a C99 extension for inline #pragma's, and use it to
disable to certain warnings during the use of opr_Verify() and
opr_Assert().
Because some versions of clang support _Pragma, do not have support
for -Wtautological-pointer-compare, and do set -Werror and -Wunknown-pragmas,
we must explicitly check for pragma support for -Wtautological-pointer-compare
as well.
Change-Id: Id3d5ee347f320a366a0571572b58414aa7044bf7
Reviewed-on: http://gerrit.openafs.org/11852
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5fbf45b56298aa5a93cf9015f2d6346c7a0f615c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 9 21:26:25 2015 -0500
afs: Log weird 'size' fetchdata errors
There are a couple of situations that should never happen when issuing
a fetchdata, but cause errors when they do:
- The fileserver responds with more than 2^32 bytes of data
- The fileserver responds with more data than requested (but still
smaller than 2^32)
While these should normally never be encountered, it can be very
confusing when they do, since they cause file fetches to fail. To give
the user or investigating developer some hope of figuring out what is
going on, at least log a warning in these situations, to at least
indicate this is the area in which something is breaking.
Only log these once, in case something causes these conditions to be
hit, e.g., every fetch. Once is at least enough to say this is
happening.
[mmeffie@sinenomine.net remove unneeded casts in afs_warn args and
explicit static initializers.]
Change-Id: I7561a9ecc225386f9b140e633912b900c591a9bb
Reviewed-on: http://gerrit.openafs.org/11830
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c0f52c3a3d76059c9d8b2df3374df844d8d6861b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 7 22:10:53 2015 -0500
afs: Fix fetchInit for negative/large lengths
Currently, the 'length64' variable in rxfs_fetchInit is almost
completely unused (it just goes into an icl logging function). For the
length that we actually use ('*alength'), we just take the lower 32
bits of the length that the fileserver told us. This method is
incorrect in at least the following cases:
- If the fileserver returns a length that is larger than 2^32-1,
we'll just take the lower 32 bits of the 64-bit length the
fileserver told us about. The client currently never requests a
fetch larger than 2^32-1, so this would be an error, but if this
occurred, we would not detect it until much later in the fetch.
- If the fileserver returns a length that is larger than 2^31-1, but
smaller than 2^32, we'll interpret the length as negative (which we
assume is just 0, due to bugs in older fileservers). This is also
incorrect.
- If the fileserver returns a negative length smaller than -2^31+1,
we may interpret the give length as a positive value instead of a
negative one. Older fileservers can do this if we fetch data beyond
the file's EOF (this was fixed in the fileserver in commit
529d487d65d8561f5d0a43a4dc71f72b86efd975). This positive length
will cause an error (usually), instead of proceeding without error
(which is what would happen if we correctly interpreted the length
as negative).
On Solaris, this can manifest as a failed write, when writing to a
location far beyond the file's EOF from the fileserver's point of
view, because Solaris writes can trigger a fetch for the same area.
Seeking to a location far beyond the file's EOF and writing can
trigger this, as can a normal copy into AFS, if the file is large
enough and the cache is large enough. To explain in more detail:
When copying a file into AFS, the cache manager will buffer the dirty
data in the disk cache until the file is synced/closed, or we run out
of cache space. While this data is buffering, the application will
write into an offset, say, 3GiB into the file. On Solaris, this can
trigger a read for the same region, which will trigger a fetch from
the fileserver at the offset 3GiB into the file. If the fileserver
does not contain the fix in commit
529d487d65d8561f5d0a43a4dc71f72b86efd975, it will respond with a large
negative number, which we interpret as a large positive number; much
larger than the requested length. This will cause the fetch to fail,
which then causes the whole write() call to fail. Specifically this
will fail with EINVAL on Solaris, since that is the error code we
return from afs_GetOnePage when we fail to acquire a dcache. If the
cache is small enough, this will not happen, since we will flush data
to the fileserver before we have a large amount of dirty data,
e.g., 3GiB. (The actual error occurs closer to 2GiB, but this is just
for illustrative purposes.)
To fix this, detect the various ranges of values mentioned above, and
handle them specially. Lengths that are too large will yield an error,
since we cannot handle values over 2^31-1 in the rxfs_* framework
currently.
For lengths that are negative, just act as if we received a length of
0. Do this for both the 64-bit codepath and the non-64-bit codepath,
just so they remain identical.
[mmeffie@sinenomine.net: directly use 64 bit comparisons, don't mask
end call error code, commit nits.]
Change-Id: I7e8f2132d52747b7f0ce4a6a5ba81f6641a298a8
Reviewed-on: http://gerrit.openafs.org/11829
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3caee7575491c33920b9c84f5dc4098d99373cf6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 9 19:58:51 2015 -0500
afs: Avoid incorrect size when fetching beyond EOF
Currently, afs_GetDCache contains a couple of calculations that look
similar to this:
if (position + size > file_length) {
size = file_length - position;
}
if (size < 0) {
size = 0;
}
Most of the time, this is fine. However, if 'position' is more than
2GiB greater than file_length, 'size' will calculated to be smaller
than -2GiB. Since 'size' in this code is a signed 32-bit integer, this
can cause 'size' to underflow, and result in a value closer to
(positive) 2GiB.
This has two potential effects:
The afs_AdjustSize call in afs_GetDCache will cause the underlying
cache file for this dcache to be very large (if our offset is around
2GiB larger than the file size). This can confuse other parts of the
client, since our cache usage reporting will be incorrect (and can be
even way larger than the max configured cache size).
This will also cause a read request to the fileserver that is larger
than necessary. Although 'size' will be capped at our chunksize, it
should be 0 in this situation, since we know there is no data to
fetch. At worst, this currently can just result in worse performance
in rare situations, but it can also just be very confusing.
Note that an afs_GetDCache request beyond EOF can currently happen in
non-race conditions on at least Solaris when performing a file write.
For example, with a chunksize of 256KiB, something like this will
trigger the overflow in 'size' in most cases:
$ printf '' > smallfile && printf b | dd of=smallfile bs=1 oseek=2147745793
But there are probably other similar scenarios.
To fix this, just check if our offset is beyond the relevant file
size, and do not depend on 'size' having sane values in edge cases
such as this.
Change-Id: Ie36f66ce11fbee905062b3a787871ec077c15354
Reviewed-on: http://gerrit.openafs.org/11828
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
commit 4a69d3894c68a52f592b43d3d8d8cb73691f7eee
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jan 21 17:55:37 2016 -0500
doc: afsd -settime and -nosettime are obsolete
Update the afsd man page -settime and -nosettime options, which are obsolete
and no longer have any effect. Use the same wording as the other obsolete
options in the afsd man page. Keep the recommendations to use the time keeping
daemons provided by the operating system to maintain the system time.
Change-Id: I08a1bd5ae0b2d6618b3e212ebcbb98f470e33820
Reviewed-on: http://gerrit.openafs.org/12175
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f3145b0de0e7718e0ad741ee826764e284fc8b3a
Author: Dave Botsch <botsch@cnf.cornell.edu>
Date: Wed Oct 28 11:53:26 2015 -0400
rxinit_status needs to be global for the kext since
RXK_UPCALL_ENV is defined in src/rx/DARWIN/rx_knet.c
Change-Id: I23b535f0cd6b45c3e186319c4bacf5b6c5a93681
Reviewed-on: http://gerrit.openafs.org/12073
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bf3707ccbf98f44103171f4a5c6fb5bcd0744bfc
Author: Dave Botsch <botsch@cnf.cornell.edu>
Date: Wed Oct 28 11:28:01 2015 -0400
Initial set of changes for El Capitan OS X 10.11 .
Mainly new El Capitan specific config files and defitions of
Darwin 15 variables and config tests/etc.
Change-Id: I87b926109561f41ee95a2f3f94fbdbcf2903691a
Reviewed-on: http://gerrit.openafs.org/12072
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 767694d9ec86fc9451f5a4ba2ec7405c29986a21
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Nov 22 18:22:58 2015 -0600
Fix optimized IRIX kernel module builds
Commit 9f94892f8d996a522e7801ef6088a13769bee7c2 (from 2006)
introduced per-file CFLAGS, using $(CFLAGS-$@); this construct
is not parsed well by IRIX make, which ends up attempting to
expand '$@)' and finding mismatched parentheses.
Commit 5987e2923a2670a27a801461dc9668ec88ed7d2a (from 2007) followed,
fixing the IRIX build but only for the NOOPT case. This left the
problematic expression in CFLAGS_OPT until 2013, when another RT
ticket was filed reporting the continued breakage. That ticket
was then ignored until 2015 (now) with no particular cries of
outrage on the mailing lists. Perhaps this gives some indication
of the size and/or mindset of the IRIX userbase. (There have
been successful IRIX installations during this time period, so
presumably it was discovered that disabling optimizations helped
the build along.)
FIXES 131621
Change-Id: Id5298103221b016239723aa08ebe0dc54bdadc5e
Reviewed-on: http://gerrit.openafs.org/12111
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit baa037a14f167b87a83762904eb52efc96baf3f9
Author: Chas Williams <3chas3@gmail.com>
Date: Thu Dec 24 17:58:32 2015 -0500
LINUX: don't cache negative entries for dynroot
The dynroot volume lacks any callbacks that would invalidate the directory
or change the data version. Further, the data version for the dynroot
is only updated for when a new cell is found or added (a positive lookup).
Change-Id: If0b022933de7335d3d94aafc77c50b85b99f4116
Reviewed-on: http://gerrit.openafs.org/12140
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6db49a841784459cf583e914b3f2433ce1e70f4c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sat Dec 19 01:08:06 2015 -0600
Typo fix in comment
afsd -shutdown takes only a single dash, as with all cmd-style
options.
Improve the grammar a bit while we're here.
Change-Id: Ie96c80dba1770e735617e5c93fe3d4c1e3afd3a9
Reviewed-on: http://gerrit.openafs.org/12133
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 70fd9bc6dcc79cb25e98cdcfd0f085c4bf4f310a
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Tue Dec 29 10:31:43 2015 -0300
afs: do not allow two shutdown sequences in parallel
Often, ‘afsd -shutdown’ is called right after ‘umount’.
Both commands hold the glock before calling ‘afs_shutdown’.
However, one of the functions called by 'afs_shutdown', namely,
‘afs_FlushVCBs’, might drop the glock when the global
'afs_shuttingdown' is still equal to 0. As a result, a scenario
with two shutdown sequences proceeding in parallel is possible.
To fix the problem, the global ‘afs_shuttingdown’ is used as an
enumerated type to make sure that the second thread will not run
‘afs_shutdown’ while the first one is stuck inside ‘afs_FlushVCBs’.
Change-Id: Iffa89d82278b0df5fb90fc35608af66d8e8db29e
Reviewed-on: http://gerrit.openafs.org/12016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a4c4b786059ac7d5f9ecc5ec07727f000b62c13f
Author: Brian Torbich <btorbich@gmail.com>
Date: Thu Jan 21 10:08:27 2016 -0500
redhat: Correct permissions on systemd unit files
Change the systemd unit file permissions created via
openafs.spec to be 0644 instead of 0755. Having the
systemd unit files be executable will trigger a systemd
warning.
FIXES 132662
Change-Id: I9f5111c855941528193aaabeb42bf1b732246a7e
Reviewed-on: http://gerrit.openafs.org/12174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9ee5fa152b7b7de6a6ddc6ed87bbf9f76da6e3e4
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Mon Jun 22 10:44:11 2015 +0200
redhat: Avoid bogus dependencies when building the srpm
By default the spec defines that both userland and kernel module
packages should be built. This results in a dependency of the form
"kernel-devel-`uname -m` = `uname -r`" being added to the source
package created by makesrpm.pl, which is bogus because the uname
values are from the system on which the srpm is built and needn't
apply to the system where it is used. While rpm and rpmbuild ignore
such dependencies of source packages, other tools don't and may fail.
Some versions of rpmbuild will also enforce those requirements when
building the srpm itself, which is pointless too.
Avoid both problems by pretending not to attempt building modules
and ignoring any dependencies when makesrpm.pl invokes rpmbuild -bs.
Change-Id: I0134e1936638c7d9c3fd9ff0ccf1cba36710d0d3
Reviewed-on: http://gerrit.openafs.org/11903
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>
commit db4343b870232417079ab6628381e356964497fa
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Dec 28 18:30:30 2015 -0600
Tweak grammar in README
So as to get a trivial change as confirmation that an updated
gerrit is functioning correctly.
Change-Id: I04eb12cab982a3f1b5ecc92d60c455e7a0d2242c
Reviewed-on: http://gerrit.openafs.org/12156
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 318692134d16caeab7176219f56aee98dfaa439b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Dec 28 16:11:17 2015 -0600
Remove blank line from README
There's no reason for this file to start with a blank line.
Change-Id: I175390d3c9796fc10ef8086a5b179f4fc27362b5
Reviewed-on: http://gerrit.openafs.org/12153
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit f7c6915358f30d25287cf28092625c75e5d5c7b7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Feb 4 10:11:29 2015 -0500
Update extra-iput configure argument description
Commit 15260c7fdc5ac8fe9fb1797c8e383c665e9e0ccd did not function
as advertised, since the conditional which attempted to make
the configure option --(en|dis)able-linux-d_splice_alias-extra-iput
mandatory on linux checked a variable for the system type which
was not set at the time the check ran.
Subsequent discussion of this behavior produced a consensus that
there is not a need to make the configure option mandatory,
due to the narrow range of kernels affected by the bug in question,
so this follow-up commit just fixes the documentation and removes
the ineffective code.
Change-Id: I36d1f8801d355f33c3132fcab166ea76faab8e87
Reviewed-on: http://gerrit.openafs.org/11710
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5fd9aed2ba6f43eeb157560724f56cd742fd3c62
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Mar 4 16:15:37 2013 +0000
compile_et: Don't overflow input file buffer
Don't overlow the buffer that's used for the input filename by
copying in to much with sprintf. Use asprintf to dynamically
allocate a buffer instead.
Link roken for rk_asprintf where needed.
Build compile_et with libtool, to ensure that it is linked statically,
as is needed for build tools such as compile_et. (This requires
a preceding change to set a buildtool_roken make variable.)
Caught by coverity (#985907)
Change-Id: I207dd2c49bcae3f04fa41c826b08a0a615d5f422
Reviewed-on: http://gerrit.openafs.org/9545
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 87ce2a6f05e313dad43311fba93224f33b86f54f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Feb 25 18:46:28 2015 -0500
Provide a buildtool_roken make variable
When using roken in build tools, i.e., binaries which must be
executed during the build stage, the roken library must be usable
prior to the 'install' stage. In particular, if the internal
rokenafs is used, the shared library will not be installed and
the runtime linker will not be able to find it, causing execution
of the build tool to fail. To avoid this failure, librokenafs
must be linked statically into these build tools.
Unfortunately, the way we currently use libtool is not very
well aligned to libtools model of how it should be used. As a result,
it does not seem feasible to cause libtool to link librokenafs
statically without breaking other parts of the build.
Libtool peeks at the compiler command-line arguments to affect its
behavior when invoked as a linker. The flags -static, -all-static,
and -static-libtool-libs can affect whether dynamic or static linkage
is used for various libraries being linked into the executable.
Passing -all-static tells libtool to not do any dynamic linking at
all, but is silently a no-op if static linking is not possible (the
default situation on most modern Linuxen, OS X, and Solaris).
Passing -static causes libtool to not do any dynamic linking of
libtool libraries which have not been installed, and passing
-static-libtool-libs causes libtool to not do any dynamic linking
of libtool libraries at all.
In order to get libtool to actually link statically in all cases,
we should pass -all-static, not just -static. However, because
too many platforms disallow static linking by default, this is
not a viable option.
If we retain the libtool archive librokenafs.la in the linker search
path, libtool then records the library dependency of libafshcrypto on
librokenafs in its metadata and refuses to install libafshcrypto.la to
any path other than the configured prefix. This restriction of
libtool is incompatible with our use in 'make dest', and it is not
feasible to desupport 'make dest' before the 1.8 release.
The most appropriate workaround seems to be to just pass the
path to librokenafs.a on the linker command line when linking
build tools. As such, provide a new make variable buildtool_roken
which is appropriate for linking roken into build tools -- this
variable will be set to the path to librokenafs.a when the internal
roken is used, and the normal -lrokenafs when an external roken
is used.
Change-Id: I079fc6de5d0aa6403eb1071f3d58a248b1777853
Reviewed-on: http://gerrit.openafs.org/11763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 93f7041a08526b1c3ac37197cd7bee40c7430010
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 01:42:55 2015 -0400
rxkad: Resolve warnings in ticket5.c
Resolves these warnings:
ticket5.c: In function ‘tkt_MakeTicket5’:
ticket5.c:574:33: warning: pointer targets in passing argument 1 of ‘_rxkad_v5_encode_EncTicketPart’ differ in signedness [-Wpointer-sign]
code = encode_EncTicketPart(encodebuf, allocsiz, &data, &encodelen);
^
In file included from ticket5.c:80:0:
v5gen-rewrite.h:43:30: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#define encode_EncTicketPart _rxkad_v5_encode_EncTicketPart
^
v5gen.c:1889:1: note: in expansion of macro ‘encode_EncTicketPart’
encode_EncTicketPart(unsigned char *p, size_t len, const EncTicketPart * data, size_t * size)
^
ticket5.c:602:33: warning: pointer targets in passing argument 1 of ‘_rxkad_v5_encode_EncryptedData’ differ in signedness [-Wpointer-sign]
code = encode_EncryptedData(ticket + *ticketLen - 1, *ticketLen, &encdata, &tl);
^
In file included from ticket5.c:80:0:
v5gen-rewrite.h:16:30: note: expected ‘unsigned char *’ but argument is of type ‘char *’
#define encode_EncryptedData _rxkad_v5_encode_EncryptedData
^
v5gen.c:690:1: note: in expansion of macro ‘encode_EncryptedData’
encode_EncryptedData(unsigned char *p, size_t len, const EncryptedData * data, size_t * size)
^
ticket5.c: In function ‘tkt_DecodeTicket5’:
ticket5.c:320:10: warning: ‘plainsiz’ may be used uninitialized in this function [-Wmaybe-uninitialized]
code = decode_EncTicketPart((unsigned char *)plain, plainsiz, &decr_part, &siz);
^
Change-Id: Ic1b878f01cf82222dc258847747ce192ee5948fc
Reviewed-on: http://gerrit.openafs.org/11955
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c0d771672f8bad23fa6816d383f5ad81137f6e57
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Mar 2 20:19:07 2015 -0500
Add filepath entries for rxkad.keytab
Even though master is not using it, we still want to be able to
find it.
Change-Id: I31fa39fe4d4bed5144c5169236b1106bd9f18501
Reviewed-on: http://gerrit.openafs.org/11784
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a14dec2bff2423c4fbb9db672ef91659bcdfb4ba
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Mar 2 16:05:51 2015 -0500
Make typedKey helpers more friendly to use
Make freeing a NULL key pointer a no-op.
Allow passing NULL to afsconf_typedKey_values() when not all
values are needed.
Change-Id: I3a4088747913e9e88be094da891cd2cca0cbb114
Reviewed-on: http://gerrit.openafs.org/11783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 6e4f8e55282963a5b2e28c4d90f7a32f5ceb37b0
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Thu Dec 24 17:23:23 2015 -0300
viced: do not overwrite possible failure
The function ‘hpr_Initialize’ overwrites the code
returned by ‘ubik_ClientInit’. As a result, ‘hpr_Initialize’
will not report any failure triggered by ‘ubik_ClientInit’.
To fix this problem, store the code returned by ‘rxs_Release’
in a new variable. Only return this code if the function
‘ubik_ClientInit’ worked properly. Otherwise, return the code
provided by ‘ubik_ClientInit’.
Change-Id: I1820e3cbc2131daace01cec0464e56fd2982a783
Reviewed-on: http://gerrit.openafs.org/12137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit b8757341fb9592519032ef64030d0e98195d8d3d
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Nov 23 21:03:57 2015 -0500
afs: incorrect types for AFSDB IPv4 addresses
DNS lookup results were being handled with int types.
Fortunately, this seems to be harmless, due to use of
memcpy when the types don't match, and assignment only
when both sides were int.
However, to avoid any future unpleasantness, change
them to afs_uint32.
No functional change should be incurred.
Change-Id: I31aeabb4ae3194a00b29a1fa767d05af167b4e4f
Reviewed-on: http://gerrit.openafs.org/12117
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 17ca935bbd18dd96b8252e22229c9470850fb20f
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Aug 7 11:56:16 2015 -0400
afs: pioctl kernel memory overrun
CVE-2015-8312:
Any pioctl with an input buffer size (ViceIoctl->in_size)
exactly equal to AFS_LRALLOCSIZE (4096 bytes) will cause
a one-byte overwrite of its kernel memory working buffer.
This may crash the operating system or cause other
undefined behavior.
The attacking pioctl must be a valid AFS pioctl code.
However, it need not specify valid arguments (in the ViceIoctl),
since only rudimentary checking is done in afs_HandlePioctl.
Most argument validation occurs later in the individual
pioctl handlers.
Nor does the issuer need to be authenticated or authorized
in any way, since authorization checks also occur much later,
in the individual pioctl handlers. An unauthorized user
may therefore trigger the overrun by either crafting his
own malicious pioctl, or by issuing a privileged
command, e.g. 'fs newalias', with appropriately sized but
otherwise arbitrary arguments. In the latter case, the
attacker will see the expected error message:
"fs: You do not have the required rights to do this operation"
but in either case the damage has been done.
Pioctls are not logged or audited in any way (except those
that cause loggable or auditable events as side effects).
root cause:
afs_HandlePioctli() calls afs_pd_alloc() to allocate two
two afs_pdata structs, one for input and one for output.
The memory for these buffers is based on the requested
size, plus at least one extra byte for the null terminator
to be set later:
requested size allocated
================= =================================
> AFS_LRALLOCSIZ osi_Alloc(size+1)
<= AFS_LRALLOCSIZ afs_AllocLargeSize(AFS_LRALLOCSIZ)
afs_HandlePioctl then adds a null terminator to each buffer,
one byte past the requested size. This is safe in all cases
except one: if the requested in_size was _exactly_
AFS_LRALLOCSIZ (4096 bytes), this null is one byte beyond
the allocated storage, zeroing a byte of kernel memory.
Commit 6260cbecd0795c4795341bdcf98671de6b9a43fb introduced
the null terminators and they were correct at that time.
But the commit message warns:
"note that this works because PIGGYSIZE is always less than
AFS_LRALLOCSIZ"
Commit f8ed1111d76bbf36a466036ff74b44e1425be8bd introduced
the bug by increasing the maximum size of the buffers but
failing to account correctly for the null terminator in
the case of input buffer size == AFS_LRALLOCSIZ.
Commit 592a99d6e693bc640e2bdfc2e7e5243fcedc8f93 (master
version of one of the fixes in the recent 1.6.13 security
release) is the fix that drew my attention to this new
bug. Ironically, 592a99 (combined with this commit), will
make it possible to eliminate the "offending" null termination
line altogether since it will now be performed automatically by
afs_pd_alloc().
[kaduk@mit.edu: adjust commit message for CVE number assignment,
reduce unneeded churn in the diff.]
Change-Id: I1a536b3a53ec4b6721fbd39a915207da4358720c
commit 634ca4fdc206884afe0826bc682aa7d5208cdc8b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 16 20:03:21 2015 -0400
viced: add missing new lines to log messages
The server logger requires an explicit new line.
Change-Id: Iffbfcfee7499bfa745a63d1b5ccb8038ee06acd0
Reviewed-on: http://gerrit.openafs.org/11841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 0bf9fba458b39035a09f45c1b63f1e65672d4c00
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jan 30 12:12:03 2015 -0500
volser: range check acl header fields during dumps and restores
Perform range checks on the acl header fields when reading an
acl from a dump stream and when writing an acl to a dump
stream.
Before this change, a bogus value in the total, positive, or
negative acl fields from a dump stream could cause an out of
bounds access of the acl entries table, crashing the volume
server.
Change-Id: Ic7d7f615a37491835af8d92f3c5f1b6a667d9d01
Reviewed-on: http://gerrit.openafs.org/11702
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 888fc16db5f0063464bf219a6cf6fee0faea4705
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Nov 22 13:24:43 2015 -0600
volser: set error, not code, before rfail
The rfail cleanup handler overwrites 'code' ~unconditionally, but
does use an existing 'error' value if present. Since the intent
is to return failure to the caller, preserve the code in the error
variable and do so.
FIXES 131897
Change-Id: I25db2f9ad75a5b856626d39d35f97a09f26bd7a9
Reviewed-on: http://gerrit.openafs.org/12108
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2f3b27ac47e26e57796b66b670f378222ef45009
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 9 21:24:04 2015 -0400
util: add CloseLog routine to close the server log
Add the missing complement to OpenLog().
Change-Id: I45e7e5d2da3241c163d2d4baa6b386167e90e582
Reviewed-on: http://gerrit.openafs.org/12002
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d646387c8e52eb13fc36e95f5cfe21360d3e056e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 9 13:22:26 2015 -0400
salvager: redd up showlog global flag
Clean up the show log flag so it is only set by the salvager and
is reset when spawning a child process.
Change-Id: I1702cf98faca583409594d1199a8215ffe08a75e
Reviewed-on: http://gerrit.openafs.org/12001
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4ed8f850b4bcef4db9c0bba0ebffdf3d410190b7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 9 10:14:41 2015 -0500
dafs: log to stderr when running salvageserver in client mode
When the -client option is given to the salvageserver, print
Log() messages to stderr instead of losing them.
Change-Id: I065e8136db9a8cc241639fbe34607db884751b95
Reviewed-on: http://gerrit.openafs.org/11729
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit dc134f3eff66c7cc5f3dcc1f2d92536ffdbc771e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 30 13:20:42 2015 -0400
dafs: remove the salvageserver -showlog option
Remove the salvagerserver option to print log messages to stdout. This
was a carry over from the stand-alone salvager and is not appropriate for
a daemon.
Change-Id: I55b99112278cdabb3e9911948dbda6a628030951
Reviewed-on: http://gerrit.openafs.org/11815
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b800f7d9bd5ea390ab330c1c0c38ac8277eb9998
Author: Brandon S Allbery <ballbery@sinenomine.net>
Date: Tue Nov 24 16:39:02 2015 -0500
gtx: use getmaxyx() with sensible fallbacks
configure now checks for the standard getmaxyx() macro; failing that,
it looks for the older but pre-standardization getmaxx() and getmaxy(),
then falls back to the 4.2BSD curses _maxx and _maxy fields; if all
else fails, gtx building is disabled.
gtx now defines getmaxyx() itself if necessary, based on the above.
This also fixes a bug in gtx with all ncurses versions > 1.8.0 on
platforms other than NetBSD and OS X: gtx was using the _maxx and
_maxy fields, which starting with ncurses 1.8.1 were off by 1 from
the expected values. As such, behavior of scout and/or afsmonitor
may change on most ncurses-using platforms.
Change-Id: I49778e87adacef2598f0965e09538dfc3d840dcc
Reviewed-on: http://gerrit.openafs.org/12107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 359e1f2a25d242984229edfb378c0b95c3ee8570
Author: Chas Williams <3chas3@gmail.com>
Date: Wed Dec 2 10:38:42 2015 -0500
Open syscall emulation file O_RDONLY
As reported on the -info mailing list, docker is now exporting the
/proc filesystem as read only. ioctl() doesn't need write permissions
to do its work, so change O_RDWR to O_RDONLY.
Change-Id: I2068888b13b6b5e31b1a2205bbcbe43f5f9fc55a
Reviewed-on: http://gerrit.openafs.org/12122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a86b0b4902e8308de4ec3346006af0cbe03a1ef1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 30 13:17:25 2015 -0400
dafs: remove the salvageserver -datelogs option
Remove the undocumented -datelogs option from the salavageserver, which
was a carry over from the standalone salvager program, but is not
appropriate for a daemon.
Change-Id: Ia382d6550e0641edcba55a414e00323755487e18
Reviewed-on: http://gerrit.openafs.org/11814
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fb91be7759605bb4ea5b4dd3ce089df1141c431a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Mar 31 11:08:34 2015 -0400
doc: remove unimplemented -showsuid and -showmounts from the salvageserver man page
These options were copied from the salvager man page and are not implemented by
the salvageserver.
Change-Id: Ib6c5b3fd494f1662b958442863e5fbfc0755a0c2
Reviewed-on: http://gerrit.openafs.org/11817
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fee3e66161a06fd96a912a618482040b32d78f69
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Nov 22 16:34:16 2015 -0600
Fix ptserver -default_access parsing
Commit 0b9986c8758c13a1de66b8bdae51b11abaea6cf3 converted ptserver
to use libcmd for parsing, but erroneously listed the
-default_access argument as CMD_SINGLE instead of CMD_LIST, since
two arguments are needed. This made it impossible to use
-default_access at all, since libcmd would reject an extra argument
and the later argument processing would notice that the second
argument was missing.
FIXES 131731
Change-Id: Ib8241308d4f40f980d635513e2255aafa06c3d8a
Reviewed-on: http://gerrit.openafs.org/12110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e4bae29efc3d370d1eaf6d954c63c324094c48e5
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Mar 31 11:04:26 2015 -0400
doc: add syslog options to salvageserver man page
Add the missing -syslog and -syslogfacility options to
the salvageserver man page.
Change-Id: I1cb057a8085c4aeda32bb003cc4cec5035d00407
Reviewed-on: http://gerrit.openafs.org/11816
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5a0e69726d4a8cedb29e074d398f0ff29984524e
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Nov 18 14:02:50 2015 +0100
tabular_output: allocate footer-line when set for the first time
If the footer line is not allocated, programs segfault at runtime.
The printFooter functions should check if the footer
is allocated before printing them.
Change-Id: Ib4066a67ee104be918811e178c0b7d7d33d790b8
Reviewed-on: http://gerrit.openafs.org/11753
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 670381aa5d3a7bc91ad74c7499605cca2c33d612
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Nov 18 15:09:37 2015 -0500
vlserver: VL_GetEntryByName* requests undercounted
Commit a14e791541bf19c6c377e68bc2f978fba34f94b1
refactored and corrected the counting of requests and aborts.
However, it inadvertently introduced a new undercount for
VL_GetEntryByName* requests, counting them only if
NameIsId(volname), e.g. volname="536870911".
Ensure that the normal case of a non-"numeric" volname is
also counted.
Discovered during review of pullup to 1.6.x.
Change-Id: Ic5dbc1a5871d0e0ff184dc4f3b11e92166c92f65
Reviewed-on: http://gerrit.openafs.org/12106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f6247f90c9644d7a396531c219c585f705e0c251
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Tue Nov 17 15:03:03 2015 +0100
writeconfig: emit error messages again in VerifyEntries
Before commit e4a8a7a38dbf29e89bc1a7b6b017447a6aa0c764 an error message
was printed if looking up a server hostname failed. Restore this, and
also print a message in the now detected case that the lookup returns
loopback addresses only.
Change-Id: Idf7c3133ab5c83e081335ba1dc8fcbddb7da7329
Reviewed-on: http://gerrit.openafs.org/12097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 33020f573bb52c00e1a2f2f0da8062e17b6d1278
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Aug 27 20:20:58 2015 -0500
CODING: permit --enable-checking with clang
Starting at 3.2, a mostly arbitrarily selected version.
Change-Id: I9f6a946e2571b939911cbf4b1b64e1d62e39e1a3
Reviewed-on: http://gerrit.openafs.org/11991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ef435746d04845753477af8b7d920d66e9dce54f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 9 09:37:54 2015 -0500
doc: fix the salvageserver log file name
Fix capitialization of the salvageserver log file name.
Change-Id: If08dd191e35e7fb15db533a623b832154a6f9f17
Reviewed-on: http://gerrit.openafs.org/11728
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 11468ae0e12a627a8802711e8562948828834f06
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 21 14:42:47 2015 -0500
bozo: create a syslog connection only if the -syslog option is given
Fix a minor bug in which an unnecessary syslog connection is opened when
the BosLog is not present (typically, the first time the bosserver is
started) or when the BosLog is a named pipe, even if the -syslog option
was not given.
This bug was introduced in commit bdc7e43117706d0aa46d3b6435489e9d4c2b0888,
which added checks to avoid renaming logs when they are named pipes.
lstat() and S_ISFIFO are provided by libroken, so do not need to be hidden
behind conditional compilation.
Change-Id: I828534be69949fe017cc7dbed1b6798aa4c0ba17
Reviewed-on: http://gerrit.openafs.org/11686
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 15e8678661ec49f5eac3954defad84c06b3e0164
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 17 21:54:46 2015 -0500
prdb_check: fix out of bounds array access in continuation entries
A continuation entry (struct contentry) contains 39 id elements, however
a regular entry (struct prentry) contains only 10 id elements.
Attempting to access more than 10 elements of a regular entry is
undefined behavior.
Use a stuct contentry when when processing continuation entries in
prdb_check. This is done to safely traverse the id arrays of the
continuation entries. Use the new pr_PrintContEntry to print
continuation entries.
The undefined behavior manfests as a segmentation violation in
WalkNextChain() when built with GCC 4.8 with optimization enabled.
Change-Id: I7613345ee6b7b232c5a0645f4f302c3eac0cdc15
Reviewed-on: http://gerrit.openafs.org/11742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3e9e244d1004972f202490faa0375768959f7690
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 17 20:58:27 2015 -0500
prdb_check: check for continuation entries in owner chains
Continuation entries may not be in owner chains. Fix the
comments in WalkOwnerChain (which were probably copied from
WalkNextChain) and add a check and error message for
continuation entries found on owner chains.
Change-Id: I8c49378478cf6a3d31317ff90a52fe1e74517dd3
Reviewed-on: http://gerrit.openafs.org/11751
Reviewed-by: Daria Phoebe Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 121ac2d939e19741986ddfbd387b5310c40edd0d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 17 21:11:50 2015 -0500
libprot: add pr_PrintContEntry function
A continuation entry (struct contentry) contains 39 id elements, however
a regular entry (struct prentry) contains only 10 id elements. Attempting
to access more than 10 elements of a regular entry is undefined
behavior.
Add a new function to safely print continuation entries and change
pr_PrintEntry to avoid accessing the entries array out of bounds.
The pr_PrintEntry function is at this time only used by the prdb_check
and ptclient debugging utilities.
Change-Id: Ie836983c8a5970a9495b87d0627ba6c05d117a9b
Reviewed-on: http://gerrit.openafs.org/11750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ed52ea68c661a7428baeddeca2d95972fe3fe618
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed May 21 17:27:47 2014 -0400
doc: document the version subcommand
Document the built-in version sub-command which displays
the OpenAFS version string. This sub-command is provided
by the cmd library.
Document the switch style -version option provided by the cmd
library for the initcmd based commands: afsmonitor, scout,
xstat_fs_test, and xstat_cm_test.
Change-Id: Id421d2c68a5c49a2b1a5abb2f3e9ca64ea36cd3e
Reviewed-on: http://gerrit.openafs.org/11161
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit eca86749d8f158d27d131ecaafe6be282703535e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Oct 12 22:16:54 2015 -0400
afs: fix for return an error from afs_readdir when out of buffers
Commit 9b0d5f274fe79ccc5dd0e4bba86b3f52b27d3586 added a return code to
BlobScan to allow afs_readdir to return an error when afs_newslot failed
to allocate a buffer. Unfortunately, that change introduced a false
EIO error.
Originally, BlobScan would return a blob number of 0 to indicate the end
of the file has been reached while traversing the directory blobs.
Restore that behavior by changing the cache manager's DRead function to
return ENOENT instead of the generic EIO error to indicate the page to
be read is out of bounds, and change BlobScan to return a blob of zero
to indicate to callers the last blob has been reached. All callers
already check for a blob number of zero, which is out of range.
Change-Id: I5baae8e5377dd49dcca6765b7a4ddc89cca70738
Reviewed-on: http://gerrit.openafs.org/12058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 69d11fd5ee556bb375967d7c41dab39b9c1befbe
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 6 11:56:31 2015 -0500
vos: reinstate the -localauth option for vos setaddrs
Commit d1d411576cf39c4bc55918df0eb64327718d566c added the vos remaddrs
subcommand, but unfortunately stole the common parameters from
setaddrs. Fix this bug and remove the extra blank line between
the subcommand syntax and the common params macro.
Change-Id: I1171bfadec08ac34679204f0a9245d76c468cafa
Reviewed-on: http://gerrit.openafs.org/12093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1c6db90677a8c0d185a408a3b7fa18cf0f47df0a
Author: Tim Creech <tcreech@umd.edu>
Date: Mon Nov 2 08:12:32 2015 -0500
Make libuafs safe for parallel make
In src/libuafs, "make" with a large number of jobs (e.g., "make -j16")
can fail because some of the LT_objs depend on make_h_tree having been
called already.
Make "h" (the libuafs header subdirectory) a dependency of all of
LT_objs.
Change-Id: Ie005dbb1f1b0a794c703147062615808a45956dc
Reviewed-on: http://gerrit.openafs.org/12079
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5f70b79817f98b5f482414a4ec849bd4bd15a5d6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 8 22:22:12 2015 -0400
rx: OPENAFS-SA-2015-007 "Tattletale"
CVE-2015-7762:
The CMU/Transarc/IBM definition of rx_AckDataSize(nAcks) was mistakenly
computed from sizeof(struct rx_ackPacket) and inadvertently added three
octets to the computed ack data size due to C language alignment rules.
When constructing ack packets these three octets are not assigned a
value before writing them to the network.
Beginning with AFS 3.3, IBM extended the ACK packet with the "maxMTU" ack
trailer value which was appended to the packet according to the
rx_AckDataSize() computation. As a result the three unassigned octets
were unintentionally cemented into the ACK packet format.
In OpenAFS commit 4916d4b4221213bb6950e76dbe464a09d7a51cc3 Nickolai
Zeldovich <kolya@mit.edu> noticed that the size produced by the
rx_AckDataSize(nAcks) macro was dependent upon the compiler and processor
architecture. The rx_AckDataSize() macro was altered to explicitly
expose the three octets that are included in the computation.
Unfortunately, the failure to initialize the three octets went unnoticed.
The Rx implementation maintains a pool of packet buffers that are reused
during the lifetime of the process. When an ACK packet is constructed
three octets from a previously received or transmitted packets will be
leaked onto the network. These octets can include data from a
received packet that was encrypted on the wire and then decrypted.
If the received encrypted packet is a duplicate or if it is outside the
valid window, the decrypted packet will be used immediately to construct
an ACK packet.
CVE-2015-7763:
In OpenAFS commit c7f9307c35c0c89f7ec8ada315c81ebc47517f86 the ACK packet
was further extended in an attempt to detect the path MTU between two
peers. When the ACK reason is RX_ACK_PING a variable number of octets is
appended to the ACK following the ACK trailers.
The implementation failed to initialize all of the padding region.
A variable amount of data from previous packets can be leaked onto the
network. The padding region can include data from a received packet
that was encrypted on the wire and then decrypted.
OpenAFS 1.5.75 through 1.5.78 and all 1.6.x releases (including release
candidates) are vulnerable.
Credits:
Thanks to John Stumpo for identifying both vulnerabilities.
Thanks to Simon Wilkinson for patch development.
Thanks to Ben Kaduk for managing the security release cycle.
Change-Id: I29e47610e497c0ea94033450f434da11c367027c
commit c372bc92a3f78ac00aa69b2fb7a2050993b4fed8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 12 09:56:07 2015 -0400
Windows: CM_ERROR_INEXACT_MATCH is not a fatal error
cm_BPlusDirLookup() and cm_Lookup() can return CM_ERROR_INEXACT_MATCH
which is not a fatal error. Instead it is an indication that the returned
cm_scache object was not a case sensitive match. Do not fail the request
and do not leak the cm_scache reference.
Change-Id: Ieef3ce1ac96a8794859b5b9c530545d4fdd26bd5
Reviewed-on: http://gerrit.openafs.org/12057
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7e3289891d9032288f32b550ba6376f59f7e9a08
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jul 8 19:47:26 2015 -0400
Windows: cm_Lookup return ambiguous filename to caller
cm_Lookup() must not mask a CM_ERROR_AMBIGUOUS_FILENAME error by
converting it to CM_ERROR_BPLUS_NOMATCH. Doing so results in the
redirector believing that the object does not exist instead of
there being a STATUS_OBJECT_NAME_COLLISION.
Change-Id: Iaa84d50271c234a84e11dd58d78ef90f5d224032
Reviewed-on: http://gerrit.openafs.org/11930
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dffaab441d09a3b955d358292c550116b76a6410
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jul 8 16:49:38 2015 -0400
Windows: fix RDR detection of ambiguous directory entries
The redirector is supposed to reject access to file objects if there
is no case exact match and multiple entries match in a case insensitive
comparison. The check was only present in the AFSLocateNameEntry()
function and not elsewhere.
Fix the AFSLocateNameEntry() call and addd the missing checks.
Change-Id: I15aba954179fa85e28b348989779bc05122c0037
Reviewed-on: http://gerrit.openafs.org/11929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit be603388ef3ec8918dba47ede9dc3e4196492100
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Oct 18 20:32:06 2015 -0400
Windows: rdr pioctl operations are opaque
Although pioctl operations are delivered through the redirector the
contents of the operations are opaque to the redirector. Therefore,
the cm_req must not be initialized as a redirector operation. If they
are the necessary invalidation notifications for symlink and mount point
operations will not be delivered.
Change-Id: I48c2d89d2b2e0fc3f0ef56e7731108a8c51e1674
Reviewed-on: http://gerrit.openafs.org/12062
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8b530d52a5f482145c71682b407e9c8f258dac70
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 15 13:22:05 2015 -0400
Windows: clientServiceProviderKeyExists use subkey
clientServiceProviderKeyExists() must use AFSREG_CLT_SVC_PROVIDER_SUBKEY
since it is a relative path from HKEY_LOCAL_MACHINE.
Change-Id: I975d594bfe69c563f692978057c08b834d54b8b1
Reviewed-on: http://gerrit.openafs.org/12059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4f20b7305efcea9d930f64c348fc58555a736c6b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 9 10:20:41 2015 -0400
Windows: if no known IP addrs, query the addr list
If cm_noIPAddrs == 0, then no servers will be probed. If
syscfg_GetIFInfo() fails then cm_noIPAddrs is set to 0. Therefore,
also set cm_LanAdapterChangeDetected to non-zero if syscfg_GetIFInfo()
fails so that the interface info can be queried again prior to a server
probe attempt.
Change-Id: I6639441fa6266671cfb875256eb23c3b018e67c9
Reviewed-on: http://gerrit.openafs.org/12055
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c615a712bf9eae3c88252c4a37bd91a0e9db89da
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 7 18:09:50 2015 -0400
Windows: Only install Service NP if one exists
Do not blindly install a network provider for the service since at
least one end user organization does not install the service's network
provider.
Change-Id: I15a528ff34ffd3e060fdbd93545af3857592c835
Reviewed-on: http://gerrit.openafs.org/12051
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cda7556b854a07220326a617a56edcf55769567a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 7 18:09:17 2015 -0400
Windows: InstNetProvider do not leak key handle
If we open a handle, close it.
Change-Id: I1a5b2308a91f3c66791e65f76ca17ae52d34789f
Reviewed-on: http://gerrit.openafs.org/12050
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3957abea2abcd791e97e66be3f3ef211672ce713
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 30 13:23:36 2015 -0400
Windows: multi ping do not leak ping count
In cm_CheckServersMulti() if cm_ConnByServer() fails or if cm_noIPAddr is
zero then a cm_server.pingCount will be leaked. This can result in
servers being marked down and never restored to an up state.
This change adds the necessary pingCount decrement and moves the
assignment of the cm_server_t pointer to serversp[] to make it clear
that the cm_server_t will not be in the array if a failure occurs.
Only objects in the array will have the pingCount decremented after
the RPCs are issued.
Change-Id: I18895c848039e4131a674d814019f236a1b0e5b5
Reviewed-on: http://gerrit.openafs.org/12048
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f8bf8221db919521ecabea20c4c8e496fb423ef4
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Sun Sep 13 08:53:22 2015 -0700
SOLARIS: Minor whitespace corrections
Fix some incorrectly indented code in osi_file.c
Change-Id: I75a8ec18bfef13bb05a99f84b2cfbfae34fcd440
Reviewed-on: http://gerrit.openafs.org/12017
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@dson.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c565450501e4bb43697fa957f55f8486f21071fa
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jan 30 11:53:58 2015 -0500
volser: update log formatting in dump and restore
Update the log messages to use modern formatting specifiers for
volume ids and inodes in the volume dump and restore code.
Change-Id: Ic2844e389e5951d2f2bbbc31a86c2342f2e8d848
Reviewed-on: http://gerrit.openafs.org/11701
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 518807cae868b6547685a3b5aaf41c6f012665ac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Sep 25 18:12:24 2015 -0400
Windows: remove extraneous "pingCount" format param
In 0a0927497c8165aec11e718df01632da75fa4cdc an extra "pingCount"
format parameter was added in cm_DumpServers(). Remove it.
Change-Id: I79c2212c11319d7f94f963214d90b0530a978ab5
Reviewed-on: http://gerrit.openafs.org/12046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0a0927497c8165aec11e718df01632da75fa4cdc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 16 09:10:04 2013 -0400
Windows: Replace CM_SERVERFLAG_PINGING with pingCount
Instead of replying upon a server flag use a pingCount interlocked
variable to track whether active ping operations are being performed
and whether or not to wait sleeping threads.
Change-Id: Ie967beee0debdb9c0963ca40b12737bd3fa88548
Reviewed-on: http://gerrit.openafs.org/12022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e314167f11f289248704426fe65fea13a734a937
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 14 18:29:45 2015 -0400
Windows: cm_GetCell_Gen rework cell prefix matching
The cm_GetCell_Gen() function permits cells to be searched for by
prefix. The idea is to permit "cs.cmu.edu" to be abbreviated "cs"
when at CMU. There are two problems with the current behavior:
1. the existing match rules will accept "cs.c" and "cs.cmu.ed" as
valid prefix matches. By not restricting the prefix matching
to full components the Freelance symlink list can become
cluttered.
2. the existing match rules will accept the first cell that
matches even if there are more than one cells that would match.
this can result in unpredictable behavior since the ordering
of the cells is not guaranteed.
Instead, fail requests for cell prefixes that are not full component
matches or that would be ambiguous.
Change-Id: I59fb5ea9bba4cebdd71808fc9fae9662456943e0
Reviewed-on: http://gerrit.openafs.org/11886
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 946d2c1699be7ec8d31251d54d603d321b1f7936
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 4 13:25:04 2015 -0400
Windows: Network Provider registration at service start
Windows 8, 8.1 and pre-releases of 10 have a horrible bug as part
of the upgrade process. All non-Microsoft network provider services
are removed from the NetworkProvider "Order" registry value. For
OpenAFS this has the side effect of breaking integrated logon and
all drive letter mappings to \\AFS.
During service start add code to:
1. Add "AFSRedirector" before "LanmanWorkstation" if not present
2. Add "TransarcAFSDaemon" to the end of the list if not present
If the service is running in SMB mode
3. Remove "AFSRedirector" if present
Change-Id: I14a703e44c6e0ee1bd36afd306f92a17dcc0d2a5
Reviewed-on: http://gerrit.openafs.org/12024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6baaa39333fba8afda84ccdb68ba106ce7ae3705
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 15:06:34 2015 -0400
Windows: cm_Analyze mark server down for misc rx errors
In cm_Analyze() replace the token error retry logic for miscellaneous
rx errors and simply mark the server down. The most common error
that will be seen in this category is RX_INVALID_OPERATION which would
be received if the Rx service id or security class is not recognized
by the peer. This could happen if an AuriStor server is replaced by
an AFS3 server or if a packet is reflected.
A side effect of this change is that V* and CM_ERROR_* errors will
once again be retried. This will permit proper failover to occur.
Change-Id: I77e6325eb05643ea6df1fc0bc877bd4ef496c974
Reviewed-on: http://gerrit.openafs.org/11920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 653647e8617d4fc3e7721832ebdd1f1e9057e9ac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 14:56:47 2015 -0400
Windows: avoid vldb lookup race with network stack
If a VLDB query attempt occurs when there is no current cell db server
list then the VLDB query won't actually occur but the last query time
would be set. This prevents a query from taking place again on the volume
for 60 seconds. If the volume in question is the root.cell volume then
the redirector will be forced to return device not ready for the share
(aka \\afs\cell).
Check for a failure of cm_UpdateCell() and only set the last update time
for the volume if there was success or if the VLDB responded with volume
unknown.
Change-Id: Ic87d871feac3f2ea3d3db377854efa9dc9db3c00
Reviewed-on: http://gerrit.openafs.org/11919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit af957c35e940aa80fda4dd42ebf92f7e7ed18f3b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 14:00:24 2015 -0400
Windows: cm_ApplyDir calls cm_SyncOpDone too soon
cm_ApplyDir() failed to maintain the synchronization state while the
GetBuffer() operation proceeded.
Change-Id: I616622e9aebbdb20a325826032991e5d5c5d9e24
Reviewed-on: http://gerrit.openafs.org/11918
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1409bf8e007ac1060dfaf8ec09bdc27e95db3ba9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:59:28 2015 -0400
Windows: cm_CheckNTDelete missing SyncDone call
cm_CheckNTDelete() forgot to call cm_SyncDone() in one of the error
paths. Fixup the call pattern and do not forget to call cm_SyncDone().
Change-Id: I9274b65c5a5f22ca71e0b10f860d57d7e567a56c
Reviewed-on: http://gerrit.openafs.org/11917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dfc8db6e3d21208c43f07bc90835cdd37f6f6812
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:51:40 2015 -0400
Windows: NPSupport Remote Name verification
When adding a connection verify that the server name and the share name
are valid. If not return ERROR_BAD_NETWORK_NAME.
When getting connection information, if a pre-existing connection does
not exist and either the server name or the share name do not verify
return ERROR_BAD_NETWORK_NAME and not ERROR_INVALID_PARAMETER.
Change-Id: Ib40a6b56318793d1c1b351ba895736beb616585d
Reviewed-on: http://gerrit.openafs.org/11916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2f072b2fe6e7d5927bd4e597614af7f62240ccb1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:43:03 2015 -0400
Windows: NPGetResourceInformation return redir error
When the redirector ioctl fails in NPGetResourceInformation() return the
actual error to the caller. Do not hide all errors as WN_BAD_NETNAME.
Change-Id: Ie02ca5331aa34aef4476c99045048871c6c25de0
Reviewed-on: http://gerrit.openafs.org/11915
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d977906371ef9cef4e62d9b86daf673b0d9b599b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:39:32 2015 -0400
Windows: NP RemoteName Length checks
Ensure that RemoteName paths have at least two characters before
attempting to access character [1].
Change-Id: I75487056686dccf2bf57b22e7c99e9d8210eaaf3
Reviewed-on: http://gerrit.openafs.org/11914
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 69bc77c538a181315f532ce4ee9e49698e589083
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:27:03 2015 -0400
Windows: AFSParseName() uniFullName.MaximumLength
The uniFullName.MaximumLength in AFSParseName() is not properly
modified and can end up being extended beyond the actual memory
allocation due to a missing decrement.
Change-Id: I070ee33acd32849d05bbc83c6e7cfaf55e6a0997
Reviewed-on: http://gerrit.openafs.org/11913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b170a840b5f702356c15bb59737e7ed106cdc88c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:24:13 2015 -0400
Windows: remove dead network provider code
Remove all #if 0 code blocks.
Change-Id: I981d7a178c0ae1be7b3ca9f546a7a1aab8f5a48c
Reviewed-on: http://gerrit.openafs.org/11912
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6405e0584a16711d09cf0e0c80b5916a050be7d2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:21:35 2015 -0400
Windows: npdll do not retrieve auth id
The authentication id for the process will always be obtained in kernel
so no longer try to fetch it in userland.
Change-Id: I8d35af1349e137b8a3d7d8299b16e443710c6482
Reviewed-on: http://gerrit.openafs.org/11911
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 967c5dbef3340ee0c870b1fb1f91c24fb6443358
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:18:01 2015 -0400
Windows: Always fetch auth id in kernel
When processing network provider requests in afsredirlib.sys always
obtain the auth id using the SYSTEM worker thread. Do not trust
the values provided by userland.
Change-Id: I9786b0c836cf967074035a7595c38c8700cb7589
Reviewed-on: http://gerrit.openafs.org/11910
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d35164370a8e799ed35f7f23670ddee02dc87f50
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 28 13:12:13 2015 -0400
Windows: Move GetAuthenticationId to Worker Thread
When PsReferenceImpersonationToken(), PsReferencePrimaryToken(), and
SeQueryInformationToken() are called in the kernel from a user process
thread the restrictions on the userland process still apply. Since we do
not want to be restricted we must obtain the token and query the token
information from a SYSTEM thread.
This change restructures the AFSGetAuthenticationId() process to queue a
synchronous task to the worker thread.
This should address the problem that has been seen during system boot when
the Group Policy Service attempts to query, remove or create a drive
letter mapping.
Change-Id: Ib8772e185aa1e4e52979ec847bbc18a9878bcaca
Reviewed-on: http://gerrit.openafs.org/11909
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4233e4d661e3beb8e4ecb59e4a4c0ed3d9df69b7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jun 9 08:55:44 2015 -0400
Windows: AFSRetrieveFileAttributes no parent path
Modify AFSRetrieveFileAttributes() to handle the case of a ParentPathName
with a Length == 0. In such a case the introduction of a path separator
would result in the construction of an absolute path when a relative path
is required.
Change-Id: I2e633b22992b0aee914927a451bb146fc57110e8
Reviewed-on: http://gerrit.openafs.org/11889
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 456b68ccb6d8ad31b735d2c08d0313963ff66c22
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jun 9 08:44:43 2015 -0400
Windows: AFSRetrieveParentPath handle no parent
AFSRetrieveParentPath() when presented with a relative path that has no
parent will walk off the front of the FullFileName buffer. Add checks to
ensure that Length never becomes less than zero.
Change-Id: I7d619dc569d6c002b1d236a9340921414c51647f
Reviewed-on: http://gerrit.openafs.org/11888
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit af7f7da0aad29ff9bf5adad288b512d31954b36e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue May 12 23:15:50 2015 -0400
Windows: AFSGetConnectionInfo partial match validation
AFSGetConnectionInfo() is called to respond to NPGetResourceInformation
and NPGetConnectionPerformance WNet API requests. The former permits
the requestor to provide a path containing components that are not
processed by the file system represented by the called network provider.
As such partial matches are permitted BUT they must consist of full
components. In other words, \\afs\sh is not a valid partial match for
\\afs\share but \\afs\share is a valid partial match for \\afs\share\dir.
This change adds validation checks to enforce full component comparisons.
It also cleans up some of the associated comparisons and trace output.
Change-Id: Ia736030f554f9770b201227c4dce26d7d45fe0d2
Reviewed-on: http://gerrit.openafs.org/11887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 99894f0a7070caca7c8e96af3d82cf2bfdfe2bb9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 6 01:39:41 2015 -0400
Windows: NetrShareGetInfo do not return registry errors
In NetrShareGetInfo() when registry api calls fail do not leak the
error codes to the caller. Instead, set the error to CM_ERROR_NOSUCHPATH
so that NERR_NetNameNotFound can be returned.
Change-Id: I2c8f12573ca604385176ebb18d92ff2f7023a27e
Reviewed-on: http://gerrit.openafs.org/11924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a640e76d0f84c647abfe4968c842c0cb33f670e5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 6 01:38:01 2015 -0400
Windows: NetrShareGetInfo no return buffer on error
When processing the NetrShareGetInfo() pipe service rpc do not
allocate memory for the return buffer is the path cannot be found.
Change-Id: I782df44de4d6b7a4664234ae0f8295294b889469
Reviewed-on: http://gerrit.openafs.org/11923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ac05e8ceebd05c2d8496759e70cf7b1b92541134
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Apr 29 11:54:45 2015 -0400
libafs: remove linux conditionals for md5 inode number calculation
Remove the conditionals which hide the md5 digest calculation for inode
numbers on non-linux platforms. This feature was originally added to
support sites running on linux, but is generally useful and the
implementation is not specific to linux.
Change-Id: I7f406f9492780c1893dc1a2892db253b05036120
Reviewed-on: http://gerrit.openafs.org/11854
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit c6a8739a67edca8a7e987bd1f3d5dcc226ad47a0
Author: Daria Phoebe Brashear <shadow@your-file-system.com>
Date: Thu Aug 20 13:20:38 2015 -0400
openafs: add a contributor code of conduct
In the interest of fostering a friendly, welcoming environment
for contributors, institute a code of conduct for the project.
Adapted from the Contributor Covenant.
LICENSE MIT
Change-Id: I4eb3b8a84981ef04f02e7d60ec46873305888147
Reviewed-on: http://gerrit.openafs.org/11987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jonathan A. Kollasch <jakllsch@kollasch.net>
Reviewed-by: Thomas L. Kula <kula@tproa.net>
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fd23587a5dbc9a15e2b2e83160b947f045c92af1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Sep 15 13:33:12 2015 -0400
LINUX: Fix oops during negative dentry caching
Commit 2e9dcc069904aaa434787eec53c6f9821911cbab reinstated negative
dentry caching, but introduced an oops when fakestat is in use. Be sure
the GLOCK is held when looking up the parent vcache dv when the parent
is a mount point and fakestat is in use, since the calls to do the
lookup require the GLOCK to be held.
Change-Id: I6c47fbf53280400bf40271b1ff2837bd7c6dc69e
Reviewed-on: http://gerrit.openafs.org/12019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 152ad2848661c0827a29d4f15543be341c1251c3
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Jan 15 20:27:04 2015 -0500
doc: remove supergroup caution from pt_util
Supergroup information is explicitly present in -members
Change-Id: I25527c093858bc0b029417cbf2bb07717c50bb32
Reviewed-on: http://gerrit.openafs.org/11681
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ab4b5557b8c10fb27ac2e63ffdece2fc78c027d8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 21 22:44:32 2015 -0500
bozo: move more initialization code to functions
Move the code to create the initial "localcell" configuration and the
code to get the rx bind address out of main and into separate
functions.
Replace the global array of host addresses used to get the rx bind
address with a local variable.
Replace the call to rx_getAllAddr() with rx_getAllAddrMaskMtu(). The
former is not safe to call before rx_InitHost().
Initialize the cell info structure to zeros when creating the initial
"localcell" configuration.
Change-Id: I756aef86018d0cdd499afa58fdea99a7ac0d99df
Reviewed-on: http://gerrit.openafs.org/11690
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 0aee126cf20a4357d9ab1df08a8428ae9313e3b9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Sep 3 16:07:32 2015 -0400
opr: export softsig functions
Add the softsig functions to the exported symbols list.
Change-Id: I9378297ae035111459e597ae211fe832e93b63e3
Reviewed-on: http://gerrit.openafs.org/11999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8e97a6c93604014b126fb2e9e33642b11f4c2fc0
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 15 11:54:30 2015 -0500
afs: Increase vcache and dcache hash table sizes
Now that we are using a real hash function, larger hash tables
will be more useful.
The vcache hash tables are statically sized, and this increase will
add about a megabyte to the kernel module's memory footprint.
Update the algorithm used to dynamically size the dcache hash tables,
keeping the old behavior for small numbers of dcaches, but growing
the hash table's size to keep the average chain length near two
for a range of dcache numbers. Cap the dcache hash tables at 32k
entries to avoid excessive resource usage.
This involves code from opr, namely opr/ffs.h, which is acceptable
in the kernel module because that header is a standalone header
like jhash.h, with no dependencies on the system.
Change-Id: I7cdb3e993b1c2ad177a46ecc06bfa2be52e619e5
Reviewed-on: http://gerrit.openafs.org/11679
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9b0d5f274fe79ccc5dd0e4bba86b3f52b27d3586
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Dec 18 08:20:24 2009 -0500
return an error from afs_readdir when out of buffers
Instead of silently failing, return EIO from readdir when the
cache manager is unable to allocate a buffer in afs_newslot,
(afs: all buffers locked).
Change-Id: I3d5a5d73ce78db216400cab45a651fd8a49ea0c3
Reviewed-on: http://gerrit.openafs.org/1001
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2e9dcc069904aaa434787eec53c6f9821911cbab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Aug 24 23:01:16 2014 -0500
LINUX: Restore negative dentry caching
One of the changes in commit 652f3bd9cb7a5d7833a760ba50ef7c2c67214bba
effectively disabled negative caching for dentries, by always
invalidating a negative dentry in afs_linux_dentry_revalidate. This
was because various temporary errors could result in ENOENT errors
being returned to afs_lookup, which created incorrect negative dentry
cache entries.
These incorrect ENOENT errors were rectified in change
Ib01e4309e44b532f843d53c8de2eae613e397bf6 . So, negative dentry cache
entries should work now, so remove the code to unconditionally
invalidate these negative entries.
Change-Id: Ic027147fd1f733beaa0fafbbabfa8c09f5656d34
Reviewed-on: http://gerrit.openafs.org/11789
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 07e474e35e070b9ddcc5158796c95442aea0597f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Jan 27 16:33:25 2015 -0500
Make compile_et output usable out-of-tree
Prior to this commit, the output C files from compile_et would
emit #includes of <afsconfig.h> and <afs/param.h>. These files
are not installed, and are only available in an OpenAFS build tree.
The output C files also emit #includes of <afs/error_table.h>, which
is an installed file, and is therefore expected to be available on
a system with OpenAFS installed. Removing the first two headers will
allow OpenAFS's compile_et binary to be used to compile error tables
which are not part of OpenAFS, on systems where OpenAFS is installed.
The inclusion of afsconfig.h was added in commit
972a4072827fb2ec680354d5adebc2c5cca06939 to ensure that it was included
prior to afs/param.h; however, the inclusion of afs/param.h in
compile_et.c stems from the original IBM import and seems of minimal
value. The only changes needed to build without param.h are to use
int instead of afs_int32 in a couple places (int is 32 bits on
all platforms currently supported) and to include <sys/types.h>
for size_t.
Change-Id: I1ee969eec92b139d265a7494e13ddfc69c05f238
Reviewed-on: http://gerrit.openafs.org/11708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit e99bfcfaa3bca3e65f03928718c2c9eb5eff7c8c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Jan 13 20:22:59 2015 -0500
afs: use jenkins hash for dcache, vcache tables
Switch the four dcache and vcache hash tables to use the jenkins
hash from opr.
This requires making DCHash into a full-weight function in order
to properly hash all three inputs; convert all four symbols to
full functions for consistency. Just pull in <opr/jhash.h> via
afs.h so all consumers (e.g., of VCSIZE) can use it without
modification.
This is the first use of src/opr/ in src/afs/ (outside UKERNEL),
but it is permissible because opr/jhash.h is a standalone
header and there are no C files needed for its implementation which
would require anything from the system.
Change-Id: Ic7f31e7dc548ff2cf13ac087a9e4bbb2b874e03a
Reviewed-on: http://gerrit.openafs.org/11673
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 244b82d24c37355bc855361815a7e682d6445af3
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Dec 14 16:13:39 2014 -0500
rx: Tidy up rxi_CheckCall()'s mtuout handling
We don't actually do anything that matters if lastPacketSizeSeq
is set and lastPacketSize is zero, so zero both when we're cleaning
up.
lastPacketSize and lastPacketSizeSeq are set together in
rxi_SendPacket (and rxi_SendPacketList), when we are sending a packet
larger than the current estimate of the peer's maxPacketSize.
The two fields are checked together during ack processing, but
rxi_CheckCall() only checks lastPacketSize, ignoring lastPacketSizeSeq.
Change-Id: I4e52bed0900b5551859200699f114f5d5a61581c
Reviewed-on: http://gerrit.openafs.org/11633
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 20d5760fe9653fb748fc25661257ab9720b2b5a6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Feb 27 18:20:19 2015 -0500
Document KeyFileExt(5)
Add a manual page for the KeyFileExt file.
Add cross-references from all places which currently reference
KeyFile(5), and update their body text accordingly.
Change-Id: Iab56847fcb59dda0c8a344a626ddb0ff35b98b26
Reviewed-on: http://gerrit.openafs.org/11770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 05e7c2f2fb60805e21f6235d7666b9c6f943a685
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 21 14:31:51 2015 -0500
bozo: use the full path when renaming BosLog to BosLog.old
Use the full path when renaming the BosLog file to BosLog.old and when
checking whether the BosLog file can be opened, otherwise the rename
will fail (and go unnoticed), and the initial BosLog check opens a
handle to a file in the wrong directory.
Create the server directories, including the logs directory, before
forking and log file initialization.
Change-Id: I3733d64335f348190572f6278086b634641f2754
Reviewed-on: http://gerrit.openafs.org/11685
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit df05a15ce3cb1c730bf87613711c38fa25be349f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 9 15:04:19 2015 -0500
bozo: fix -pidfiles default
Fix the default value for the -pidfiles argument. The pidfiles
should be stored in the local state directory, not the server
configuration directory when using modern paths.
Fixes commit bdf86d245fd55c5c7ac7ea81e3d6b6bafdbe1783.
Change-Id: Ie338b0071c6ea6ee44b376d231d12b85571de6ae
Reviewed-on: http://gerrit.openafs.org/11732
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 64eb76eebb7e4f0363aca2c92fd6b1cc0ce8e7b0
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 01:49:03 2015 -0400
kauth: Resolve date signedness warning in SetFields
Resolves this warning:
admin_tools.c: In function ‘SetFields’:
admin_tools.c:611:30: warning: pointer targets in passing argument 2 of ‘ktime_DateToInt32’ differ in signedness [-Wpointer-sign]
code = ktime_DateToInt32(s, &expiration);
^
In file included from /home/anders/wd/openafs/include/afs/afsutil.h:84:0,
from admin_tools.c:39:
/home/anders/wd/openafs/include/afs/afsutil_prototypes.h:101:18: note: expected ‘afs_int32 *’ but argument is of type ‘afs_uint32 *’
extern afs_int32 ktime_DateToInt32(char *adate, afs_int32 * aint32);
^
Change-Id: Id24e7a6cd1ab2291c0c05d3835f4ad7fddfec8d7
Reviewed-on: http://gerrit.openafs.org/11956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fa8e0beb96c8693a98d5ce0f310255bcd0731f6f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Feb 27 17:47:45 2015 -0500
Update asetkey.8 for KeyFileExt
Prefer KeyFileExt to KeyFile ~everywhere. Make the main documentation
assume a modern cell with KeyFileExt and rxkad-k5, moving the old
rxkad and KeyFile documentation to a new section,
HISTORICAL COMPATIBILITY.
Note that kaserver is deprecated.
Do not mention the Update Server, which is also disrecommended for
new installations.
Add a copyright statement for the new content.
Change-Id: Idcb4940615a00189b655538a9a190cc35153cc89
Reviewed-on: http://gerrit.openafs.org/11769
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 05f64de7d723a8d5430d9b5928c2025838a6fa52
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Jul 29 09:03:14 2015 -0300
Linux: Only use automount for volume roots
As long as we avoid using directory aliases when crossing
a mount point (at the volume root), we should always get
to a given non root directory with the same dentry.
The mechanism added by commit de381aa0 ("Linux: Make dir
dentry aliases act like symlinks") is therefore only really
necessary for a volume root.
With kernel 4.2 it is not possible to tweak the "total link
count", resulting in ELOOP errors when looking up a path
with 40 or more directories that are being looked up for
the first time. With this change, only mountpoints will
count against the limit.
Change-Id: Id0e5a51d579eee51ecb8d7fb575a7a30740ea70e
Reviewed-on: http://gerrit.openafs.org/11945
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c38382c12763128d3f66e750e5e7b1c767ac74f7
Author: Marcio Barbosa <mbarbosa@sinenomine.net>
Date: Thu Aug 6 11:53:23 2015 -0300
tests: give the full path to the softsig test helper program
In order to start the softsig test helper properly,
the full path of this program is necessary.
FIXES 132246
Change-Id: I4e9ff1e62a0b82078338eeaf0d4368ac1b35dccc
Reviewed-on: http://gerrit.openafs.org/11977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fcfa8d039a56d051838142cc5b361be195d225e3
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 23:26:43 2015 -0400
tests/auth/keys-t.c: Don’t ignore return value of write
Resolves this warning:
keys-t.c: In function ‘copy’:
keys-t.c:63:6: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(out, block, len);
^
Change-Id: If2427f2658b428091ffba3d11643ad95f193a67d
Reviewed-on: http://gerrit.openafs.org/11957
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 86053beac56629f7bdbc2695fda560e0410e430f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:19:13 2013 +0000
Unix CM: Make rootVolume array big enough
In afs_CheckRootVolume, the local rootVolumeName array needs to
be large enough to hold the contents of the global
afs_rootVolumeName string, which is 64 characters long. Fix our
local array to be the same length by using a new defined constant
MAXROOTVOLNAMELEN.
Caught by coverity (#985758)
Change-Id: I4c926b94efb40d7107e2d7160ade0ba8b381004e
Reviewed-on: http://gerrit.openafs.org/9348
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 06caaaa6d089e0c0393e45c43b525d202c9c7a24
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Wed Jan 14 12:39:38 2015 +0100
vos dump -clone: use volumename of cloned volume
with the command "vos dump -clone" use the volumename of the cloned volume
instead of the fixed string "dump-clone-temp". This volumename is recorded
in the DumpHeader and VolumeHeader of the dump file.
Change-Id: I38ef846f043680c8f13dce263581a61bbd7ef7dd
Reviewed-on: http://gerrit.openafs.org/11670
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8ea75188476edde820ec369039691497057b88ab
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Dec 16 16:52:17 2013 -0500
afsmonitor: Skip additional bits for large timeval
When the timeval structure uses 64-bit values for sec and usec,
64 extra bits need to be skipped in the input for every time value
that is parsed. There's a remaining assumption in this part of the
code that the time values received from the server are 32-bits, but
after decoding they will always have the local size which may well
be 64-bits.
Change-Id: Iaf52df8f9da1146807dddc1c44a9e52e83654d9c
Reviewed-on: http://gerrit.openafs.org/10592
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 763eb16380986959aeb8c2cc6111f1d9cdb7b17d
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jan 12 16:34:21 2015 -0500
vol: Switch to Jenkins hash for volume hash table
While here, bump the default size from 256 to 1024.
Change-Id: Ife95f14009764785a18556289d5dfe5e7a96b477
Reviewed-on: http://gerrit.openafs.org/11667
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ebf04c3a3eeb6dd49756a93f31e0f90fd706a44f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jan 12 16:13:28 2015 -0500
Switch to jhash for VNODE_HASH
Remove the vnodeHashOffset field, as the Jenkins hash will get
a uniform-enough distribution without this extra help. Per-volume
unique hashing is retained by using the volume ID as the initial
value input to the Jenkins hash.
While here, increase the vnode hash table size from 256 to 2048.
Change-Id: I353dfc8178f13f4e9adcd03a331adf2a7c64a1a9
Reviewed-on: http://gerrit.openafs.org/11666
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 22faedd3ccac9b74f759709a6116befb3c4bc17a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jan 12 16:15:53 2015 -0500
vol: relocate some comments
Put them closer to the code they are describing.
Change-Id: Iaf7137eae2bf4464f26d98b0c3e0e9040f19c321
Reviewed-on: http://gerrit.openafs.org/11665
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bfa668c14730b2335c29abd7b8aa20b8e6df338b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jan 12 15:14:48 2015 -0500
Normalize on vp->hashid for hash table usage
At present the hashid is set to the same value as the volume ID
(i.e., V_id(vp) a.k.a. vp->header->diskstuff.id), but we should
not leak across the abstraction barrier without cause.
Change-Id: I6a727e60c34bdc938f4ae2e815c7513802a4dbc9
Reviewed-on: http://gerrit.openafs.org/11664
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 899f8eaf3f63b1f91fe6b6eb8f582f82bd10cb66
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 14 15:13:48 2014 -0500
objdir build: Normalize COMPILE_ET_* commands
A few different places in the tree currently invoke compile_et in a
few different ways. These three general styles all appear:
${COMPILE_ET_H} -p ${srcdir} foo
${COMPILE_ET_H} -p ${srcdir} foo.et
${COMPILE_ET_H} ${srcdir}/foo.et
Of these, the first is the correct way to invoke compile_et in a
Makefile. The other two can fail during at least some objdir builds.
Take this example of the second style of invocation:
afs_trace.h: afs_trace.et
${COMPILE_ET_H} -v 2 -p ${srcdir} afs_trace.et
During an objdir build, the compile_et command will get expanded like
so, due to VPATH expansion:
$top_objdir/src/comerr/compile_et -emit h -v 2 \
-p $top_srcdir/src/afs \
$top_srcdir/src/afs/afs_trace.et
The compile_et command concatenates the -p prefix with the actual
filename provided, so the file it tries to open is:
$top_srcdir/src/afs/$top_srcdir/src/afs/afs_trace.et
For non-objdir builds this doesn't happen, since $srcdir is just '.',
and afs_trace.et gets expanded to just afs_trace.et (or possibly
./afs_trace.et). This is also not a problem for objdir builds that are
specified as a relative path and are 'adjacent' to the srcdir. For
example, if we ran '../openafs-1.6.10pre1/configure --options', our
$top_srcdir is just '../openafs-1.6.10pre1', with some magic to
expand '..' to the correct number of levels. So in the above example,
the compile_et invocation gets expanded to:
/path/to/objdir/src/comerr/compile_et -emit h -v 2 \
-p ../../../openafs-1.6.10pre1/src/afs \
../../../openafs-1.6.10pre1/src/afs/afs_trace.et
And compile_et then tries to open the path
../../../openafs-1.6.10pre1/src/afs/../../../openafs-1.6.10pre1/src/afs/afs_trace.et
which collapses to just
../../../openafs-1.6.10pre1/src/afs/afs_trace.et, which is the correct
file.
However, if the $srcdir is specified as an absolute path, or if the
number of '..'s is wrong, this doesn't work. It is perhaps easiest to
explain why by just using another example. For an absolute path, the
invoked command is:
/path/to/objdir/src/comerr/compile_et -emit h -v 2 \
-p /path/to/openafs-1.6.10pre1/src/afs \
/path/to/openafs-1.6.10pre1/src/afs/afs_trace.et
And compile_et tries to open
/path/to/openafs-1.6.10pre1/src/afs/path/to/openafs-1.6.10pre1/src/afs/afs_trace.et,
which obviously does not exist. This results in a build failure like:
/path/to/openafs-1.6.10pre1/src/afs/path/to/openafs-1.6.10pre1/src/afs/afs_trace.et: No such file or directory
*** Error code 1
make: Fatal error: Command failed for target `afs_trace.msf'
For a non-working relative objdir, we may invoke a command like this:
/path/to/objdir/src/comerr/compile_et -emit h -v 2 \
-p ../../../../openafs-1.6.10pre1/src/afs \
../../../../openafs-1.6.10pre1/src/afs/afs_trace.et
And compile_et tries to open
../../../../openafs-1.6.10pre1/src/afs/../../../../openafs-1.6.10pre1/src/afs/afs_trace.et,
which is ../../../../../openafs-1.6.10pre1/src/afs/afs_trace.et, which
(probably) doesn't exist, since it goes one too many levels up.
To avoid this, we can just prevent the filename argument to compile_et
from undergoing VPATH expansion. compile_et never opens the given path
directly if -p is given, so it's not really a file path and so should
not be altered by VPATH.
compile_et will add a trailing .et to the filename if it doesn't have
one, so we can avoid the VPATH expansion by just leaving out the
trailing .et. We could also avoid the VPATH expansion by specifying
something like './afs_trace.et', but it is perhaps more clear to not
say the explicit filename, since we're not really specifying a path to
a file.
Just leaving out the -p option, as in this style of compile_et
invocation:
dumpscan_errs.h: ${srcdir}/dumpscan_errs.et
$(COMPILE_ET_H) ${srcdir}/dumpscan_errs.et
also fails for objdir builds. This is because, without the -p option,
compile_et defaults to '.' as the prefix. If the srcdir is
/path/to/openafs-1.6.10pre1, then this will expand to:
/path/to/objdir/src/comerr/compile_et -emit h \
.//path/to/openafs-1.6.10pre1/src/tools/dumpscan/dumpscan_errs.et
which will fail, since that path to dumpscan_errs.et does not exist.
So to fix this, make all compile_et invocations follow this style:
${COMPILE_ET_H} -p ${srcdir} foo
Many other invocations of compile_et in the tree are already like
this, so this commit just changes the others to match.
Change-Id: Ied12e07a1cc6e115d4a10cd7a6c97aae9ce7f5f9
Reviewed-on: http://gerrit.openafs.org/11391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 4e05184264bf1c0d54e20741563ba9dadc2ef522
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Jan 12 23:24:55 2014 -0600
LINUX: Fix "unused but set var" autoconf warnings
A few of the linux autoconf tests generate -Wunused-but-set-variable
warnings, unless the test is run with -Wno-unused-but-set-variable.
Since we run these tests with -Werror, this can cause the tests to
incorrectly fail if they are not run with
-Wno-unused-but-set-variable.
The Linux kernel build process normally does run with that option, but
due to some other (possibly buggy) behavior, sometimes these configure
tests do not run with that option. So, make our tests work without
generating that warning, so we will work in more cases.
Reorganize a few of these tests so we are setting a field in a global
structure, instead of a function-local one. Make the test function
names and style little more consistent while we are here, but do not
make the global structure 'static', in case the compiler recognizes we
are setting fields for a structure that cannot be used by anything.
In particular, the "revalidate takes nameidata" test had been wrongly
succeeding, but that didn't usually matter because of how the feature
tests are ordered in the code. It does matter in the case when the
"revalidate takes unsigned" check also gets a wrong result, which
can cause kernel BUGs, which should be fixed by these changes.
See:
<http://lists.openafs.org/pipermail/openafs-devel/2014-January/019727.html>
<http://thread.gmane.org/gmane.comp.file-systems.openafs.devel/11361>
Change-Id: Ic29c4fc61da17633d8d1af81949b3917beb58cf6
Reviewed-on: http://gerrit.openafs.org/10706
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9738c82bd6e5a1c294911d06e3c3e38b70a8caa8
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sun Jun 23 22:08:34 2013 +0100
opr: fix often reported warning
$ make CC=cgcc CHECK="smatch -Wsparse-all" 2>&1 | tee debug
$ sed -n 's/.*warning: //p' debug | sort | uniq -c | sort -n | tail -1
7218 passing argument 1 of 'opr_AssertionFailed' discards 'const' qualifier from pointer target type [enabled by default]
Change-Id: I81c5c1db39b1a08c7dda3caa3d4cdf685186ff5b
Address: http://smatch.sourceforge.net/
Reviewed-on: http://gerrit.openafs.org/10019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 204cb4deec73121ff8ef13654beb9936f828a804
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Feb 10 14:13:39 2014 -0600
vol: Log more info on wrong SYNC response length
We log that the length of the response was wrong, so we're dropping
the connection. Log what the actual and expected lengths were, at
least, so we can maybe get a little bit of useful information from
this message.
Change-Id: I499d43c7625712b507698d908feb21477b789563
Reviewed-on: http://gerrit.openafs.org/10829
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2aa4cb047596b654a175f5a22197c2923002a271
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 13 18:08:25 2015 -0600
afs: Stop abusing ENOENT
When looking up a file, the ENOENT error code is supposed to be used
if we know that the target filename does not exist. That is, the
situation is a user or application error; they specified a filename
that was not previously created.
Currently, though, we use ENOENT for a variety of different
situations, such as:
- After successfully looking up a directory entry, we fail to
afs_GetDCache or afs_GetVCache on the FID for that entry.
- We encounter an invalid mount point, in certain code paths.
In each of these situations, an ENOENT error code is incorrect, since
the target filename does indeed exist and these situations may be
caused by network or administrative errors. An ENOENT error implies
that the user may be able to then create the target filename, which is
not true most of the time in the above situations.
In addition, on LINUX we return a negative dcache entry when we
encounter an ENOENT error on lookup. This means that if any of the
above scenarios occur, Linux would cache the fact that that directory
entry did not exist, and return ENOENT for future lookups. This was
worked around in one of the changes in commit
652f3bd9cb7a5d7833a760ba50ef7c2c67214bba to always invalidate such
negative dentries, but at the cost of performance (since this caused
negative lookups to never be cached).
To avoid all of these issues, just don't use ENOENT in these
situations. For simple non-disconnected afs_GetDCache or afs_GetVCache
errors, return EIO, since we have encountered an error that is
internal to AFS (either the underlying data is inconsistent, or we
have a network error, or something else). In disconnected operation,
return ENETDOWN like in other disconnected code paths, since often the
root cause is due to us not having network access. When a bad
mountpoint is encountered, return ENODEV, since that is what we use
elsewhere in the code when encountering a bad mountpoint.
It is also noteworthy that this changes removes the translation of
VNOVNODE into ENOENT, since a nonexistent vnode is not the same as a
nonexistent filename, as described above. Some code paths have special
behavior for this situation (ignoring the error in some cases where it
does not matter). These code paths should be okay with this change,
since all of them examine error codes that have not been translated
through afs_CheckCode.
Some useless references to ENOENT were also removed in
src/afs/LINUX*/osi_misc.c. These did not result in incorrect behavior,
but removing them makes searching for bad ENOENT references easier.
Change-Id: Ib01e4309e44b532f843d53c8de2eae613e397bf6
Reviewed-on: http://gerrit.openafs.org/11788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a19728ba55f30a41799855b49c5cf6c07c840f87
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 13 18:02:44 2015 -0600
afs: Clarify vcache->mvid accesses
Currently, numerous places in the code treat the 'mvid' field in
struct vcache as a few different things:
- If the vcache is a mountpoint, mvid points to the fid of the root
dir of the target volume.
- If the vcache is a volume root dir, mvid points to the fid of the
parent dir for the mountpoint.
- If the vcache is a sillyrenamed file, mvid points to a string,
which is the name the vcache was renamed to.
Despite these three things being very different (and one of them is a
completely different type than the others), everywhere in the code
just accesses mvid as 'avc->mvid'. This can make it very confusing as
to what the field actually means at any particular part of the code,
and makes it very difficult to search the code for places that use
mvid in any one of these specific ways.
So, to aid in code clarity, make mvid into a union, with the following
members:
- target_root: For the "mountpoint" case.
- parent: For the "root dir" case.
- silly_name: For the "sillyrename" case.
This should have no effect on code behavior, but just makes the code a
bit clearer.
Change-Id: I45391bb7a99d6f8e35c44873b677d157ea681900
Reviewed-on: http://gerrit.openafs.org/11748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 65cffcadb96389ff3e794eb822d2231220c71160
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 13 17:31:37 2015 -0600
afs: Use named constants for mvstat
Currently the vcache 'mvstat' field is assigned three magic values: 0
for normal files and directories, 1 for mountpoint objects, and 2 for
volume root dirs. These values are clearly defined in comments, but
everywhere we actually assign or compare these values, we use the bare
numbers.
Stop this nonsense and use named constants, to make the code less
inscrutable.
Change-Id: Ic1b133109d619b70317141431f163e552bafd109
Reviewed-on: http://gerrit.openafs.org/11747
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
commit 721451286285d4cc15b2fc22bfcde83b21e954a3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Aug 11 13:51:39 2014 -0500
vol: Avoid FDH_SEEK/FDH_READ
All code in the tree except for this uses positional i/o
(FDH_PREAD/FDH_PWRITE). For consistency and to ensure that we do not
mix positional and non-positional i/o, just use the positional i/o
functions here. It's simpler, too.
Change-Id: Ib65f81dde7532631cd7d642c9ef814d47c71581a
Reviewed-on: http://gerrit.openafs.org/11377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Hans-Werner Paulsen <hans@mpa-garching.mpg.de>
Tested-by: Hans-Werner Paulsen <hans@mpa-garching.mpg.de>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ce51d192861ca8a21208fadf38e30a62ac06a019
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 14:25:54 2014 -0400
readme: remove README.PTHREADED_UBIK
We enabled pthreaded ubik by default in commit 27cb0d38885428474b0d4287,
and it is no longer considered beta or experimental. There is no longer
a need for separate documentation of it, and adjust the options
listing in INSTALL accordingly.
[kaduk@mit.edu: adjust for the changed default behavior.]
Change-Id: Ib1315e55c1e00bdae0f55f0f8446f5a2c3d9671f
Reviewed-on: http://gerrit.openafs.org/10978
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9a77af6d2265c478b561bf1c5525e913b371525d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 14:03:58 2014 -0400
readme: Rename README to INSTALL
Create a new top level README to introduce OpenAFS.
Move the old README to a file called INSTALL for information about
building and installing OpenAFS on various platforms.
Change-Id: Id8853de73f669a6d5497cafd65a1e98b309c6efc
Reviewed-on: http://gerrit.openafs.org/10976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f61beda6d628f72a0357e2066d4e03cf52f0ba03
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 13:02:00 2014 -0400
readme: move the LICENSE file to the top level directory
Move the LICENSE file to the top directory to make it
more visible and to clean up the src directory.
Update the top level make file and redhat packaging
to accomodate the new path to the LICENSE file.
Change-Id: I64b655584cf61b8a45c6d6788a84aff31df8e83e
Reviewed-on: http://gerrit.openafs.org/10972
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c9f430fd8f479bbfe28829f7032ecd325a4f833d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 1 09:32:35 2015 -0400
vlserver: ListAttributesN2 volume name safety
The vlserver ListAttributesN2 RPC permits filtering the result set
by volume name in addition by site or volume id.
Two issues identified by Andrew Deason (Sine Nomine Associates) are
addressed by this patch. First, the size of the volumename[] buffer
is insufficient to store the valid input read over the network. The
buffer needs to be able to store VL_MAXNAMELEN characters of the volume
name, two characters for the regular expression '^' and '$', and the
trailing NUL.
Second, sprintf() is used to write to the buffer and even with valid
input from the caller SVL_ListAttributesN2 can overflow the buffer
when ".backup" and ".readonly" are appended to the volume name. If
there is an overflow the search name is invalid and there can not be
a valid match.
This patch increases the size of volumename[] to VL_MAXNAMELEN+3.
It also uses snprintf() instead of sprintf() and performs error
checking. The error VL_BADNAME is returned when the network input is
invalid.
Change-Id: Id65b83e0dd14c6f41af73c6868975ae53c4975a7
Reviewed-on: http://gerrit.openafs.org/11969
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 049323e7e03c64f534a73ff452d218f19d5b8132
Author: D Brashear <shadow@your-file-system.com>
Date: Fri Jul 18 16:00:12 2014 -0400
vlserver: limit use of regex to admins always
allow regexes only if the querying user is a superuser.
if the superuser uses up all the resources, well, they could just do
whatever damage directly anyway. means even in unrestricted mode
we are not vulnerable
Change-Id: Ib35d649f31e752ba5ae8373a06b67ea76f97425c
Reviewed-on: http://gerrit.openafs.org/11968
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fc43236872c798fe426590714d19773c74d4bbbe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 3 15:03:00 2015 -0400
Revert "vlserver: Disable regex volume name processing in ListAttributesN2"
This change reverts commit 22481ab3705522ac1988b7de038c4dbc1e5009a9 which
by disabling regex queries of volume names breaks some backup software
including TSM.
Change-Id: Ic8b398e289845b45b6b073729e9a091c8b5d71b5
Reviewed-on: http://gerrit.openafs.org/11967
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
commit 682d5e74347495045fc2a550adddea243118126b
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sun Aug 2 21:26:13 2015 -0400
kas: remove @CFLAGS_NOERROR@ in favor of specific pragma
Change-Id: Icf07c63a0e5a59da19a9db4edf7ac3c346349088
Reviewed-on: http://gerrit.openafs.org/11966
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7254d831b766c72f8e1b77158082e0e5b3d20224
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 23:28:49 2015 -0400
tests/volser/vos-t.c: Don’t ignore return value of pipe
Resolves this warning:
vos-t.c: In function ‘TestListAddrs’:
vos-t.c:60:5: warning: ignoring return value of ‘pipe’, declared with attribute warn_unused_result [-Wunused-result]
pipe(outpipe);
^
Change-Id: I7eb58a91b5a7d9df18a4952400f74c79299e857d
Reviewed-on: http://gerrit.openafs.org/11958
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5a0603ced26bebb867b52f3f3a0cb1604880d0df
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sat Aug 1 05:05:11 2015 -0400
tests/opr/jhash-t.c: Fix unsigned constant warning
Resolves this warning on 32-bit GCC:
jhash-t.c: In function ‘main’:
jhash-t.c:60:4: warning: this decimal constant is unsigned only in ISO C90
is_int(3704403432, opr_jhash(test, 2, 0),
^
jhash-t.c:62:4: warning: this decimal constant is unsigned only in ISO C90
is_int(3704403432, opr_jhash_int2(test[0], test[1], 0),
^
Change-Id: Ie3ab0f5aacdc719fa63f32e545b5863ec351f5eb
Reviewed-on: http://gerrit.openafs.org/11961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 540050bbc893416fbd075ed5e349abaa5baaeba1
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sat Aug 1 03:15:39 2015 -0400
Squash a frightening number of warnings from XBSA-related code
Mostly missing prototypes and mismatched format strings, but also some
more disturbing bugs.
Change-Id: I9a10728c7da645bb562374a3598414484de33f4d
Reviewed-on: http://gerrit.openafs.org/11960
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 8f78afa65be0c8a1c130661a590e5b15be527537
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sat Aug 1 03:58:19 2015 -0400
Add XBSA_XLIBS to XLIBS after it’s computed
Commit 353aa7ef2c172f574998480d6d051b3f4e95ae7b (after 1.6 was
branched) reordered things such that XBSA_XLIBS was being added to
XLIBS before it was computed, which caused link failures with
--enable-tivoli-tsm.
Change-Id: I791add1b916c845d975d1ee21652c13244c50736
Reviewed-on: http://gerrit.openafs.org/11959
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ac39d879f8cb6adc11efecef4cb3966582e09c82
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sat Aug 1 05:54:42 2015 -0400
tests/opr/time-t.c: Use labs instead of abs for long argument
Resolves this warning with clang:
time-t.c:46:8: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type 'int' which may cause
truncation of value [-Wabsolute-value]
ok(abs(osTime - osNow) < 2, "opr_time_Now returns a reasonable value");
^
time-t.c:46:8: note: use function 'labs' instead
ok(abs(osTime - osNow) < 2, "opr_time_Now returns a reasonable value");
^~~
labs
Change-Id: Ib98069e1349161d936c8ada0e69f9b33d2f71ce3
Reviewed-on: http://gerrit.openafs.org/11965
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 09bf3ebb26a3d8a4bd10571b394a59207a7f6980
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sat Aug 1 05:52:59 2015 -0400
src/kauth/krb_udp.c: Remove redundant NULL check for array address
Resolves this warning with clang:
krb_udp.c:302:13: warning: address of array 'tentry.misc_auth_bytes' will always evaluate to 'true' [-Wpointer-bool-conversion]
if (tentry.misc_auth_bytes) {
~~ ~~~~~~~^~~~~~~~~~~~~~~
Change-Id: I0656b055090654eada2cd63476330fb288490acc
Reviewed-on: http://gerrit.openafs.org/11964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 38bd5def2a90303b6bb07926f99d0ab095ba96c0
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 01:35:05 2015 -0400
rfc3961: prototype _krb5_internal_hmac
Resolves this warning:
src/external/heimdal/krb5/crypto-arcfour.c: In function ‘_oafs_h__krb5_HMAC_MD5_checksum’:
src/external/heimdal/krb5/crypto-arcfour.c:82:5: warning: implicit declaration of function ‘_oafs_h__krb5_internal_hmac’ [-Wimplicit-function-declaration]
ret = _krb5_internal_hmac(context, c, signature, sizeof(signature),
^
Change-Id: I10f028b8a0e1756cb1f1638a061616db0e76779e
Reviewed-on: http://gerrit.openafs.org/11953
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit f5a35b240b183f2daeef83caa985e8f4a712fec9
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 21:27:42 2015 -0400
make distclean: clean doc/xml/*/Makefile
These files are conditionally generated by configure.ac.
(Conditionally is okay because this is an ‘rm -f’ line.)
Change-Id: I7ade07e09b5e378b2abf6481dc8ffac26b574eed
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/11952
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8d75f24aae3d2ed62dc070fd257464713d615a23
Author: Anders Kaseorg <andersk@mit.edu>
Date: Fri Jul 31 20:47:35 2015 -0400
libadmin: #define UBIK_LEGACY_CALLITER 1 in afs_kasAdmin.c
Replaces this warning:
afs_kasAdmin.c: In function ‘GetPrincipalLockStatus’:
afs_kasAdmin.c:710:6: warning: implicit declaration of function ‘ubik_CallIter’ [-Wimplicit-function-declaration]
ubik_CallIter(KAM_LockStatus, kaserver->servers, UPUBIKONLY,
^
with these marginally less alarming warnings:
In file included from ../adminutil/afs_AdminInternal.h:17:0,
from afs_kasAdmin.c:21:
/home/anders/wd/openafs/include/ubik.h:627:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
extern afs_int32 ubik_CallIter(int (*aproc) (), struct ubik_client *aclient,
^
/home/anders/wd/openafs/include/ubik.h:632:1: warning: function declaration isn’t a prototype [-Wstrict-prototypes]
extern afs_int32 ubik_Call_New(int (*aproc) (), struct ubik_client
^
Change-Id: I49dbc5f6bb9199764c73c6ee8449d62518f377e6
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/11954
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 22481ab3705522ac1988b7de038c4dbc1e5009a9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 8 14:37:16 2015 -0400
vlserver: Disable regex volume name processing in ListAttributesN2
For the interim and until it is needed, this is most prudently
simply disabled.
FIXES 131890
Change-Id: Ib52da4ba38b579e51a0d8571e2da1307ae50a06f
commit 8ce4a3905268385d3f5a0e11f20594875467cae6
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Jul 8 14:28:50 2015 -0400
Solaris: setpag should verify that ngroups will not overflow
Our ngroups management (since PAGs are still encoded as 2 groups) needs
to ensure that we do not overflow what we are prepared to handle,
and do not panic due to misheld mutexes if we have to return an error
when handling it.
FIXES 131878 (CVE-2015-3286)
Change-Id: I044d5e7d3161de815b3c2dace9c211fbb4b51ffa
commit ef671f497e9161ec2759446d594789495d3346f1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 8 14:20:13 2015 -0400
afs: Use correct output buffer for FSCmd pioctl
MRAFS added the FsCmd pioctl for passing messages to the fileserver;
a bug causes it to write into the wrong memory and potentially panic
clients.
FIXES 131896 (CVE-2015-3285)
Change-Id: Ic3a81fe06edc886f24bbc0537ea53e994b086c9e
commit 592a99d6e693bc640e2bdfc2e7e5243fcedc8f93
Author: Daria Brashear <shadow@your-file-system.com>
Date: Wed Jul 8 14:16:41 2015 -0400
afs: Clear pioctl data interchange buffer before use
Avoid leaking data in pioctl interchange buffers; clear the memory
when one is allocated.
FIXES 131892 (CVE-2015-3284)
Change-Id: I880bbaa75b07b491a08c62fb17527b9fff47ec8c
commit 62926630a82b8635d1cb1514b852f9f7a2609311
Author: Daria Brashear <shadow@your-file-system.com>
Date: Wed Jul 8 14:11:33 2015 -0400
bos: Use crypt for commands where spoofing could be a risk
bos defaults to not requiring crypt in a lot of cases, instead using clear.
As the simplest way to secure the channel is to enable crypt, do so.
FIXES 131782 (CVE-2015-3283)
Change-Id: I354fcbb5db37db225391a47b59d99518d1d0b2f9
commit 415a2aad4c1e9ab5d034b62989e4c16a37b5dcc7
Author: Daria Brashear <shadow@your-file-system.com>
Date: Wed Jul 8 13:51:47 2015 -0400
vos: Clear nvldbentry before sending on the wire
Don't leak stack data onto the wire. Clear nvldbentry before use.
FIXES 131907 (CVE-2015-3282)
Change-Id: I18ea2c6ce21b6462277d067de329f4fb44dfb3ae
commit 656aaacd01a90f658a5126111af9988fa1854dec
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Dec 16 19:25:06 2014 -0500
vos: changeaddr refuse to change mh entries without -force
Add a client side check to vos changeaddr -oldaddr -newaddr
to refuse to change multihomed server entries, unless -force
is given.
Change-Id: I1428e94f0c2fc19bb6ba3b2c53468f4587283bbc
Reviewed-on: http://gerrit.openafs.org/11638
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6c3ac6dc1ea865153a65b5c5c4f288617a3e6d0f
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jul 6 13:01:38 2015 -0300
Linux 4.2: Changes in link operation APIs
The follow_link and put_link operations are revised.
Test for the new signature and adapt the code.
Change-Id: I2834589cbe36c41924ab0505e6ca4ecd797a57fd
Reviewed-on: http://gerrit.openafs.org/11928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c2c0b6bc86c6d67814d0f7fe14fa8eefc445b4a4
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jul 6 12:00:10 2015 -0300
Linux: Add AC_CHECK_LINUX_OPERATION configure macro
Add a new macro to check the signature of a particular
operation against a provided typed argument list.
One of the arguments is an arbitrary label that is used
to construct the pre-processor define name. This will
allow for testing of different forms for the same
operation.
This can be used to replace many of the remaining odd
checks in src/cf/linux_test4.m4.
Change-Id: Ic619ace54f81aa8e1eb744e2d11f541a303b9587
Reviewed-on: http://gerrit.openafs.org/11927
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 89aeb71a3e23c944f58cfa9572e9eae4d2130d37
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jul 6 11:00:13 2015 -0300
Linux 4.2: total_link_count is no longer accessible
The value is now stored in the nameidata structure which
is private to fs/namei.c, so we can't modify it here.
The effect is that using a path that contains 40+ directories
may fail with ELOOP, depending on which directories in the
path were previously used. After a directory is accessed once
its D_AUTOMOUNT flag is reset and it will no longer count
against the symlink limit in later path lookups.
Change-Id: I90e4cb0e9004b075bff2330d165c67b7a923193f
Reviewed-on: http://gerrit.openafs.org/11926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e597b879677d023165298adadfb88db031883ff4
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Jul 8 14:32:31 2015 -0300
Linux 4.2: Pass namespace to sock_create_kern
sock_create_kern gains an additional network namespace
argument.
Pass in the default system namesapce.
Change-Id: I640e9497510242788e5060759779785ffb563a81
Reviewed-on: http://gerrit.openafs.org/11925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4ef47f787a64dc5c8ebb73a454b0851c86d7c06b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jun 26 09:09:18 2015 -0400
doc: bosserver runs in the background
Since OpenAFS 1.0 bosserver automatically puts itself into the
background and removes it's controlling terminal. Update the examples in
the Admin and Quick Start Guides to remove the unneeded '&' on the
command line to start the bosserver.
Change-Id: I1fd8f31c604004b099d50ffe166262b4d0d58804
Reviewed-on: http://gerrit.openafs.org/11906
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 73e080cbb043424d9094a4bdd8f3e82c47a89502
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jun 12 12:38:49 2015 -0400
tests: fix typo in softsig test helper
Change-Id: I74183a04b54b70bf3593a53fdb5f164cbd6c3b98
Reviewed-on: http://gerrit.openafs.org/11893
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 683ea4a983ada3845ecc8589f0362802ed967dc2
Author: Daria Brashear <shadow@your-file-system.com>
Date: Wed Mar 4 17:25:14 2015 -0500
vos: desupport -stayonline
roll back -stayonline support for volume releases for now.
Change-Id: I5b4de15892f975514ea699994cb7c1da17ac83c2
Reviewed-on: http://gerrit.openafs.org/11787
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 82e02157fec248293e7336f0e0b3d1c9da545228
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 11 20:28:43 2015 -0400
libafs: reset all the volumes with fs flushall
Fix a logic bug in fs flushall in which only the first volume in each
hash chain is reset (invalidated). Instead, reset all the volumes in
the volume hash.
This bug was introduced in commit 4197bbecd9d0b2ff0b8eaec75a0df9a64f713cf0
(libafs: fs flushall for unix cm)
Also, when flushing a single volume with fs flushvolume, don't bother
searching all the hash chains, instead start on the hash chain
containing the volume being flushed.
Change-Id: I7be67fdb310b4845d02dc916f4400f83cc649cb8
Reviewed-on: http://gerrit.openafs.org/11892
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0b8e85c1f9c6d741e1b8556cc3be6b62c97e7937
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Feb 9 12:09:32 2015 -0500
pagsh: do not call set[ug]id()
Supposedly calling setuid(getuid()) and setgid(getgid()) would
help pick up a new group list on some systems, in the depths
of history. In the absence of reason to believe this is still
the case, drop the calls to avoid scary warnings about unchecked
return values.
Change-Id: I39e87a27fb52f5a6868b867c9325d4a5fa93ef58
Reviewed-on: http://gerrit.openafs.org/11759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c6ec6410afdb21cc6f2ecdf0d36559dc8f0fc6cd
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Feb 9 10:38:04 2015 -0500
Avoid unsafe scanf("%s")
Reading user input into a fixed-length buffer just to check the
first character is silly and an easy buffer overrun. gcc on
Ubuntu 13.03 warns about the unchecked return value for scanf(),
but scanf("%s") is guaranteed to either succeed or get EOF/EINTR/etc..
In any case, we don't need to use scanf() at all, here -- reuse an
idiom from BSD cp(1) and loop around getchar to read the user's
response, eliminating the fixed-length buffer entirely. A separate
initial loop is needed to skip leading whitespace, which is done
implicitly by scanf().
Change-Id: Ic5ed65e80146aa3d08a4b03c213f748ef088156b
Reviewed-on: http://gerrit.openafs.org/11758
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 74ffe9bc78a898361bdcb3b97cb512bac338c62a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed May 27 16:13:13 2015 -0400
afs: Do not supply bogus poll vnodeops for FBSD
We currently provide one which just always returns 1, but the
kernel provides a vop_nopoll which conceptually is the same thing.
That one, however, provides some feature checks and fails when
consumers ask for fancy features that are not portable.
Change-Id: Iba03904aac2883e18a1abdd4f09289b6c6f907c0
Reviewed-on: http://gerrit.openafs.org/11882
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c19cadbf6a7b625f034f26245dcba225afc03aba
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Feb 6 14:15:11 2015 -0500
Ignore return values more harder
Building on Ubuntu 14.04 with gcc 4.8.2-19ubuntu1, we encounter
fatal warnings about unchecked return values in uss, which is
now always built, as of 00a33b26d74aa067086ddc340efb82184715857f.
Change-Id: I997dcb683e33902c2765121c70bdcf21e9d5e892
Reviewed-on: http://gerrit.openafs.org/11757
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 95b857399d71cb1f6619e625bff256f8c4c72c6a
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Apr 22 15:06:12 2015 -0300
Linux: mmap: Apply recursion check only to recursion cases
The CPageWrite flag was originally added to prevent a scenario
where a thread doing "writepage" would realize that the cache
was too full and that some of its contents need to be written
back to the server. Before writing back it would ask the OS to
flush any dirty VM associated with the vcache entries that are
to be written, to make sure the data is not stale. This flush
could itself trigger writeback, leading to deadly recursion.
One such scenario is a process doing mmap writes to a file larger
than the cache.
With some kernel versions and some callers of writepage, this
can cause the mapping to be marked as being in an error state,
leading to EIO errors passed back to user space.
Make the recursion check more specific to only bail when the
calling thread is one that was originally seen writing. A list
of current writers is maintained instead of a single state flag.
This lets other threads (like the flusher thread) go on with
writeback to the same file, and limits the WRITEPAGE_ACTIVATE
return case to call sites that can deal with it.
In testing this helps avoid EIO errors when writing large
chunks of data through mmap.
Thanks to Yadav Yadavendra for extensive analysis and testing.
Change-Id: Ic3136d7050c62e3ffac5e52441171f322b60fe86
Reviewed-on: http://gerrit.openafs.org/11124
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit cb0081604ef5369f34279c6eb77eb4d28406f2ac
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 23 21:26:14 2012 +0000
opr: Add new softsig implementation
Signals and pthreaded applications are a poor match. OpenAFS has had
the softsig system (currently in src/util/softsig.c) in an attempt to
alleviate some of these problems. However, that implementation itself
has a number of problems. It uses signal functions that are unsafe in
pthreaded applications, and uses pthread_kill within its signal
handlers. Over the years it has been responsible for a number of
portability bugs.
The old implementation continues to receive signals in the main thread
of the application. However, the handler code is run within a seperate
signal handler thread. When the main thread receives a signal a stub
handler is invoked, which simply pthread_kill()s the signal handler
thread.
The new implementation simplifies things by only receiving signals in
the handler thread. It uses only pthread-compatible signal functions,
and invokes no code from within async signal handlers.
A complete test suite is supplied.
Change-Id: I4bac68c2f853f1e7578b54ddced3833a97dd3f82
Reviewed-on: http://gerrit.openafs.org/6947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit b8648dbefb3968329d20cad8976ce15947428678
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed May 20 10:57:53 2015 -0400
afsio: switch BreakUpPath to strdup
The current version of BreakUpPath is slightly broken, since
commit 4e68282e26b0c4569d25d076d54274f0da47a691 -- it has two
output parameters but takes only one length parameter for the
size of the output buffers passed in. The callers ended up using
the shorter of the buffer lengths in question, so there is not
a risk of a buffer overrun, but long paths would not be properly
handled.
There is not really any need to pass in a length at all, since
what is going on is conceptually strdup, and there is no real
need to use strlcpy at all. Make the change from strlcpy to
str(n)dup, and adjust callers to free the outputs as appropriate.
While here, convert writeFile() to use goto and a cleanup handler
to avoid leaks.
Change-Id: Ib742cb73a6d70aa863c8d30423416887b977677b
Reviewed-on: http://gerrit.openafs.org/11874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 9076cbd58dd48801ad212f803f586fdc53d7b886
Author: Daria Brashear <shadow@gmail.com>
Date: Thu May 21 16:34:09 2015 -0400
Add defines for recent darwin sysctl constants
These were accidentally omitted from commit
ab9bb6363ca95f658764fbb9fb68ec88f89a5b3f.
Change-Id: Ic3374484eb79fe44a4032def1484c9ed733f9422
Reviewed-on: http://gerrit.openafs.org/11875
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5c1237432edf4600111845d175c92252430d5f76
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Apr 20 10:41:53 2015 -0300
Linux 4.1: Don't define or use ->write directly
We no longer have to define a ->write operation, and we can't
expect the underlying disk cache filesystem to have one. Use
the new __vfs_read/write helpers that will select the operation
to use based on what's available for that particular filesystem.
Change-Id: Iab923235308ff57348ffc2dc6d718dd64040656b
Reviewed-on: http://gerrit.openafs.org/11849
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fcfa5ae2468d878db962a93d6013fcd3042e6c13
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Apr 20 10:37:40 2015 -0300
Linux 4.1: No need for do_sync_read
Make the test here a bit more specific. do_sync_read no longer
exists, but we don't use it for new kernels. Trying to define it
here in terms of generic_file_read is not helpful as that doesn't
exist anymore.
Change-Id: Iffb059716165436c3439e66db15002cdec5dfc16
Reviewed-on: http://gerrit.openafs.org/11848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 810f0ccd0354dac30af024ca7b5acf3ebabf5f4b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Apr 22 13:43:43 2015 -0400
kauth: fix clock skew detection
Commit 5b3c1042969daec38ccb260e61d665eda0c713ea changed/removed some
uses of abs() on unsigned time values. While the previous use of abs()
was indeed incorrect, the result wasn't necessarily much better, even
though it built with recent compilers, since it only checked for skew
in one direction.
Define and use a macro to correctly evaluate the conditionals in 64-bit
precision, avoiding C's integer promotion rules which prefer unsigned types
(Date) to signed types of the same width (time_t on 32-bit systems).
Change-Id: Ifcbe59e73942a52a8635cb0f43cce94fdeea85a3
Reviewed-on: http://gerrit.openafs.org/11850
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit abca1fefc018e7f7ccc91ff31ada1d5e6d8076e0
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Wed Apr 22 09:58:48 2015 -0700
afsd: Update list of supported flags
afsd.c starts with a block comment listing the flags supported by the
afsd command. As the code has evolved this list has not been kept up
to date. Bring the list up to date. Some obsolete options no longer
have any backing code. These are marked OBSOLETE. Some obsolete
options have code that says they are now deprecated. These are
marked IGNORED.
Additionally fix a typo in backuptree's help text.
Change-Id: I90ddf4db826c891bf1daf6959f94feee17d35f78
Reviewed-on: http://gerrit.openafs.org/11857
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit df5f4925aa0f9f9e6e3b38f5804ad00e71a63d76
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 30 09:47:11 2015 -0400
libafs: remove extraneous solaris headers from afs_util.c
Remove several solaris specific headers from afs_util.c which are no
longer needed.
Change-Id: Id3874c90448215dc506b7ab9b5e695c2aeef50f3
Reviewed-on: http://gerrit.openafs.org/11856
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ab9bb6363ca95f658764fbb9fb68ec88f89a5b3f
Author: Daria Brashear <shadow@your-file-system.com>
Date: Thu Apr 16 13:12:05 2015 -0400
osx: update afssettings for yosemite
handle deprecated functions
Change-Id: I437ec88b7909c38af247f44d58599da8810a72f2
Reviewed-on: http://gerrit.openafs.org/11836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fda2bc874751ca479365dc6389c0eebb41a0bda1
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Mon Jun 17 21:08:14 2013 -0400
Allocate pathname buffers dynamically
This change reworks numerous places which formerly used potentially
large on-stack buffers (of size AFSDIR_PATH_MAX) for constructing or
storing pathnames. Instead, these buffers are now allocated from the
heap, either by using asprintf() to build a pathname in a correctly
sized buffer or, where necessary, using malloc() to allocate a buffer
of size AFSDIR_PATH_MAX.
A few occurrances of AFSDIR_PATH_MAX-sized buffers are not changed;
these are generally either globals or are contained within another
data structure that is already allocated on the heap.
[kaduk@mit.edu convert to cleanup-handler memory management where
appropriate]
Change-Id: Ib1986187a1c467e867d50280aaf1d8a86d9108c8
Reviewed-on: http://gerrit.openafs.org/9985
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6f1979c83a4357c82be2e011b79d993b21e545f9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Jan 14 15:32:47 2015 -0500
vol: use ffs from opr instead of inline
volume.c defined its own ffs() macro if AFS_HAVE_FFS was not
defined. Now that ffs() is in opr, just use it from there always.
Change-Id: Ia80a439924541be236b3221b9480143b511c885a
Reviewed-on: http://gerrit.openafs.org/11674
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ec706b21530240d7fb66bad2f08513eff8f7c335
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Apr 13 12:05:12 2015 -0400
Remove Linux 2.4 compat from RedHat packaging
You can't package what you can't build.
Change-Id: Ife3a46dfa1fee72b36d0f1fb21d82928aa8d83b6
Reviewed-on: http://gerrit.openafs.org/11833
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit d457769173753a73c3f767294743ab486ed1d3e5
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:36:26 2015 -0400
Remove linux24 conditionals from mcas/Makefile.osi
Linux 2.4 has been desupported by OpenAFS.
Change-Id: I7803d718ca9d2760a799f1ac2c438f8e6df8b9b9
Reviewed-on: http://gerrit.openafs.org/11806
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit b3ad01ec0c091d43976061cb575224fc64aba6ee
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:34:49 2015 -0400
Remove stale MakefileProto.LINUX.in conditionals
Linux 2.4 and older are no longer supported; there's no need to
keep the noise in this file.
Change-Id: Ia1a968e0cdc1180e66bdedd0aa0638eadfd897fb
Reviewed-on: http://gerrit.openafs.org/11805
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit 763a18f488a5d5677bb2f742c7b0b9a2b9d90409
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:23:43 2015 -0400
Remove LINUX24 from src/rx
These files are no longer used.
Change-Id: Iebf85590e18c2542663ebdd279b126a3ab058213
Reviewed-on: http://gerrit.openafs.org/11803
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit 91713206b0c414c82992fc3bb18da36995ae83c0
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:23:16 2015 -0400
Remove LINUX24 from src/afs
These files are no longer used.
Change-Id: I4a7e0cc8c308399004c999b3769c77388794cfdd
Reviewed-on: http://gerrit.openafs.org/11802
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit 83a27da150dd164f9f7afbb29163431c89a504bc
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:20:07 2015 -0400
Remove linux22 and linux24 param files
They are no longer used.
Change-Id: I1337bf0e1239336e7ae39f88f484cb8237002302
Reviewed-on: http://gerrit.openafs.org/11801
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit 7a998206127e03e48837380063566a464321604b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:17:59 2015 -0400
Remove osconf conditionals for linux24
They are no longer triggerable now that linux 2.4 is desupported,
so make the code easier to read.
Change-Id: I77b48d30db66b635cfdc06e977f9884dd2825713
Reviewed-on: http://gerrit.openafs.org/11800
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit ccf353ede6ef5cce7c562993d1bea0d20844bdb7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 13:11:44 2015 -0400
Mark Linux 2.4 as unsupported
The Linux 2.4 series (and older) will not be supported platforms
for OpenAFS 1.8 and later. Detect these systems at configure time
and direct users of those systems to the OpenAFS 1.6 series of releases.
These systems are believed to not be in common use with OpenAFS,
and retaining support for the LinuxThreads threading implementation
they require presents a maintenance burden that the project is
not equipped to deliver. The project will be able to move forward
more quickly by desupporting these systems.
Code conditional on these old systems can be removed in subsequent
commits.
Change-Id: I679fc2390b35851f3b0457a846047c812bc03dba
Reviewed-on: http://gerrit.openafs.org/11799
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Daria Brashear <shadow@your-file-system.com>
commit 6c62237ecd80077b0a72b24fec5db20b623eb897
Author: Ben Kaduk <kaduk@mit.edu>
Date: Thu Feb 12 16:01:28 2015 -0500
aklog: swap order of roken and hcrypto
hcrypto depends on roken, so roken must come after it.
Change-Id: Ic63de1f9095555a6c3e83f2f6d2f9d024ad00006
Reviewed-on: http://gerrit.openafs.org/11743
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d1d411576cf39c4bc55918df0eb64327718d566c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Nov 17 11:23:38 2014 -0500
vos: remaddrs sub-command
Introduce the vos remaddrs sub-command for removing multi-homed server
entries from the vldb. The remaddrs sub-command completes the listaddrs
and setaddrs command suite and allows vos changeaddr to be deprecated
completely.
Change-Id: I98e92e776a153591a617a5b04037c3b6139d4732
Reviewed-on: http://gerrit.openafs.org/11606
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 25373555f838ec7f9a7a1625e66c7d83108a62f2
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 18 10:35:33 2015 -0400
Do not redeclare mutexes for darwin
Partially revert commit e2e93aa8920c0b1bfc672a555a59eb4e15dbeaae,
which added local declarations for des_init_mutex, des_random_mutex,
and rxkad_random_mutex to a number of files in libadmin, apparently
to fix the build on macos 10.3. That OS is long EoL-ed, and
more recent versions of OS X include toolchains that do not
need these extra declarations. In particular, the extra declarations
can be harmful when these files start to pull in more symbols
from our libraries (e.g., libafscp), since the details of the
linking process can cause that to generate duplicate symbol errors.
There is no longer any need to have local declarations of these
symbols for OS X, so just remove them.
Change-Id: Ie152387b4bd16b470054821fc8ddf852e1a4285c
Reviewed-on: http://gerrit.openafs.org/11798
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 777870da86e9ed66756e01e858a54e959959482d
Author: Nathan Dobson <ndobson@andrew.cmu.edu>
Date: Fri Mar 20 18:32:22 2015 -0400
aklog: Correct size used for strlcpy()
When copying into the 'cell' array, use the size of cell, not
the size of some other array that is copied into a few lines previously.
Change-Id: Ib8b523901dd8008038c5a95a7c315b899cff8cee
Reviewed-on: http://gerrit.openafs.org/11807
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7ae8e64d1ee79c23da96c326111fdc40015ed5a6
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Feb 9 18:16:16 2015 -0500
pioctl.c: restore required result variable
Commit b9fb9c62a6779aa997259ddf2a83a90b08e04d5f refactored lpioctl()
so that LINUX would have its own implementation. This also simplified
the other lpioctl() implementations by removing superfluous variable
'rval'.
Unfortunately, 'rval' was actually required for both DARWIN and SUN511.
On both of these platforms, the address of 'errcode' is passed
to the respective ioctl_*() routine so its value may be passed back
to lpioctl(). Therefore, 'errcode' must not also be used for the
return value from these functions; doing so results in the return
value from the function overwriting the intended value of 'errcode' upon
return to lpioctl().
In the case of Solaris 11, ioctl_sun_afs_syscall() always returns zero
(as long as the ioctl device 'dev/afs' opened successfully).
So 'errcode' was always being set to zero, even if the pioctl had
actually failed. For example, without this fix, 'fs listcells'
loops forever on Solaris 11, listing an infinite number of "cells",
because it will never "see" the EDOM that informs it of the last defined
cell.
Partially revert b9fb9c62a6779aa997259ddf2a83a90b08e04d5f by restoring
the 'rval' variable and logic for DARWIN and SUN511.
Change-Id: I4407af29d54813689cf8ccf2517bb2df4dd8eb25
Reviewed-on: http://gerrit.openafs.org/11734
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 026fcc6f975dbc13ac39d3276d28a48a9b56ee7d
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Thu Feb 5 12:07:50 2015 +0100
bos, pts: emit error messages on stderr
as one expects.
Change-Id: Icb67a05b61ddcef8def826768491b9a1952862e9
Reviewed-on: http://gerrit.openafs.org/11605
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c73d151853a80806247126730a0ffbd984508559
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Feb 11 19:02:00 2015 -0500
Namespace-clean some more heimdal symbols
We get linker conflicts if we try to statically link against the
system libkrb5 when it is heimdal, from both hcrypto and rfc3961.
While here, add an include guard to hcrypto's config.h.
Change-Id: Ib5fcd9291b295415325a4ed230bd35d496961367
Reviewed-on: http://gerrit.openafs.org/11740
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5b3c1042969daec38ccb260e61d665eda0c713ea
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Feb 13 09:47:20 2015 -0500
Fix incorrect uses of abs()
abs(3) is a function of one variable of type int returning int.
labs(3) is a function of one variable of type long returning long.
labs(3) should be used when the input is of type long, as in
kaprocs.c.
Calling anything from the abs(3) family on a variable of unsigned
type is a bogus type pun, and a logical operation which is a no-op.
(Unsigned values are never negative and thus the absolute value
function is the identity over the entire range of values representable
in an unsigned type.) Just remove the use of abs() for unsigned
values, as in kaprocs.c, krb_udp.c, and vldb_check.c
While in kaprocs.c, wrap a long line that was touched for the
conversion to labs(3), spell the argument to time(3) as NULL
instead of 0, remove unneeded parentheses, and correct the spelling
of "reserved".
Change-Id: I0897b250fd885a1230d1622015eec9afe3450b46
Reviewed-on: http://gerrit.openafs.org/11745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit fb499c2406450fa5dc423a0b038266d3b8e79e33
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Feb 11 17:47:10 2015 -0500
Remove spurious NULL checks
clang 3.5 is more aggressive about these checks than the previous
FreeBSD system compiler, so new warnings (which became errors)
appeared on FreeBSD 11-CURRENT.
In afs_dcache.c, checking &tdc->f for NULL-ness has no effect.
The struct fcache f member of struct dcache is an ordinary structure
element; its address will be the value of tdc plus the offset of
f within struct dcache, which will not be NULL even if tdc is NULL.
In ubik_db_if.c, udbHandle is a file-scope global and thus has
allocated storage; the address of a member variable will never
be NULL. The 0 it was compared against was spelled RX_SECIDX_NULL,
which shows the intended check, which is for the value of the
uh_scIndex member variable, not its address.
In afscp_server.c, srv->conns can never be NULL since conns is a member
variable of struct afscp_server (of array type, containing pointers
to struct rx_connection). Comparing the array member variable against
NULL is comparing the address of the array, which is never NULL since
it is not allocated separately from struct afscp_server.
In fssync-debug.c, state.vop->partName is never NULL because
common_volop_prolog always allocates for state.vop, and the
partName member variable of struct fssync_state is of array type,
and thus is not separately allocated from the containing structure.
Change-Id: I03e1332d8a3320f1a4d303b444985648a207116e
Reviewed-on: http://gerrit.openafs.org/11739
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8cb4a42496f71c3d47ebe30a96ec33478e203c82
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Feb 26 10:13:50 2015 +0100
Update CellServDB to 20150119 snapshot
Update all remaining copies of CellServDB in the tree, and make the
Red Hat packaging use it by default too.
Change-Id: Id915a82b1364ef6e301921e4d3873c7203aef91c
Reviewed-on: http://gerrit.openafs.org/11764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 1cc77cd43732cca1c617db329a71693903d2b699
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Dec 16 16:13:01 2014 -0500
vlserver: do not perform ChangeAddr on mh entries, except for removal
Fix a long standing bug in the ChangeAddr RPC which damages the vldb,
When vos changeaddr is run with -oldaddr and -newaddr, and the -oldaddr
is present in an multi-homed entry, instead of changing the address in
the mh entry, the server slot is "downgraded" to a single homed entry
and the mh entry is orphaned in the vldb.
Instead, if the -oldaddr is in a multi-home entry, refuse to change the
address with a VL entry not found error and log the event.
Multi-homed addresses can be changed manually using the vos setaddrs
command which calls the RegisterAddrs() RPC.
Change-Id: I20ba3e7fa5ffdb1b1abd2e2a716d8e4bb6594542
Reviewed-on: http://gerrit.openafs.org/11639
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 30667a5d7b86b29f9aafe2b490d89b8e01bfc541
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 11 01:25:04 2015 -0500
ubik: DISK_UpdateInterfaceAddr == server restart
If a DISK_UpdateInterfaceAddr RPC is received the server that sent
it restarted. Force the urecovery code to verify the server state.
Change-Id: I465863dc3a52d844b56d576bd55229435556cfd6
Reviewed-on: http://gerrit.openafs.org/11738
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d47beca13236c64ed935fabeff9d1001e8a8871f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 22 01:14:28 2015 -0500
ubik: SDISK_Begin no quorum, wrong db, no transaction
When processing an DISK_Begin RPC verify that there is an active quorum
and that the local database is current. Otherwise, fail the RPC with
a UNOQUORUM error.
The returned error must be UNOQUORUM instead of USYNC becase the returned
error code will be returned by the coordinator's ContactQuorum_iterate()
to the client that triggered the write transaction. Most ubik clients
will only retry if the error is UNOQUORUM.
FIXES 131997
Change-Id: Icaa30e6aca82e7e7d33e9171a4f023970aba61df
Reviewed-on: http://gerrit.openafs.org/11689
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5cca05d1a1c9883e33c953b31c4cb32252474f77
Author: Anders Kaseorg <andersk@mit.edu>
Date: Mon Feb 23 00:13:05 2015 -0500
Linux 4: struct address_space no longer has backing_dev_info
The backing_dev_info is only stored in the super_block now.
Change-Id: I57e147100bd47a8d1f5e97224ceb3322ea102a48
Reviewed-on: http://gerrit.openafs.org/11756
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a5b091e1ec69d4a43d6f1b1efc93134ef7ed2167
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sun Feb 22 23:43:49 2015 -0500
Treat Linux 4 (and greater) as Linux 2.6/3
In an age where Linux version numbers are determined by Google+ polls,
it’s clear that they aren’t going to be very useful for marking major
API compatibility boundaries like they were in the days of 2.2/2.4.
Change-Id: I56e0e88eb178573c3eb280d5a5a01d8b8a20a363
Reviewed-on: http://gerrit.openafs.org/11755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e02b852f05c0927d48b6467872378bae99df2760
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Tue Feb 17 15:34:33 2015 +0100
Document --enable-linux-d_splice_alias-extra-iput
Even though we hope no one will actually ever need to use it, explain
this configure switch in the same place as the others.
Change-Id: Ib59f963b9000c3e66dc84c7b18eb220f0e108bd5
Reviewed-on: http://gerrit.openafs.org/11749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 7266685a03b12ca03c247623e7ffdc054a017382
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 29 12:14:24 2014 -0400
vos: preserve cloneId and backupId when restoring
Preserve the volume clone and backup ids in the volume header when
restoring over an existing volume, instead of always setting the clone
and backup ids to zero.
For example, before this change, restoring over a volume resets the
ROnly and Backup ids reported in the volume header section of vos
examine.
$ vos examine xyzzy
xyzzy 536871023 RW 3 K On-line
myhost /vicepa
RWrite 536871023 ROnly 536871024 Backup 536871025
...
RWrite: 536871023 ROnly: 536871024 Backup: 536871025
number of sites -> 2
server myhost partition /vicepa RW Site
server myhost partition /vicepa RO Site
$ cat /tmp/xyzzy.dump | vos restore myhost a xyzzy -overwrite incremental
Restoring volume xyzzy Id 536871023 on server myhost partition /vicepa .. done
Restored volume xyzzy on myhost /vicepa
$ vos examine xyzzy
xyzzy 536871023 RW 3 K On-line
myhost /vicepa
RWrite 536871023 ROnly 0 Backup 0
...
RWrite: 536871023 ROnly: 536871024 Backup: 536871025
number of sites -> 2
server myhost partition /vicepa RW Site
server myhost partition /vicepa RO Site
Change-Id: If7ffcf84a983046c10d9d215d672a6a1ba1f9400
Reviewed-on: http://gerrit.openafs.org/11516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 34e495d69a8831c57cac2ccf18898e63f02c7745
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Dec 10 14:07:14 2014 -0500
Handle backupDate of zero
In older versions of OpenAFS (prior to 2001), the backupDate was
never set. Try to provide somewhat more reasonable behavior in
this case, by using a different date in that case.
Change-Id: Id74ce003c6a2317b06e78ba64d6891229c16421a
Reviewed-on: http://gerrit.openafs.org/11627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d14ad1374d39693d8a44c75f4d95607a45b260d2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 13:38:01 2014 -0600
libafscp: Remove comment with dead code
You're not supposed to write the length of the submitted data on the
split rx stream for a StoreData operation; the fileserver knows how
much data to read from the "Length" parameter of the StoreData RPC.
For a FetchData, putting the data length over the split rx stream is
required, since we can't get the "OUT" arguments before reading the
file data. But for a StoreData, this is unnecessary, since the length
is right there in the arguments.
So just get rid of this commented-out code; it's clearly wrong and
this commit explains why.
Change-Id: Idde0f9079e90da75d71a142f4a9f36a84ce79776
Reviewed-on: http://gerrit.openafs.org/10786
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d309b193671a85c118e75c82171144c52ad1c48c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 00:02:24 2014 -0600
rx: Set lastBusy on RX_CALL_TIMEOUT
Currently, if a server RPC hangs forever, the client call will error
out with RX_CALL_TIMEOUT (if idle/dead timeouts are configured). If we
later try to make a new call on that conn, the server will respond
with BUSY packets, and we'll have to wait until we RX_CALL_TIMEOUT
again. After that we'll set lastBusy and avoid the call channel, but
that extra delay with the BUSY packets is avoidable.
So, avoid this extra delay by setting lastBusy when we kill a call
with RX_CALL_TIMEOUT, so a future rx_NewCall will avoid the call
channel. It makes sense to set lastBusy here, since the call channel
is more likely to be busy than the other call channels.
Change-Id: Iadf77f52ae418491e3108a4b0b5388361f2424aa
Reviewed-on: http://gerrit.openafs.org/10785
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 28f9712b4b1c615e5d0b565fbcaa828b559bff4a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 00:40:57 2014 -0600
rx: Remove RX_CALL_BUSY
Commit 23d6287f7f494383891a497038e8c0e870e824bf introduced the
behavior where a client can immediately retry a call if it receives a
"busy" packet from the server (meaning, the call channel is already in
use). This happened via Rx returning the error code RX_CALL_BUSY, and
the caller was supposed to immediately retry the call, so Rx could
reissue the RPC on a different call channel.
However, this behavior makes it more likely for the server to process
an RPC that the client thinks has not been processed. Say the client
issues an RPC, the server replies with a "busy" packet, and the client
resends the original packet before it sees the "busy" packet. In
this case, the server will get the resent packet for the RPC request
and process it, but the client will think the call has failed (and
presumably will retry the call on a new channel). For calls that are
non-idempotent (e.g. MakeDir), this can result in incorrect errors
(e.g. EEXIST) as well as incorrect cache state in the client.
There may be some ways to mitigate at least some of the problems here,
but this kind of "instant" retry behavior is often not really that
helpful. Calls that take a very long time to run on the server are
very rare (and usually indicate some other problem), while the
occasional short-lived "busy" packet is relatively common (sometimes
the server just hasn't cleaned up the call by the time we issue a new
call). So just get rid of the retrying behavior to ensure we don't
continue to encounter any problems like this.
To get rid of this behavior, we remove the RX_CALL_BUSY code, and all
code dealing with processing it. This means removing the RX_CALL_BUSY
handling from the client, as well as removing
rx_SetBusyChannelError(). This effectively reverts most of
23d6287f7f494383891a497038e8c0e870e824bf, and a few other commits
related to RX_CALL_BUSY.
With this change, if all we get from the server are BUSY packets when
we try to issue an RPC, the call will eventually error out with
RX_CALL_TIMEOUT (or hang forever, if no timeouts are configured). This
can be thought of intuitively as similar to "idle dead" behavior,
since we are just waiting for the server to proceed with processing
the call. So, if "idle dead" is configured, we still timeout after the
"idle dead" timeout. And if no idle or hard dead timeout is
configured, we will hang forever; just like if the server started
processing the call but then hangs forever.
Note that not all of 23d6287f7f494383891a497038e8c0e870e824bf is
reverted. Namely, the logic to have rx_NewCall try to pick the "least
busy" channel is retained.
Thanks to Simon Wilkinson for bringing up and discussing this issue in
this thread:
<http://thread.gmane.org/gmane.comp.file-systems.openafs.devel/10931>
<https://lists.openafs.org/pipermail/openafs-devel/2013-April/019297.html>
Change-Id: I272e51f252356aa14bc4b8a3b7c594700deb432c
Reviewed-on: http://gerrit.openafs.org/10784
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0f339711ebf7b7a76e299f9ab9ee74264bedb0d2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 00:39:39 2014 -0600
rx: Remove RX_CALL_IDLE
After change Ie0497d24f1bf4ad7d30ab59061f96c3298f47d17, RX_CALL_IDLE
is not generated by Rx anymore; "idle dead" timeouts just cause
RX_CALL_TIMEOUT errors. Any code dealing with it is thus now dead code
(this value was deliberately never sent over the wire), so remove the
dead code.
Change-Id: I2b38327f77ffc8168712b83506afa1da3eea1224
Reviewed-on: http://gerrit.openafs.org/10783
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 846f2c8eae4968d1c400d18ec66ca1daf5fdef02
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 00:36:22 2014 -0600
rx: Remove idleDeadDetection
After change Ie0497d24f1bf4ad7d30ab59061f96c3298f47d17,
testing for idleDeadDetection is equivalent to testing if idleDeadTime
is non-zero. The idleDeadDetection field is thus redundant, so remove
it.
Change-Id: Id11f2829167f4de1505cee286dcc7c56b431a5a6
Reviewed-on: http://gerrit.openafs.org/10782
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7acac948fcda0e772326a26ad24481ccf1ae31ef
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jan 27 00:36:14 2014 -0600
rx: Rely on remote startWait idleness for idleDead
This commit removes the functionality introduced in
c26dc0e6aaefedc55ed5c35a5744b5c01ba39ea1 (which is also modified by a
few later commits), as well as
05f3a0d1e0359f604cc6162708f3f381eabcd1d7. Instead we modify the
startWait check in rxi_CheckCall to apply to both "reading" and
"writing" to enforce "idle dead" timeouts.
Why do this? First, let's start out with the following:
If an Rx call gets permanently "stuck", what happens? What should
happen?
Here, "stuck" means that either the server or client hangs while
processing the call. The server or client is waiting for something to
complete before it issues the next rx_Read() or rx_Write() call. In
various situations over the years, this has happened because the
server or client is waiting for a lock, waiting for local disk I/O to
complete, or waiting for some other arbitrary event to occur.
Currently, what happens with such a "hanging" call is a little
complex, and has several different results in different situations.
The behavior of a call in this "stuck" situation is handled by the
"idle dead" timeout of an Rx call/connection. This timeout is enforced
in rxi_CheckCall, in two different conditionals (if an "idle dead"
timeout is configured):
if (call->startWait && ((call->startWait + idleDeadTime) < now) &&
(call->flags & RX_CALL_READER_WAIT)) {
if (call->state == RX_STATE_ACTIVE) {
cerror = RX_CALL_TIMEOUT;
goto mtuout;
}
}
and
if (call->lastSendData && ((call->lastSendData + idleDeadTime) < now)) {
if (call->state == RX_STATE_ACTIVE) {
cerror = conn->service ? conn->service->idleDeadErr : RX_CALL_IDLE;
idle_timeout = 1;
goto mtuout;
}
}
The first of these handles the case where we are waiting to rx_Read()
from a call for too long (the other side of the call needs to give us
more data). The second handles the case where we are waiting to
rx_Write() for too long (the other side of the call needs to read some
of the data we sent previously).
This second case was added by commit
c26dc0e6aaefedc55ed5c35a5744b5c01ba39ea1, but it has the general
problem that this check does not check if anyone is actually trying to
write to the call, and just tries to keep track of the last time we
wrote to the call. So, we may have written some data to the call
successfully, and then we went off to do something else. We can then
kill the call later for taking too long to write to, even though
nobody is trying to write to it. This results in a few problems:
(1) When the fileserver is writing to the client, it may need to wait
for various locks and it may need to wait for local disk I/O to
complete. If this takes too long for any reason, the fileserver
will kill the call (currently with VNOSERVICE), but the thread
for servicing the call will still keep running until whatever the
fileserver was waiting for finishes.
(2) lastSendData is set whenever we send any ACK besides an
RX_ACK_PING_RESPONSE (as of commit
658d2f47281306dfd46c5eddcecaeadc3e3e7fa9). If we are the server,
and we send any such ACK (in particular, RX_ACK_REQUESTED is
common), the "idle dead" timer starts. This means the server can
easily kill a call for idleness even if the server has never sent
the client anything, and even if the server is still actively
reading from the client.
(3) When a client tries to issue an RPC for the server, the "idle
dead" timeout effectively becomes a hard dead timeout, since we
will write the RPC arguments to the Rx stream, and then wait for
the server to respond with the output arguments. During this
time, our 'lastSendData' is the last time we sent our arguments
to the server, and so the call must finish before
'call->lastSendData + idleDeadTime' is in the past.
In addition to this "idle dead" processing, commit
05f3a0d1e0359f604cc6162708f3f381eabcd1d7 appears to attempt to provide
"idle dead"-like behavior by disabling Rx keepalives at certain points
(when we're waiting for disk I/O), controlled by the application
process (currently only the fileserver). The idea is that if
keepalives are disabled, the server will just appear unreachable to
the client, and so if disk I/O takes too long, the client will just
kill the call because it looks like the server is gone. However, this
also has some problems:
(A) Clients send their own keepalives, and the server will still
respond to them. So, the server will not appear to be
inaccessible anyway. But even if it did work:
(B) This approach only accounts for delays in disk I/O, and not
anywhere else (we could hang for a wide variety of reasons). It
also requires the fileserver to decide when it's okay for a call
to be killed due to "idle dead" and when it's not, which
currently seems to be decided somewhat arbitrarily.
(C) This doesn't really let the client dictate its own "idle dead"
timeout for idleness specifically; it just looks like the server
went away.
(D) The fileserver would appear to be unreachable in this situation,
but it's not actually unreachable. This can be confusing to
clients, since distinguishing between a server that is completely
down vs just taking too long is an important distinction.
(E) As noted in (1) above, the fileserver thread will still keep
waiting for whatever it has been waiting for, even though the
call has been killed and is thus useless.
So instead of all of this stuff, just modify the rxi_CheckCall "idle
dead" check to depend on the call->startWait parameter instead. This
parameter will be set whenever anyone is waiting for something to
proceed in the call, whether that is waiting to read data or write
data. This should make "idle dead" processing much simpler, as it is
reduced to effectively: if we've been waiting for longer than N
seconds, kill the call.
This involves ripping out much of the code related to lastSendData and
rx_KeepAlive*. This means removing the call->lastSendData field and
the rx_SetServerIdleDeadErr function, since those were only used for
the behavior in c26dc0e6aaefedc55ed5c35a5744b5c01ba39ea1. This also
means removing rx_KeepAliveOn and rx_KeepAliveOff, since those were
only used for the behavior in
05f3a0d1e0359f604cc6162708f3f381eabcd1d7. This commit also removes the
only known use of the VNOSERVICE error code, so add some comments
saying what this code was used for (especially since it is quite
different from other V* error codes).
Note that the behavior in (1) could actually be desirable in some
situations. In environments that have clients without "idle dead"
functionality, and those clients cannot be upgraded or reconfigured,
this commit means those clients may hang forever if the server hangs
forever. Some sites may want the fileserver to be able to kill such
hanging calls, so the client will not hang (even if it doesn't free up
the fileserver thread). However, such behavior should really be a
special case for such sites, and not be the default behavior (or only
behavior) for all sites. The fileserver should just be concerned with
maintaining its own threads and availability, and clients should
manage their own timeouts and handle hanging servers.
Thanks to Markus Koeberl, who originally brought attention to some of
the problematic behavior here, and helped investigate what was going
on in the fileserver.
Change-Id: Ie0497d24f1bf4ad7d30ab59061f96c3298f47d17
Reviewed-on: http://gerrit.openafs.org/10773
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1f2818192fef9bd2707068414e8800dfc56b681e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 10 02:36:03 2015 -0500
Windows: Fake status info on EACCES
When enumerating a directory if status info for an entry cannot be
obtained, fake it. Do not return STATUS_ACCESS_DENIED to the redirector
as that will be interpreted as the directory not being listable.
Change-Id: I488f5d8d244c363135e00e156a685cd56fd060c8
Reviewed-on: http://gerrit.openafs.org/11736
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0008ca80a873975e042993b30cbdc47d8f8f116b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 22 19:48:32 2015 -0500
Windows: foo.backup -> foo.backup too many symlinks
In the case where an explicit mount point to a .backup volume is
resolved from a .backup volume the cache manager refuses to evaluate
the mount point target. This is meant to address unwanted recursion
in the directory tree searches.
Change the error code to ERROR_TOO_MANY_SYMLINKS and propagate that
error to the AFS redirector. That will result in the application
receiving STATUS_ACCESS_DENIED instead of
STATUS_REPARSE_POINT_NOT_RESOLVED.
The STATUS_REPARSE_POINT_NOT_RESOLVED error causes cmd.exe and
powershell.exe to terminate recursive directory searches.
Change-Id: I5dfdd835e8696b823af45a8e5c33a5ca6320cf31
Reviewed-on: http://gerrit.openafs.org/11693
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 73cad3be0a3489237ab7e66d3b12c52ffb0b67d0
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Sun Jun 16 16:28:22 2013 -0400
Ignore return values harder
In various places where we intentionally ignore the return values of system
calls and standard library routines, this changes the way in which we do so,
to avoid compiler warnings when building on Ubuntu 12.10, with gcc 4.7.2 and
eglibc 2.15-0ubuntu20.1.
Change-Id: I41f806a686d68b02aec2847886bd5d787cbff3d3
Reviewed-on: http://gerrit.openafs.org/9980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a762e6871ad6837ee126cec9e63d99388b4bf119
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Feb 4 10:25:38 2015 -0600
rx: Zero unitialized uio structs
We use some uio structures that were allocated on the stack, but we
only initialize them by initializing individual fields. On some
platforms (Solaris is one known example, but probably not the only
one), there are additional fields we do not initialize. Since we
cannot be certain of what any additional fields there may be, just
zero the whole thing.
This is basically the same change as
I0eae0b49a70aee19f3a9ec118b03cfb3a6bd03a3, but in the rx subtree.
Change-Id: I400144143bb1f47409eccb931daacc8a5058e074
Reviewed-on: http://gerrit.openafs.org/11711
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit c16ec571273b03e9d4f4905efdeaa2182bbe0c6a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Nov 5 14:26:36 2014 -0500
Deorbit AIX-specific QuickStartGuide bits
Although there are still servers deployed on AIX systems,
there may not be any clients in use, and it is unlikely that
there will be new deployments which require this documentation.
Change-Id: Id6554e120cb01c5d4de5c7de67e74e802b7ea217
Reviewed-on: http://gerrit.openafs.org/11592
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ca66b1aff35b31a944679656ca71546768c91c47
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Nov 5 14:26:36 2014 -0500
Deorbit HP-UX-specific QuickStartGuide bits
Get the rest of them all at once.
Change-Id: Idb33746d43a4a1a9f41e21d7f6d81360ecdd952e
Reviewed-on: http://gerrit.openafs.org/11591
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 69e84bd8a2ccc6065c3a06b7239c855207b92e4d
Author: Daria Brashear <shadow@your-file-system.com>
Date: Wed Jan 14 10:22:25 2015 -0500
LINUX: ensure mvid is set on root vnodes
it shoudn't happen that we aren't setting mvid on root vnodes,
so assert so we notice if the invariant is violated
Change-Id: I32c8aa4dced8751d11817d74508b87ff44261837
Reviewed-on: http://gerrit.openafs.org/11669
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 31e4a030f58f7ecb0cbc4236cab3d7cc25f29ccb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 22 19:36:59 2015 -0500
afs: refactor afs_linux_dentry_revalidate
No functional change. Separate the
if (locked && vcp->mvstat == 1) { ... }
conditional into
if (locked) {
if (vcp->mvstat == 1) { ... }
}
in preparation for another change.
Change-Id: I1fe42ed7771882ce365d9359a4e6187c283592a8
Reviewed-on: http://gerrit.openafs.org/11692
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 381c7afbe60a0e6d53e8cc1bca2de920574b3383
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 21 14:58:35 2015 -0500
bozo: do not exit when the client config already exists
The bosserver creates symlinks for the client CSDB and ThisCell config
files during initialization. Avoid exiting if the client CSDB or
ThisCell configuration already exists, otherwise the bosserver cannot be
restarted with bos restart.
This fixes an error introduced with commit
720363fa9bf7cfbebdc485104b74ca6bac1895f6, Fix unchecked return values.
Change-Id: Ie6ecf126d1ed663f161c26da2a8c4d568369d99d
Reviewed-on: http://gerrit.openafs.org/11684
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d908845831ec6d6f641b06926b6724bd4818043c
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Mon Jan 19 19:35:41 2015 -0800
doc: backup manpage fix
While reviewing gerrit 11678 I noticed the -n flag was
duplicated. Remove the duplicate flag.
Change-Id: I4a63a50199e1564a0b0394445e9dc1569bb08a0c
Reviewed-on: http://gerrit.openafs.org/11688
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5ef1de5eddccce0e7b135bb9ed4decaa62fc19ce
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 30 13:29:57 2015 -0600
afs: Zero uninitialized uio structs
In several places in the code, we allocate a 'struct uio' on the
stack, or allocate one from non-zeroed memory. In most of these
places, we initialize the structure by assigning individual fields to
certain values. However, this leaves any remaining fields assigned to
random garbage, if there are any additional fields in the struct uio
that we don't know about.
One such platform is Solaris, which has a field called uio_extflg,
which exists in Solaris 11, Solaris 10, and possibly further back.
One of the flags defined for this field in Solaris 11 is UIO_XUIO,
which indicates that the structure is actually an xuio_t, which is
larger than a normal uio_t and contains additional fields. So when we
allocate a uio on the stack without initializing it, it can randomly
appear to be an xuio_t, depending on what garbage was on the stack at
the time. An xuio_t is a kind of extensible structure, which is used
for things like async I/O or DMA, that kind of thing.
One of the places we make use of such a uio_t is in afs_ustrategy,
which we go through for cache reads and writes on most Unix platforms
(but not Linux). When handling a read (reading from the disk cache
into a mapped page), a copy of our stack-allocated uio eventually gets
passed to VOP_READ. So VOP_READ for the cache filesystem will randomly
interpret our uio_t as an xuio_t.
In many scenarios, this (amazingly) does not cause any problems, since
generally, Solaris code will not notice if something is flagged as an
xuio_t, unless it is specifically written to handle specific xuio_t
types. ZFS is one of the apparent few filesystem implementations that
can handle xuio_t's, and will detect and specially handle a
UIOTYPE_ZEROCOPY xuio_t differently than a regular uio_t.
If ZFS gets a UIOTYPE_ZEROCOPY xuio_t, it appears to ignore the uio
buffers passed in, and supplies its own buffers from its cache. This
means that our VOP_READ request will return success, and act like it
serviced the read just fine. However, the actual buffer that we passed
in will remain untouched, and so we will return the page to the VFS
filled with garbage data.
The way this typically manifests is that seemingly random pages will
contain random data. This seems to happen very rarely, though it may
not always be obvious what is going on when this occurs.
It is also worth noting that the above description on Solaris only
happens with Solaris 11 and newer, and only with a ZFS disk cache.
Anything older than Solaris 11 does not have the xuio_t framework
(though other uio_extflg values can cause performance degradations),
and all known non-ZFS local disk filesystems do not interpret special
xuio_t structures (networked filesystems might have xuio_t handling,
but they shouldn't be used for a cache).
Bugs similar to this may also exist on other Unix clients, but at
least this specific scenario should not occur on Linux (since we don't
use afs_ustrategy), and newer Darwin (since we get a uio allocated for
us).
To fix this, zero out the entire uio structure before we use it, for
all instances where we allocate a uio from the stack or from
non-zeroed memory. Also zero out the accompanying iovec in many
places, just to be safe. Some of these may not actually need to be
zeroed (since we do actually initialize the whole thing, or a platform
doesn't have any additional unknown uio fields), but it seems
worthwhile to err on the side of caution.
Thanks to Oracle for their assistance on this issue, and thanks to the
organization experiencing this issue for their patience and
persistence.
Change-Id: I0eae0b49a70aee19f3a9ec118b03cfb3a6bd03a3
Reviewed-on: http://gerrit.openafs.org/11705
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit b9647ac1062509d6a3997ca575ab1542d04677a2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 30 13:08:19 2015 -0600
SOLARIS: Avoid uninitialized caller_context_t
Currently we pass a caller_context_t* to some of Solaris' VFS
functions (VOP_SETATTR, VOP_READ, VOP_WRITE, VOP_RWLOCK,
VOP_RWUNLOCK), but the pointer we pass is to uninitialized memory.
This code was added in commit 51d76681, and this particular argument
is mentioned in
<https://lists.openafs.org/pipermail/openafs-info/2004-March/012657.html>,
where the author doesn't really know what the argument is for.
Over 10 years later, it's still not obvious what this argument does,
since I cannot find any documentation for it. However, browsing
publicly-available Illumos/OpenSolaris source suggests this is used
for things like non-blocking operations for network filesystems, and
is only interpreted by certain filesystems in certain codepaths.
In any case, it's clear that we're not supposed to be passing in an
uninitialized structure, since the struct has actual members that are
sometimes interpreted by lower levels. Other callers in
Illumos/OpenSolaris source seem to just pass NULL here if they don't
need any special behavior. So, just pass NULL.
I am not aware of any issues caused by passing in this uninitialized
struct, and browsing Illumos source and discussing the issue with
Oracle engineers suggest there would currently not be any issues with
the cache filesystems we would be using.
However, it's always possible that issues could arise from this in the
future, or there are issues we don't know about. Any such issues would
almost certainly appear to be non-deterministic and be a nightmare to
track down. So just pass NULL, to avoid the potential issues.
Change-Id: I41babe520530ba886d1877de99eb1644c1b9f699
Reviewed-on: http://gerrit.openafs.org/11704
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit cb6de07fb8a12199ad0f1c4990f19074a9a54fcc
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Wed Sep 17 09:41:16 2014 +0200
use V_creationDate in DumpHeader for R/O volumes
This patch modifies a patch committed as 1e6fb1b7b7, the dumpTimes.to is now
set to creationDate for R/O volumes. The old value copyDate is wrong, if the
R/O volumes is re-cloned. This does not happen with "vos dump -clone", but
may happen with dumping a R/O volume directly: "vos dump <R/O volume>".
Change-Id: Ia3ae7e1ae4a22aa47f0f28fac45077ff6789e720
Reviewed-on: http://gerrit.openafs.org/11468
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 40d97fa9f0356fce7aec76d69dbacb81eac3db37
Author: Antoine Verheijen <apv@ualberta.ca>
Date: Tue Jan 27 19:49:04 2015 -0700
OpenBSD: Clean up use of LK_CANRECURSE in call to lockmgr()
The LK_CANRECURSE and LK_RECURSEFAIL flags in the call to lockmgr()
are mutually exclusive. Previous version of OpenBSD didn't really
check well for this but more recent versions look for the conflict
and take a kernel panic when they're both set.
The OpenBSD kernel module currently just blindly sets the
LK_CANRECURSE flag in its call to lockmgr(). This patch changes
that behaviour so that it checks to make sure that the LK_RECURSEFAIL
flags is not set before it actually applies the LK_CANRECURSE flag.
That removes the kernel panics that have started to arise.
This behaviour is more consistent with other OpenBSD code that makes
use of the LK_CANRECURSE flag.
Change-Id: Ie435559f4b88195136e09c6184543861f06257da
Reviewed-on: http://gerrit.openafs.org/11699
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit d354386b8c6047206800dc52ab82886e23db77ad
Author: Antoine Verheijen <apv@ualberta.ca>
Date: Tue Jan 27 19:44:56 2015 -0700
OpenBSD: Remove obsolete parameter in call to osi_VM_FlushVCache()
The second parameter in the call to osi_VM_FlushVCache() in the kernel
module is obsolete and has been removed. However, one call in the
OpenBSD module still contains that parameter in its call. This patch
removes it, eliminating the compile error.
Change-Id: Ia3f79c74e86b8038301459e1adbf17a58056e8b1
Reviewed-on: http://gerrit.openafs.org/11698
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 15260c7fdc5ac8fe9fb1797c8e383c665e9e0ccd
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Dec 18 08:43:22 2014 -0500
Linux: d_splice_alias may drop inode reference on error
d_splice_alias now drops the inode reference on error, so we
need to grab an extra one to make sure that the inode doesn't
go away, and release it when done if there was no error.
For kernels that may not drop the reference, provide an
additional iput() within an ifdef. This could be hooked up
to a configure option to allow building a module for a kernel
that is known not to drop the reference on error. That hook
is not provided here. Affected kernels should be the early
3.17 ones (3.17 - 3.17.2); 3.16 and older kernels should not
return errors here.
[kaduk@mit.edu add configure option to control behavior, which
is mandatory on non-buildbot linux systems]
Change-Id: Id1786ac2227b4d8e0ae801fe59c15a0ecd975bed
Reviewed-on: http://gerrit.openafs.org/11643
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b9d86a12d1fccf93f0663b06a317a01811d981d8
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Dec 15 11:04:06 2014 -0500
IRIX: remove mention of unsupported sgiefs from Makefile.in
Change-Id: Ib3594fa5c75df2c10d2692801ed64d657ece5d19
Reviewed-on: http://gerrit.openafs.org/11635
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 84422047f4948d88ab91fc4132767c272138d3f4
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Dec 15 10:58:02 2014 -0500
IRIX: Move src/sgistuff to platform/IRIX
Change-Id: Ie7e17859c346e472af1d07adf2c359250f71d653
Reviewed-on: http://gerrit.openafs.org/11634
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6e545ebf974c81f29b3249d3201821b52586ba6f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Nov 5 14:26:36 2014 -0500
Deorbit IRIX-specific QuickStartGuide bits
Get the rest of them all at once.
Change-Id: Ife9920f00ec8eea953929a76a30f86d958d55f9c
Reviewed-on: http://gerrit.openafs.org/11590
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ccda3b6cbbb61fb8d9bc3eea451beb299ad01c1b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Dec 4 16:52:37 2014 -0500
Add auditing to GetXStats
This will record the caller as well as the fact that we received
a GetXStats call.
Change-Id: I101b9fcea37e26e031efa4a8cf74df8351866dcf
Reviewed-on: http://gerrit.openafs.org/11620
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 012fc253c21e6ab35ddc571aed6706fd3c75e74e
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Tue Aug 26 16:44:51 2014 +0200
AFSVolClone: remove calls to AssignVolumeName
The calls in AFSVolClone to AssignVolumeName are unnecessary, because
the volume name is overwritten few lines later with strcpy.
Change-Id: If5031271b9ade08ae248703c8a72f3a083fd4fce
Reviewed-on: http://gerrit.openafs.org/11432
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2b1481dae535c399cce837f3d63b1c76831b8190
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Jan 9 09:52:53 2013 +0000
Build system: MT_LIBS includes XLIBS
The MT_LIBS library list already includes XLIBS, so there's no need
to specify both on a link line.
Change-Id: I8594b1b6e1a16af741b40822cbce49e846b26f49
Reviewed-on: http://gerrit.openafs.org/8904
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d7052df849278ca685bae113a580bfaadce3d2aa
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Apr 23 17:51:28 2010 -0500
Add asserts to VLock* functions
Make sure we don't continue on if we have unbalanced locks and
unlocks. Having a negative refcount is a serious internal error, and
they are difficult to fix unless we assert right away.
Change-Id: Ib9b5b3f209635e0365df96c79ea8bf49c765008b
Reviewed-on: http://gerrit.openafs.org/2594
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 82a30ed17c9cf56e319d5e13ca2e18d82f8b239c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 4 14:15:34 2012 -0500
DAFS: Free header on partially-attached vol salv
When we VRequestSalvage_r a volume, normally the header is freed when
the volume goes offline. This happens when we VOfflineForSalvage_r,
either via VCheckSalvage when nUsers drops to 0, or in
VRequestSalvage_r itself if nUsers is already 0. We cannot free the
header under normal circumstances, since someone else may have a ref
on vp, which implies that the vol header object is okay to use.
However, for VOL_SALVAGE_NO_OFFLINE, we skip all of that. For
VOL_SALVAGE_NO_OFFLINE, the volume has only been partially attached,
so it does not go through the full offlining process, so we don't ever
hit the normal VPutVolume_r handlers etc. So, in the current code, we
don't free the header. But our nUsers drops to 0 anyway, and when
nUsers is 0, our header is supposed to be on the LRU (if we have one).
"oops"
Rectify this by freeing the volume header when VOL_SALVAGE_NO_OFFLINE
is set. Add some comments to try to be very clear about what's going
on.
Note that similar behavior was removed in commit
4552dc552687267fce3c7a6a9c7f4a1e9395c8e5 via a similar flag called
VOL_SALVAGE_INVALIDATE_HEADER. I believe now that this is the same
scenario that VOL_SALVAGE_INVALIDATE_HEADER was trying to solve.
However, VOL_SALVAGE_INVALIDATE_HEADER was not always used correctly,
and its purpose was not really adequately explained, which contributed
to the idea that its very existence was buggy.
Previously, when VOL_SALVAGE_INVALIDATE_HEADER existed, it was used
incorrectly in the VRequestSalvage_r calls in GetVolume,
VForceOffline_r, and VAllocBitmapEntry_r. All of these call sites
could have a vp with other references held on it, and so invalidating
the header there can cause segfaults when the header is freed. So
ideally, commit 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5 would have
just removed the flag from those call sites.
This change effectively restores the behavior that
VOL_SALVAGE_INVALIDATE_HEADER provided. But no new flags are gained,
since this behavior is what we want for the VOL_SALVAGE_NO_OFFLINE
flag. This is not a coincidence; for the 'normal' case, we will free
the header whenever we offline the volume. But for the 'do not
offline' case, obviously that will never happen, so we need to do it
separately. So, these two flags are really the same thing.
Change-Id: Ia369850a33c0e781a3ab2f22017b8559410ff8bf
Reviewed-on: http://gerrit.openafs.org/8204
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 71072c2bb373a6ae5edec91884985c3cfc478147
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 4 14:39:41 2013 -0500
ihandle: Add a comment on IH_OPEN/IH_REALLYCLOSE
Currently, it's not really 'safe' in ihandle to issue an IH_OPEN
against an IHandle_t when an IH_REALLYCLOSE is running at the same
time. The reasons for this are explained a bit in ticket 131530 and
related commits, but briefly:
Say IH_OPEN runs, and drops IH_LOCK to open a new fd on disk. Then
IH_REALLYCLOSE runs and closes all fds, or marks them as needing
close. The running IH_OPEN then acquires IH_LOCK again and puts the
newly-opened fd onto the per-IH list of fds. We now have an fd that
effectively "survives" across the IH_REALLYCLOSE; effectively
IH_REALLYCLOSE did not close all fds for the ih.
This is possibly fixable by maintaining some extra information in
IHandle_t's, but this is only a problem if we allow IH_OPEN calls to
happen simultaneously with IH_REALLYCLOSE calls. Ever since
ih_sync_thread was removed (or changed to not call IH_OPEN), there
should be no cases where this is possible. All instances of
IH_REALLYCLOSE happen during error recovery for a newly-created file,
or happen under a per-vnode write lock, or for volume metadata files
only happens when the ref count for a volume drops to zero when we're
offlining the volume.
So, do not bother trying to fix this, since doing so is currently a
waste of time and the resulting complexity could introduce bugs. But
in case someone ever tries to do something resulting in IH_OPEN calls
executing outside the normal threads of execution, add a comment
around the IH_REALLYCLOSE explanations to try and briefly explain that
this cannot currently be done.
Change-Id: I989806635f3b048b0c084480a4b02dc1902ba031
Reviewed-on: http://gerrit.openafs.org/9709
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit d43699173e0e5ee5650974fcff105b38105c0422
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Jan 14 15:05:35 2015 -0500
opr: implement the BSD ffs() functions
Provide opr implementations of ffs(), fls(), ffsll(), and flsll().
There is no need to provide the 'long' form, since int is 32 bits
and long long is 64 bits.
These functions return the index of the first (or last) bit set
in a given (long long) word, or zero if no bits are set.
Change-Id: I126000f8b650f41d67567a9af659e0805478af2d
Reviewed-on: http://gerrit.openafs.org/11671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 6419d241866af95942d285b2e07dd510a43086f6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jan 12 17:48:25 2015 -0500
afs: Remove unused constant DCSIZE
The size of the dcache hash table is automatically determined
from the size of the vcache hash table size, since even before
the initial OpenAFS 1.0 release. AFS 3.3 had constants
DCHASHSIZE and DVHASHSIZE which were used to size the respective
hash tables, but DCSIZE was unused even there.
Change-Id: I1f4e278eacb881b60a457fa9871225de7ce0f9f8
Reviewed-on: http://gerrit.openafs.org/11672
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit afa6bda887c39101dbfc7c3268a315e48d47fa09
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 16 17:03:34 2014 -0600
cacheout: Use authenticated secClass for VLDB
Currently 'cacheout' will always utilize an unauthenticated connection
when talking to the VDLB, even if it uses an authenticated connection
when talking to fileservers. This is regardless of any tokens
retrieved or command-line parameters, etc.
Using an authenticated connection to the VLDB can be useful, since a
user may want to encrypt the VLDB communication, or require stronger
guarantees of data consistency. So, just use the same security class
information for our VLDB communication as for our fileserver
communication.
'scnull' is now not used anywhere after this commit, so get rid of it.
Change-Id: I1e8a440ea7427399a3b219246e4c3623a603c35e
Reviewed-on: http://gerrit.openafs.org/11637
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 52b8073a6c1ef11f1a47fb26d77efd87425be556
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 14 16:57:53 2014 -0500
fix byte ordering in check_sysid
Several uuid fields as well as the ip addreses in the sysid file are in
network byte order. Fix the check_sysid utility to decode these fields
properly. In addition, print the server uuid in the common string
format used to display uuids, instead of by individual uuid fields.
Change-Id: I9688e9117490d0ef0eb6dd5af417222482322e0c
Reviewed-on: http://gerrit.openafs.org/11603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 7644d02f258cd2dfd880d7d52c2f41b2eb2ce870
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Dec 14 15:12:04 2014 -0500
rx: rxi_SendPacketList remove duplicate conditional
Presumably these checks were different at some point in the past.
Change-Id: I0fb8737404a3c4fa786ab7965b60d35328d0bf32
Reviewed-on: http://gerrit.openafs.org/11632
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit a1a6331e2e1ccfd846927752a5aacb7a39c14488
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sat Dec 13 23:18:36 2014 -0500
rx: Remove dead AFS_ADAPT_PMTU SUN5 code
AFS_ADAPT_PMTU is only defined on linux26, so anything which is
conditional on both AFS_ADAPT_PMTU and AFS_SUN5_ENV being set is
dead code.
This seems to have been dead code since its introduction in
commit 1206e7538be86f073b21cd289266286b60a95d0a.
Change-Id: I9bb6ff40de87a7f2d8d953ef7583c6c2b090ab48
Reviewed-on: http://gerrit.openafs.org/11631
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit d03e3c392eee2bd9158c417f42bcbf2009dabfc3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 13 17:58:50 2012 -0500
rx: Normalize use of some MTU-discovery fields
When we store MTUs (peer->ifMTU, peer->natMTU, etc.), we store the
maximum transport unit usable by RX, i.e., excluding the IP and UDP
headers, but including the RX header. Contrariwise, when we track the
size of packets we've sent (conn->lastPacketSize, peer->maxPacketSize),
we track logical packet lengths which exclude the RX header (and the IP
and UDP headers). However, the consumers of lastPacketSize and
maxPacketSize were not always interpreting their values correctly as
excluding the RX (and other) headers.
Add comments to these fields in their respective structure definitions
to help make clear what they contain (and the difference between them).
Correct several checks which were using the wrong constant for
correcting between these two worldviews (and the wrong sign). Modernize
the style of lines that are touched.
The lastPacketSize and maxPacketSize variables are only accessed from
five places: while sending packets, while processing acks, while sending
acks, while handling growMTU events, and in rxi_CheckCall(). They are
used to track the size of packets that have been successfully sent (and
thus, indirectly, to control the size of packets we send). The
maxPacketSize is only set once we have received an ack from the peer for
a packet of that size, and lastPacketSize tracks the size of a
speculative packet larger than that size, until it is acked.
When sending packets, we check if the size of the packet we are sending
exceeds the recorded maxPacketSize, and if so, record that speculative
size in the lastPacketSize variable, along with the sequence number of
that packet in lastPacketSizeSeq.
Correspondingly, when processing acks, if the packet tracked in
lastPacketSizeSeq is being acked, we know that our speculative large
packet was successfully received, and can attempt to update the recorded
maxPacketSize for the peer. This is done through an intermediate
variable, 'pktsize', which holds either the value of lastPacketSize or
lastPingSize, without adjustment for the size of any headers.
The ack processing has a bit of code to handle the case where
maxPacketSize has been reset to zero, initializing it to a small value
which should be expected to always work. The intention seems to have
been to initialize maxPacketSize to the smallest permitted value (since
RX_MIN_PACKET_SIZE is amount of data available to RX in the smallest
permitted IP packet), but the old code was actually initializing
maxPacketSize from zero to something a bit larger than the minimum, by
RX_IPUDP_SIZE + RX_HEADER_SIZE. This over-large initialization was
mostly harmless, see below. After this potential initialization,
'pktsize' was incorrectly used to set a new ifMTU and natMTU for the
peer. It correctly determined that a packet larger than the previous
maxPacketSize had been acked, but then set the peer's ifMTU and natMTU
to smaller values than the acked packet actually indicates. (It is
careful to only increase the ifMTU, though.) The actual peer->MTU is
*not* updated here, but will presumably trickle through eventually via
rxi_Resend() or similar. It is possible that this code should be using
rxi_SetPeerMtu() or similar logic, but that might involve locking issues
which are outside the scope of this analysis.
The over-large initialization of maxPacketSize (from zero) was
fortuitously mostly harmless on systems using minimum-sized IP packets,
since a correspondingly wrong check was used to detect if a new MTU
invalidates this maxPacketSize, with the constants offsetting.
Likewise, the checks in rxi_SendAck() had the wrong constants, but they
offset to produce the correct boundary between small and large packets
while trying to grow the MTU. Unfortunately, the old behavior in the
"small" case is not correct, and the grow MTU event would try to send a
packet with more padding than was intended. In networks allowing
packets slightly larger than the minimum (but not much larger than the
minimum), the old code may have been unable to discover the true MTU.
In the main (MTU-related) logic of rxi_SendAck, a variable 'padbytes' is
set to a small increment of maxPacketSize in the "small" case, and a
larger increment of maxMTU in the "large" case. There is a floor for
padbytes based on RX_MIN_PACKET_SIZE, which ended up being larger than
intended in the old code by approximately the size of the rx header.
(Some of the adjustments performed are rather opaque, so the motivations
are unclear.)
The more interesting places where accesses to lastPacketSize and
maxPacketSize happen are during the MTU grow events and in
rxi_CheckCall().
In rxi_CheckCall(), the packet size variables are only accessed if
the connection has the msgsizeRetryErr flag set, the call is not timed
out (whether for idleness or during active waiting), and the call has
actually received data. In this case, we conclude that sending packets
failed and decrease the MTU. The old code was quite broken in this
regard, with a reversed sense of conditional for whether a speculative
large packet was outstanding, and a rather large decrease in MTU size
of effectively 128 + RX_HEADER_SIZE + RX_IPUDP_SIZE = 212, when only
a decrease of 128 was intended. The new code corrects the sense of
the conditional and sets the decrease in MTU to the intended value of 128.
With respect to MTU grow events, this change only touches
rxi_SetPeerMtu(), to correct the conditional on whether the MTU update
invalidates/overrides the cached maxPacketSize. There is a window of
values which could cause the old code to incorrectly fail to invalidate
the cached maxPacketSize. Values in this window could result in the old
code being stuck on a bad MTU guess, but should not cause an actual
failure to communicate. That conditional zeroing of maxPacketSize is
the only access to the PacketSize variables in rxi_SetPeerMtu().
maxPacketSize is also checked in rxi_GrowMTUEvent(), but only against
zero to avoid sending RX_ACK_MTU packets needlessly, so it is unaffected
by the issue at hand.
In summary, in certain network conditions, the old code could fail
to find an optimum MTU size, but would always continue to operate.
The new code is more likely to find a better MTU size, and the old
and the new code should interoperate fine with both each other and
themselves.
[kaduk@mit.edu add a few missed cases; expound on analysis in commit message]
Change-Id: I7494892738d38ffe35bdf1dfd483dbf671cc799a
Reviewed-on: http://gerrit.openafs.org/8111
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit fa5434adf19d040bd194b63993b81263c395fa78
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Sep 14 14:24:17 2014 -0500
afs: Warn about afs_conn overcounts
Currently we panic if we detect an undercount on an afs_conn
structure, as this is a serious bug and can cause corruption and other
issues. But an overcount is never noticed, until the refCount
overflows and looks negative. Log a warning if the refCount gets
really high, so an administrator has a chance at noticing and
notifying a developer before the machine actually panics.
[kaduk@mit.edu use the %p format specifier, mandated by C89]
Change-Id: Ifc291fc10959e4e1c60115813d82a09e5a65ef75
Reviewed-on: http://gerrit.openafs.org/11465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 0c89335b5aa7ae3582862596878936dfcbe99bf1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 30 17:32:26 2013 -0500
afs: Refactor GetDSlot parameters
The 'indexvalid' and 'datavalid' parameters were really representing 3
different scenarios, not 2 different values with 2 possibilities each.
Change these to a single parameter, 'type', with 3 different values:
DSLOT_NEW, DSLOT_UNUSED, and DSLOT_VALID. Hopefully this will make the
relevant code paths easier to understand.
This should incur no functional change; it is just code
reorganization.
Change-Id: Iac921e74532de89121b461fa0f53ddb778735e0c
Reviewed-on: http://gerrit.openafs.org/9834
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit d61cb9ad764115811fcca3dd0a735ecad1d6eac4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Dec 1 10:11:38 2014 -0600
LINUX: Remove fix_bad_parent
For Linux, fix_bad_parent (and in 1.6 and earlier, check_bad_parent)
served the purpose of fixing mvid if it was "wrong", for volume-root
vcaches (mvstat == 2).
However, in modern Linux, we never really use mvid for root vcaches.
This would normally be used for looking up ".." entries in the root
dir, but Linux handles that for us.
Specifically, the only times an "mvstat == 2" mvid is used are:
- afs_lookup(), where we specifically check for a ".." lookup. Linux
cannot give us a lookup for "..", since Linux itself services ".."
lookups through the dcache.
- afs_readdir_move(), where we look for ".." entries. Linux does not
use this function, since Linux reimplements afs_readdir() in
afs_linux_readdir(), and so this function is never called.
Of course, mvid is used in many other locations, mostly for "mvstat ==
1" vcaches (mountpoints) and a few other special cases. But these are
the instances where mvid is relevant for root dirs.
So, since mvid is never really used for "mvstat == 2" vcaches on
Linux, don't bother trying to keep it up-to-date. Doing so is just
needless waste, and causes problems when there are bugs in
fix_bad_parent. The mvid field is still updated in cross-platform code
from time to time; removing that would be more complex and possibly
not worth the effort.
Change-Id: I5011ba069e5c8ed947ab6ff8d8dd393241d9c4bf
Reviewed-on: http://gerrit.openafs.org/11615
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 8b6ea7213a69f19ce2e591f1ae56a1db946c136c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Dec 10 14:36:36 2014 -0500
Add AFSCONF_NOCELLNAME error code
Contrast with AFSCONF_NOCELL, which is for when no cell configuration
information is available at all (i.e., a struct afsconf_dir* was NULL) --
this code is used when there is some cell configuration available, but
that configuration does not include the cell name.
Replace the only existing use of AFSCONF_UNKNOWN with this more-informative
error code, leaving AFSCONF_UNKNOWN free for use in other situations.
Change-Id: I989756a960e5377545af43f8e9414d1f2d6476b4
Reviewed-on: http://gerrit.openafs.org/11628
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 72e22eb00f641f137f7dbe4195d6d82f4a8addc9
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jan 5 07:17:14 2015 -0500
Linux 3.19: struct nameidata becomes opaque
With kernel 3.19 struct nameidata becomes opaque. As a result
we cannot rely on STRUCT_NAMEIDATA_HAS_PATH being true for
new kernels.
Rework the conditions here so that STRUCT_NAMEIDATA_HAS_PATH
is only tested when we're using a nameidata structure and
the result matters.
Also modify a configure test to use a nameidata pointer
instead of an actual structure.
Change-Id: I0d71fca44a67570ac3b86151c70f2969dc463f4f
Reviewed-on: http://gerrit.openafs.org/11648
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ec9a7c2db833efacfd0692c658c2d38ed9f852ba
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jan 5 07:13:37 2015 -0500
Linux 3.19: Use mgs_iter in struct msghdr
struct msghdr gets msg_iov replaced by msg_iter. Add a configure
test and adjust the affected code.
Change-Id: I9b9e3987e55a10e48087b318d98a5a7bb17a4612
Reviewed-on: http://gerrit.openafs.org/11647
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f9ca302b7a10ffc36f2439e068333ab147791c5a
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jan 5 07:03:16 2015 -0500
Linux 3.19: No more f_dentry
Back in kernel 2.6 .20 struct file lost its f_dentry field
which was replaced by f_path.To ease transition f_dentry
was defined as f_dpath.dentry in the same header.This
define finally gets removed with kernel 3.19.
Keep using f_dentry in the code, but add a configure test
for the presence of f_path and the absence of the f_dentry
macro so we can add it if its missing.
Change - Id:I8e8a7e4d3ddd861018de50af1eb7315e730ad529
Change-Id: I4b05aa3d37f01e0e675c420cbf941d682c49c69c
Reviewed-on: http://gerrit.openafs.org/11646
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d6f29679098aff171e69511823b340ccf28e5c31
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Dec 18 07:13:46 2014 -0500
Linux: d_alias becomes d_u.d_alias
The fields in struct dentry are re-arranged so that d_alias
shares space wth d_rcu inside the d_u union. Some references
need to change from d_alias to d_u.d_alias.
The kernel change was introduced for 3.19 but was also backported
to the 3.18 stable series in 3.18.1, so this commit is required
for 3.19 and current 3.18 kernels.
Change-Id: I711a5a3a89af6e0055381dfd4474ddca2868bb9c
Reviewed-on: http://gerrit.openafs.org/11642
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a0ffea098d8c5c5b46c6bf86a12d28d6e7096685
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Mar 12 09:51:39 2013 -0500
ptserver: Limit length on namelist, idlist
namelist and idlist are used as IN parameters to ptserver RPCs that
can be issued by unauthenticated clients. Not having a length limit on
them means anyone can use up a ton of ptserver memory by just issuing
those RPCs with a very large length.
So, put a limit on them. PR_MAXLIST is a constant that already exists,
but is small enough to potentially limit real use, so define a new
OpenAFS-internal value for this purpose.
prlist and prentries are returned from the ptserver to clients, so
also limit them in the same way.
Change-Id: Iaf45639bbae401093354adbfb4daa172fe97ede1
Reviewed-on: http://gerrit.openafs.org/9588
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 00a33b26d74aa067086ddc340efb82184715857f
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Jan 5 10:41:53 2015 -0500
uss: always build uss
Revert change Ibab1dd189e7fbc41ca01e7ef7479421c056999f5 since uss
should always be safe to build now that its parser symbols are private.
Change-Id: I65fd2008b037dd36a2c7d3ef8817d4d7dda689d7
Reviewed-on: http://gerrit.openafs.org/11653
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 1bb8ad417188650e9049da9b33177de7f14226cb
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Tue Jan 6 17:58:05 2015 -0500
uss: Avoid -i (inplace) with sed
Not all sed versions support inplace editing, so do things ourselves.
Also use the sed version found by configure for consistency.
Change-Id: I6194b8dd6b7abf88d0b0fa36ba871e0ba092ce1e
Reviewed-on: http://gerrit.openafs.org/11655
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 6ca324e565c34d9d04f3c553b7d0febe675ae538
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Dec 18 06:57:22 2014 -0500
Linux: Move code to reset the root to afs/LINUX
Move the Linux specific bit of code to reset the root to
afs/LINUX platform specific files. Things that play with
the Linux vfs internals should not be exposed here.
No functional change, but this helps cleanup some ifdef
mess.
Change-Id: Ia27fca3d8052ead45783cb2332c04fe6e99e5d9f
Reviewed-on: http://gerrit.openafs.org/11641
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
commit 720363fa9bf7cfbebdc485104b74ca6bac1895f6
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Sun Jun 16 15:28:03 2013 -0400
Fix unchecked return values
This change fixes numerous places where the return values of various
system calls and standard library routines are not checked. In
particular, this fixes occurrances called out when building on Ubuntu
12.10, with gcc 4.7.2 and eglibc 2.15-0ubuntu20.1, when the possible
failure is one we actually do (or should) care about. This change
does not consider calls where the failure is one we deliberately
choose to ignore.
Change-Id: Id526f5dd7ee48be2604b77a3f00ea1e51b08c21d
Reviewed-on: http://gerrit.openafs.org/9979
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 218561a5d920bb9bfaa668d3bdd11e1dfac1df9f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jul 21 17:41:32 2014 -0400
vol: rename volUpdateCounter macro
Change the volUpdateCounter volume macro name to be
consistent with the volume header name.
Change-Id: I55f55f2c084135e9598c194ed9081fce800ddfe9
Reviewed-on: http://gerrit.openafs.org/11318
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ada9dba0756450993a8e57c05ddbcae7d1891582
Author: Michael Laß <lass@mail.uni-paderborn.de>
Date: Mon Dec 8 08:34:26 2014 +0100
Remove traces of Debian packaging
In e34e0d1 the Debian packaging was removed. Some traces are still left, so
remove those as well.
Change-Id: I1d5c22181f59b2bee42dd34c9f3a043297d294a2
Reviewed-on: http://gerrit.openafs.org/11630
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 88a4efbfa3dbf497a96ad4d8b8ab2cd68351ffbf
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Dec 19 09:49:33 2013 -0500
dafs: avoid asserting on dafs VSALVAGING error code
DAFS introduced the VSALVAGING error code which is returned when a vnode
cannot be put and a volume has been scheduled to be salvaged.
Update the afsfileprocs to not assert on VSALVAGING, as well as the
VSALVAGE error code.
For example, VPutVnode() and VVnodeWriteToRead() may call
VRequestSalvage_r() which will set the error code to VSALVAGING when a
salvage is requested.
This was noticed during a code inspection.
Change-Id: I6cacfe92347bc5af57defef17b8a2f98c5302f93
Reviewed-on: http://gerrit.openafs.org/10611
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ed1b1df3c8acf9a2c5d4dface88ac15dcb8d7a2e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Feb 10 16:23:07 2014 -0600
bozo: Constify bozo_Log 'format' argument
We clearly do not need to modify the format string; declare it const.
This makes the signature of bozo_Log identical to FSLog, which can
make it easier to use these functions interchangeably.
Change-Id: I89ae9babec2c4e8714019f58fe29dacc7283ae15
Reviewed-on: http://gerrit.openafs.org/10830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 4b648925603a50d2a248304a954308e8fa902df4
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Nov 20 15:05:21 2013 -0500
fssync-debug: close test connection
A valid fssync-debug query <volid> command issued against
a DAFS fileserver will produce the following error messages in FileLog:
SYNC_getCom: error receiving command
FSYNC_com: read failed; dropping connection (cnt=1)
Routine dafs_prolog() issues a tentative FSYNC_VOL_LISTVOLUMES operation
to test for the presence of a DAFS fileserver. If DAFS is detected,
we then call dafssync-debug for the original requested operation.
However, the FSYNC connection for the tentative LISTVOLUMES operation
is never closed. This results in the errors when the command completes.
Close the test connection.
Change-Id: I3c987289408407ba38cd184b7518e72ee1ae9cfc
Reviewed-on: http://gerrit.openafs.org/10476
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit ffe0757a5610d1fe6cf7e513d62ccc570d559206
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Aug 12 15:13:46 2014 -0400
Attempt to clean up tvolser dependencies
The volserver only needs vl_errors.c to be locally generated, not
vlserver.h; in fact, the only consumers of vlserver.h in src/volser/
consume it via afs/vlserver.h.
Instead of reaching over to ../volser for the generated volerr.c,
generate our own local copy, as well as the volser.h generated from
the same error table -- volser.h is included with double-quotes from
the volser sources.
Add the appropriate dependencies on volser.h, and remove the unneeded
dependencies on vlserver.h
Change-Id: Ic6e728fa455419cc8e95dc25c41ed6d6b7d20934
Reviewed-on: http://gerrit.openafs.org/11380
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 05217c29179100b69a32562202b302ae60b4b36c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 1 14:54:15 2013 -0500
rx: Ignore responses to nonexistent challenges
Consider the following situation:
- A client sends a data packet to a server, using a security class
that requires a challenge
- The server responds with a challenge
- The server is restarted
- The client responds to the challenge with a response
In that situation, the server will process the response, but since the
server was restarted, it has no knowledge of the challenge that was
sent. This generally means that we error the connection, since the
given response is not valid. For rxkad with modern endpoints, this
results in an RXKADPACKETSHORT error, since we interpret the response
as an 'old' response, but it's actually a 'v2' response, so we
interpret the fields in the response as garbage.
This means that the client gets a connection error when the client did
nothing wrong, and there's no way for the client to distinguish this
from a real connection error.
One way to solve this would be to send a Challenge packet to the
client immediately when we detect that this situation has occurred.
However, if we do that, then we never see a data packet with a
checksum, so we fall back to using "old" challenges and responses. And
in general, that would cause the server side to never see a data
packet during the connection negotiation, which is unusual and I am
concerned there may be other niggles of odd behavior that may occur in
that scenario.
So instead, to fix this, make the server ignore responses in this
situation (that is, if we haven't sent out any challenges yet).
Clients will eventually resend the data packet, and we will go through
negotiating the connection security like normal. This should never
cause any new problems, since dropping a challenge packet must be
handled anyway (sometimes packets just get dropped). And a client will
never hang on sending the same response over and over again; clients
only ever send a Response in response to a Challenge packet.
Change-Id: Id3fae425addb2ac8ab60965213b3ebca2e64ba5d
Reviewed-on: http://gerrit.openafs.org/10315
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 3b9d52b2e8020cce65d55516db36580d58a51f0b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Nov 8 13:14:27 2014 -0500
vldb_check: rebuild free list with -fix
Rebuild the vldb free chain in addition to the hash chains when
vldb_check is run with the -fix option. Print a FIX: message for
entries added to the free chain.
Example vldb with a broken free chain.
$ vldb_check vldb.broken
address 199364 (offset 0x30b04): Free vlentry not on free chain
address 223192 (offset 0x36818): Free vlentry not on free chain
address 235180 (offset 0x396ec): Free vlentry not on free chain
Scanning 1707 entries for possible repairs
$ vldb_check -fix vldb.broken
Rebuilding 1707 entries
FIX: Putting free entry on the free chain: addr=199364 (offset 0x30b04)
FIX: Putting free entry on the free chain: addr=223192 (offset 0x36818)
FIX: Putting free entry on the free chain: addr=235180 (offset 0x396ec)
Thanks to Kostas Liakakis for reporting this bug.
Change-Id: I57d6b17263ffe5f8818f70f8260a0dce8d85ab1f
Reviewed-on: http://gerrit.openafs.org/11598
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9de36a0398a53fffd7bde8ed9e57573bed3b669d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Dec 23 17:27:05 2013 -0500
RedHat: Update configure options, again
Commit 83f85c9ad6c439eb9676436a3e09c40c2813f1c1 updated the arguments
we give to configure, since --enable-disconnected and --with-krb5-conf
no longer exist. But, it only updated the configure options for the
userspace configure, and did not update the configure invocation for
building kmod kernel modules.
Update the other configure invocation, so they match and both of them
avoid using outdated configure options.
Change-Id: Ia7fe16a373b5feabd4060bd85fbf9220407082f5
Reviewed-on: http://gerrit.openafs.org/10623
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 24f0fdcce4cdc493edcf35c8578a151b8bbb32fd
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Fri Oct 10 09:12:31 2014 -0400
uss: Make the uss parser private
Attempt to make the parser in uss private so that it doesn't
conflict with other libraries that might leak their parser symbols.
Change-Id: I15b52f55b419b3bbc788ced9660bc41163e2be36
Reviewed-on: http://gerrit.openafs.org/11533
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c11c58646f56f0adc2016e31a7d3a3d34d6cdd3a
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sun Oct 19 02:42:08 2014 -0400
Linux: get sysname even if kernel module disabled
Fall back to `uname -r` if we aren't probing for kernel sources,
as we still need to know for the rest of the build. While this
could be worked around by explicitly passing the sysname as an
argument, this seems friendlier.
Change-Id: I0db75ba5fc7d1f5ec08d27dfce6858b968b6ce28
Reviewed-on: http://gerrit.openafs.org/11552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b22c586bcdf785c489009ab96cbb572181cb9b09
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Fri Dec 19 10:11:53 2014 -0500
Unix CM: Avoid using stale DV in afs_StoreAllSegments
It was reported in RT 131976 that on Linux some file
corruption was observed when doing mmap writes to
a file substantially larger than the cache size.
osi_VM_StoreAllSegments drops locks and asks the OS to flush
any dirty pages in the file 's mapping. This will trigger
calls into our writepage op, and if the number of dirty
cache chunks is too high (as will happen for a file larger
than the cache size), afs_DoPartialWrite will recursively
call afs_StoreAllSegments and some chunks will be written
back to the server. After potentially doing this several
times, control will return to the original afs_StoreAllSegments.
At that point the data version that was stored before
osi_VM_StoreAllSegments is no longer correct, leading to
possible data corruption.
Triggering this bug requires writing a file larger than the
cache so that partial stores are done, and writing enough
data to exceed the system's maximum dirty ratio and cause
it to initiate writeback.
To fix, just wait until after osi_VM_StoreAllSegments to
look at and store the data version.
FIXES 131976
Change-Id: I959f06b5a7a51171e7ed70189620e9d11d52efa2
Reviewed-on: http://gerrit.openafs.org/11644
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4f03d6e07ba8ea5bddfd952cf47f9d2172051ca4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Nov 8 11:10:52 2014 -0500
doc: document the vldb free list
Document vldb free list in the vldb format (vldb.txt). The nextIdHash[0]
is on the free chain when the vl entry is free.
Also fix two typos in vldb.txt.
Change-Id: I5d79f55214295e029e7174ef46838afd7dc44bf1
Reviewed-on: http://gerrit.openafs.org/11597
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 54c0ee608f4afd2b178c9b60eabfc3564293d996
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Sep 14 14:10:11 2014 -0500
afs: Fix some afs_conn overcounts
The usual pattern of using afs_Conn looks like this:
do {
tc = afs_Conn(...);
if (tc) {
code = /* ... */
} else {
code = -1;
}
} while (afs_Analyze(...));
The afs_Analyze call, amongst other things, puts back the reference to
the connection obtained from afs_Conn. If anything inside the do/while
block exits that block without calling afs_Analyze or afs_PutConn, we
will leak a reference to the conn.
A few places currently do this, by jumping out of the loop with
'goto's. Specifically, in afs_dcache.c and afs_bypasscache.c. These
locations currently leak references to our connection object (and to
the underlying Rx connection object), which can cause problems over
time. Specifically, this can cause a panic when the refcount overflows
and becomes negative, causing a panic message that looks like:
afs_PutConn: refcount imbalance 0xd34db33f -32768
To avoid this, make sure we afs_PutConn in these cases where we 'goto'
out of the afs_Conn/afs_Analyze loop. Perhaps ideally we should cause
afs_Analyze itself to be called in these situations, but for now just
fix the problem with the least amount of impact possible.
FIXES 131885
Change-Id: I3a52f8ccef24f01d04c02db0a4b711405360e323
Reviewed-on: http://gerrit.openafs.org/11464
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 604f1eece60a8586642bb7006e2265913d2a4a25
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Sat Dec 6 07:40:04 2014 -0500
doc: fix unbalanced <listitem> in AdminGuide/auagd018.xml
This was introduced by c04c57c6c57d2e0b09ba60b68de738b636c9450b
Change-Id: I2dbc558bf97673074c774b457b53b4a4436b43c1
Reviewed-on: http://gerrit.openafs.org/11624
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5cc3920ce40d5943fb400f5aca04151da70cea63
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Sat Dec 6 07:31:46 2014 -0500
doc: fix duplicate tag usage in QuickStartUnix
The duplicate LIWQ54 tag appears to break newer versions of fop. Since it
isn't referenced by anything, just remove in both instances.
Change-Id: Ie996f0110a9114399a1873ebda1eba4c7696f716
Reviewed-on: http://gerrit.openafs.org/11623
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5e3df1d99df207a65d883f6747d8a616fa4b8f9c
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Sep 20 15:04:13 2013 -0400
rxgen: Only cast array/pointer/vector types
Assuming the correct values are passed to the xdr functions, no casts
are required. Don't cast simple/struct/union/typedef values. Do cast
array/pointer/vectors, since the relevant xdr wrapper functions expect
char *.
Change-Id: I375c03899576735668c1a0df0af47377223ae97a
Reviewed-on: http://gerrit.openafs.org/10260
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b7bfd3aa2715e49b2b1ec056b60d8dda72317ebc
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Sep 20 14:28:07 2013 -0400
rxgen: Always pass aliases (typedefs) as pointers
Since prototypes were introduced, xdr functions for typedef foo
expect a foo *, never a foo, even if the underlying type is an array.
print_param (for stubs) got this right, but print_stat (for inter-xdr
calls) did not.
Change-Id: I2b12aaf919fd39e6195d85072fdfd915a1c509f0
Reviewed-on: http://gerrit.openafs.org/10259
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1c445cc7e5d66881ef28860c9d43695feedf37d7
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Sep 20 10:42:20 2013 -0400
Remove sunrpc compatibility
Remove sunrpc compatibility from rxgen. It's not tested, and
rpcgen is available from other sources. This will allow changes to be
made to rxgen without worrying about their impact on rpcgen compatibility.
Removals consist of the -l, -m, and -s switches, the source files
rpc_clntout.c and rpc_svcout.c, and the scan tokens 'program' and
'version'. The -R switch ('R compatibility') is also removed, as it's
a noop.
Change-Id: I960fac14faf072d221b8cb166e9388ab4accfa26
Reviewed-on: http://gerrit.openafs.org/10258
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4d72af9fbd8f676e722fe8fa07b8e1342255fd01
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Sun Mar 23 17:47:25 2014 -0400
vlserver: Refactor auditing
Refactor auduting to be more like other uses in the code base.
Auditing is now done in a wrapper.
Change-Id: I491aeda31c223e594e3870573871ae10a541d010
Reviewed-on: http://gerrit.openafs.org/11315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 75d67780b42c1a7bfa506fcd230b28a6f293fcbd
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Nov 13 12:12:12 2014 -0500
redhat: do not overwite the server CellServDB
The bosserver creates a pair of symlinks in the client's configuration
directory (/usr/vice/etc) during startup, if the configuration files are
not present:
/usr/vice/etc/CellServDB -> /usr/afs/etc/CellServDB
/usr/vice/etc/ThisCell -> /usr/afs/etc/ThisCell
Due to a bug in the bosserver (which is not fixed on 1.6.x), the
symlinks are only created when the /usr/vice/etc directory already
exists when the bosserver is started.
If the bosserver is started before the client is installed (and the
/usr/vice/etc directory is present), then the packaging script will
write to the symlink CellServDB, overwriting the server's CellServDB with
the contents of the client's CellServDB.local and CellServDB.dist files.
Also, if the client is started after the bosserver creates the symlinks,
the client init script will overwrite the server's CellServDB with the
contents of the client's CellServDB.local and CellServDB.dist files.
Update the packaging and the client init script to delete this symlink
if present, since it is only intended to provide stub configuration
for the client utilities while setting up an initial server. Then,
the updating of the CellServDB will create a local file, instead of
following the symlink and overwriting the server CellServDB.
While here, adjust the indentation whitespace to match the tabs below.
Change-Id: I802fd8d85f73946ca8d8d57e115abb8ae6958196
Reviewed-on: http://gerrit.openafs.org/11601
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit de1ac7daff3183bf5b2c2a3482e74a099f7fb641
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun May 20 17:32:13 2012 -0500
afs: Add xvcache-related afs_FlushVCache comments
Add a couple of comments to help make it explicit when it is okay to
drop afs_xvcache here.
Change-Id: I451ffe80755ea471322e32017f71c0619e6a8e63
Reviewed-on: http://gerrit.openafs.org/7436
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 73bfe94802ef62a7e6f8d2c36cb801be6ab2863a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri May 18 17:49:31 2012 -0400
afs: Remove 'slept' from osi_VM_FlushVCache
No implementation of osi_VM_FlushVCache drops and reacquires
afs_xvcache. Doing so would cause problems when afs_FlushVCache calls
osi_VM_FlushVCache, since someone could grab a reference to the vcache
while xvcache is dropped. So, prohibit dropping and reacquiring
afs_xvcache in osi_VM_FlushVCache, and remove the 'slept' argument to
it.
Change-Id: I50b4ee35f54a5277749f44e93b1094e4fb5c93e9
Reviewed-on: http://gerrit.openafs.org/7435
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 2b10d96762366ce25a4816641ecfaf9705592d44
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Mon Dec 8 12:33:05 2014 -0800
afs: Correct routine name on error message
While studying some code I noticed one of the error messages in
afs_UFSGetVolSlot was prefixed with a different routine name.
More shocking was that git blame fingered me as the last person
to update that line! Indeed I had but I hadn't noticed, nor had
my reviewers, the mis-matched routine name.
Update afs/afs_volume.c to correct routine name.
Change-Id: Id7ee275c9f8991bb71082b9dfcd52c14ead83955
Reviewed-on: http://gerrit.openafs.org/11625
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dc4d9d64342b76be7be3e8f0264e66c6d943b64c
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Sat Apr 26 14:49:36 2014 -0400
afs: Remove AFS_BOZONLOCK_ENV
The only user of AFS_BOZONLOCK_ENV is ppc_darwin_80. This was added
to the param file by commit:
commit 379e3be3196aeb3fefaa1e9296e52a9f8018550a
Author: Derrick Brashear <shadow@dementia.org>
Date: Sun Jun 19 00:20:01 2005 +0000
ppc-darwin80-20050618
this is actually a throwaway
It isn't clear to me what the intent was. Darwin clearly isn't
using the Bozon lock around every osi_FlushPages() despite comments
in DARWIN/osi_vnodeops.c about said lock. The possibility of the
Bozon lock being required only ppc_darwin_80 and not ppc_darwin_70 and
ppc_darwin_90 is unlikely.
The comments about the Bozon lock in FBSD/osi_vnodeops.c appears to be
a copy/paste from DARWIN's. Curiously, FBSD doesn't drop the GLOCK()
when osi_FlushPages() calls osi_VM_FlushPages() despite a comment to
the contrary in osi_VM_FlushPages().
Also, instead of editing the alpha_dux param files, just remove them.
Nothing is using them.
Change-Id: Ic1f6aabd82b9bd3686c95fd501a9d72163595421
Reviewed-on: http://gerrit.openafs.org/11108
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 2725a4ca14fb29f897d905d9de0e3c9c1925e597
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Sep 24 16:26:43 2012 -0400
budb: Avoid use of anonymous structures to determine size
Change-Id: Ife337e4e020a0450020f9ae641b1711435b936c4
Reviewed-on: http://gerrit.openafs.org/8153
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 49088ad21aea794aecd5df928f21e7872ee36280
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Nov 27 16:23:12 2014 -0500
volser: Break callbacks to the target of VolClone
With the "-stayup" release mechanism, clients may have callbacks
to the target of VolClone rather than the target of VolRestore,
so also break callbacks there.
This could cause clients to not be notified of a volume release
done with -stayup and have stale contents.
Change-Id: I94009f4b9382471a3615d2a729e4ee3955a14d44
Reviewed-on: http://gerrit.openafs.org/11619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c47d619f6c93ba3362f3e65f102a875d509e5c44
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Dec 4 17:00:04 2014 -0500
Remove FreeBSD packaging
The packaging used by official FreeBSD package builds is taken from
the FreeBSD Ports Collection's version control, which is currently
available at https://svnweb.freebsd.org/ports/head/net/openafs/ .
The version of the FreeBSD packaging in the openafs repository
will almost always be out-of-date and is not needed by FreeBSD
(although a small portion of it is currently used by the upstream
FreeBSD packaging), and the actual packaging used by FreeBSD is
easily available, so there is no purpose in maintaining FreeBSD
packaging in the OpenAFS source code repository.
Change-Id: I969cd6933ecd56d6940b8d48da67f50260101571
Reviewed-on: http://gerrit.openafs.org/11622
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e34e0d149f3b3a8b48ab563b7b52174065925975
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Dec 4 17:00:04 2014 -0500
Remove Debian packaging
The packaging used for uploads to Debian is maintained on Debian
infrastructure, presently at
http://anonscm.debian.org/cgit/pkg-k5-afs/openafs.git .
The packaging repository for any given Debian openafs source
package will be listed in the Vcs-* fields in the package's
control file.
The version of the Debian packaging in the openafs repository
will almost always be out-of-date and is not used by Debian,
and the actual packaging used by Debian is easily available, so
there is no purpose in maintaining Debian packaging in the OpenAFS
source code repository.
Change-Id: I23011315ece011e32cdddd992c4f8a176e348c67
Reviewed-on: http://gerrit.openafs.org/11621
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a4dc1d8fc0ae5b9b0130d2524aff0c22fa34faa3
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 20:20:52 2013 +0100
build-sys: make docbook path find easier to read
Additional gain, when horizontal lists are converted to vertical, is that
each item will be individually version controlled.
Change-Id: I4f12efac9c3d828fafdc7ab8a15740cfb0276538
Reviewed-on: http://gerrit.openafs.org/10014
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 72ca1e876f61ec7a2984e4379dcc59cfd160f2a5
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sat Jul 26 15:05:19 2014 -0400
Make all VLDB interactions use VLF/VLSF names
src/volser/volser.p.h defined the values used in VLDB entries. These values
appear (by exhaustive walk of source and by inspection of the volser's rxrpc
api) to be unused by any aspect of the volser and were solely used in
communication with the VLDB.
This patch deletes the misplaced definitions and moves the entire tree to
use the VLF_{RW,RO,BACK}EXISTS and VLSF_* macros from vlserver/vldbint.xg .
No include wrangling was needed; these definitions have always been in scope
but relatively unused.
It also serves to head off a potential problem, which actually motivated the
whole thing: ITSRWREPL was 0x10, which was claimed as VLSF_UUID;
VLSF_RWREPLICA is 0x40, which did not have an ITS equivalent. As ITSRWREPL
was not used, this had never shown itself in operation. There was no ITS
semantic equivalent of VLSF_UUID.
Change-Id: I60426c2635976b9ac34bf820a8aec7a0c8575e20
Reviewed-on: http://gerrit.openafs.org/11331
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e331ee87a32ad3a26c7c933203e1d3690148448f
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Wed Dec 3 02:06:35 2014 -0500
DeleteVolume should check ITSROVOL as a bit
Other bits may be asserted even if this is a RO vol.
Change-Id: Iff5256db25502b61b161ec068bd9d2a389f796c7
Reviewed-on: http://gerrit.openafs.org/11617
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit a36aab0dd6e846dbce925cbf3484b74f7f8590a9
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Thu Jul 31 01:52:30 2014 -0400
Revert "vos-sync-flag-voltype-properly-20080521"
The convention appears to be that ITSRWVOL is the correct flag for
the backup volume.
This reverts commit dcafea769a1cb70c7b1f8763ae4f7b7744b2a436.
Change-Id: I0f88107d56817515f41a68062053b263683afc94
Reviewed-on: http://gerrit.openafs.org/11341
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 654f9e4ad46dd31e789b71a23f7e1465f8300132
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 20:06:34 2013 +0100
build-sys: reindent AC_ARG_WITH section in acinclude.m4
Change-Id: I80b68eeecf9f72ac7f2ce133d9a5642a67dde22c
Reviewed-on: http://gerrit.openafs.org/10013
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 2f2e6effa791e3f36f002702cd72e615ccf1a1a7
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Aug 30 12:23:43 2013 -0500
namei: Remove icreate tfd hack
Currently, the namei icreate routine creates a fake FdHandle_t for a
SetLinkCount call if we're creating a linktable. In the past this was
probably done because we did not want to open a "real" fdP ,since that
would mean opening another file descriptor, when we already had a file
descriptor (from the creating afs_open call).
This is a problem in the salvager, since it means that we can reach
ihandle code before the ihandle package has been initialized.
Specifically, we can reach icreate -> namei_SetLinkCount -> ih_fdsync.
If we reach ih_fdsync without the ihandle package being initialized,
we assert and dump core.
The ihandle package assumes that we've already initialized it if we
reach any ihandle code, since creating any IHandle_t causes the
package to initialize. But since namei_icreate fakes its own IHandle_t
and FdHandle_t structures, that doesn't happen.
So, to avoid this, stop faking our FdHandle_t and create a real one.
Since we have ih_attachfd, we can create a real FdHandle_t with our
existing file descriptor.
Change-Id: I7a8c1e0ed1ee8e5c8ce2e165b9493811d5d2435d
Reviewed-on: http://gerrit.openafs.org/10213
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 47a1a786786bc7f1e3939aff9100c2196cfcb5a7
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue May 13 19:18:57 2014 -0400
kauth: fix klog principal name parsing
If a principal name is specified to the klog command, it is not
correctly passed in the pw structure. This in turn causes
uninitialized storage to be passed to ka_UserAuthenticateGeneral.
This may either lead to a segmentation fault in klog, or cause
garbage to be passed to the kaserver, leading to garbage in some
log and audit messages. In all cases it is impossible to authenticate
to kaserver with a specified principal name. However, klog
still works correctly when no principal name is specified.
This was introduced by commit 68ce3aa814a7e3085242e705f013f05ed5da2d5c
which removed lclpw to eliminate a clang warning. However, the clang
warning was misleading in this case, as lclpw was actually used
(confusingly) to indirectly update the pw structure.
Instead of reverting this commit, just update pw->pwname directly.
Change-Id: I565360c6e2f970637422e8b01998d3fc29874ec4
Reviewed-on: http://gerrit.openafs.org/11145
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 01917b4497c5ad4f91bf8bd260a3cc6b7c25f150
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Jul 3 10:53:51 2014 -0400
auth: Clean up and document functions in netrestrict.c
Clean up and document parseNetRestrictFile_int and ParseNetInfoFile_int
in preparation for some future changes.
Change-Id: I3c8f1823ba1e042fb6ae68c6f0aba58128ef5b81
Reviewed-on: http://gerrit.openafs.org/11312
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 185966b471325ce15d05d28325e98faaa34ad146
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Mon Jul 28 13:26:22 2014 -0400
Export xdr_nbulkentries in liboafs_vldb
Change-Id: Id6ba0e4fdb802cc10aa98b32d7e7c9b605c90606
Reviewed-on: http://gerrit.openafs.org/11334
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 35247b0adb7f31775409fd86aa7a4c4db6267b53
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Oct 9 07:38:10 2013 +0200
liboafs_util: export symbols for tabular_output
Otherwise compilation fails on AIX.
Change-Id: Id22b7726d9aa56f9a2e0665257b3099baf774896
Reviewed-on: http://gerrit.openafs.org/10326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit cd8f24d9a1ba8563c6bef2b8d30885a753e8d30c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jun 10 14:47:31 2014 -0500
doc: Document fs listquota 2TB partition limit
We have previously documented that volumes over 2TB can result in
inaccuracies, but this documentation does not say how the 'partition'
field in "fs listquota" can be inaccurate. It is confusing to see a
usage of 0% for a partition that you know is being used, so try to
briefly explain in what way this field is inaccurate.
The reason we _under_-report the partition usage is that the
fileserver actually gives back PartBlocksAvail and PartMaxBlocks (not
"blocks used" and "blocks total"). So 1TB used and 4TB total is
truncated to 2TB and given back as 2TB free and 2TB total. One we hit
3TB used we'll report it as 1TB free 2TB total (50%) when the actual
usage is 75%.
Change-Id: I0b3de04ef2bd6cd32fdcb1a82cbac58d5d621e5b
Reviewed-on: http://gerrit.openafs.org/11245
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f889469e271cee5ccf362d829c7827307a6add4c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Feb 18 13:00:38 2014 -0600
vol: Make FindLinkHandle static and namei-only
FindLinkHandle is only referenced inside vol-salvage.c. Also, the
concept of a link table only exists on namei, so the function is only
used for the namei server (and it's only called by other namei-only
code).
So, make the function static, and put it inside the AFS_NAMEI_ENV
ifdef, to be a little more clear about where it can be used. Moving it
inside the AFS_NAMEI_ENV ifdef also avoids a warning if FindLinkHandle
is made static, since otherwise the function would be defined but
unused on non-namei.
This change should incur no difference in behavior; it is just code
reorganization.
Change-Id: Ia8cdadafaf15c724462f600514aa59910619a090
Reviewed-on: http://gerrit.openafs.org/10848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 4103aee514615c46e919202fb7842b9b2e254ff9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 14 13:17:27 2014 -0500
ubik: Unlock version lock before udisk_end
Currently, BeginTrans calls udisk_end with UBIK_VERSION_LOCK held when
it gets an error from DISK_Begin. However, udisk_end itself acquires
UBIK_VERSION_LOCK to update the database flags, so this causes a
deadlock.
So, unlock UBIK_VERSION_LOCK before calling udisk_end. Also unlock it
before calling DISK_Abort, udisk_abort, and DISK_Begin, as well, since
none of those modify fields protected by UBIK_VERSION_LOCK. (Any read
access is allowed because we DBHOLD the database.) This commit unlocks
the lock immediately after we are done modifying versioning
information, which is right after we change writeTidCounter for write
transactions.
Change-Id: I31343d67c82734ff88b76bec740ef16767bb9667
Reviewed-on: http://gerrit.openafs.org/11541
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b19bb7db413de426984f6ddb79b7b97ea478ffaf
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Oct 13 15:06:36 2014 -0500
ubik: Convert DoProbe 'i' to 'nconns'
DoProbe was using the variable 'i' to keep track of how many
connections we have in the conns array. Keep track of this separately
using a variable called 'nconns' instead, to make this function a bit
less confusing.
Change-Id: Ica2b4901c083b315e901366820042fad64030b3c
Reviewed-on: http://gerrit.openafs.org/11540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8ce37d0d4aa4e6107f79efaf5027f31ea5a17604
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Nov 13 22:28:08 2014 -0500
libafs: remove "Please install afsd with check server daemon" warning
Apparently, ancient versions of afsd did not start the check server
daemon (AFSOP_START_CS). The afs_Daemon tries to detect when the check
server daemon is not running and issues a warning to upgrade afsd. The
afs_Daemon waits for the cache initialization to complete (AFSOP_GO)
before detecting if the cache server daemon is started.
Unfortunately, when running with memcache, the cache initialization is
fast enough to race with the start of the check server daemon, and the
"Please install afsd with check server daemon" message is sometimes
printed to the syslog.
Since all modern versions of afsd do start the check server daemon, this
error message is no longer needed, so just remove the message and the
flag used to print it on only once.
Change-Id: If6a57ca0e6fb7e20a1e104c46416139cf5fe785a
Reviewed-on: http://gerrit.openafs.org/11602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e1f6e4e8f70b0994ba7fdfaeb9df926709b806b
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Mar 8 19:19:05 2013 -0500
Free security objects used in VolForward
VolForward and VolForwardMulti create rx security objects, but
never free them. The RXS_Close's are positioned where they are
to limit the need for conditionals
Change-Id: Iec6879270ad54c30c1fea571cea583afaca9364b
Reviewed-on: http://gerrit.openafs.org/9527
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit aea3c2a327860297168ea42bb72145b44e6e5acf
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 19:52:51 2013 +0100
build-sys: fix indentation in test code
Change-Id: If2c0c2a0b0b01bb425f8c1658cef9df232844b1c
Reviewed-on: http://gerrit.openafs.org/10012
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7d689390a89823df8a102c844d313c1c7a2c096a
Author: Sami Kerola <kerolasa@iki.fi>
Date: Wed Jun 19 21:15:19 2013 +0100
build-sys: fix m4 quotation to make upstream autotools to work
Macro arguments for AC_ARG_WITH, such as AC_CHECK_PROGS, need to be
quoted. Unless they are the latest version of autoconf will expand
macros slightly wrong way making the configure to fail at line where
there are only two ticks.
$ ./regen.sh
[...]
$ automake -a -f
[...]
automake: error: no 'Makefile.am' found for any configure output
$ ./configure
[...]
checking pkg-config is at least version 0.9.0... yes
./configure: line 13348: syntax error near unexpected token `newline'
./configure: line 13348: ` '''
Notice that the 'automake' run is needed in order to avoid later
configure error, which would look something like.
configure: error: cannot find install-sh, install.sh, or shtool in build-tools "."/build-tools
Change-Id: I39476270f351d2f5b332c5c945d6ac67fe16dd82
Reviewed-on: http://gerrit.openafs.org/9995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 23d81757394824702c3e8bce31fd0f6d568dd680
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Wed May 29 13:24:37 2013 -0400
Remove UKERNEL code from files that don't need it
Remove #ifdef UKERNEL sections from auth, kauth, ptserver, and ubik sources
that are no longer part of libuafs
Change-Id: I515f65c7e634d9562680c60666a15758261aaae0
Reviewed-on: http://gerrit.openafs.org/9955
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 8b0a296bef8529cf66664b0713a3b451e3b5a5ec
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Wed May 29 13:26:29 2013 -0400
Remove kauth headers from afs_usrops.c
Since ka_* functions are no longer called from here, we don't need
the headers
Change-Id: I538c27cf4fe2f16811d1d3056b25054c80ba5b2a
Reviewed-on: http://gerrit.openafs.org/9956
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1df1a68535bcf243b7f6c43f79bc597322719ff8
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Wed May 29 13:05:15 2013 -0400
rxgen: skip ubik for KERNEL
Declare ubik rxgen stubs only for !KERNEL, UKERNEL doesn't need them anymore.
Don't declare ubik_client or #include ubik.h on KERNEL or UKERNEL.
Change-Id: I0b1587eb46e9efbf627f04c74e0d76f9858bffd0
Reviewed-on: http://gerrit.openafs.org/9954
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c09785aa036125074db03a799f7dfebb411f4852
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun May 20 17:20:54 2012 -0500
FBSD: Drop afs_xvcache for vgone()
For FreeBSD, osi_TryEvictVCache was calling vgone() without dropping
afs_xvcache. Prior to aad83a30a82407bfa6ac15b49fd31d69b563e898, this
is what osi_TryEvictVCache did, and since the 'slept' pointer
represents whether we dropped xvcache (not whether we dropped glock),
it seems like this is the intention of the code.
Change-Id: Icb8cc86d972d7ca717bd91e250771d90931e1ba7
Reviewed-on: http://gerrit.openafs.org/7434
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b656710d30e6227c5bab75805ef422d237359f46
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun May 20 17:16:37 2012 -0500
FBSD: Do not vgone() in osi_VM_FlushVCache
osi_VM_FlushVCache just needs to remove VM references to the given
vcache; calling vgone() entirely should be unnecessary. Remove the
call to vgone() and other osi_TryEvictVCache-ish stuff, and just try
to cache_purge the vnode, like the other BSD implementations do.
Change-Id: I71d71f137c04d9ef3625f6a8ae22f0ffb90b9637
Reviewed-on: http://gerrit.openafs.org/7433
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0315bb393fa9429361e27478832e8a4ed68182d4
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed May 28 10:47:32 2014 -0400
Rewrap some long lines in the toplevel Makefile
Only rewrap long lines in make scope; long lines in shell scope
are untouched.
We are inconsistent about whether continuation lines for listing
the dependencies of a target are indented by one or two tabs,
which this commit does not fix.
Change-Id: I2e438a0f42faa2ef7922d2c3b143e14bc82de826
Reviewed-on: http://gerrit.openafs.org/11178
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 138017efd8166f248d6a1706e5851f2074ad1b34
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed May 15 18:16:00 2013 -0400
Remove FOREIGN
It has been unused since the original import of IBM's code.
Change-Id: Ieec597c76e53453d012f1cd86f6860ae60dade5c
Reviewed-on: http://gerrit.openafs.org/9918
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit bd6859861d7331569081d03450db80a0b476875d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 29 16:14:23 2013 -0500
salvager: Don't lie about locked-ness to namei_SLC
We have not locked the linktable with a prior call to
namei_GetLinkCount. So don't claim that we did.
Change-Id: I43adf92b60a0e46b90ae624e4713747585d12c67
Reviewed-on: http://gerrit.openafs.org/10198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit bdd8c60e798cd1cc6d9e6ec4ee55d60eab1574ca
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 29 16:00:37 2013 -0500
namei: Remove namei_SetNonZLC
This function is unused. Remove it.
Change-Id: Ie48d5370187c851afdd7cd359115d9e74d001aae
Reviewed-on: http://gerrit.openafs.org/10197
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 752d77b5561bfb6b70e203d3bfcddd93c9dffa12
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 29 15:33:49 2013 -0500
namei: IH_REALLYCLOSE special inode on delete
When we delete a special inode, we should IH_REALLYCLOSE it, to ensure
no other cached file handles are open for that special inode. However,
currently PurgeHeader_r does this, and then IH_DECs the special
inodes. On namei, calling IH_DEC on a special inode causes the inode
to be opened, so we create a cached file handle right after we closed
all cached file handles for that inode with IH_REALLYCLOSE.
Making namei IH_DEC not open an FdHandle_t for the given file is
non-trivial, at least when dec'ing the linktable. So instead, just
make namei IH_DEC itself issue the IH_REALLYCLOSE right before the
actual unlink() call.
With this, we can keep the cached file handle open for special inodes
until right before they are actually deleted, so we don't issue extra
unnecessary open()s and close()s.
Change-Id: I35b234ab429bc7cd0f29654cc8f854c82c961071
Reviewed-on: http://gerrit.openafs.org/10196
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5b62fac45d9eab00626f8aba9d9994d9138980c0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 29 15:16:00 2013 -0500
namei: Remove redundant linktable SetLinkCount
If we're setting the linktable linkcount to 0, we're about to delete
the whole linktable. So, don't bother setting the link count. Still
make sure we unlock the linktable, as we still have it locked at this
point, from the previous GetLinkCount call.
Change-Id: Ia00c1e14de6b8fcd69d594f0dbdbafa32b066dc5
Reviewed-on: http://gerrit.openafs.org/10195
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit d527a8082507bf091f89c7964ce152dfce5d4052
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Sat Jun 15 18:58:13 2013 -0400
Fix unchecked calls to asprintf
The return value of asprintf() is the number of bytes printed, or -1 if there
was an error allocating a large enough buffer. In the latter case, the value
of the result string is undefined, and so it cannot be counted on to be NULL.
This change fixes numerous places where the result of asprintf is checked
incorrectly (by examining the output pointer and not the return value) or not
at all.
Change-Id: I9fef14d60c096795d59c42798f3906041fb18c86
Reviewed-on: http://gerrit.openafs.org/9978
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 13c1684b59d5780e205f451da1a7d7f61f5ce78d
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Jan 7 13:33:12 2013 -0500
volser: make splitvol use VolumeId
convert split volume rpc to also use volumeid type
Change-Id: I6b1ed670a0abdc1487daa65b7e136a1370afd5fd
Reviewed-on: http://gerrit.openafs.org/8888
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 81a1a53a367f550f6804c7fc562498534ce10d51
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 8 16:51:33 2014 -0400
Clean up our cleaning
'make clean' and 'make maintainer-clean' still leave around a fair
number of droppings, prior to this commit.
We were not descending into the 'tests' top-level directory while
cleaning. Furthermore, tests/opr/Makefile needed $(LT_CLEAN), and
tests/rx/Makefile needed to spell it correctly.
The libtoolization places a lot of files to be removed in the
'pristine' target.
The processing used to implement the =include directive in the pod
sources for the man pages leaves around the non-.in versions of
files; we should clean that up in the 'pristine' target as well.
The 'pristine' target should likewise remove the man pages which
are generated from the pod files.
Additionally, the documentation build uses a Doxyfile which is
output by configure; that should be removed (if present) by the
'distclean' target.
When hcrypto was converted to libtool, the use of ${OBJECTS} in
the clean target was missed, so we were leaving around most of the
actual object files -- $(LT_CLEAN) does not handle this for us.
Change the rule to remove *.o as is done elsewhere.
The conversion of libafsrpc to libtool added a convenience library
libafsrpc_sys.la, and changed how syscall.o was generated on
most architectures, to be the result of compiling an empty .c file
(instead of just an empty .o file). This introduced a new
intermediate file, syscall.c, which must be cleaned up.
tvolser was only listing volserver and not vos in its list of
executables to remove while cleaning.
The conversion of venus/test to libtool was not done quite right.
Makefile.libtool and the .lo suffix are only needed when libtool
is being used to link *libraries*; just Makefile.pthread suffices
when libtool is being used to link executables. As such, remove
the inclusion of Makefile.libtool, and change the .lo targets back
to regular .o ones, and add back *.o to the list of files to remove
in the 'clean' target (it was needed there even without the
other changes to that Makefile).
Change-Id: Ifbc3eee4ad2dce54df991301bc5edd11eb29a24a
Reviewed-on: http://gerrit.openafs.org/11532
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8f2fa9d6393a958080387e8d84f6b8cd032b5ff8
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Sep 24 17:50:02 2014 -0500
afs: Consolidate fheader initialization
We were initializing an afs_fheader structure in two different places,
with the same values. Consolidate these into a single function, so
updating the structure is easier. Also zero the whole structure, just
to make sure everything is initialized, even if the structure changes.
This commit should have no behavior impact; it is just code
reorganization.
Change-Id: If90757166d8490eaa053aa086c7b95349a62332e
Reviewed-on: http://gerrit.openafs.org/11510
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0125d8c911faf0706667a1733fc086adae6decce
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Nov 20 16:54:25 2014 -0500
vos: fix crash when getting a non-loopback host address
Fix a crash in vos when trying to find a non loopback server address.
The struct hostent h_addr_list field is a null terminated array of
pointers to addresses, in network byte order. The struct hostent length
field is not the length of the h_addr_list array (as one would expect),
but rather the length of an address in bytes, which is always 4 for IP
version 4 addresses.
Verify the returned addresses are IPv4 and take care to not iterate
beyond the end of the address pointer array.
The non-loopback address check was introduced
commit dc2a4fe4e949c250ca25708aa5a6dd575878fd7e.
Change-Id: I75dff5ed2a7dd3c4bd6605b375a7a2ffa91eff01
Reviewed-on: http://gerrit.openafs.org/11609
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 21c9f5341ecb7ef17f37f19406804971090f276f
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Dec 4 18:43:51 2013 -0500
libafs: fix some nits around the symlink VOP
Commit 3f4c1099b7b (gerrit 10474) introduced a few issues, addressed here.
vpp is idiomatically of type 'struct vnode *', not 'struct vcache *';
use pvc as the name of the parent vcache pointer instead.
Fix whitespace.
Change-Id: Ic5d98a43446861bb571fe5a260e7ae1eea1051fd
Reviewed-on: http://gerrit.openafs.org/10531
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ba0b0986ecd6407fc07d5733ca741c1e5fa7bf52
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 6 19:20:27 2014 -0400
Windows: Fix cm_AppendServerList
Should use || and not | as the operator when testing for
NULL pointers.
Change-Id: I00afe64aec4f965d6a831028b546ed01d8e9672a
Reviewed-on: http://gerrit.openafs.org/11523
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3b8c4abf81ea90e7f24fb7d729062ebb0753043d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Apr 4 10:14:15 2014 -0400
cmd: avoid piggy-backing flags in the help string
Remove the hack to piggy-back the hidden command option
in the help string argument.
Change-Id: Iedcb6b96e98b766e3ef2c87cd6e5d41874f2c0b7
Reviewed-on: http://gerrit.openafs.org/10982
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0adad43d8e400e273ae243cc98ab1503673eb8be
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 21 00:25:45 2014 -0400
cmd: add flags argument to create syntax function
Add the flags argument to cmd_CreateSyntax() and update all callers.
The flags argument will be used to set command options, such as
CMD_HIDDEN.
Change-Id: Ia51be9635f262516cb084d236a9e0756f608bf16
Reviewed-on: http://gerrit.openafs.org/11430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 744a0e6df11ceefde0885a2ab737a8e689762d53
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Tue Aug 12 21:56:22 2014 -0400
FBSD: osi_vcache: remove support for unsupported FreeBSD releases
Support for FreeBSD 7.x terminated in early 2013, and it's highly
unlikely that anyone was successfully using OpenAFS in that
environment. OpenAFS has not been tested on 7.x since at least that
time, probably longer. This removes the #ifdefs that support pre-8.0
releases.
Change-Id: I01cbce2d98f02755b170df34d948a94525df3853
Reviewed-on: http://gerrit.openafs.org/11382
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 94d5807d82cc863eefee2814bcc71a7c91f88d51
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sun Sep 7 20:41:06 2014 -0400
Export xdr_nbulkentries from liboafs_vldb
Change-Id: I117b875189f4f9de971a99ff68eca470515a11ad
Reviewed-on: http://gerrit.openafs.org/11449
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e053b6bf435519cbbdedaef23f537992f3b50a15
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sun Jul 27 20:16:35 2014 -0400
Move vos COMMONPARMS to a larger offset
Currently, vos.c leaves a gap of 12 in the argument handling array
before its common operations (-verbose, -noauth, etc.); 'vos each'
will take more, so move that to 25.
While here, switch to named constants for these arguments, which
should make it easier to do this again, if ever necessary.
Change-Id: Idc4424e5fe4efd78389ea8421db000a361b461ec
Reviewed-on: http://gerrit.openafs.org/11332
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit 562b8f39d14fbcbabb9b39547c3ac81516f6b6d2
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Nov 27 17:31:16 2013 -0500
rx: Named values for securityObjectStats types
Stop using hardcoded constants and use defined symbols for these
values.
Change-Id: I3edcf809572cb8c8360af19dcab7a12c4d1be4a9
Reviewed-on: http://gerrit.openafs.org/10528
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit da12da791e53c8f1ff7f67eda1b58d53a3a2e1cc
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 26 07:35:29 2014 -0400
Disallow creating users with ANONYMOUSID
It can result only in sadness.
Document this restriction alongside UID 0 as a reserved number.
Change-Id: Ibea2d98bc15a730bc85e84477791ca45a40f2d92
Reviewed-on: http://gerrit.openafs.org/10950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit cb8195d2d6ce1c01e132c05c1bf5593eab45b2c6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 2 17:51:46 2014 -0500
systemd: RemainAfterExit in openafs-client.service
Currently, if the client is started without any options that require
an extra thread (like -afsdb), all processes spawned by afsd will
exit. There may be some kernel threads still active, but those are
spawned by the kernel module, and are not child processes of the
parent afsd process, or anything like that.
Since we are a Type=forking service in systemd, systemd interprets
this situation to mean that the service has stopped successfully, and
then runs the ExecStop commands. So, for example, if our AFSD_ARGS in
our sysconfig is "-fakestat -afsdb", the service starts as normal. But
if it is changed to "-fakestat", then when openafs-client.service is
started, it immediately stops again.
To avoid this, turn on the systemd option RemainAfterExit, which tells
systemd that the service has not stopped if all of our processes have
exited. The client service will thus remain running until it is
stopped.
Issue reported by Rich Sudlow.
Change-Id: If760d3617d4afbcfac923df726eb58b03ce25771
Reviewed-on: http://gerrit.openafs.org/11440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
commit cbf67da1e5b8134be58bb1632be6ea69f2052cf5
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Thu Apr 17 11:03:11 2014 -0500
NetBSD osi_crypto: use cprng(9) for random source on NetBSD 6.99/7.x
Change-Id: Id8ee7f149cdc921989a5de7dda35739147de0014
Reviewed-on: http://gerrit.openafs.org/11086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ce0cad182cddd21ccdebbf05a3e2379c7fcbe8fe
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Nov 19 14:14:07 2014 -0500
Update CellServDB to 20141117 snapshot
This should be all the locations we keep it in-tree.
Change-Id: I6819bf0658766aaad21ad38417295616418d41c5
Reviewed-on: http://gerrit.openafs.org/11607
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f8ec0c9d559cc61561d0245f133cb162c4b6f6d5
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Thu Apr 17 12:32:17 2014 -0500
NetBSD: catch up to <sys/simplelock.h> removal in NetBSD 6.99.x
Change-Id: I2c663fc426914e978e98c6003419503b57a020d3
Reviewed-on: http://gerrit.openafs.org/11087
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7ae5b73a90940fe693fd5a726aa31408bd7aec39
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Oct 31 23:45:13 2014 -0400
fix whitespace errors in acinclude.m4
Use tabs instead of spaces in the sysname lookup case
statement for the macos cases.
Change-Id: Iee03d1b593aee4f6c4bc2488b069b21e116c9f1d
Reviewed-on: http://gerrit.openafs.org/11566
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a9a3cb2efff7e6c020be4687b004d157bc070ac6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 5 10:22:00 2014 -0600
LINUX: Avoid check for key_type.match existence
Commit b5de4a9f removed our key_type 'match' function for kernels that
do not have such a 'match' function pointer. However, this added a
configure test where we are supposed to fail for the "new" behavior,
which is discouraged.
This causes an actual problem, because this test will fail on at least
RHEL5, due to arguably unrelated reasons (the header file for the
relevant struct is in key.h instead of key-type.h). And so, in that
situation we avoid defining a 'match' function callback, meaning our
'match' function callback is NULL, which causes a panic when we try to
actually look up keys for a PAG.
To fix this, transform the 'match' config test into one where we
succeed for the "new" behavior. We do this by testing for the
existence of the new functionality that replaced the old 'match'
function, which is the match_preparse function (specifically, the
'cmp' field in the structure accepted by match_preparse). This should
cause unrelated compilation errors to cause us to revert to the "old"
behavior instead of the "new" behavior. At worst, this should cause
build issues if we get the config test wrong (since we will try to use
the 'match' function definition that does not exist), instead of
panicing at runtime.
Note that while we test for key_type.match_preparse, we don't actually
use that function, since our 'match' functionality is the same as the
default behavior (according to b5de4a9f). So, we can avoid defining
any such function for newer kernels.
Thanks to Stephan Wiesand for bisecting this issue.
Change-Id: If6f93d6b5340fa738a55adeb7778d26ff5dbacc1
Reviewed-on: http://gerrit.openafs.org/11589
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 255c0a564fce8616a2ebc9e6d1c2d7370b1d6908
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Fri Feb 7 11:23:32 2014 +0100
rx: initialize memory before use
initialize sockaddr_in.sin_zero before using. cosmetic, might fix some
compiler warnings.
Change-Id: Ib9c4707373ca98742f6a5e28e60006499527fa38
Reviewed-on: http://gerrit.openafs.org/10816
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7583f97d5f19aa2d207f8a35a1a3a8b76f672e30
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 15 15:03:36 2014 -0400
Allow compiling with KERNEL and AFS_PTHREAD_ENV
Add the necessary preprocessor conditionals to allow building
libuafs with AFS_PTHREAD_ENV defined.
A follow-up commit will switch to building libuafs using libtool,
which will set the pthread compiler/linker flags. UKERNEL is already
using the pthread primitives for its internal kernel synchronization,
so there should not be any harm from additionally specifying the
pthread build arguments.
This change was produced mostly in a mechanical fashion, attempting
to perform such a build, and eliminating compiler and linker errors
in an iterative process. No concerted effort has been made to audit
the whole kernel codebase for correctness of conditionals, but the
linktest executable does link (that is, the overall build succeeds).
Change-Id: I14a3ab5fce72812d92ba5657c734783dbd086ee3
Reviewed-on: http://gerrit.openafs.org/11546
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a55d61b1f5206d4e8dffca0088e31c54836110f9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 15 12:19:44 2014 -0400
klog: make krb5_524 non-fatal for native K5 tokens
The krb5_524_conv_principal() function should fail whenever the Kerberos
v5 principal cannot safely be mapped onto a Kerberos v4 principal, and
does fail on some Kerberos v5 principals used in real-world AFS
deployments.
Prior to this patchset a failure was treated as a fatal error that
in turn prevents an AFS token from being generated or set into the
cache manager.
Prior to b1f9b4cb5dd295162ae51704310e9d6058008f0a the
krb5_524_conv_principal() function wasn't used and a local client
mapping was created. b1f9b4cb5dd295162ae51704310e9d6058008f0a
replaced the local mapping with the krb5 function because the local
mapping could be wrong and confusing.
The krb5_524_conv_principal() function as applied to AFS tokens is
just a local guess. How the username in the token is interpreted by
the AFS server is up to the server.
krb5_524_conv_principal() is only used for Krb5 native tokens. For Krb4
tokens the krb5_524_convert_creds() function is used to obtain both the
Kerberos v4 ticket and the converted names from the KDC. Many
organizations used the krb524d service to perform name translation. When
the krb524d service is used, the name translation is performed by the KDC,
so there is no local call to krb5_524_conf_principal() which might fail.
As a result, disallowing the use of a native Krb5 token due to a failed
local name translation is a needless loss of functionality; the local name
translation is not an essential part of obtaining a token.
This patchset modifies the behavior such that krb5_524_conv_principal()
errors are non-fatal.
1. If -noprdb is not specified the error message is generated
and a NULL username is used.
2. If the username is NULL the prdb lookup is disabled.
3. If the username is NULL the informational messages do not
include a username.
4. If the username is NULL the username info provided to the
cache manager in the token description is the nul string.
Credit to Ben Kaduk for assistance with the wording of this
commit message.
Change-Id: Ib07131fc0ff4bf5319815213198c3f0adac17b10
Reviewed-on: http://gerrit.openafs.org/11542
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit d9a39f3580484a0818f2169f6db38fc685afda80
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Mon Oct 13 01:02:41 2014 -0400
Stylistic tweak lwp/process.o machinery
Rename process.s to process.default.s so that the name "process.s" is free
for use, and switch to using that as the ephemeral file name. This enables
the use of gcc for ${AS}, despite gcc's ignoring files with extensions that
it does not recognize.
Change-Id: Idc0716547770fe4fc94bc3fa2c223966f3f76c3b
Reviewed-on: http://gerrit.openafs.org/11535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 96e001088c7e22e992366d5a6dd03e300c858f43
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Oct 6 13:47:13 2014 -0400
tests: Fix fmt-t.c warning
'main' in fmt-t.c was declared as a prototype-less function, which
triggers a warning, which is an error with --enable-checking. Fix it
by declaring 'main' properly.
Change-Id: I45cfec591acd0ef8d7836c79e997e8ffe29b9e38
Reviewed-on: http://gerrit.openafs.org/11539
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
commit 6b93ad695e53a86dbe9eea13bd0ff651e1d8c9b7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Oct 24 17:17:07 2014 -0400
vldb_check: fix false mh block error message
Fix a false error message about invalid mh blocks when the vldb has more
than one mh block. To add insult to injury, vldb_check complains about
the wrong address and block number.
The flags field in the mh block header is in network byte order, in all
of the blocks, not just the first one. Be sure to convert all of them
to host byte order so the VLCONTBLOCK flag check works. Fix the error
message on the secondary blocks to show the correct address and block
number.
Example bogus error messages:
vldb_check ./vldb.DB0
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
address 132120 (offset 0x20458): Multihomed Block 0: Not a multihomed block
Change-Id: I31d96ad43f01fbf2774815184942be45e2d7820b
Reviewed-on: http://gerrit.openafs.org/11555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 46bc619c38591b831b61b3efa7fb7706fbd44527
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Oct 6 17:19:44 2014 -0400
Finish deorbiting libjuafs.a
Change I2074d5bc26e326db36b16e055431818ef1c69210 removed the separate
compilation/link of a libjuafs.a (since it was functionally identical
to the libuafs.a already being built), but retained a libjuafs.a in
TOP_LIBDIR for use by src/JAVA/libjafs/.
This commit adjusts src/JAVA/libjafs to refer to libuafs.a directly,
and removes references to libjuafs.a which are no longer relevant.
Change-Id: I0d02ea9e4be773ac50a04925c45e5f243650e21a
Reviewed-on: http://gerrit.openafs.org/11526
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 003519485db7a185f0e1b843e5b569977ff1224b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Oct 16 00:04:14 2014 -0400
Make afs_usrops.h more closely resemble reality
Remove prototypes for many routines which are not implemented.
(I thought some toolchains would complain about this sort of thing?
Maybe we disable it.)
Change-Id: Id09f494f1c64c2feb05ae82ead9898c08888a5de
Reviewed-on: http://gerrit.openafs.org/11547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 33f20e841d1ba39761b292d8a69aec2e6fdf883d
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 19 23:04:10 2014 -0400
Build libuafs with libtool
Use the standard program for building PIC and non-PIC object files,
instead of rolling our own. This allows us to pull the build rules
into the Makefile.common, leaving just compiler flags and similar
in the MakefileProtos.
This does change the build flags being used to compile these files
somewhat -- the old CRULE1 and CRULEPIC used CC instead of CCOBJ
or MT_CC, and did not pass MT_CFLAGS, but it should be safe to
move to the standard compiler invocations. We can also eliminate
the libuafs-specific 'OPTF' variable which expands to OPTMZ almost
everywhere.
Rename our COMMON_INCLUDE to MODULE_INCLUDE so it's picked up properly
by the standard build rules; this will let us remove
${TOP_OBJDIR}/src/config and ${TOP_INCDIR} once the rest of the
build rules in this Makefile are converted to use libtool, as those
include directories are already added by COMMON_INCL in Makefile.config.
As a side effect, we get rid of the LIBUAFS make variable -- all sites
were defining it to libuafs.a anyway, so we can just hardcode it.
We can also build a shared libuafs.la "for free". Don't install
it anywhere just yet, though.
Change-Id: I2bda2f40bbd0aa808c24e074d2d7bcd329f6b77e
Reviewed-on: http://gerrit.openafs.org/11472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit ba229cbf45bce094d1a93f800483c4b98d32f6db
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Oct 16 12:46:11 2014 -0400
Attempt to make hcrypto parallel-safe
make -j4 on a Fedora buildbot machine failed to compile engine.lo
because hcrypto/rand.h was missing.
Change-Id: I2750db9ed932144fbc66ede41d24c4930172a446
Reviewed-on: http://gerrit.openafs.org/11548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c7f1db24d5d0e1fdc956896c7b9804657e4d5b28
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 15 19:49:12 2014 -0400
(Partially) unify XDR for libuafs and libafs
The libuafs build was getting xdr_vector() from both afsaux.c and
xdr_update.c, but because of the rules for creating static libraries,
this did not cause build errors.
The libafs build is sensitive to duplicate symbols, and was only
getting xdr_vector() from afsaux.c; libafs was not building xdr_update.c
or xdr_refernce.c (that is not a typo).
Remove duplicate xdr_vector() from afsaux.c, and build xdr_update.c
and xdr_refernce.c into libafs.
Remove the unused #define of AUTH_DES.
Change-Id: I58ea595d424801697acb07406664ede33aeaf026
Reviewed-on: http://gerrit.openafs.org/11545
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 67d168511e716d12cc68476a7fda7e984e2ff96a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 15 17:52:22 2014 -0400
Avoid AFS_version conflicts in uafs
libuafs links in both afsd.o and AFS_component_version_number.o;
afsd.c #includes AFS_component_Version_number.c, which causes
symbol conflicts when linking shared.
Don't include the version file when compiling for UKERNEL, to
avoid the conflict.
Change-Id: I9474faf10e029d0022b12431aad51e27412b19fc
Reviewed-on: http://gerrit.openafs.org/11544
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 7223d7b00c20032a957bd6f82ddaf2e0c7d522a9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Apr 7 21:54:46 2014 -0400
Do not install kauth manpages when kauth is disabled
Commit 5afe7a882b0bb90a515e505d9ffce4f644633f06 added a configure
option to disable the installation of the kauth suite, but did not
add any logic to disable the installation of the corresponding man
pages, so those man pages were always installed regardless of the
options to configure.
Add logic to doc/man-pages/Makefile.in to create .noinstall files
for man pages which should not be installed in the current configuration.
Depend on the Makefile (which will be regenerated by configure) in
this target so as to attempt to behave properly if configure is re-run
with different arguments in the same working tree.
Change-Id: I19b77a9f20fe27c49db14f3e800d8c77cda1bb3a
Reviewed-on: http://gerrit.openafs.org/10993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c36a1525f13d3900817caea7dbd0c934cc93931e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 14 17:02:55 2014 -0500
auth: Fix GetNthIdentityOrUser EOF return code
Before commit 0af17e7e, afsconf_GetNthUser always returned 1 on
failure, to indicate to the caller that they should stop traversing
over the list. After commit 0af17e7e, when reaching the end of the
list, we return EIO or -1. This causes 'bos listusers' invocations to
always fail, since 'bos' clients expect to get the code 1 when
reaching the end of the SUsers list.
To fix this, make GetNthIdentityOrUser always return -1 when searching
beyond the end of the list. For the newer interface
afsconf_GetNthIdentity, we return this as-is, to have a separate
return code specifically for EOF, but still allowing us to return any
positive error code in case of an error.
For the older interface afsconf_GetNthUser, return 1 in this
situation, to retain compatibility with the old interface (both at the
libauth level and on the wire).
Change-Id: I2db4760440d7846dc290a05fa24e24ec97a02f12
Reviewed-on: http://gerrit.openafs.org/7377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 01bbe3772734c496b64af2cd7c213cc5f6533ba6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 15 15:04:16 2014 -0400
Remove dead code
RX_ENABLE_TSFPQ is never defined for KERNEL builds.
In any case, there's a syntax error in the removed code, with a
missing '&' before rx_stats.receivePktAllocFailures.
Change-Id: I3aaf3d80f7dfee6836016b65b057e1312d716368
Reviewed-on: http://gerrit.openafs.org/11543
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f39dd54e11dff5e2b4da3eec419ae7c0825c210f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Oct 30 19:51:29 2014 -0400
Build fix for recent FreeBSD -current
r273707 added a flags argument to syscall_register(), so
add the appropriate version check in param.generic_fbsd.h
and ues that in the main code.
Change-Id: I7ddf6e1295d7ed94625f19fdeee4e38ef5fd511e
Reviewed-on: http://gerrit.openafs.org/11565
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit ae8df21d26dd3462c75beb89e6ebbe6dedebd106
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 21 00:06:26 2014 -0400
remove cmd-suite-option-for-hiding-admin-commands
Remove the incomplete and non-functional cmd option for hiding admin
commands, introduced in commit 36d02757fd6863a845163daf0d730bdcc0a28343.
This patch removes the CMD_ADMIN flag, the non-functional help -admin
parameter, and the non-functional cmd_IsAdministratorCommand() function.
Thanks to Jeffrey Altman for pointing out this old commit and for
suggestions on cleanup.
Change-Id: I72c7d2ed7109b1238713fe0d6d177c5af6fc6b7d
Reviewed-on: http://gerrit.openafs.org/11429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c22e1797e8c200140f3885647d0ddcb901e8fc37
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sun Nov 2 01:22:52 2014 -0500
Add sparc_linux26 sysname and params
A copy of sparc_linux24 without #undef USE_UCONTEXT. Userland
tested on a Debian unstable-release machine.
Change-Id: I69a4226622748b18f5835d6517297b2d3750586a
Reviewed-on: http://gerrit.openafs.org/11567
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 27b66f24aad04d1e74a7aa43d6ebcca0b98af18f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Oct 30 19:38:50 2014 -0400
Attempt to make the server install bits current
Avoid using -noauth, and mention both the rxkad.keytab (1.6)
and the KeyFileExt (as 1.8, though it's only master at present).
To support these, move forward the use of kadmin to extract
the afs/cell principal's keytab.
Move the buserver's creation to the end of the list and mark it
as optional (many sites do not run the AFS backup suite).
Deindent some programlisting blocks so they don't flow off the
page as much in the PDF version.
Drop vos syncserv and vos syncvldb from the tasks for setting
up a new server; they should not be needed, as the new db server
should pick up the existing database when it joins the quorum.
General edits for clarity, whitespace and such.
Change-Id: I951ec3ee237e4c83a17c82802328f0a454b61097
Reviewed-on: http://gerrit.openafs.org/11581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f0ba037073bc215132c02c40e66732f2514983d6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 13:33:56 2014 -0500
Switch other-linux to built-from-source
Don't talk about tarball distributions; we shouldn't be
doing those anymore. Also switch away from 'make dest'.
Change-Id: If0badacab4b3c2492e90867328153f83da82bfc1
Reviewed-on: http://gerrit.openafs.org/11580
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 112064b98ff14da8418d1b4fe0844ef1adb9f258
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 13:13:44 2014 -0500
Add a Debian/Ubuntu subsection
As an alternative to rpm-based systems or "systems packaged as
tar files". Luckily, the instructions are pretty simple.
Change-Id: I8045763b518465c3ffd7fe3f177fff98146033fb
Reviewed-on: http://gerrit.openafs.org/11579
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit face986d9440faa28c00dfbc5ff33a3a852ed14c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 16:47:16 2014 -0500
Deorbit upserver from the quickstart guide
It's not the recommended way to push updates anymore,
and clutters up the guide.
Change-Id: I248380f12609a2ca03f47602773dc08f230b6fbe
Reviewed-on: http://gerrit.openafs.org/11578
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit b83ba7e3fd950c88db3afedd989349e6fa7bb4d8
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 16:46:20 2014 -0500
Drop the non-DA fileserver
The instructions are clearer when we just tell people what
to do, and we think that dafs should be right for almost
everyone. Mention that the traditional fileserver is an
option and where to read about it, but nothing more.
Change-Id: I1fccceb8ee2bf2ec1e5afb0f5b034f029ee96c61
Reviewed-on: http://gerrit.openafs.org/11577
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2c6886bf8c62f72eb399d96508012ff7724e1180
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 12:59:14 2014 -0500
Reorder "Getting Started" sections
Put the ones most likely to be relevant at the top, instead
of sorting alphabetically.
Change-Id: I6ad80ee2a30b7192d8c8e4668234fa1789e1a213
Reviewed-on: http://gerrit.openafs.org/11576
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f71063b0324031178432468aff6dca12c3019f4b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 12:57:08 2014 -0500
Deorbit "Getting started on IRIX systems"
IRIX is mostly gone as an upstream. The case for removing this
is less clear than the case for removing the HP-UX docs, but
it still feels like clutter in this document.
Change-Id: Ib7e9bfc8f7ae8e08e9f12b70d5df615496f57bb6
Reviewed-on: http://gerrit.openafs.org/11575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit ce57b96ecb4274901d96a01c602dc747509d604e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Nov 3 12:55:55 2014 -0500
Deorbit "Getting started on HP-UX systems"
We don't really support HP-UX anymore; no need to clutter up
the documentation with it.
Change-Id: Ib75f4f137c3cfcb5ab2aece3746964f1cfbab051
Reviewed-on: http://gerrit.openafs.org/11574
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2e9c06056b6047f1b9f6fb8ad18caba3a849c2f4
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 29 09:10:21 2014 -0400
Update QuickStartGuide front matter
Bump copyright and, uh, major version for the "in progress" note...
Change-Id: I5edd235864138b82c84dc1c1218f849217efad1e
Reviewed-on: http://gerrit.openafs.org/11573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 86cdf6daa74e6f6f963eaf8c014b4ad5dc68d7e4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Aug 1 09:13:43 2014 -0400
roken: configure checks for inet_ntop and inet_pton
Change-Id: Idf2eee040235bbf1f34ed993c74dd5936ae063c6
Reviewed-on: http://gerrit.openafs.org/11584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit dedc1734e511329e06100b7c39cc33502e0581ab
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Fri Aug 1 08:56:02 2014 -0400
Import of code from heimdal
This commit updates the code imported from heimdal to
5dfaa0d10b8320293e85387778adcdd043dfc1fe (git2svn-syncpoint-master-311-g5dfaa0d)
New files are:
roken/inet_ntop.c
roken/inet_pton.c
Change-Id: Ice2f687c67550409b366fbea3e52ae42284f4cbd
Reviewed-on: http://gerrit.openafs.org/11583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f4c2befbdf1d8b251a2b029297c31c3ab1ba917c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Aug 1 08:38:45 2014 -0400
roken: add inet_ntop and inet_pton to the imported file list
Change-Id: If785d18e3fd5f333c62bff9ddee2c5835ee871db
Reviewed-on: http://gerrit.openafs.org/11582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit e4a8a7a38dbf29e89bc1a7b6b017447a6aa0c764
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Nov 3 19:06:15 2014 -0500
avoid writing loopback addresses into CellServDB
Do not use loopback addresses for the server side CellServDB file. Use
getaddrinfo() instead of gethostbyname() to look up a list of IPv4
addresses for a given hostname, and take the first non-loopback address.
This avoids writing a loopback address into the CellServDB on systems
such as Debian, which map the address 127.0.1.1 to the hostname in the
/etc/hosts file.
Change-Id: I11521df50262ca80c7db21b7b44671d94bef3587
Reviewed-on: http://gerrit.openafs.org/11585
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 9be7e23cc562a2dfec2dc4cd7614c5ca5f397789
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Oct 29 17:25:29 2014 -0400
Document the vldb (ubik) file format
Briefly document the vldb version 4 file format. Describe the vl
header, the vl entry, and mh extensions.
Thanks to Marcio Barbosa for an initial draft, comments, and review.
Thanks to Ben Kaduk the prdb.txt, and for an initial review and comments.
Change-Id: If3ca85419027a218b7bb1585f5d5cd4763ad5b26
Reviewed-on: http://gerrit.openafs.org/11564
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit ba1cc838ab4a80b7a7787c441a79aca31d84808c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 28 00:10:56 2014 -0500
LINUX: Avoid d_revalidate failure on mtpt mismatch
Currently, if afs_linux_dentry_revalidate is given an inode that
corresponds to a mtpt vcache ('vcp'), it resolves the mtpt to its root
dir if it's easy to do so (mvid and CMValid are set). Later on, we run
afs_lookup to see if looking up our dentry's name returns the same
vcache that we got; afs_lookup presumably will also resolve the mtpt
if it's easy to do so.
However, it is possible that afs_linux_dentry_revalidate and
afs_lookup will make different decisions as to whether or not they
resolve a mtpt to a dir. Specifically, if CMValid is cleared after
afs_linux_dentry_revalidate checks for it, but before afs_lookup does,
then afs_lookup will return a different vcache than
afs_linux_dentry_revalidate is expecting, even though the relevant
directory entry has not changed. That is, tvc is not equal to vcp, but
tvc could be a mtpt that resolves to vcp, or vice versa. CMValid can
be cleared by another thread at virtually any time, since this is
cleared in some situations when we're not sure if the mtpt resolution
is still valid (callbacks are broken, vldb cache entries expire, etc).
afs_linux_dentry_revalidate interprets this situation to mean that the
directory entry has changed, and so it eventually d_drop's the
associated dentry. The way that this manifests to users is that a
"fakestatted" mtpt can appear to be deleted effectively randomly, even
when nothing has changed. This can be a problem because this causes
the getcwd() syscall to return ENOENT when the working directory
involves such an affected directory.
To fix this situation, we just detect if afs_lookup returned either
'vcp' (our possibly-resolved vcache), or the original inode associated
with the dentry we are revalidating. If the returned vcache matches
either of these, then the entry is okay and we don't need to
invalidate or drop anything.
FIXES 131780
Change-Id: Ide1dd224d1ea1e29a82eb7130a010877cf4e9fc7
Reviewed-on: http://gerrit.openafs.org/11559
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit b5de4a9f42bb83ae03f2f647b11a1200a502d013
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Oct 23 11:27:55 2014 -0400
Linux 3.18: key_type no longer has a match op
Structure key_type no longer has a match op, and
overriding the default matching has to be done
differently.
Our current match op doesn't do anything special so there's
no need to try to override the defaults; just remove the
assignment of .match and the associated function.
Change-Id: I0ee195e47f40688d9a71ea62a0b87a4265363f05
Reviewed-on: http://gerrit.openafs.org/11563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit a42f01d5ebb13da575b3123800ee6990743155ab
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Oct 23 11:12:57 2014 -0400
Linux 3.18: d_invalidate can no longer return an error
d_invalidate is now defined as void and does not have
a return value to check.
Change-Id: Ief1b562db63877dde9f4a8ac4918b727a05b23bb
Reviewed-on: http://gerrit.openafs.org/11562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 882146b0e671e008e1d599cd34213bf940410d33
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 11 20:53:09 2014 -0400
viced: kill CLIENT_TO_ZERO macro
Move all struct client fields that are to be zeroed upon structure
reuse to a new struct client_to_zero. Include the new structure
within struct client and call memset() on that structure.
Change-Id: I0f83f5f18b41bc0d4f8e1f7f8e04cd5508cbe4e1
Reviewed-on: http://gerrit.openafs.org/11288
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 1b5d5afca69b4a5a6c4027d4b5968d4ebdadc89a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 11 20:40:47 2014 -0400
viced: kill HOST_TO_ZERO macro
Move all struct host fields that are zeroed into a new structure
host_to_zero which is then included in struct host as 'z'.
Remove the HOST_TO_ZERO macro entirely as its presence can lead
to the introduction of dangerous errors.
Change-Id: I44afd37413afae4e4357e68cdadf5c28784611c5
Reviewed-on: http://gerrit.openafs.org/11287
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: D Brashear <shadow@your-file-system.com>
commit fb67a8d4ef62387f8ed7d1ffc373a07475e70588
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 11 19:37:34 2014 -0400
viced: move host tmay fields before index
The index field and those after it in struct host do not get zeroed
when a host is reused. The placement of the tmay fields after index
in commit 9a0a8ca4d186cf953b87d9fae1a35f66090b060c results in the
use of uninitialized memory.
This change moves the tmay fields before index which permits
the HOST_TO_ZERO() macro to compute the correct size to be memset()
to zero.
Change-Id: I1f93bebb23c99eaa7826dafa8cd7497d1b49bb53
Reviewed-on: http://gerrit.openafs.org/11286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 235e88a36c1c26b5e5160510ce3b63e61d597e19
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Jun 12 14:20:24 2014 -0400
viced: remove obsolete comment about alignment
Alignment may have been historically relevant, but is no longer.
Remove the comment.
Also remove the unneeded 'dummy' field which does not provide
padding for a useful alignment.
Change-Id: I447fb73c379e6f86facd955a29ffd80e8929ceff
Reviewed-on: http://gerrit.openafs.org/11289
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 3b27be6692796bb5319dfa1ea0e01698bbf64aab
Author: D Brashear <shadow@your-file-system.com>
Date: Tue Oct 14 14:03:40 2014 -0400
libafs: avoid contaminating the return of lookup vnop
when we resort to checking the inlinebulk errors to see if a retry
is needed, do not overwrite the lookup return code; only decide if
a retry is needed.
problem case was where the first vnode returned EACCES and so
all vnodes were assumed to have failed, when just one did.
Change-Id: Ifd7361ce5af50a72817afa81d31d9cfbda906efd
Reviewed-on: http://gerrit.openafs.org/11537
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8f630226f6f1f73a4d816b72caab3bb1e4620312
Author: Christer Grafström <christer.grafstrom@ltu.se>
Date: Wed Oct 29 08:05:06 2014 +0100
Packaging support for MacOS X 10.10 "Yosemite"
This is just the packaging part of the patch submitted in the
RT ticket. The configuration part is in the preceding change.
FIXES 131946
Change-Id: Ic5b200b1f54d7f9f9552b0f9e2b881c3f0af9bc2
Reviewed-on: http://gerrit.openafs.org/11561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 4109785a891d802194ad11edb600a61de316d262
Author: Christer Grafström <christer.grafstrom@ltu.se>
Date: Wed Oct 29 07:56:35 2014 +0100
Add support for configuration of MacOS 10.10 "Yosemite"
This is just the configuration part of the patch submitted
in the RT ticket. The packaging part will will follow in the
next change.
FIXES 131946
Change-Id: Ic8835b1ddf317600483505a2d94d9f3568720804
Reviewed-on: http://gerrit.openafs.org/11560
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 8c78a44cf5197ceee6907e947074973138c442f0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Oct 27 16:39:34 2014 -0500
rx: Reset lastSendData when resetting call
Currently we use call->lastSendData to attempt to detect a stalled
call, if it's been too long since the last time the call sent any
data. However, we never initialize lastSendData to anything when
creating a new call.
This means that when rx_NewCall (or rxi_NewCall) returns, lastSendData
can be nonzero. This can happen if we reuse a DALLY call, or if we
pull a call off of rx_freeCallQueue. This can be a time very far in
the past, since the lastSendData time has not changed since the last
time the call was used; it will remain unchanged until a user of the
new call writes something to the call stream.
This can be a problem between the time when a caller creates a new
call with rx_NewCall and when the caller actually writes something to
the stream. Between those two times, if lastSendData happens to be set
to a time in the past, we may call rxi_CheckCall on that call, and
abort the call for being idle. The call will thus be aborted before it
even sent any data on the wire.
This is of particular concern for multi_Rx calls, since those can
create a large number of call structures, possibly introducing a delay
between calling rx_NewCall and writing anything to the stream (if one
of the later rx_NewCall invocations blocks waiting for an open call
channel, for instance, all of the previous allocated calls will stick
around unused for potentially a long time).
One such multi_Rx call is done by the cache manager, where it
periodically uses multi_Rx to call RXAFS_GetCapabilities to probe
fileservers for reachability. If this issue occurs during that
operation you can see a large number of servers get marked down for
code -9 (RX_CALL_IDLE), and then get marked as coming back up.
To fix this, set lastSendData to 0 when resetting a call, along with
most of the other fields in a call, to indicate that the call has
never sent any data. As long as lastSendData is 0, the call will never
get aborted with RX_CALL_IDLE, and this situation will be avoided.
This ensures that this issue cannot happen, since rxi_ResetCall is
guaranteed to be called at some point whenever we reuse a call
structure for any reason.
Change-Id: Ie96d1c640616fd5a234c635f60dfef4ad7c19d28
Reviewed-on: http://gerrit.openafs.org/11557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 616d19a2ebedf62e47a30c3357b3596aa234e011
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sat Oct 25 19:48:36 2014 -0400
Remove duplicate CREATE_SGUID_ADMIN_ONLY define
A trivial omission from 30433f36a953187f27b5db9fb432f3b7dce91e6b
Change-Id: If85ebd73a68c6226077b690243a94c2e40f88149
Reviewed-on: http://gerrit.openafs.org/11556
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c04c57c6c57d2e0b09ba60b68de738b636c9450b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Oct 22 12:07:37 2014 -0400
Remove documentation of 'program'
This tool was removed in 2006 in commit
b405868ca02880207bda1ec6eb4e21c7b0ac250c. Also remove mention of
wsadmin, removed at the same time.
Change-Id: I8475b951f576f10ddd2f4b72565354b9fba41d94
Reviewed-on: http://gerrit.openafs.org/11554
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 6e167d4646992e95d294927b238e21f39b1169e3
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Oct 6 22:54:09 2014 -0400
Remove unused -k argument to fileserver
It has been unused since the LWP fileserver was removed.
It was used to set the LWP stack size.
Change-Id: I2ffd3a2f02049a307b668a46b62b31dc9bc128a8
Reviewed-on: http://gerrit.openafs.org/11527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 89febdba40119c3f1e2d33901bdce4f649a12400
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Oct 6 17:06:53 2014 -0400
Warn at configure time about bitmap-later
It's superseded by DAFS and is slated for removal post-1.8.
Change-Id: Id2c870fb76eeb470bbf393e99654df434b1a1a86
Reviewed-on: http://gerrit.openafs.org/11525
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f7ddab6606617cb587a0f667bba6837c8103d5e9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Oct 6 13:31:23 2014 -0400
Merge pam into the kauth configure option
Realistically, you shouldn't be using either kauth or pam. The
pam functionality provided by the module in our tree is only
useful in a kaserver-style environment, so it makes sense to merge
the two knobs.
Retain a separate enable_pam variable so that it can be overridden
on a per-architecture basis where it is known to not work. Consolidate
the two places where we did such checks, as well.
Change-Id: I6bf39ee5002f943548c51d089fe612f7e2f0501b
Reviewed-on: http://gerrit.openafs.org/11524
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2c3a517e876013f24430462fc5a2eea25e5cd61d
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Sep 24 00:31:16 2014 -0400
Retire Makefile.shared
It has served its purpose, and been replaced by libtool.
Change-Id: Ifb4e2f585fb4239e9138daef82dcc7f41d7f2a99
Reviewed-on: http://gerrit.openafs.org/11485
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 6d2395ed2205d438cb8814689960b8f524454fea
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Sep 24 00:11:07 2014 -0400
Build kopenafs with libtool
Prior to this commit, we were installing libkopenafs.so.1.1. As
for the other libtoolizations, bump SONAME to 2.0 as a general
precaution.
Change-Id: I6edef89737cf057eb8aab8dfe2eacfb4f417dd6e
Reviewed-on: http://gerrit.openafs.org/11484
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 5815ee92a41cdcf105741d834042a5617dc4c219
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Sep 25 07:52:12 2014 -0300
Linux 3.17: Deal with d_splice_alias errors
In 3.17 the logic in d_splice_alias has changed. Of interest to
us is the fact that it will now return an EIO error if it finds
an existing connected directory for the dentry, where it would
previously have added a new alias for it. As a result the end
user can get EIO errors when accessing any file in a volume
if the volume was first accessed through a different path (ex:
RO path vs RW path).
This commit just restores the old behaviour, adding the directory
alias manually in the error case, which is what older versions
of d_splice_alias used to do.
Change-Id: I5558c64760e4cad2bd3dc648067d81020afc69b6
Reviewed-on: http://gerrit.openafs.org/11492
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 6a23ca5b6e8bcaf881be7a4c50bfba72d001e6cd
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Tue Sep 9 10:39:55 2014 -0300
Linux 3.17: No more typedef for ctl_table
The typedef has been removed so we need to use the structure
directly.
Note that the API for register_sysctl_table has also changed
with 3.17, but it reverted back to a form that existed
before and the configure tests handle it correctly.
Change-Id: If1fd9d27f795dee4b5aa2152dd09e0540d643a69
Reviewed-on: http://gerrit.openafs.org/11455
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit cadaea4f86427c4dc74f56fc66707e8cfb0166cb
Author: Anders Kaseorg <andersk@mit.edu>
Date: Wed Sep 3 18:26:36 2014 -0400
Linux: Refine openafs-client.service dependencies
Make sure that openafs-client is started after the network is online,
and before services that need remote-fs at startup.
Change-Id: Ib69e0c07f9079f47bbe5057626652c44039c433a
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/11441
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 57ca77786eb6c04519f9358f1456fdf5b8006757
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Sep 17 12:07:02 2014 -0400
Fix disk name initialization in scout
Scout needs to initialize names in scout_disk structures to prevent
the use of uninitialized data. However, '\0' is a NUL character
constant, i.e., the integer value 0, which is interpreted as NULL
(the pointer constant) in a pointer context, such as when assigned to
a variable of type char*. Since the name field in these structs is
passed to printing routines, the safe initialization value is the
empty string constant "", not a zero value.
Change-Id: Ie0530fc4fc090b226c0e54201b4a74158efddebd
Reviewed-on: http://gerrit.openafs.org/11469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 66a431bf82da5e09e89307c250991bfc12caf532
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Sep 16 22:57:53 2014 -0400
Build fixes for recent FreeBSD -current
Let's try a new paradigm of using flag checks in the main code,
which are based off of precise version checks in the FreeBSD-specific
param.h file. It's not quite configure checks, but is much more
granular.
Change-Id: I8274a8ad3747d3847cdec3ce8d521837fd5b2a92
Reviewed-on: http://gerrit.openafs.org/11467
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ec2382e060753dfdcaf84b9ac03e1534c65fcdbc
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 13:47:33 2014 -0400
Tweak AFSDIR_PATH_MAX definition
On recent Debian, we run into runtime errors in the test suite
because _POSIX_PATH_MAX is only 256, and that buffer is too small
for a call to realpath(). Use PATH_MAX if it's available and larger
than _POSIX_PATH_MAX, in a way that should be safe even when PATH_MAX
is not defined.
Change-Id: I39127e88d92b358245ece21131219380ca4be98a
Reviewed-on: http://gerrit.openafs.org/11453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 4514dbb1c4527a91a41e2a29c8a721091f6351a9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 13:42:27 2014 -0400
Let mancheck_utils ignore version subcommands
We don't have a man page for the 'version' subcommand, which has
"always" been present but only recently was exposed to the usage.
It's okay to not have a man page for it, so tell the test infrastructure
to not complain about its absence.
Change-Id: Ife834d41797d1d1efe403b204736ac85d62724e9
Reviewed-on: http://gerrit.openafs.org/11452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 27cb0d38885428474b0d42878fa2c539ce45b025
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Sep 23 23:42:50 2014 -0400
Adjust configure defaults for 1.8
Disable pam; enable pthreaded ubik.
(Pam is actually not installed by default anyway, since it is
functionally part of kauth.)
pthreaded ubik is believed to be stable, and we want to move away
from LWP moving forward.
Change-Id: I14d20e3157df625a9e04059534bbb59268384213
Reviewed-on: http://gerrit.openafs.org/11483
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit f2d4ba8b61bfe51d2c2167190f0049c4ec94f220
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 19 14:39:04 2014 -0400
Build hcrypto with libtool
Or rather, with lwptool, since we need a LWP version as well as
the various pthreaded versions.
The previous version was the initial version, 1.1, but since we're
switching to libtool, bump the version to 2.0 just to be safe.
Libtool abstracts away the extra logic that had previously been needed
to build different copies of rand-fortuna for the pthreaded and LWP
libraries.
As for roken, we must install both shared and static libraries
to $(TOP_LIBDIR) for unity of consumption, but remove the libtool
archive after instllation.
Change-Id: Ibc530a1fa4baa7a38b44eb3e0719e1905a6fe269
Reviewed-on: http://gerrit.openafs.org/11482
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit a6d7014187e238c9659141919d3c0934aac61f3b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Sep 23 18:19:09 2014 -0400
Allow external hcrypto
Put the configure checks into a separate file in src/cf, following
the same general structure as the roken checks.
Allow explicitly requesting the internal version, or checking
what's in the default paths, or providing a specific hcrypto root
or lib/include dirs for Debian compatibility.
We must still always compile libafshcrypto_lwp.a for use by LWP
binaries, from the bundled sources, but other binaries will use
the system version.
The hcrypto headers have an unfortunately large number of dependencies,
including depending on being able to find each other by including
<hcrypto/foo.h> paths. As such we must pass both the user-supplied
directory and $dir/hcrypto to the preprocessor in order for things
to work, and we also may need to revisit the includes used in the
configure check for use on non-linux systems due to the dependencies
on system headers.
Change-Id: Idcba1418a19a7b562335524c911d69dc84268177
Reviewed-on: http://gerrit.openafs.org/11481
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 493765cc88a15fd7db14d13dc03f0771cf6bb210
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Sep 23 16:58:08 2014 -0400
Link aklog against LIB_hcrypto
This was the last place where libafshcrypto.a was explicitly referenced,
preventing the use of an out-of-tree hcrypto library.
We will continue to need to build the in-tree code to produce a
libafshcrypto_lwp.a library for use in LWP applications, until we
do not have any more LWP applications, but some systems (such as
Debian) have a desire to avoid bundled libraries, so we should
facilitate the use of an external libhcrypto where possible.
Many consumers of libafshcrypto_lwp.a will be removed when the
LWP versions of various modules are removed after 1.8 is branched.
Change-Id: I23049866caae9c16ffb2ec32c5e7b058465a26ba
Reviewed-on: http://gerrit.openafs.org/11480
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit d31d7c3cb0d78f77e2e12215a35efaa7754813e4
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 19 15:01:29 2014 -0400
Build venus tests with libtool
This was the only place doing -lafshcrypto_lwp on the command line.
(There are other consumers, which list libafshcrypto_lwp.a explicitly;
we can use the presence of libafshcrypto_lwp.a to track progress towards
not needing a LWP hcrypto build, which must come from the in-tree version.)
Convert the tests to build with libtool (as pthreaded), where we can
just throw in $(LIB_hcrypto) and deal with what we get.
Change-Id: Ibc99615d2ff03b8aebf956502a2a6b1cb26f0a65
Reviewed-on: http://gerrit.openafs.org/11479
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 3160b1ad38a87c0c7e132246de2e5f3c3fac92bd
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Sep 18 13:55:15 2014 -0400
Build roken using libtool
Previously it was version 1.1; just in case I did something terrible,
bump it to 2.0, as was done for the other libtool conversions.
Install both the libtool archive and the static archive to $(TOP_LIBDIR),
so that all our internal consumers can just use -L$(TOP_LIBDIR) -lrokenafs
(well, via the LDFLAGS_roken and LIB_roken aliases) whether linking
statically or shared. Installing the libtool archive gets us the shared
library there, but we have to then remove the libtool archive, since
this is not the location we told libtool we would install to (the prefix
we configured with), and libtool would get confused trying to use this
installed, but installed-at-the-wrong-place libtool archive.
Add rk_vsyslog to the export list, for AIX.
It is tempting to eschew this installation and instead point LIB_roken
at the libtool archive file librokenafs.la directly (with empty
LDFLAGS_roken), but this is not possible until all consumers of roken
are converted to build using libtool. In practice, this will probably
not happen until LWP is evicted from the tree.
Change-Id: If6ab6c2d57c0a1b1511f9631b9aeb522d7e7392b
Reviewed-on: http://gerrit.openafs.org/11477
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 933d980341556f776a500b41f12a86854bdd41a2
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Tue Sep 23 15:33:08 2014 -0400
Build auth tests with libtool
(And pthreaded.)
This was the only place consuming librokenafs directly, which is
forbidden if we are to properly support using an external roken.
Convert to libtool and throw $(LIB_roken) on at the end.
Change-Id: I0cdea690800be1022888244b613929ce3154db1d
Reviewed-on: http://gerrit.openafs.org/11476
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit efe449adbb8994e6333bfb018be225b46d9f4ba6
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Sep 18 21:35:30 2014 -0400
Fix LT_LDLIB_shlib_missing
Libtool's -symbols-file argument is taken as an exact match of symbols
that this library claims to export. It does not filter based on what
symbols are actually present in the objects comprising the library.
Instead, if there are symbols in the file which are not implemented
by the library, there is an implicit assumption that some other library
will provide those symbols, which must be linked into a consumer of
this library alongside this library.
These are not the semantics we want (at present, only for roken), wherein
a library will implement some (but probably not all) of a given list
of symbols, and we want the export list to reflect only those symbols
which are implemented. Instead, use the symbols file to build a regex that
will only match symbols listed in the file (and no other symbols), and
only export the subset which is present.
Change-Id: Id81f7a35089ae7f760fe643680f9bfb9c81521aa
Reviewed-on: http://gerrit.openafs.org/11475
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 119d2edf8a4b42ca4c3fd36d17e3621ddc0de60d
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 22 17:02:27 2014 -0400
Allow building with MIT krb5 and external roken
That is, an external roken which is part of a heimdal distribution,
with full headers and libraries, most notably krb5.h and libkrb5.
This adjusts the ordering of file- and module-specific compiler and
linker arguments so that the more specific arguments are able to
take precedence. For general flags arguments, such as enabling
or disabling warnings or features, the more-specific settings should
come last, so as to override the flags set by default. However,
for arguments that affect a global search list (e.g., for headers
or libraries), the more-specific arguments must come first, so
as to be at the beginning of the search list.
We presently use per-file CFLAGS for both warning-type flags and
preprocessor (i.e., include path) type flags, so add an additional
file-specific setting for CPPFLAGS, which comes at the beginning of
the compiler invocation.
At present, MODULE_CFLAGS are essentially only used for preprocessor
functionality, so treat them as CPPFLAGS and put them right after
the per-file CPPFLAGS. (It might be cleaner to rename them to
MODULE_CPPFLAGS, but that would be more churn than is needed. If
such a distinction turns out to be necessary, it can be done at a
later date.) Likewise the MODULE_LDFLAGS are generally being used
to affect the library search path, so put them early as well.
Make the necessary Makefile changes to use these new features to
allow building with MIT krb5 and external roken: put KRB5_CPPFLAGS
in per-file CPPFLAGS, and put LDFLAGS_KRB5 in MODULE_LDFLAGS for
aklog.
Change-Id: I1091223b3b75c782b39b9e189bdd47e52ebefae2
Reviewed-on: http://gerrit.openafs.org/11474
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 9e3596c3fae6912783ec6d714a37f3dc05f8925c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 22 15:27:44 2014 -0400
Adjust roken.m4 to allow separate lib and include
In some installations (e.g., Debian), the roken libraries and headers
will not be installed in a common root directory to which /lib and
/include may be appended to find the appropriate library and header
directories, respectively.
Take inspiration from rra-c-util's GSSAPI macros and allow the
specification of separate include and lib directories. Since there
are now three values to pass to the guts of the checking routine,
pass them in global variables instead of as parameters.
The expected usage would be to set either --with-roken, or both of
--with-roken-libdir and --with-roken-includedir, as in
configure --with-roken-include=/usr/include/heimdal
--with-roken-lib=/usr/lib/x86_64-linux-gnu/heimdal
This also fixes a typo that prevented --with-roken=internal from
functioning as intended.
Change-Id: I6f651ef3f3abf37c92ea81ea1801294ca3dc00b2
Reviewed-on: http://gerrit.openafs.org/11473
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit bd5c12995e6de74d36bd2205f7268a0f32029b7f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 19 21:18:38 2014 -0400
Deorbit separate JUAFS build
Since 80943970b8cfcdf3fc630b25804aebaea228bd73, when the web enhancements
were enabled universally, there has no longer been a functional difference
between the UAFS and JUAFS builds. Their object files are compiled
using the same compilation rule, and the list of object files differed
only by rx_kmutex.o (which is devoid of content) and xdr_int32.o
(which is preumably an oversight).
Save the extra build time by just reinstalling libuafs.a as libjuafs.a
to preserve the existing interfaces.
Additionally, drop the LIBJUAFS make variable -- all definitions set
it to libjuafs.a. Similarly, the LIBJUAFS_FLAGS variable was unused
and can be removed.
Change-Id: I2074d5bc26e326db36b16e055431818ef1c69210
Reviewed-on: http://gerrit.openafs.org/11471
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 9799484891ae90e408cdd7d86ef2e928cdd07c61
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 19 21:45:31 2014 -0400
Deorbit the netscape plugin
Netscape hasn't been a thing since 2008.
We would only try to build it if someone manually ran 'webinstall'
in src/libuafs, and there is no documentation telling anyone to do so.
It's dead, Jim.
Change-Id: I7486ca33da7ff19f23f0d9f54f5fb4e7e3232540
Reviewed-on: http://gerrit.openafs.org/11470
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 5d2bd0416bbaf5b85f28e870a06dbc2955a1adf7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sun Sep 14 21:16:56 2014 -0400
Make pam conditional on INSTALL_KAUTH
The pam module we provide is only useful in kaserver-like environments,
and as such should not be installed when the user has requested to
not have kauth.
Change-Id: I9b336593e34cedfd6e8c2210f3798575d115d2d6
Reviewed-on: http://gerrit.openafs.org/11466
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 6825d6aeaa7c3951aafc216fa3707ae6c62e8691
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 12 18:07:51 2014 -0400
Build a usable pam_afs.so
Our use of libtool for building the pam modules resulted in shared
objects which had dependencies on liboafs_auth.so and liboafs_kauth.so,
neither of which are installed.
We still need some way to resolve those dependencies at link time, and
a dependency on libafsauthent.so seems ill-advised to insert into the
pam stack, so we are left with only the option of directly linking in
the requisite functionality. Fortunately, almost all of the requisite
convenience libraries of PIC objects already exist to meet the
requirements of libafsrpc and libafsauthent; the only exception is
from the auth module. Here, we require a new convenience library,
because the pam_afs.krb.so module includes its own version of ktc.o,
compiled with AFS_KERBEROS_ENV defined, yet the pam_afs.so module
requiers a ktc.o compiled without AFS_KERBEROS_ENV defined. The
convenience library from the auth module can only include one version,
and would therefore be wrong for the other. As such, create the new
libpam_auth.la archive from the BASE_objs in src/auth, and manually
compile ktc.lo and ktc_krb.lo as needed for the pam modules.
As for libafsrpc and libafsauthent, the convenience libraries included
from other parts of the tree belong in LT_objs, not LT_deps, because
they are contributing actual content to be included in the resulting
library; they are not library dependencies of the output of this module.
Change-Id: I5292718a5494710d166043fd08ad07269ff9fdf2
Reviewed-on: http://gerrit.openafs.org/11463
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 96b0307b3c79ccfc2305f98a3045b49f3c2a4723
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 18:06:25 2014 -0400
Build and install libafsauthent.so.2
During the libtool interim, we had been building a .0 but not
installing it. Prior to the libtoolization of shlibafsauthent, we
had installed a libafsauthent.so.1.1, which is the same version currently
installed by the 1.6 branch. Since there have been backwards-incompatible
ABI changes (e.g., afsconf_BuildServerSecurityObjects) since the .1.1
version, we must bump the SONAME to .2.0.
At time of this writing, the libtool rules for updating the
version information is found at:
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
and
http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
This lets us consolidate the building of the shared and static libafsrpc
and their installation), as libtool will happily do both for us
at once.
We explicitly do not install the .la files, as our libtool use is
to be kept entirely internal.
Change-Id: I283f9bb74eb9853c268e8642ac1f01741deeae2b
Reviewed-on: http://gerrit.openafs.org/11462
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 248b3216e77d333126c84987319a928a9ca6e3af
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 18:06:25 2014 -0400
Build and install libafsrpc.so.2
During the libtool interim, we had been building a .0 but not
installing it. Prior to the libtoolization of shlibafsrpc, we
had installed a libafsrpc.so.1.4 (though the 1.6 branch was
installing libafsrpc.so.1.5, "so we don't collide with the shlibafsrpc
versions on the master branch", which seems misguided). Since there
have been backwards-incompatible ABI changes (e.g., rx_SetMaxMTU) since
the .1.4 version, we must bump the SONAME to .2.0.
At time of this writing, the libtool rules for updating the
version information is found at:
http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
and
http://www.gnu.org/software/libtool/manual/html_node/Libtool-versioning.html
This lets us consolidate the building of the shared and static libafsrpc
and their installation), as libtool will happily do both for us
at once.
We explicitly do not install the .la files, as our libtool use is
to be kept entirely internal.
Change-Id: I11bc3cbc80048d0192aadeb80b89d2772bcd01cd
Reviewed-on: http://gerrit.openafs.org/11461
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit cd030f3c36c6a6ed6fa721cdcaa98fe4a4fce8a4
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 12 17:21:42 2014 -0400
Normalize LT_deps/LT_objs split
As described in the commit message of
69f26ece3c4545ecc9099641f7a507796fe9dc77, LT_objs should contain
the .lo files for the given module, and LT_deps should contain the
libtool dependencies, i.e., the .la files from other parts of the
tree. However, this simple split by file suffix is not correct
when we are using convenience libraries. Really, LT_objs represents
the "new" objects being provided by the module, and LT_deps is
libraries from other modules that provide functionality on which
we depend. Since convenience libraries are just thin aggregates
of object files, they behave more like object files than libraries
upon which we depend. In particular, libafsrpc and libafsauthent
are wrapper libraries that gather together the functionality of
several modules and export them as a single library interface;
they do not have any objects of their own.
However, libafsauthent has a dependency on libafsrpc, which does
belong in LT_deps (or possibly in LT_libs).
Simon's description of LT_libs leaves a little ambiguity, as it
does not describe what should be done with non-libtool libraries
from within OpenAFS. (At present, these include libafshcrypto
and librokenafs, both of which are regularly put in LT_libs.)
I prefer to recast LT_libs as containing externally visible libraries,
not just external libraries, which rationalizes the inclusion of
roken and hcrypto there, since we currently install those libraries,
and build libraries that have shared library dependencies on them.
In the future, as we begin committing to stable shared library
interfaces for libraries produced by libtool, I would like to
have those .la files be moved to LT_libs, since they would then
be external library dependencies of the given module.
Change-Id: Ie50010da84df99cec048c3e39ffeb9d5897fc08c
Reviewed-on: http://gerrit.openafs.org/11460
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit a470b30ecabb7db578a9345771b0d371a5581f8d
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Sep 12 15:41:23 2014 -0400
Normalize names of libtool convenience libraries
Part of why libtool was introduced into the tree was to reduce the
number of times each source file is compiled. PIC code is needed
for shared objects, and non-PIC code for static libraries, so in most
cases a C file must be compiled twice, but not more than that.
Libtool automatically manages which version of an object is passed to
the linker when libtool is used to link .la files. At several places
in the tree (libafsrpc, libafsauthent, libuafs_pic.so, and pam_afs.so)
we use libtool to link a .la library and pass other .la libraries in
as linker inputs. In normal situations, libtool would produce an
output shared library that registered a shared library dependency on
the (shared version of the) input library. However, in our usage,
these input .la libraries are used only for our convenience, and are
not intended to be installed, so libtool would produce an output
library that was not usable.
Libtool refers to our usage of libraries not intended to be installed
as "convenience libraries"; for us, they are essentially just
static archives that contain PIC objects (as opposed to normal
static archives which contain non-PIC objects).
Prior to this commit, we had named our convenience libraries things
like libafsauthent_auth.la or libafsrpc_comerr.la, since they were
mostly only used for either libafsrpc or libafsauthent. However,
future commits will need to use some of these convenience libraries
in other shared objects (such as pam_afs.so), so we normalize the
library name to indicate merely that it is a PIC version of that
module.
There are three exceptions to this rule: libafsrpc_sys.la, which
contains only a single file and not the whole of the sys module,
libafsrpc_util.la, which contains a subset of the util objects,
and libauthent_ubik.la, which contains a subset of the ubik
objects. Since these convenience libraries are in fact tailored to
the particular application, a target-specific name is appropriate.
The convenience library provided by the ptserver module is named
libprot_pic to match the existing public interface libprot.a.
We cannot link the dependencies of the convenience libraries
directly into them, because any given object may only be linked
once into a given library, and our dependency graph between
modules is decidedly not a tree, so attempting to link in the
dependencies would result in duplicate symbol errors.
Change-Id: I5f10af74b8582edd51e5f1b3f0026dbc7ef9f7ad
Reviewed-on: http://gerrit.openafs.org/11459
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 81189b7bc9ef66519a5bf96e20ec2fbe0267dfc8
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 18:28:11 2014 -0400
Use correct syntax for libtool version info
It does not take an '='.
Whomever thought that making libtool silently accept all (i.e.,
malformed) command-line arguments was a good idea ... seems to
have been mistaken.
Change-Id: I357cd44ac6f495474f9763a2f768ac9c8d1e4cb4
Reviewed-on: http://gerrit.openafs.org/11458
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 25be08520935bc4b0604bff0a476ee53e1a511d5
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 10 09:00:11 2014 -0400
build: remove trailing whitespace from makefiles
Remove trailing whitespace from the makefiles, except for
trailing whitespace in the boilerplate comment headers.
Change-Id: Ib8ee87a51f00633ba15e1974ac0b311969bef1bf
Reviewed-on: http://gerrit.openafs.org/11456
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit fbea3265b3bc042b97be17229839ccf7d11a0bf9
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue Sep 30 13:52:31 2014 -0400
aklog: Fix segfault on aklog -path
Commit 2fac53522e7ef5b3a376e191bffdc1f6784e6995 “aklog: Fix improper
use of readlink” inadvertently changed the meaning of int link from a
boolean flag (length > 0) to just a length. This caused ‘aklog -path
(anything)’ to segfault.
Update the type of link and the condition of the while loop to account
for this change.
FIXES 131930
Change-Id: Ia05836795425a53e858ab29866900f6d45970644
Reviewed-on: http://gerrit.openafs.org/11517
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c6b61a4510c0c34688b979182ea6f3823a840296
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Thu May 29 15:51:57 2014 -0700
afs: Verify osi_UFSOpen worked
In some builds (UKERNEL) osi_UFSOpen returns a NULL if it runs
into a problem. On the other builds osi_UFSOpen simply panics.
afs/afs_cell.c was checking for a NULL return but other callers
were not. Add checking logic to all callers.
This is a prepartory patch. A subsequent patch will have
osi_UFSOpen return NULL rather than panic for other builds too.
Change-Id: I3610a57dff59b84fe5ea8b1c862f3192157f255f
Reviewed-on: http://gerrit.openafs.org/11243
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c90c5e97c6361e06ff06aab02d0768a0bd43354d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 25 13:23:16 2014 -0400
Windows: SetDispositionInfo vs Link Count
When SetDispositionInfo is called to mark a file for pending
delete the link count should not be decrememented. The count is
decremented only when the file is actually deleted.
Change-Id: I611e2b9695179abcba01d6fa83022b08044ee8bf
Reviewed-on: http://gerrit.openafs.org/11508
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8da84729c8f1e849882aea7b1268c6ac49936f21
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 25 13:21:48 2014 -0400
Windows: FileStandardInfo Link count
Instead of returning 1 in all cases the ObjectInformation.Links
value should be returned to the caller.
Change-Id: I719bebca9299953c6afc3352117c1e1bf99d63f6
Reviewed-on: http://gerrit.openafs.org/11507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 243537f7071a108950d5442a4f9f7ab0747ca080
Author: pete scott <pscott@kerneldrivers.com>
Date: Thu Sep 25 09:01:27 2014 -0600
Windows: Check for RO and Open Target in rename
During a file rename operation, check to see if the target file
has the DOS readonly attribute set or has a non-zero reference
count. If yes, the request must be failed. The error status
depends upon the state of the pending delete flag. Either
STATUS_PENDING_DELETE or STATUS_ACCESS_DENIED.
Change-Id: I90fa1ea54176f96ca3052ee2b774b1179642e2ef
Reviewed-on: http://gerrit.openafs.org/11506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a27bed59cae1a4244429c752edfde0a8363c8a3b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 25 12:34:18 2014 -0500
afs: Move init_hckernel_init to osi_Init
Currently we call init_hckernel_init inside afs_InitSetup, to
initialize the hcrypto mutex. However, we use the hcrypto mutex in the
AFSOP_SEED_ENTROPY syscall, which afsd calls before any syscall that
cals afs_InitSetup. This means we crash on trying to
AFSOP_SEED_ENTROPY.
To avoid this, just call init_hckernel_init inside osi_Init instead,
which is called when our kernel module itself is initialized. This
ensures that the mutex is initialized early on, regardless of what
happens with afsd and the startup syscalls.
Change-Id: Ib6cbed7abcfd8f9a61685f613a848e9f36d6050d
Reviewed-on: http://gerrit.openafs.org/11509
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cdfa21ad5e86184f822496c1a9aa769fa98a8bb1
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Sep 24 11:49:38 2014 -0600
Windows: Use the allocation size from the service
The prior patchset modified the service AllocationSize return value
to count the number of 1KB units. Use the value from the service
without modification. This corrects an inconsistency in the
FileStandardInformation response.
Change-Id: I9a5f0a4f43aa12de903875b6ed4c5493e37b0163
Reviewed-on: http://gerrit.openafs.org/11491
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d9ca3050c697a9d6b623be874ea46aaf2312ad87
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 24 18:12:31 2014 -0400
Windows: report AllocationSize in 1KB increments
Windows expects storage to be allocated in increments of some
block size. The AFS servers allocate in 1K units so lets report
that to Windows.
Change-Id: I64ad1844339357733933cd9e360551fdcd450146
Reviewed-on: http://gerrit.openafs.org/11490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3f1465f8da47dc589cf27b1c4168ec0bce0fa5d6
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Sep 24 11:00:36 2014 -0600
Windows: Remove trailing slash on non-root directories
For the FileNameInformation and FilePhysicalNameInformation queries
a trailing slash is required for the \\server\share\ path but is
not required for directories below the root.
Change-Id: Iabbe7daed4f60ad995c04c70dfb2992af095281e
Reviewed-on: http://gerrit.openafs.org/11489
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 70f67371e7fb6262d43874950107864f31f903c9
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Sep 24 10:49:06 2014 -0600
Windows: FilePhysicalNameInfo query AFS prefix
In response to the FilePhysicalNameInformation query the AFS redirector
failed to include the server name in the response. Since the constructed
name is the same as the FileNameInformation query create a helper function
AFSGetFullFileName() to populate the file name into the provided buffer
and use it to satisfy both queries.
Change-Id: I78eef49a9902341c751d942a395921bb687c503b
Reviewed-on: http://gerrit.openafs.org/11488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit af72e83832e0849f04e28a355b5a55166cfc0982
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Sep 24 10:06:38 2014 -0600
Windows: FileInfo too small INFO_LENGTH_MISMATCH
The FileAllInformation query is initially processed by the IO Manager
and when the IO Manager is passed a buffer that is too small to hold
the File Information structure it returns STATUS_INFO_LENGTH_MISMATCH.
Previously the afs redirector returned STATUS_BUFFER_TOO_SMALL in this
case. Instead follow IO Manager's lead.
Change-Id: I74d1b68d37fb9e79cae79408eac1f5dc4dd05e1e
Reviewed-on: http://gerrit.openafs.org/11487
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 06995ceb4d664c3f14f6626da447cf9891470719
Author: pete scott <pscott@kerneldrivers.com>
Date: Tue Sep 23 13:20:45 2014 -0600
Windows: !overwrite IOMgr populated FileInfo data
I/O Manager will populate the FILE_ACCESS_INFORMATION,
FILE_MODE_INFORMATION, and FILE_ALIGNMENT_INFORMATION portions of
a FILE_ALL_INFORMATION structure prior to forwarding a FileAllInformation
FileInfo query to the file system. There is no need for the file system
to duplicate the effort.
Change-Id: Iaa7f1de95c6b7e42bdc326cc3f4bfe8596add949
Reviewed-on: http://gerrit.openafs.org/11478
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5ebe2437efa7a64f0b0cc61e2123f9ae766b84cf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 10 10:23:17 2014 -0400
Windows: preserve prior vlserver list on dns failure
Do not destroy the existing vlserver list if the DNS resolver query
fails. Continue using the prior vlserver values until a DNS response
is obtained. This will result in repeated DNS queries and a delay
if there is continued failure, but it will permit VL RPCs to continue
to be issued in the face of a DNS failure or misconfiguration.
Change-Id: Icac97c2bebdef744cc316225c1a6b1888ceb2f6e
Reviewed-on: http://gerrit.openafs.org/11457
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f999113d33adadf9b276e2a30c36d2b3a5e74f7d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 4 09:16:47 2014 -0400
Windows: power management suspend/resume changes
1. Call cm_UpdateIFInfo() for all power management events to force
an update of the valid network interface count.
2. Ensure that regardless of which Suspend and Resume events are
generated that the service only suspends once and resumes once.
Change-Id: If0c2fe5b6a18dd6b7ee01b511378cb78837efa3d
Reviewed-on: http://gerrit.openafs.org/11447
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ac601314706043f623ace379e3da597a7d5c5e9a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 4 09:14:07 2014 -0400
Windows: No network, no probe
Modify cm_PingServer and cm_CheckServersMulti to avoid probing servers
when there are no network interfaces with which to do so. Just mark
the servers down.
Change-Id: I5ba6c9813a28ec44b09dccd8f8c5ffc7e0c0ce10
Reviewed-on: http://gerrit.openafs.org/11446
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 15c62a9dd014dc56192c8e880fa6855f5377154e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 4 09:11:25 2014 -0400
Windows: introduce cm_MarkServerDown
Consolidate the operations necessary to mark a server down into a
new routine cm_MarkServerDown()
Change-Id: I9f70752498600046d677686c212c3adf3e810bde
Reviewed-on: http://gerrit.openafs.org/11445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ec1dcfbe29961fad23dec087c2d214be785a7816
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 4 09:08:32 2014 -0400
Windows: replace lana_OnlyLoopback() calls
lana_OnlyLoopback() relies upon Netbios over TCP being enabled but
Netbios over TCP is not officially supported on Vista and above.
Replace all lana_OnlyLoopback() calls with a test on the number of
network interfaces as computed by syscfg_GetIFInfo(). That list
excludes loopback interfaces.
Change-Id: I22d952f1487734ead02335108377bc404baa6024
Reviewed-on: http://gerrit.openafs.org/11444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 95c3db9c7ccb86c7ad384c06094c066107de262c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 4 09:04:42 2014 -0400
Windows: cm_UpdateIFInfo consolidate syscfg_GetIFInfo calls
Add a new function cm_UpdateIFInfo() that consolidates all of the
syscfg_GetIFInfo() call functionality into a single rountine. Replace
all of the existing call sites.
It is safe to call cm_UpdateIFInfo() without holding cm_syscfgLock
during afsd initialization because no other threads have been created.
Change-Id: Ifd4ca4f4f698014852a26d2c95a523c3b2cc851f
Reviewed-on: http://gerrit.openafs.org/11443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 092684e2bd31424c958ca3a9e88b7987b4c5555c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 4 01:11:01 2014 -0400
Windows: Prevent MDL leak on Cc*Mdl* failure
If CcMdlRead or CcPrepareMdlWrite fail, check the IoStatus.Information
field to see if any MDL pages have been locked. If the Information
value is greater than zero, complete the Mdl operation to unlock the
pages.
Change-Id: Icb44e74e25b46c7976f3f418410364a90a723d91
Reviewed-on: http://gerrit.openafs.org/11442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bf11f54790bcd99f7789b0004d36cc3747f12e11
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jul 24 20:56:41 2014 -0400
Sort libtool symbol files
Some entropy had crept in.
Change-Id: I72ae9d16a3aa4b9b66bc8efcda46bdc35edf95c9
Reviewed-on: http://gerrit.openafs.org/11323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 544b5096e5f3a12426f149c91dfeba1c5c207002
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Mar 27 13:37:42 2013 -0400
Remove rx_SetEpoch, rx_SetConnectionEpoch, rx_SetConnectionId
The core RX code now manages the Epoch and CID; external callers
should not be modifying them.
Change-Id: Ia517205aa280b2a0bbd2568274be7fb010fba0bc
Reviewed-on: http://gerrit.openafs.org/10843
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a63a07c3357cc6f54ef129e0542ec531f2ce9433
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Mar 26 19:43:07 2013 -0400
Garbage-collect afs_GCUserData's argument
We no longer need the ability to force all rxnull connections to be
reaped, as the epoch is set globally. Change the prototype and
callers accordingly.
Change-Id: I0815fdd035c3dd9d56f72e43603f9c53f5cec79d
Reviewed-on: http://gerrit.openafs.org/10842
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 39b165cdda941181845022c183fea1c7af7e4356
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Mar 26 13:41:40 2013 -0400
Move epoch and cid generation into the rx core
Now that we have hcrypto available everywhere, we can get real randomness
in the rx core (both uerspace and kernel), and thus can initialize the
RX epoch to a real random value when first initializing a host; there is
no need to rely on rxkad to produce randomness for this purpose.
Initialize a connection ID counter at the same time, and use that in
rx_NewConnection, also supplanting rxkad-specific logic.
The rxkad-specific logic is removed, and in particular there is no longer
a need to export rxkad_EpochWasSet to the rest of the world.
The code in afs_Daemon() to check whether the rxepoch was set can be
removed, as if the epoch is not set, rx initialization fails.
Add libafshcrypto to LIBS in the handful of places it hadn't crept already,
and likewise afshcrypto.lib in the NTMakefiles.
Change-Id: I1dd1015b29a600aaf72b6b4b36f8a17032453c97
Reviewed-on: http://gerrit.openafs.org/10841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0d67b00ff9db48c5555e8ae11daff9a469c770b0
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Mar 27 17:02:55 2013 -0400
Export heimdal's rand-fortuna PRNG to the kernel
Some systems (e.g., AIX, SGI, DFBSD, HPUX) do not supply a useful
implementation of osi_readRandom(), in some cases because the kernel
does not expose a random-number interface to kernel modules. We want
real random numbers on all systems, because we want to use the for
setting the RX epoch and connection ID in the kernel.
Build hcrypto's rand-fortuna PRNG into the rand-kernel interface we expose,
and implement RAND_bytes using rand-fortuna when osi_ReadRandom()
is not useful.
Add stub routines to config.h as needed, and add a heim_threads.h
with the necessary locking for rand-fortuna. The rand-fortuna algorithm
requires some measure of time's passage, so provide a stub gettimeofday()
with single-second resolution. We use a single (global) mutex for the
hcrypto kernel code, so that we can statically declare an initializer to
be the address of that mutex. Otherwise the locking is taken essentially
wholesale from rx_kmutex.
rand-fortuna requires the sha256 code for its hashing, and also
requires a stub rand-fortuna to satisfy linker symbol visibility.
Since the rand-fortuna code does not have any actual sources of entropy
available to it during its initialization routines, we must explicitly
seed the in-kernel rand-fortuna using entropy passed in from userland.
(Userland will always have at least /dev/random available, so the
userland hcrypto should always have usable entropy.) Be sure to do so
early in the afsd startup sequence, before any daemons are started, so
that entropy is available to the core rx code for generating the epoch
and cid -- the rand-fortuna code will (erroneously) always claim that
it has startup entropy even though in this case it may not actually
have any entropy. The rand-fortuna code does not consider itself
fully seeded until it has 128 bytes of entropy, so be sure to pass
more than that in from userspace.
It is preferrable to always build this code into the kernel, even on
systems when it is not going to be used, to help prevent bitrot. This
also avoids the possibility of a new system being supported that would
attempt to use the rand-fortuna code but fail to supply any seed entropy,
which would not necessarily be readily apparent.
Change-Id: I614d2bd9ac52803ec3b9572cc694cd836c8427dd
Reviewed-on: http://gerrit.openafs.org/10840
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bcf3d33f2879e00c894afc7fc53c6116ad3bad5a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 14:46:34 2014 -0400
Add missing tests to tests/opr/.gitignore
dict-t and fmt-t were missing.
While here, sort the existing entries.
Change-Id: If62e0f9f93f4d51900cdd7747beede561861f51e
Reviewed-on: http://gerrit.openafs.org/11454
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 75d9e4b954d86ff2efbd230cba95b559b88de6d8
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Sep 8 13:40:48 2014 -0400
Fix memset invocation in rx/event-t.c
The order of the parameters was swapped, which recent gcc complains
loudly about.
Change-Id: I2329ca3dd0eee81639731e78172621b580199024
Reviewed-on: http://gerrit.openafs.org/11451
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 11efae8362c5c73cdac19ef9f1c5e7f9c33883d8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Aug 25 16:25:43 2014 +0100
ubik: Don't leak UBIK_VERSION_LOCK if udisk_LogEnd fails
If the call to udisk_LogEnd() fails (probably due to an I/O error)
don't leak the UBIK_VERSION_LOCK.
This is the possible cause of a vlserver deadlock, which had
approximately 4800 threads blocked. Analysis of backtrace of all
of these threads showed that all blocked threads were waiting in
ubik.c:555 (blocked on DBHOLD) with the exception of:
One in beacon.c:388 (blocked on UBIK_VERSION_LOCK)
One in recovery.c:503 (blocked on DBHOLD)
One in ubik.c:125 (blocked on DBHOLD)
One in ubik.c:585 (blocked on UBIK_VERSION_LOCK)
The last of these is the critical one, because it already holds
the lock that DBHOLD waits on - so despite the vast majority of
threads being blocked in DBHOLD, it's actually UBIK_VERSION_LOCK
that we're waiting on.
There is no sign of a thread which is still active which currently
holds UBIK_VERSION_LOCK.
Change-Id: I1627b448d359152237912d4d78c9fa52c7149aa0
Reviewed-on: http://gerrit.openafs.org/11427
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b9bbd21e88e2050957c1a7d49f3ad603cae763b2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Aug 25 16:15:26 2014 +0100
ubik: Don't leak UBIK_VERSION_LOCK if setlabel fails
If a call to the setlabel() physical IO function fails, don't
leak the UBIK_VERSION_LOCK.
This is the possible cause of a vlserver deadlock, which had
approximately 4800 threads blocked. Analysis of backtrace of all
of these threads showed that all blocked threads were waiting in
ubik.c:555 (blocked on DBHOLD) with the exception of:
One in beacon.c:388 (blocked on UBIK_VERSION_LOCK)
One in recovery.c:503 (blocked on DBHOLD)
One in ubik.c:125 (blocked on DBHOLD)
One in ubik.c:585 (blocked on UBIK_VERSION_LOCK)
The last of these is the critical one, because it already holds
the lock that DBHOLD waits on - so despite the vast majority of
threads being blocked in DBHOLD, it's actually UBIK_VERSION_LOCK
that we're waiting on.
There is no sign of a thread which is still active which currently
holds UBIK_VERSION_LOCK.
Change-Id: Ie6093409e9375d50fa69733908b5ce99586e1b1d
Reviewed-on: http://gerrit.openafs.org/11426
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 123f0fb134370ffe417d466fb9d103b13565960a
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Thu Aug 28 03:09:49 2014 -0400
config: remove support for old FreeBSD releases
The FreeBSD project no longer supports 5.x, 6.x, or 7.x releases, and
has not done so for a long time. It's unlikely the OpenAFS works
properly on any of them, if it even still builds, since it is not
regularly build-tested on anything older than 8.3. Unclutter
src/config by removing the param.*.h files for these obsolete
releases.
Change-Id: Iedd11e9a9045b39d2193c61b9833abd592d1bfa2
Reviewed-on: http://gerrit.openafs.org/11438
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ad655372fcb3f41a648f055668afaaad6af8a675
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Thu Aug 28 03:04:19 2014 -0400
README: update for current state of FreeBSD support
The FreeBSD project hasn't supported releases prior to 8.x for a long
time now, and OpenAFS is neither built nor tested regularly on
anything that old. Dedocument support for these releases in
preparation for later removing configuration support.
Change-Id: I42e78291cfed91e20b3414576cf885a11b7f341b
Reviewed-on: http://gerrit.openafs.org/11437
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 65ec004ce5fdca7446f65cb70f720a77a861762c
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Tue Aug 26 11:55:06 2014 +0200
vos clone use the value of the -toname argument
The -toname argument was not followed with the vos clone command. The name
of the clone volume was always ".clone".
Change-Id: I76b78d239ecb38e793098078ac34a703f2ffeeeb
Reviewed-on: http://gerrit.openafs.org/11431
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 58e4e4802d4208604a6aa05362454e6174fe3277
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 8 03:27:26 2014 -0400
Windows: Avoid deadlock during pending delete cleanup
Release the Fcb resource and clear the AFS_DIR_ENTRY_PENDING_DELETE
flag prior to the AFSProcessRequest(AFS_REQUEST_TYPE_CLEANUP_PROCESSING)
if a delete is pending during cleanup of the last FCB open handle.
Failure to do so results in an out of order lock acquisition when
the parent object info tree lock is acquired after the AFSProcessRequest()
call to the service completes.
Change-Id: Id1c770b3dfe669d6804276bbe832af2d215c72dc
Reviewed-on: http://gerrit.openafs.org/11425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e6fb1b7b7ed32e2035452db9fc221f38a8b4956
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Thu Aug 14 11:56:22 2014 +0200
use V_copyDate in DumpHeader for cloned volumes
Volume dumps can be created from backup volumes, cloned volumes, or
directly from RW volumes. The beginning and end of the time range
covered by the dump is recorded in the DumpHeader. The end time is
based on the type of the volume. Use backupDate for backup volumes,
use copyDate for cloned volumes, and updateDate for RW volumes.
Change-Id: I18206d25f056e553eed2f3c3e0695fed003f3714
Reviewed-on: http://gerrit.openafs.org/11389
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit d93b89ddb61d44b47f039ae96af6304f2d87b5e2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 21 04:19:28 2014 -0500
Windows: AFSEvaluateTargetByName NULL ptr assignment
If DirEnumEntry is NULL, then on failure of AFSEvaluateTargetByName()
a NULL pointer will be dereferenced prior to function return.
Change-Id: I6d0d646e667c4b805abcddce1af49b81037ae51d
Reviewed-on: http://gerrit.openafs.org/11422
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1ce48e9e93c686aef24bb066ce76c2fcf08f96b6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 8 16:34:25 2014 -0400
sys: pioctl_nt translate WinErr to Unix
When reading the result of a pioctl fails with ERROR_NOT_SUPPORTED
this must be translated to an EINVAL errno.
Change-Id: I3db03f80b8a0da5d7e4931dc5673c7010d580d8d
Reviewed-on: http://gerrit.openafs.org/11417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fc70e0ddebb8521a69aaeb6e1d249b9ca577db52
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jun 14 22:58:52 2014 -0400
Windows: registry enum do not request write perm
Only Read and Query privileges are required to enumerate the registry
keys, do not request write privileges for an enumeration.
Change-Id: Ifc9acb4203db71b6e94bf5a21ca5aa104d94d35b
Reviewed-on: http://gerrit.openafs.org/11416
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 47ef2e4e514234bb947cdf325634ad0b8ae5d7da
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jun 28 23:03:45 2014 -0400
Windows: Do not sync callbacks when only need locks
Syncing lock operations with callback fetching is unnecessary because
local lock state is not tracked via callbacks. More importantly it
risks blocking the cm_LockDaemon thread which needs to be able to
renew locks without obstruction.
Change-Id: Iabe9bb33fef599c4eb0e876e222587ee3e2fdb49
Reviewed-on: http://gerrit.openafs.org/11415
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bcaaf4640d06c761b798c1eb2c82f81f21ec78d8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Aug 5 01:40:22 2014 -0400
Windows: do not forget cm_SyncOpDone
If cm_SyncOp was called, then cm_SyncOpDone must be called.
By goto out of the loop, the cm_SyncOpDone call was skipped.
Change-Id: I20105ec8708c19eecbf215258ada0779cd705f73
Reviewed-on: http://gerrit.openafs.org/11414
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bf687348e0269deb0d76475ba9b7219a6e1b40e8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 18 15:28:14 2014 -0400
Windows: set hard dead timeout not conn timeout for probes
For the Rx connections used for probing VL and FILE servers set a
hard dead timeout and not a connection timeout. A connection timeout
will not terminate the call as long as the lastReceiveTime continues
to be updated by ping packets. The hard dead timeout will cause the
connection to fail when the 10 second limit expires.
Change-Id: I371dcd95fc0ff822a205cf903fa6218e80a2b042
Reviewed-on: http://gerrit.openafs.org/11401
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8e23809542556937a0845246960a0f5484b6cf1e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 18 15:25:50 2014 -0400
Windows: Freelance whole volume rdr invalidate
When updating the Freelance directory do not notify the redirector
of individual objects to invalidate since that can leaad to race
conditions. Send whole volume invalidations since that is what is
required in any case.
Change-Id: I22a963907ebbb3da3178750670a2897603463cfe
Reviewed-on: http://gerrit.openafs.org/11400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d5b6a545ed1e9f01c295280495b806981d9877d3
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Aug 13 15:28:49 2014 -0400
Windows: Obtain File Attribs for DFS Link target
The AFSRetrieveFileAttributes() function is used to acquire the
attributes for an AFS symlink. The result is either returned directly
to the application or used internally to determine the attributes
to be exposed by reparse points.
If the evaluated symlink crosses a DFS Link the redirector cannot
return the request to IO Manager to evaluate the target. Instead
the redirector must handle the request internally and attempt to
read the attributes of the target object.
Change-Id: If14df8dc41e13fd59b524fdb575c46abab1dfc2f
Reviewed-on: http://gerrit.openafs.org/11399
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dceb8d6336e574a735b9887cf670c229bc6ee446
Author: pete scott <pscott@kerneldrivers.com>
Date: Mon Aug 11 13:18:16 2014 -0400
Windows: LocateName skip DFS Link only last component
As with Mount Points and Symlinks, when AFSLocateName() is called to
process a CreateFile with Open_Reparse_Point enabled, DFS Link processing
must be disabled only for the last component in the path. Failure to
do so results in the AFS Redirector succeeding IRP_MJ_CREATE calls that
should be given back to the IO Manager so the path can be evaluated by
another file system.
Change-Id: I1627e7c6582d3a80d99dd2acc5171135a6a7bc4b
Reviewed-on: http://gerrit.openafs.org/11398
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d36b8ff8db63ee893941d57422e54ca05e4a1564
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 11 01:07:27 2014 -0400
Windows: Reparse Policy vs DFSLinks
When a reparse policy is specified and AFSLocateNameEntry() returns
with STATUS_REPARSE, do not re-evaluate the path with the reparse
policy disabled. STATUS_REPARSE was returned because the FileObject's
FileName was modified and the IO Manager needs to reparse the request.
Change-Id: I290837357793d3961833923ea1d5300d08bf7dfc
Reviewed-on: http://gerrit.openafs.org/11397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 68d5e229e9bca83b90cd3e4c8c17719ea9864b00
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 11 01:41:52 2014 -0400
Windows: AFSParseRelatedName always use related name
When parsing a RelatedFileObject always refer to the RelatedFileObject
FileName and not the IrpSp->FileObject.
Set the output FileName to pRelatedCcb->FullFileName
Test pRelatedCcb->FullFileName for wild cards
Change-Id: I86f5bb7fc05eddc0d3d1ca9fbb069248af23be98
Reviewed-on: http://gerrit.openafs.org/11396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2f4f1e3f8619b1531838a62031e969cbf64be7dd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 11 01:38:54 2014 -0400
Windows: AFSParseName always set FileName output
The FileName output parameter is used by the caller even when an
error occurs. In case of error it indicates that path that failed
to parse. Not all of the error paths set FileName.
Start AFSParseName() with FileName referring to
IrpSp->FileObject->FileName. It can be updated as required later.
Change-Id: I37c615aa815affec0c8f4dfef7d8c5777650c275
Reviewed-on: http://gerrit.openafs.org/11395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d57d87a87a6041b1596532c7fe08795ae9d91b95
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 11 01:28:12 2014 -0400
Windows: Refactor AFSParseName related name parsing
AFSParseName() is a very long complex function. Extract the parsing
of RelatedFileObject name parsing to a new function AFSParseRelatedName().
This removed ~160 lines of source code out of AFSParseName().
This changeset is not intended to introduce any functional changes.
Change-Id: If04a1bee0c104461f2d8bc33bca426e9ff71be74
Reviewed-on: http://gerrit.openafs.org/11394
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit da1597d74a0f56e35a156ec27df231f965934910
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 18 15:23:54 2014 -0500
vos: cross-device link error message
Print a better diagnostic message for cross-device link errors, which
happens when a clone volume is not in the same partition as the
parent read-write volume.
Change-Id: If58284a1dc53f8264fb17757f37c627fc2a378db
Reviewed-on: http://gerrit.openafs.org/10850
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f433bc779b18e0111a122e9baf5cbddc4864f101
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Wed Jun 4 15:27:32 2014 -0700
redhat: Fix minor whitespace errors in openafs-kmodtool
During review of commit c20c01185ed748b2bc823369a8f28cf004b7d1c9
gerrit flagged one of the changed lines as having a trailing whitespace
error. This patch corrects that error and several others that were
in the file.
Change-Id: I3668e67e456322cccdfa76df935951053f9b6a48
Reviewed-on: http://gerrit.openafs.org/11200
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 418ca56f911a05d9487f4c3c3dc2ca2d37c5da15
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Tue May 27 00:07:52 2014 -0700
Correct comment typos in a couple files
Correct typos in a couple files. These were noticed while
researching code paths. Comment changes only. No code change.
afs/afs_stats.h has source file names updated on several lines.
Many source file name comments are wrong in this file.
I didn't attempt to correct them all, just the ones I bumped
into. If I bump into others in the future I'll fix them then.
rx/rx_call.h has source of enumerated types corrected.
Change-Id: Ie78b7f20b5c9c2261ec8a73701e77bdfbabd8465
Reviewed-on: http://gerrit.openafs.org/11172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1283226ccb638be47ead6cc4d9a47381aa6b08d1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Aug 6 15:08:33 2014 -0400
volscan: fix copyright and licence notice
These are new files and new content; fix the copyright notice and
license to reflect.
Change-Id: I8d5f00fb7edaf2e3855e2dc2a1af07bba471c0d6
Reviewed-on: http://gerrit.openafs.org/11362
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2ceb387191d4dced7815237c20a9b2cb577ad3df
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 21 17:30:36 2014 -0400
Remove some incomplete struct initializers
C99 requires that objects with static linkage, which includes
global variables, be initialized to zero/NULL.
It is possible that old compilers required a hack of using one
explicit initializer and relying on the requirement from C99 that
the elements of the structure not listed in the initializer be
initialized as if it had static linkage. These incomplete initializers
seem to have been introduced to support old OS X compilers which
are not believed to still be in use.
Using a complete explicit initializer is undesired here, as the
rxkad statistics structures have a great number of elements and
the uuid structure is somewhat complicated.
Change-Id: Iefe7842cbf874252267cb3a8aee5d90ec2cab169
Reviewed-on: http://gerrit.openafs.org/11374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f81f17938cf9ec2dfa3541983c125afc37817698
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 21 17:50:50 2014 -0400
FBSD: avoid unused-variable warning
This variable is passed as an argument to the ma_vn_lock() compat
macro, which ignores the thread argument on some versions of FreeBSD.
Make the variable only be declared in those cases when it will be used.
Change-Id: I1ed10654fb402f4feec55d6d7c7ece6f0c78bc8e
Reviewed-on: http://gerrit.openafs.org/11373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit edafaf047b13a0defdfbca55b7517a52a33bdda5
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 21 14:13:39 2014 -0400
FBSD: initialize 'retval' for afs3_syscall
In the same way as linux_ret.
An ugly hack, but retval is not really used for anything relevant at
the moment, and the compiler will warn about it being used uninitialized
otherwise.
Change-Id: Ia31ea6668ac3bc2edbec143d0b839f3e797ff424
Reviewed-on: http://gerrit.openafs.org/11372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 59e9b3b409be73dfd004077b634958abcd79b91d
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 21 11:01:04 2014 -0400
Avoid a name conflict in a local variable
Modern compilers will warn when a variable in a nested scope hiding
a variable of the same name in an outer scope. One of the arguments
to afs_lhash_remove() is already named 'data'; don't reuse that name
for a local variable.
Change-Id: Icbb5010d298110cd4dab395fc5eec45e01ec9ba3
Reviewed-on: http://gerrit.openafs.org/11371
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 64da7c133a66a15233c2cdc5d9a8f71d17d80d77
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jul 24 09:40:21 2014 -0400
Make kernel hcrypto calloc return zeroed memory
As far as I can tell, the afs_osi_Alloc contract does not
guarantee zeroed memory. On FreeBSD, with a debug kernel, it
definitely does not currently provide zeroed memory, returning
instead memory initialized with 0xdeadc0de.
Properly speaking, the role of calloc() is to both check for overflow
from the multiplication and to produce zeroed memory. However, since
we do not have a reasonable way to report failure, do not bother
checking for overflow at this time.
Change-Id: I187c2057d473fba869692c1dfa11735502b260c1
Reviewed-on: http://gerrit.openafs.org/11322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9dd67783bb2bd9ef8a972a1aac47b1925069a655
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Wed Aug 13 02:32:06 2014 -0400
viced: time_t might not be long
Fix a couple of printf format errors that bite on FreeBSD 10 for i386.
Since time_t might be an int, it can't be printed with a long format.
Since time_t might be a long in general, cast to it to long when
printing.
Change-Id: Iecc4487adee7a64542dd2dc17f94485a6198e707
Reviewed-on: http://gerrit.openafs.org/11385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f02beb8d644ec2a52bf21737a040321905a39e20
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Wed Aug 13 02:20:02 2014 -0400
afsd: correct printf format mismatch in debugging printf
On platforms where size_t is unsigned int, the type of
cacheFiles * sizeof(AFSD_INO_T) is not an unsigned long as the format
string requires. Casting cacheFiles to unsigned long ensures that the
result is at least unsigned long, although it will still be wrong if
any architecture makes size_t be long long. Fixes build for FreeBSD
10 on i386.
Change-Id: Ifd124d81b16f53133293dd591f7f8cf2f7d3175a
Reviewed-on: http://gerrit.openafs.org/11384
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 80f4939a3b9e1d48c03d0797a21c9e77a844cf7f
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Fri Aug 8 17:13:09 2014 +0200
redhat: package volscan
Add volscan and the manual page to the files in the server package.
Change-Id: I97c210da1e0d9d28682e555e92863c4c408b94da
Reviewed-on: http://gerrit.openafs.org/11370
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2e2bef28f00f505190c21bd42398f6a01268879c
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Jun 6 19:27:04 2014 -0400
opr: opr_AssertionFailed undefined in kernel module
The opr_Assert in opr_rbtree_remove is incompletely defined;
the opr_Assert macro is defined in opr.h, but the definition
for the opr_AssertionFailed routine it invokes is not included.
This allows the kernel module to build successfully even though
it retains a hidden undefined reference for opr_AssertionFailed.
However, the logic in obr_rbtree_remove ensures that this
particular opr_Assert can never fail - it is superfluous.
Some compilers (e.g. gcc for Linux AFS kernel module
builds) are able to recognize this and optimize it out. Others
(e.g. Solaris 5.12) do not, and when this happens the OpenAFS
build appears to succeed but the kernel module will fail to load
due to the undefined symbol.
Remove the superfluous opr_Assert.
This partially reverts commit 9f8b765bbdbb8913fcadbde8d3362039e9dc8e61.
Change-Id: I4ed2b1873c434e41dce0f2e474926bf8b449b819
Reviewed-on: http://gerrit.openafs.org/11296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 594e2980a0ab12f6967d626b842fc6569f4343e4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Aug 6 14:34:46 2014 -0400
Revert "libafs: remove stray "-v 2" argument to afs_compile_et"
This reverts commit d7082793eedc46d3647d38ffdf5a2b52fadb3cc3
Change-Id: I8ad37f109fc244d198f85c4642dcf1e8eb33a184
Reviewed-on: http://gerrit.openafs.org/11360
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e0d0e6ffdbb11d5445b129ef0bd5030aec59d333
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jul 17 10:33:23 2014 -0500
LINUX: Avoid premature RO volume lock error
Commit 0fc27471e7da0c5de4addcdec1bfbca5208072cc avoids processing lock
requests for RO volumes, but it did this both in afs_lockctl() and in
the Linux-specific afs_linux_lock(). The changes in afs_linux_lock()
are incorrect, since they also avoid F_GETLK requests (whereas
afs_lockctl() just avoids F_SETLK* requests).
Additionally, the section in afs_linux_lock() incorrectly reports an
error, since it returns a positive EBADF error code, when we are
supposed to return -EBADF.
The result of all of this is that an F_GETLK F_WRLCK request for an RO
volume always fails with fcntl() returning 9 (EBADF), which is an
invalid return code for fcntl() F_GETLK (instead we should return -1
with an errno of 9). But if there are no locks, we should return
success anyway.
Just remove this section, since afs_lockctl() handles this case itself
anyway.
Thanks to Todd Lewis for reporting this issue.
Change-Id: Ia7f3f0b1bdbb922dca06be9de02a9c2b33f9ffee
Reviewed-on: http://gerrit.openafs.org/11316
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7ca2cce89ea525c73bc1571578c316016c6c4461
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 8 16:22:48 2013 -0500
tools: fix unpack in example sysvmq audit reader
Fix the unpack in the example sysvmq audit reader script to
correctly unpack the message type, which is an native long.
From the msgrcv perl docoumentation:
Note that when a message is received, the message type as a native
long integer will be the first thing in VAR, followed by the actual
message. This packing may be opened with "unpack("l! a*")".
Change-Id: I5c5480c30d530b384d8057fb071b01e67f1b4ad2
Reviewed-on: http://gerrit.openafs.org/10445
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 36ce11ce5506fba2de3d46120f68b15467996273
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Sun Jun 29 16:27:37 2014 -0400
afs: remove cruft from Solaris afs_freevfs
Remove some unused variables left behind in a previous
refactor of flushing vcaches during afs_shutdown
(commit 80fe111f0044aa7a67215ad92210dc72cb7eb2c0).
Change-Id: Ie0a23cb08fc2946f1c400b8ce8e15ef3dc22ec20
Reviewed-on: http://gerrit.openafs.org/11310
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit bf5685e537ea3991644ee5e79de0f88c34508c59
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Wed Jul 23 13:57:50 2014 +0200
volinfo: fix documenting comments
As pointed by Andrew deason during review of the 1.6 pullup of
commit ae27283550dab33704f30e18975722e0ed2c5424, psize is not
a parameter of HandleHeaderFiles, and in function HandleSpecialFile
it is of type inout since the value is first read by the += operation.
Fix this, and try to improve the description of psize too.
Change-Id: Ia728b20475f0c44b6104dc954aaa04d5f0f098b5
Reviewed-on: http://gerrit.openafs.org/11319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2edf5c0382385f898a017fd8e0e2429f8b2b3520
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jul 24 11:07:45 2014 -0500
LINUX: Check afs_lookup return code explicitly
Checking if the returned vcache is NULL or not is a bit of an indirect
way to check if an error occurred. Just check the return code itself,
to make sure we notice if any kind of error is reported.
Suggested by Chas Williams.
Change-Id: I61cc7304e9885ddaaebe96db3b12457cb6224420
Reviewed-on: http://gerrit.openafs.org/11321
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 774d77e056515ae3e87c8f0be8e133c3cdb36bbb
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jul 18 15:19:24 2014 -0400
FBSD: adhere to gop_lookupname() semantics
The current semantics are that gop_lookupname() returns an unlocked
vnode; the previous code was written to a different semantic that
a locked vnode should be returned.
This makes a disk cache more likely to work on FreeBSD, but such
configurations remain not very tested.
Change-Id: I12ac77cd271be72af2fa4045c2ebf576847b625e
Reviewed-on: http://gerrit.openafs.org/11317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit b18b59e03689a20e988b6068499c6f2a561fcbdc
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Jul 31 20:50:04 2014 +0200
libafs: remove stray "-v 2" argument to afs_compile_et
Commit 4e6b7ab904d38d38da1b80a7342bd815668a8c09 separated the
compile_et rules for creating the source and header files using
the new -emit functionality. During review for inclusion in 1.6,
Chas Williams spotted a stray "-v 2" carried over to the rule
for creating the header file, where it doesn't apply. Remove it.
Change-Id: I554354eae0fa018e56fe7b78df69a43e5b5a0b07
Reviewed-on: http://gerrit.openafs.org/11347
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 51c97beb3f3bb68704d33e126561b8c2866ddab3
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jul 28 20:57:01 2014 -0400
libafs: fix vrequest leak in afs_lookup
Fix vrequest leak introduced in commit
9930567bcf9655d3f562b210b2dc4b4a99226691.
Thanks to Andrew Deason for finding this error.
Change-Id: I8fc1391ab43f33c5a8208ff58d1d0641292cf63e
Reviewed-on: http://gerrit.openafs.org/11337
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b7f1763652fb932ca5bd3f3351a48df11e58f2dc
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jul 28 17:27:40 2014 -0400
libafs: do not allow NULL creds for afs_CreateReq
Do not allow callers to pass a NULL cred to afs_CreateReq. This
avoids setting the uid of zero in the vrequest when no cred is
passed. Update callers to pass afs_osi_credp for an anonymous cred
when no cred is available.
Thanks to Andrew Deason for pointing out afs_osi_credp should be
used.
Change-Id: I05f694026ec72ab701160d9920e47c16cda46cd7
Reviewed-on: http://gerrit.openafs.org/11336
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit eb5102e998d09466c5169eabe96d3e1ed1919d17
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Jul 31 11:45:14 2014 -0400
config: Refactor the FreeBSD configuration files
Use a common file for most of the platform specific settings.
Change-Id: If95ad44de99fc3320570d53d706fed4d760fe67d
Reviewed-on: http://gerrit.openafs.org/11346
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c5f8d5adb252e7ba0b6ac51b0eb191e2d0b7bf23
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Jul 31 11:40:23 2014 -0400
config: AFS_SHORTGID no longer in use
Remove the AFS_SHORTGID macro from the param header files. There
are no usages in the rest of the source tree.
Change-Id: I417b6e90fa9a094bfef727134b640964596eceb3
Reviewed-on: http://gerrit.openafs.org/11345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 9d61dd420df47cff6926ea5daa510527b243b13b
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Jul 31 11:14:57 2014 -0400
config: Updates to AFS_HAVE_STATVFS for FreeBSD
Always define AFS_HAVE_STATVFS. According to the man page, statvfs()
appeared in FreeBSD 5.0. Additionally, this macro is only used for
userspace which eliminates all disables except for FreeBSD 5.0 which
appears to have just been an oversight when the param file was created
from the 4.x param files.
Also fixes the comment so it reflects the actual choice.
Change-Id: Ibdcd694e9c4a0d0cecccd91a51962af6fb11ff36
Reviewed-on: http://gerrit.openafs.org/11344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 9171cbda2f7e5016186dbe0438758047d53be452
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Jul 28 08:24:48 2014 -0400
config: Remove deprecated macro from FreeBSD configuration files
The macro STDLIB_HAS_MALLOC_PROTOS was deprecated in commit
daff4006627fc88be85dade3d72aa45e57a6804a.
Change-Id: I9c2129f6f3d5be6a00ef6ddd358967e0fd4f7ec9
Reviewed-on: http://gerrit.openafs.org/11333
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 05dbea9fc4da02c6349d9e0b69656acb3254cfe8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Aug 1 18:27:35 2014 -0400
libafs: fix error location code in LINUX/osi_export
Fix the missing error location code introduced in commit
40fb2650b783fbafe51aefd3d0af7a6b0536c265
libafs: allocate vattrs in LINUX to reduce stack used
Use location number 104, which is the next in the sequence.
The code in this module is compiled when building the
nfs translator, which is only built under linux when
configure detects it is possible.
Thanks to Andrew Deason for spotting this error.
Change-Id: I00c834bc915fa3be7d5f27467895930e4f62aa76
Reviewed-on: http://gerrit.openafs.org/11351
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit a5866b3a7c21551a8aa40fc6141cca3a65fea563
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 23 11:54:47 2014 -0500
LINUX: Drop dentry if lookup returns new file
Background: when an entry is looked up after its parent changes,
afs_linux_dentry_revalidate re-looks-up the entry name in its parent.
If we get an ENOENT back, we d_drop the dentry, and in any other
situation we just d_invalidate it. As discussed in prior commits
997f7fce437787a45ae0584beaae43affbd37cce and
389473032cf0b200c2c39fd5ace108bdc05c9d97, we cannot simply d_drop the
dentry in all cases, because that would cause legitimate directories
to be reported as "deleted" if we just failed to lookup the entry due
to e.g. transient network errors (this causes, among other things,
'getcwd' to fail with ENOENT).
However, this logic has problems if the dentry name still exists, but
points to a different file; the case where 'tvc != vcp' in
afs_linux_dentry_revalidate. If that case happens, and the dentry is
still held open by some process, we will continue to try to reference
the vcache pointed to by the 'old' dcache entry, which is incorrect.
To maybe more clearly illustrate the issue, consider the following
cases:
$ sleep 9999 < /afs/localcell/testvol.ro/dir1/file1 &
$ rm -rf /afs/localcell/testvol.rw/dir1
$ mkdir /afs/localcell/testvol.rw/dir1
$ vos release testvol
$ ls -l /afs/localcell/testvol.ro
ls: cannot access /afs/localcell/testvol.ro/dir1: No such file or directory
total 0
d????????? ? ? ? ? ? dir1
Here, on the last 'ls', afs_linux_dentry_revalidate will afs_lookup
'dir1', and notice that it points to a different file (tvc != vcp),
and will d_invalidate the dentry. But since the file is still held
open, the dentry doesn't go away, and so we are still pointing to the
vcache for the old, deleted 'dir1'. That file doesn't exist anymore on
the fileserver, so we get an ENOENT when actually trying to stat() it
(we get a VNOVNODE from the fileserver, whcih gets translated to an
ENOENT).
A possibly more serious case is when the file is just renamed:
$ sleep 9999 < /afs/localcell/testvol.ro/dir1/file1 &
$ mv /afs/localcell/testvol.rw/dir1 /afs/localcell/testvol.rw/dir1.moved
$ mkdir /afs/localcell/testvol.rw/dir1
$ touch /afs/localcell/testvol.rw/dir1/file2
$ vos release testvol
$ ls -l /afs/localcell/testvol.ro/dir1
total 0
-rw-rw-r--. 1 1235 adeason 0 Jul 23 11:09 file1
$ kill %1
$ ls -l /afs/localcell/testvol.ro/dir1
total 0
-rw-rw-r--. 1 1235 adeason 0 Jul 23 11:10 file2
In this situation, the same code path applies, but the old file still
exists, so we will continue to use it without error. But since we are
still pointing at the old file, of course the results are incorrect.
Once we kill the process holding the file open, the bad dentry finally
goes away and the results are valid again.
To fix this behavior, d_drop the dentry in all cases, except when we
encounter an error preventing the lookup from being done. This ensures
that the dentry is unhashed from the parent directory in the scenarios
above, and so cannot be used for a subsequent lookup.
With this change, the only afs_lookup response that causes a simple
d_invalidate is when we encounter actual errors during the lookup
(such as transient network failures). This is correct, since in those
cases we don't _know_ that the dentry is wrong. For all other cases,
we do know that the dentry is wrong and so we must force it to be
unhashed.
Change-Id: I11a2db1e05d68a755a77815ec5e8d01ac7b36129
Reviewed-on: http://gerrit.openafs.org/11320
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2d89d447c8b00a40d3fc559813fe31c177da164b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 30 11:12:39 2014 -0500
ptserver: Fix RemoveFromSGEntry hentry memcpy
In this function, hentry is the "previous" continuation entry that we
looked at, and centry is the "current" continuation entry. We keep
track of the previous continuation entry in case we need to update its
'next' pointer, which we do if we free one of the continuation entries
because it is empty after the removal.
So, this memcpy is supposed to copy the current entry to the previous
one, but the arguments are flipped, so we just copy zeroes to centry
(since hentry is initialized to zeroes early on in the function), and
hentry never gets set to anything besides zeroes.
The effect of this is that whenever a ptdb entry has more than one
continuation entry, and we free up any of them after the first one via
RemoveFromSGEntry, the previous continuation entry becomes blanked
(though the 'next' pointer should still be correct). This means the
membership information for that group is not recorded correctly, as it
loses a chunk of the IDs that it is a member of. The reverse mapping
should still be intact (the parent groups have a pointer to the
sub-group), but the group probably doesn't function correctly.
The reason this happened is because of the confusing conversion from
bcopy to memcpy. Most of the instances of bcopy/bcmp/bzero/etc were
converted (correctly) back in commit c5c521af, but the supergroups
implementation was added afterwards, in 8ab7a909, and contained a
bcopy reference. This bcopy was converted to memcpy in 58d5f38b, but
the argument order was not corrected, causing this bug.
To fix this, just flip the first two arguments of the memcpy. Just get
rid of the casts here, too, to match the code in the non-supergroups
RemoveFromEntry and elsewhere.
Change-Id: Ibcbbdcb13ef5c033ea3452555832a0fd3f916efd
Reviewed-on: http://gerrit.openafs.org/11340
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 11e68c181ab9cb09e89e27a33e86d49bbfd550b7
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Fri Jul 25 11:50:16 2014 -0400
Move VLOP_RESTORE and VLOP_ADDSITE home
Change-Id: I19c04ea1762eec349b0e9645fa9777e6a6c5263a
Reviewed-on: http://gerrit.openafs.org/11325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2809bae58851ce9168ca8b18c94360392b8a609f
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 26 00:43:10 2014 -0400
FBSD: 10.1 is coming out soon
The 10.1 release cycle is starting in a month, so let's get ahead of
the curve by adding the config bits now.
Change-Id: Ia17e1267dafee5c80d87a6bfc5e423982f83306d
Reviewed-on: http://gerrit.openafs.org/11328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6667399aa426009a841cdd6459dbfa498e562646
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 26 00:22:09 2014 -0400
FBSD: 9.3 has been released, so add config bits and sysname
Change-Id: I453a457d5311dfea04fd7e8173f1296a0db74902
Reviewed-on: http://gerrit.openafs.org/11327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f63eed308a2def003b9d8d1a98e934c7082b314a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jul 9 11:37:21 2014 -0400
ptserver: fix errant debug message log level
Fix the log level a debugging message introduced
in commit 9ddf9eca56e02be978ff7d065ee16c85de2cfb06.
Thanks to Ben Kaduk for reporting this issue.
Change-Id: I8913472aba8fe5247a29e31e3f04090bc0fce64e
Reviewed-on: http://gerrit.openafs.org/11314
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 668b1765478eb32b5d0895d25301773e412df7a0
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Jul 3 11:02:40 2014 -0400
auth: Fix library dependencies so that tests build again
Change-Id: Ia95a94a77290baea419beb942ea60cd1b89c22fa
Reviewed-on: http://gerrit.openafs.org/11311
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a303bb257ed9e790d8c14644779e9508167887b6
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Jun 18 09:06:39 2014 -0400
Linux 3.16: Convert to new write_iter/read_iter ops
Change read/write operations to the new write_iter/read_iter
operations.
Change-Id: Ia58e5f90182f3968d1a81cfc2f831e7a9cf35d93
Reviewed-on: http://gerrit.openafs.org/11303
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e284db57f94c8f97ed1c95dcd0bd9518d86c050c
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Jun 18 08:53:48 2014 -0400
Linux 3.16: Switch to iter_file_splice_write
Users of generic_file_splice_write need to switch to
using iter_file_splice_write.
Change-Id: If4801d27e030e1cb986f483cf437a2cfa7398eb3
Reviewed-on: http://gerrit.openafs.org/11302
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d704f1d4dc3fca4d903c443130374da2284f3f15
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jun 16 12:44:08 2014 -0400
Use an unsigned type for bitmask values
As noted by clang -Wshift-sign-overflow, the expression "1<<31"
overflows the signed int type, giving undefined behavior.
Use an unsigned type to make the result of the shift defined
behavior by the C99 standard.
Also change an instance of "1<<31" that was checking for whether the
most significant bit was set, as it's still undefined behavior.
Change-Id: I8cf9443aa92470181044fc3b63d491da18ff5e34
Reviewed-on: http://gerrit.openafs.org/11301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e1105acb1c61670caec7d283b0dc6d73d84a0ff2
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Nov 27 17:06:33 2013 -0500
auditU: also report for rxkad-always-encrypt
The logic that works for security index 2 also works for index 3.
While here, update a comment in preparation for rxgk.
Change-Id: Ifd868fa8d9d0ba2f422fa1fac43e4f583d27a1ff
Reviewed-on: http://gerrit.openafs.org/10527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 30a1c829af970ad725bb9d0f44a019fb01530bf7
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Nov 27 17:01:39 2013 -0500
Use the RX_SECIDX_* enums in more places
Add symbols for security indices 1 (rxvab, unused) and 3 (rxkad with
always-encrypt, maybe-used).
kauth and bubasics defined macros for RX_SCINDEX_*; replace those
with the common core rx enums as well.
Use the global symbols instead of custom defines like BULK_NULL and
SAMPLE_NULL, which can now be removed.
Reformat a comment to match current style, since we're changing it anyway.
Change-Id: I82bbb0016a5c3129dfd18ff7dc77ff7839501ad8
Reviewed-on: http://gerrit.openafs.org/10526
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c8dfe8e4c2fd685ef7df181a3d6d45b122d6ff44
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Apr 7 18:56:26 2014 -0400
afs: maintain afs_users buckets in sorted order
Modify afs_GetUser() to insert a new unixuser into an afs_users
hash bucket in sorted order, by uid/PAG. This is in support of
other small optimizations in future commits.
Change-Id: I68c51ab38733575290aa0c8aa2a306168c5483c0
Reviewed-on: http://gerrit.openafs.org/11071
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 7d4f3a4710fb8c9fbde4294c2458ecf32658300b
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Apr 3 16:37:51 2014 -0400
afs: only reset access caches for the matching cell
When an AFS user's tokens change (unlog, aklog) or expire,
afs_ResetAccessCache() is called to reset all the access caches
for that uid/PAG.
However, a user/PAG may have tokens for multiple cells, and they
may expire or be set/reset at different times. Therefore, it is
incorrect to assume that all access caches for a uid/PAG should
be discarded when only one cell's tokens have changed.
Modify afs_ResetAccessCache() to acccept a new argument 'cell',
and only reset the access caches for a uid/PAG if the vcache
resides in the specified cell. If the caller really wants to
reset all a user's access caches, specify cell=-1.
For cache managers that are running with multiple PAGs and multiple
cells, this should improve performance because 1) it avoids
scanning access caches chains for vcaches that are not part of the
current cell and 2) it avoids deleting access caches that may still
good, thus preventing unnecessary FetchStatus calls.
Change-Id: Id4c138dab45fd48265a4029880a5d57947e67a52
Reviewed-on: http://gerrit.openafs.org/11070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit e2f666fe81f2152a9dd1f35680499cf029e8381b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jan 10 22:17:57 2014 -0500
roken: configure checks for getaddrinfo and friends
Change-Id: Icb2ace89332024668c9dc4326b967a1015afc1e9
Reviewed-on: http://gerrit.openafs.org/11199
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit b0bb7bdb499367a5aebde7183e6e5d188280545a
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Wed Jun 4 16:04:19 2014 -0400
Import of code from heimdal
This commit updates the code imported from heimdal to
5dfaa0d10b8320293e85387778adcdd043dfc1fe (git2svn-syncpoint-master-311-g5dfaa0d)
New files are:
roken/freeaddrinfo.c
roken/gai_strerror.c
roken/getaddinfo.c
roken/getnameinfo.c
Change-Id: I4a80dfd0d95cfd252af5ce3228fb824b4aacb961
Reviewed-on: http://gerrit.openafs.org/11198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 064b69ca267e58a7fdd8c4c7b728e79fd23a97cc
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jan 10 22:12:08 2014 -0500
roken: add getaddrinfo and friends the imported file list
Change-Id: I2203bf9ab45feb47df760b404727d23d1fa15381
Reviewed-on: http://gerrit.openafs.org/11197
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 48789d47b613e40734e7b0caac58572a80f8b318
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jun 2 23:24:45 2014 -0400
linux: dont ignore kmod build errors
Errors from the linux kmod build are not propagated, since make is
run as the first command in a pipeline, and the shell returns the
exit code of the last command in the pipeline. Run the make command
in a subshell to detect errors, and exit afterwards. (This method
is more portable than bash specific pipeline processing options.)
Thanks to Mark Vitale for pointing out this build system defect
to me.
Change-Id: If3e204fe31dbdc9e7416d52fae897f792d27d678
Reviewed-on: http://gerrit.openafs.org/11186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 1673764ea091a3f02a64a3d853c3e14f758cdda7
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jun 4 09:42:46 2014 -0500
bozo: Ignore ListKeys ka_KeyCheckSum return value
With commit c04de52da4e89e15b211b4a19a3d9bc4d612b209, an error in
ka_KeyCheckSum here makes the entire BOZO_ListKeys RPC to fail. This
caused two changes:
- That commit makes the RPC fail in situations where it did not
before. But even if we cannot calculate the checksum, we can still
return other information about the key, so this is undesirable.
- It masks the previous 'code' value, returned from stat(). The
return code of stat() is now effectively ignored, except for the
purposes of setting st_mtime, whereas previously a failure caused
the RPC to fail. This is a behavior change.
So, effectively revert c04de52da4e89e15b211b4a19a3d9bc4d612b209.
Explicitly cast the return value of ka_KeyCheckSum to void, to make it
clear that we are intentionally ignoring the return value, so
hopefully this will not be flagged as a warning by code analysis tools
such as coverity.
Change-Id: Iac745d7c88ed7c2d97660e6949caa63580eef6e2
Reviewed-on: http://gerrit.openafs.org/11194
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 4bf942f5c38fd711136e1a2010cb0b2ea4612901
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Jun 4 20:41:57 2014 -0400
rx: Do not try to cancel nonexistent events
Unconditionally cancelling the resend event and releasing the
reference it was supposed to have on the call, can cause the
call reference count to go negative.
In particular, the call chain when a new rx_call structure is
allocated would cause its reference count to become negative.
Behave similarly to all the other rxevent_Cancel calls touched
by 20034a815750beff262d49b37fba225c72dd0ab1, and only cancel the
event and drop a reference when the event is present on the call.
Change-Id: Icf2dd58c2545814ac17bb960077621c6d3209da0
Reviewed-on: http://gerrit.openafs.org/11201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2d973c10f13b40c0ac9da25fe7f4c73b3560a686
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Fri May 23 07:48:11 2014 -0400
afs/VNOPS: use osi_AllocSmallSpace() correctly
Send the size down to the allocator so it can perform some
consistency checks.
Change-Id: I6c089ab912014c639888b744a92a28813fb4b3c4
Reviewed-on: http://gerrit.openafs.org/11168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 3ab546395536a3c93613dfd53363d380e2c05081
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Mon Jun 2 16:15:15 2014 +0200
fstrace: Don't read uninitialised data on other platforms either
Commit 908105fe8d51551e45692de4e145022138a0356c fixed an off-by-one
error potentially causing a buffer overread in CheckTypes, but only
in the IRIX/AIX version of the function. Apply the same fix to the
code for the other platforms.
Spotted by Andrew Deason.
Change-Id: I5f70c072e609337b39064ba48353b4fdf23acf17
Reviewed-on: http://gerrit.openafs.org/11185
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 69705782318226806b6a2b092ec4b63d594d184c
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Thu May 29 19:24:24 2014 -0700
afs: Delete unneeded duplicate code
Delete a memory release and a goto since natural code flow will
result in exactly the same thing.
Change-Id: I8fe1400aa2db0e15cbbd577ba18cc1fcdec18447
Reviewed-on: http://gerrit.openafs.org/11179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 02565591855f5a5ddb7dd6e308d9f535c2fd64b8
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Tue May 27 01:26:59 2014 -0700
config: Move AFS_LRALLOCSIZ to afs_args.h
AFS_LRALLOCSIZ is currently defined in afs/afs.h. Other memory
related definitions such as AFS_SMALLOCSIZ and AFS_MDALLOCSIZ
are defined in config/afs_args.h. Move AFS_LRALLOCSIZ to
config/afs_args.h for consistency.
Change-Id: Ie1e286c24be6a2def404a54355a2fa4b2c42330d
Reviewed-on: http://gerrit.openafs.org/11174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit de74227d9c925206cd6d46496ec4682569d3105b
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Tue Apr 29 12:48:03 2014 -0400
libafs: Speed up afs_CheckTokenCache
On systems with a large number of PAGs and files in use, the
periodic daemon job that checks for expired credentials and
cleans up the axs cache can run for a very long time. This
can lead to kernel soft lockups and eventually hang processes
and file access because of unavailable locks.
Rework the scanning logic in afs_CheckTokenCache to make the
scanning more efficient in most real world cases. On a test
system accessing ~4000 files from processes in 1000 PAGs, this
has been observed to reduce the runtime of afs_CheckTokenCache
from a problematic ~70s down to about 0.7s.
Additionally, this changes the conditions in which an axscache is
discarded. uid+cell (rather than just uid) must now match, and
if no matching unixuser is found, it will also be discarded.
Adapted from code from Jeffrey Altman who provided the original
loop algorithm and code.
Change-Id: I65b275b4244b3b6ab65453623bb8729530a9e1a6
Reviewed-on: http://gerrit.openafs.org/11123
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 231bd022ede3309238d840461dc63a46aaa357e5
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jan 4 16:16:04 2013 -0500
Dummy Makefile for rxgk
Include a libtool export symbol list for the shared library, which
only has the client RPC calls and the NewFooSecurityObject primitives
for now, since that's all that's stubbed out.
Also connect the rxgk directory up to be buildable from the root, but
nothing depends on it yet so it will not be built.
Looking ahead, build a libafsrpc_rxgk.la object.
Change-Id: I12ddefbdaa1ad4845649e3a32efdeaaa21b5e9b7
Reviewed-on: http://gerrit.openafs.org/10563
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit ee56e925f0c6484ac58e23ccdd1b1bf1a3760505
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Dec 6 15:24:58 2013 -0500
Add rxgk boilerplate
Just the skeleton of what needs to be there. The actual import is split
over multiple commits, to make the reviewer's burden more manageable.
Error table, protocol description, and stubs for the security object
routines, with header to declare them.
The public header rxgk.h currently only contains a few typedefs and the
NewSecurityObject prototypes, and includes the RPC interface and com_err
code headers.
Change-Id: I7893f78119bb4aef12112cc1e51e1ec69de326c2
Reviewed-on: http://gerrit.openafs.org/10562
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit e156fae7a1866d1b00a1d9252c0a775128e2f033
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Dec 6 14:56:25 2013 -0500
Add some configure bits for GSS-API
rxgk will require gss_pseudo_random and might want a couple other
krb5-specific bits. We'll also need substvars to tell whether or
not we can try building these things.
Change-Id: Id18eb3f554605875696095eb40c25ec54df1f74b
Reviewed-on: http://gerrit.openafs.org/10561
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0abf5fcbe8a0367a91224fa50480e78f0e6b02e4
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon May 5 13:33:10 2014 -0400
Linux: Drop PageReclaim AOP_WRITEPAGE_ACTIVATE case
The exit case here seems to have been added to avoid recursion into
the writeback code and eventual deadlock (see RT #15239). One issue
is that the PageReclaim check can trigger in code paths that don't
deal with the AOP_WRITEPAGE_ACTIVATE code correctly, leading to EIO
errors when multiple threads are doing large mmap writes and memory
pressure is sufficient to trigger reclaim.
The check could be improved to check wbc.for_reclaim which seems to
indicate more reliably when it is safe to return ACTIVATE, but given
that the CPageWrite flag already provides more targeted recursion
prevention, it seems safer to just drop this special case.
Note that many kernel filesystems used to have a similar check mainly
to prevent excessive stack usage, but as more recent kernels have
moved away from doing any writeback during direct reclaim this is a
case that should no longer occur. Partly as a result of this there
are very few users of AOP_WRITEPAGE_ACTIVATE left in the kernel,
which may be a motivation to find a better mechanism for OpenAFS
eventually.
This has been shown to help avoid EIO errors with multiple processes
doing intensive mmap writing.
Thanks to Yadav Yadavendra for identifying the issue and providing
extensive analysis and testing.
Change-Id: I88d9ef6e6e7a8f666f82c5ca481254839c2ba1e5
Reviewed-on: http://gerrit.openafs.org/11125
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 21a85792c44e2145eea6d10dc31d58028ba933b8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 18 13:59:59 2014 -0500
volser: log message for cross-device link errors
Add a log entry to the volume server to help diagnose those pesky
'Invalid cross-link device' errors returned by vos, which occur when
a clone volume is located in a different partition than the parent
read-write volume, or when a read-only volume is on the incorrect
partition on the server.
With this change, a new log entry is added when the volume server
fails to create a clone or a read-write volume because a volume with
the target volume id already exists on a different partition. For a
clone volume, this would be a different partition than the
read-write volume. For a read-only volume, this would be a different
partition than indicated in the vldb.
Examples:
Volume foobar is on /vicepb, but foobar.backup is incorrectly on
partition /vicepa.
$ vos backup foobar
Failed to clone the volume 536870934
: Invalid cross-device link
VolserLog:
VCreateVolume: volume 536870936 for parent 536870934 found on /vicepa; unable to create volume on /vicepb.
1 Volser: Clone: Couldn't create new volume 536870936 for parent 536870934; clone aborted
...
The vldb indicates a read-only volume should be on /vicepa on a
remote site, but the actual volume is on /vicepb.
$ vos release xyzzy
Failed to create the ro volume: : Input/output error
The volume 536870921 could not be released to the following 1 sites:
mantis /vicepa
VOLSER: release could not be completed
...
VolserLog on mantis:
VCreateVolume: volume 536870922 for parent 536870921 found on /vicepb; unable to create volume on /vicepa.
...
Change-Id: Iaa471c46059d598a5095d59580e3b0b8ac6e1992
Reviewed-on: http://gerrit.openafs.org/10849
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c0683441a0121433d772bfb36e1e9a1c020a5dcb
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed May 28 09:53:58 2014 -0400
vol: Fix gcc 4.9 warnings
gcc 4.9 complains here because the trailing 0 in these macros
has no effect, the value having already been set to NULL.
Just remove the offending 0s, nothing uses the return value
anyway, even if there were platforms where 0 != NULL.
Change-Id: Ic9a79d51419726c0c823a9228c21c13dea918dc8
Reviewed-on: http://gerrit.openafs.org/11176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 40fb2650b783fbafe51aefd3d0af7a6b0536c265
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun May 18 19:28:16 2014 -0400
libafs: allocate vattrs in LINUX to reduce stack used
Allocate temporary vattrs in LINUX to reduce the amount
of stack space used.
Change-Id: Iafa8d920b7149486f1ea8fb1999c1f4c9a935615
Reviewed-on: http://gerrit.openafs.org/11170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 9630c075409a262424805411ed473178814b412c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun May 18 17:17:38 2014 -0400
libafs: api to create and free vattrs
Add a pair of functions to allocate and free struct vattrs,
to avoid having struct vattrs on the stack.
Change-Id: Ia5a148ebcdf8a2f1e3a2aa9d8fd3c0e0cd0e25e9
Reviewed-on: http://gerrit.openafs.org/11169
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f66c467bdd7182eb80ede3b9faa5f5ae5231632f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed May 28 10:41:02 2014 -0400
Use a separate toplevel target for venus/tests
There's no particular reason to lump them in with the venus target,
and we have reports that it causes parallel build failures on some
systems.
Just use a separate 'venustests' target akin to rxtests and ubiktests
and the like, instead.
Some of these lines are now long and should be wrapped, but leave
that for a follow-up commit.
Change-Id: Idd50c02d3c0c88dc2788ecfd221bbc5cbf8cba19
Reviewed-on: http://gerrit.openafs.org/11177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit f05abc47938beddb436fd0b9677f7b59fc64a215
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Fri May 30 15:05:28 2014 +0200
libadmin: Remove redundant memset call
Commit bf78bf2c115659b78c34d3bc9d1934bcff21c8cc added initialisation
of the nbulkentries structure to 0, to avoid freeing garbage due to a
goto fail_... before the structure is initialised. As pointed out by
Andrew Deason, there already is an equivalent memset call later in the
code which is now redundant. Remove it.
Change-Id: I236e6de2a79f4f483be314654225bd52316f5a02
Reviewed-on: http://gerrit.openafs.org/11180
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e7a4359a0870f214091113f3efb0b32a4b68663c
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Fri May 30 14:28:53 2014 -0700
audit: Delete va_copy kludge
When I developed fix c3d4c109305b2db8a63b754c1894ad37326dc340 I used
va_copy. I was nervous because it required C99, but I had no
problem with any of the buildbots, nor did any reviewer comment.
audit/audit.c contains a local hack to simulate va_copy in the
pre C99 days. There are no uses of va_copy in audit.c but
presumably at some point there was. Delete the local va_copy.
Change-Id: I5e30c7e3052aeffe56e366888c5a3db3a705fd00
Reviewed-on: http://gerrit.openafs.org/11184
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 85f3d0941b37c71047f59e1b1f4f92557d232fb8
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Tue May 27 01:16:26 2014 -0700
Delete several unused memory management constants
Change 412854593cf368006c18e6c0dc607a9ecd76a0e0, removed from
the code base the last usage of:
AFS_SALLOC_LOW_WATER (defined in afs/afs.h)
AFS_MALLOC_LOW_WATER (defined in config/afs_args.h)
AFS_MDALLOCSIZ (defined in config/afs_args.h)
This patch deletes these constants.
Change-Id: I1333aed508875e9b13dc3f36f3ff0d5eadfb2cfd
Reviewed-on: http://gerrit.openafs.org/11173
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7a37f49e9db2dad980f22b3df8766863711ddb4c
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Dec 13 13:19:04 2013 -0500
bcrypt keys are on the rxkad list, not rxgk
Make the code match the comment.
Change-Id: If891b9a4b33eafc93816077c321790f5af10803f
Reviewed-on: http://gerrit.openafs.org/10582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 882b9dedef974f1cbc71093a64675819811b4b1f
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed May 8 12:51:31 2013 -0400
Suppress nonliteral format string warning/error
Clang doesn't like a nonliteral format string, and some kernel
builds (e.g., freebsd) are done with -Werror. Use the standard
workaround for FreeBSD and UKERNEL builds by calling vsnprintf()
into a fixed buffer.
Remove the !defined(AFS_LINUX26_ENV) check, as it duplicates a
conditional around the entirety of osi_Panic().
Change-Id: If6287dd19604b78150c81febba8a59b73f56783c
Reviewed-on: http://gerrit.openafs.org/9880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 4b4d44b3dd62c2a36908f20eeff345b666e7858d
Author: Georg Sluyterman <georg@sman.dk>
Date: Wed Mar 26 21:48:56 2014 +0000
cmd: List version in help for commands
List version in help for commands using cmd library
Change-Id: I4da64be11244e64d961e8de47cecb24cbbadce32
Reviewed-on: http://gerrit.openafs.org/10956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c01236beb5a6ad55cd424f0ccc3a836d737f78f3
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Oct 26 23:35:14 2013 -0400
build: separate source and header compile_et rules
Generate source and header files separately to support parallel make
without contortions.
Add a complete list of dependencies for each generated header file
to avoid build errors during parallel make.
Change-Id: I804ff553e08d411a1cfe20a4ef4e57da9d321837
Reviewed-on: http://gerrit.openafs.org/10370
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 0408718b8108882d5fb70612e7e7e5d3184fb65f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 2 14:54:00 2014 -0500
rxkad: fix include quotes for generated headers
Change-Id: I36f7df2205fb4e655c3f342b864df5b877469aec
Reviewed-on: http://gerrit.openafs.org/10871
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit d3eed1e58a7605b320ec38d48ff1c185aa2d9806
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 2 12:26:24 2014 -0500
auth: fix include quotes for generated headers
Change-Id: If4786c30b0b448ea4ff663d62d5e0f8623736084
Reviewed-on: http://gerrit.openafs.org/10870
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 4e6b7ab904d38d38da1b80a7342bd815668a8c09
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Jan 19 17:04:08 2014 -0500
libafs: separate source and header compile_et rules
Use the new compile_et -emit flag to generate source and header
files separately to support parallel make.
Export afs_trace.h since it is required to build libafs. Before the
compile_et -emit flag was available, The afs_trace.h file was
generated as a side-effect of creating afszcm.cat.
Change-Id: I4e93691dda34ddc8600d6a818503e0c9e75e618a
Reviewed-on: http://gerrit.openafs.org/10729
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit e97198372a8ddbdba4b5a58c0659f2aa5d2b2d56
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jan 21 13:45:32 2014 -0500
libadmin: separate source and header compile_et rules
Use the new compile_et -emit option to generate source
and header files separately for parallel make support.
Remove unneed -h options, since there are no prolog
files and the header names match the error table names.
Change-Id: Ib94bf2cd34e9102d4047d8f1ae0b108af3299cc4
Reviewed-on: http://gerrit.openafs.org/10730
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 1141d120a5b8a0e0f33c6b8f8bfe57f1f3eb5180
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 30 11:53:16 2014 +0200
doxygen: make dox
Add an optional make target (make dox) and doxygen configuration to
generate doxygen output files. Auto-detect when the doxygen and
graphviz dot tools are available. When dot is present, configure
doxygen to create dependency graphs.
Since the graph generation can take a very long time, a new
configure option has been added to override the dot tool
auto-detection. To disable the graph generation (even if dot is
installed), run configure with the option: --without-dot
When graph generation is desired, but graphviz dot is not present in
the PATH, specify the path to dot with the configure option
--with-dot=<path-to-dot>.
The configure summary has been updated to show when doxygen document
and graph generation is configured.
Thank you Jason Edgecombe for providing the doxygen configuration
for OpenAFS.
Change-Id: Ie875fc2961877ee76e4c17631bbb95c29ef20b9e
Reviewed-on: http://gerrit.openafs.org/10970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 8050a005a39faf39a6743293c72fa8ed7e928a47
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 30 14:02:17 2014 +0200
configure: fix comment about unix variants
Remove vulgar comment, and remove commented out checks for
aix and minix.
Change-Id: I1ee6948bab3185a7855f1d9dc0e9557e27d4e1d2
Reviewed-on: http://gerrit.openafs.org/10969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 383602344921ab6dbe72e35bdc085567ccda2b69
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Apr 25 15:23:16 2014 -0400
rxgen: use unsigned type for max array length
Plain '0' is of type int, i.e., signed, and therefore so is '~0'.
The length of an XDR array is unsigned, so this constant should
be of an unsigned type.
Change-Id: I13f5f94b2f54bc0adcdf2ded1696b797b5205057
Reviewed-on: http://gerrit.openafs.org/11107
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 200658834fcb22ca608dba8856d2d47872d3b2b3
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Apr 25 15:24:22 2014 -0400
Some rx type cleanup for signedness
The epoch, Cid, and security header/trailer sizes are all fundamentally
unsigned quantities. Change the types exposed in some API signatures
to match this reality, and also change the global variables for the
epoch and Cid to match. (Per-connection variables were already of
an unsigned type.)
Change-Id: I4a56736ef7d78028d1d0b980cda0b4c37d694388
Reviewed-on: http://gerrit.openafs.org/11106
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 7a701239d8327ae738124edb5e11f3bcbb08a76b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed May 21 15:58:17 2014 -0400
Install afscp.h from srcdir, not the build dir
That header is not a generated file, and is not found in the
object directory. make install would fail from a separate objdir
prior to this change.
Change-Id: I31041c793bd930cfe2fc3c5f8a754ba1b91c26e5
Reviewed-on: http://gerrit.openafs.org/11160
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1ac4eb1b84db2732b9c2645492daff9e25417475
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Apr 9 08:40:21 2014 -0400
libafs: reduce stack space in LINUX
Allocate temporary vrequests to reduce the amount
of stack space used.
Change-Id: I71ed86b6345ce69a70f33cdbaf5eed2abb2cef19
Reviewed-on: http://gerrit.openafs.org/11005
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 76ad941902c650a4a716168d3cbe68f62aef109f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 14 16:07:53 2014 -0400
libafs: api to create and free vrequests
Add a pair of functions to allocate and free struct vrequests, which
are to be used to avoid having struct vrequests on the stack.
Change-Id: I6cbfe2ed21beb1ba500975188bb76608fdee4bc7
Reviewed-on: http://gerrit.openafs.org/11074
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit b71a041364d28d6a56905a770cd20d1497ee26ec
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Thu Apr 24 06:19:32 2014 +0200
Logfiles: open with O_APPEND
This does not change the current (normal) behaviour, but allows
logrotation via "copy and truncate" as offered by logrotate.
Otherwise the processes will remember the offset of the last write
and a truncated file is filled with '\0' until the current offset.
The mrafsStyleLogs are untouched, since they can be rotated by a
kill -HUP and are deprecated anyway.
Change-Id: I09437aac63205fee3d97850507531e6833fed14f
Reviewed-on: http://gerrit.openafs.org/11092
Reviewed-by: Nathaniel Filardo <nwfilardo@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit f4ab11a8dd562bd7ee11c45e51814281d64c866c
Author: Nathaniel Wesley Filardo <nwfilardo@gmail.com>
Date: Sat Mar 29 22:56:21 2014 -0400
Add a small string formatting utility to opr
This is to be used by the (coming next) vos-foreach utility, but it seemed
sufficiently general and useful to break out into its own free-standing
component.
Change-Id: I92c3a615fecb80e1766f78492b229a826a23e18a
Reviewed-on: http://gerrit.openafs.org/10965
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 18511623f2e2bb33e3ebe9f768afed52fd53f9ce
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 14:01:37 2014 -0400
readme: move README.WARNINGS to CODING
Move the information about compiler warnings to the CODING
readme file.
Change-Id: I0be752c76ddee809fe80bd1f97048953eeee89ee
Reviewed-on: http://gerrit.openafs.org/10975
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit eff41a2e53acd2622d89003647ba711a8b5bc75c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 13:57:33 2014 -0400
readme: move git info to CODING
Move the REAME.GIT information to the CODING readme file.
Change-Id: I3013e03ebfe003dce23f0e2d808ab6905dd2b452
Reviewed-on: http://gerrit.openafs.org/10974
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 04c7ed855ef78e1d1a15821ffff5fe0f26b9d0c4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 13:06:03 2014 -0400
readme: rename README.DEVEL to CODING
Rename the developer's readme file to CODING as a home
for developer related information.
Change-Id: I8c2cf70258671387b926ef3d666f6476056ef06e
Reviewed-on: http://gerrit.openafs.org/10973
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 2db8242aebea7dfda7f9f1a2827f76a6fe5c8dc7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Mar 30 14:11:00 2014 +0200
makefile: remove comment about washtool
Once upon a time, AFS used something called washtool as part
of the build system. Remove the remnant comment about it.
Change-Id: I566920b98c03d3cc65a6e2974a78a9247fd79842
Reviewed-on: http://gerrit.openafs.org/10968
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 9930567bcf9655d3f562b210b2dc4b4a99226691
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 8 16:10:36 2014 -0400
libafs: reduce stack space in VNOPS
Allocate temporary vrequests to reduce the amount
of stack space used.
Change-Id: Ic14cc4f657f7c7e97ef396601bd6c8c7f91abe55
Reviewed-on: http://gerrit.openafs.org/11004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 027e2bbb1191c31dbbe968a925c192b064d52c47
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Mar 28 00:36:29 2014 +0100
libafs: reduce stack space
Allocate temporary vrequests to reduce the amount
of stack space used.
Change-Id: I8c50a3af3028512003a02e46a2960b9b135213a5
Reviewed-on: http://gerrit.openafs.org/11003
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit cdbf49f06baf33abd803b5d1ec245e58a94eec52
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 24 15:27:38 2014 -0400
libafs: check afs_InitReq return code
Do not ignore the return code from afs_InitReq everywhere it is
called. If afs_InitReq fails, the vrequest could not be initialized
for some reason.
Change-Id: Ibae9f93c1e20a9fcae812f047da14106e6717454
Reviewed-on: http://gerrit.openafs.org/11097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c20c01185ed748b2bc823369a8f28cf004b7d1c9
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Wed May 7 15:20:51 2014 +0200
redhat: Use the right path to depmod
As of Fedora 17 and RHEL 7, depmod has moved from /sbin to /usr/sbin.
The full path to depmod is used in package scripts and as a dependency.
This hasn't caused problems in most cases because on an installed
system a link /sbin -> /usr/sbin is present and during ordinary package
installations yum/rpm correctly then figure out that /sbin/depmod is
actually provided. But in other situations, the dependency check is not
that clever and (incorrectly) fails.
Add a macro to the spec defining the full path to depmod, use the macro
rather than plain /sbin/depmod throughout the spec, and also pass it to
kmodtool when required to generate the kmod package scripts and
requirements.
FIXES 131860
Change-Id: I1f2e4f7100d244477c2cb9087d2f48bbcea27fdc
Reviewed-on: http://gerrit.openafs.org/11128
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit e1d0342326d11a14e1fb0075fb62cc6be9389b97
Author: Antoine Verheijen <apv@ualberta.ca>
Date: Wed May 7 14:57:26 2014 -0600
OpenBSD: Add support for OpenBSD 5.4
Add param header files and other config info to provide
support for OpenBSD 5.4.
Change-Id: I56d2e716bd7fa4dee699f8d190cb4b60bb0f67a8
Reviewed-on: http://gerrit.openafs.org/11130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 0287086fa78f0bc0012325c2eadb3dccb6b1f766
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Mon Mar 31 04:42:22 2014 -0700
afs: Suppress duplicate message on Linux
Update afs_util.c to call afs_warnall in places where afs_warn and
afs_warnuser are called back to back with identical parameters.
Change-Id: I529344dea12149d8f18ec38bb17418c703f7d26b
Reviewed-on: http://gerrit.openafs.org/11006
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit a70f8e1a7e3fcbc13c9a60f8a7409dd01d014afb
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Sat Mar 22 00:52:32 2014 -0700
afs: Define afs_warnall routine
In a Linux environment afs_warn and afs_warnuser both go to
the same spot, resulting in duplicated messages if both are
invoked back to back. Define a new function afs_warnall
for use when identical messages are directed to both warn
and warnuser. In a Linux environment it will do the right
thing and present only one copy of the message.
Change-Id: I1abdc63adc74fe5b08d3872d48698ec9dcc7a40c
Reviewed-on: http://gerrit.openafs.org/10943
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit c3d4c109305b2db8a63b754c1894ad37326dc340
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Fri Mar 21 23:31:21 2014 -0700
afs: restructure afs_warn and afs_warnuser
Restructure afs_warn.c to provide an afs_vwarn and afs_vwarnuser
that accepts a va_list rather than a variadic parameter
specification. afs_warn and afs_warnuser continue to be
variadic functions but now call afs_vwarn and afs_vwarnuser.
This is a preparatory change. A subsequent update will
further exploit afs_vwarn and afs_vwarnuser.
Change-Id: I8e740c4db311582bda6422e6600f1503dfbd0f5a
Reviewed-on: http://gerrit.openafs.org/10942
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit bec2555feb70be92bbd5685d9a43ae3138de382b
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Fri May 9 13:25:55 2014 -0400
solaris: help fs_conv_sol26 build cleanly
handleit(), being static, should be declared before usage.
Change-Id: I5cf9767ed2fc552f7a22c7570d0a4d256a4111b1
Reviewed-on: http://gerrit.openafs.org/11134
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 995cc38a24840cd1ba2b8dcdf3c9df233c1b2abe
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 1 17:46:45 2013 -0500
vos: vos release -force-reclone option
Add a new vos release option called -force-reclone to force the
reclone of the release clone and a release to all of the remote
sites, regardless of the state of the VLDB flags on the remote
sites, but does not force full volume dumps when distributing the
volume.
Provide an alias -f for -force for compatibility with the original
IBM vos, in case scripts were written to use the old '-f' option,
and for users with muscle memory.
Change-Id: I0ebebc5e8099299781e8da57579d91848bb2ad19
Reviewed-on: http://gerrit.openafs.org/9020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 84cbafc3b1394eb5bce1fd617a5581536530d54e
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Thu Apr 17 12:55:34 2014 -0500
NetBSD: update kernel module glue for NetBSD 6.99.x
Change-Id: I4fe5ccb33ec823a6df3a73e94247a0a42b970e57
Reviewed-on: http://gerrit.openafs.org/11089
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2f64bc272434562dfb84c4f480c82354019dec19
Author: Gergely Risko <gergely@risko.hu>
Date: Wed Mar 19 10:56:26 2014 +0100
RestrictedQuery feature
Make vlserver and volserver suppport a new command line parameter,
"-restricted_query admin". When this is on, the query RPCs that
are not needed for normal cache manager operations are restricted
to administrators listed in UserList. This is off by default.
Change-Id: I2a23a4e99cabd46b19ed491a6520773731a5994e
Reviewed-on: http://gerrit.openafs.org/10927
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7206d4088d823bf535aaddef49dab1653a43a0fe
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 17 09:31:18 2014 -0400
uss: add missing include
Fix a build error when configured with --enable-uss. The
added include defines the VolumeId which is needed by
the volser.h.
Change-Id: Ifbdaadf4de726ff1da54e93ba47124c5b5eb9cfb
Reviewed-on: http://gerrit.openafs.org/11084
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b9979e1a23ce28b20fe95d5e6042b9b15506c993
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri May 9 11:43:35 2014 -0400
aklog: double get_credv5 in retry logic
Fix a bug where get_credv5() is called twice, even if the first one
succeeded, in the aklog retry logic.
(This bug uncovers another bug where get_credv5_akimpersonate
crashes in the krb5 libs when get_credv5 is called back to back.)
Change-Id: Ie6cac3b4522946c87c30ad3cd6939738234800bf
Reviewed-on: http://gerrit.openafs.org/11133
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3946b50a7ecdfd34681ab471863929b2f82aff4b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 15 12:30:19 2014 -0500
doc: Clarify some BosConfig.new text
It is not always clear to users whether BosConfig.new is noticed
during an automatic restart, or if it requires stopping and starting
the bosserver. Slightly reword the relevant text and add a small note
that a "general restart" does cause BosConfig.new to be noticed, so
this is explicitly clear.
Change-Id: Iab3eaff176305b0b2991a6636e70204b5072b1b0
Reviewed-on: http://gerrit.openafs.org/11076
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 72bc3848536cc71b8950e5619f5769f60a73f3ab
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 14 06:42:40 2014 -0400
Windows: Restrict redir trace buffer to 10240KB
Define macro AFS_DBG_LOG_MAXLENGTH to 10240 and then use it to
enforce the 10MB trace buffer limit.
Change-Id: I98b759d9f51d24d402bfdc56570c0f0de93926a0
Reviewed-on: http://gerrit.openafs.org/11146
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ccb092c37802d300b6ec12d45f10bed42d2a5a59
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Mon May 12 21:50:48 2014 -0400
Windows: Fix uninitialized variables
VS2013 spotted two cases where we do not set up the
Iosb.Status when we catch an exception from Cc.
Fix them.
Change-Id: I93b8a48863f22fd1dc2d7dba4d9de18454f35fe0
Reviewed-on: http://gerrit.openafs.org/11140
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d075b0549d62e4a81b7543b9c2f5dac242074909
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Fri May 2 14:10:06 2014 -0400
Linux: Prevent some fakestat data inconsistencies
When fakestat is enabled for a mount point, the parent vcache
entry is not the right place to find the DataVersion of
the target volume root directory. This can lead to data
inconsistency since the revalidation checks rely on the parent's
DataVersion to determine if a file entry is still valid. If the
file was replaced or deleted remotely, the only callback we
get is for the parent directory, and in that case the client
will think the file entry is still valid and give back stale
data to the user.
If fakestat is enabled and we have a mountpoint, always use
the parent vcache pointer returned by FakeStat before using it
to either store (in the lookup and create ops) or compare
(in the revalidate op) the DataVersion.
FIXES 131855
Change-Id: I03c05c1dab39e663b74635700e80ba70861b1c2e
Reviewed-on: http://gerrit.openafs.org/11118
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit aad509a7e11432bbe8cf0a3a0adaa78d7f9c9da5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 8 09:06:07 2014 -0400
Windows: cm_Analyze retries vs CM_REQ_NORETRY (2)
Commit a1b5a1d42280753de13094006dcc130fede978a1 left out a critical
part of the patch. The check for "retry < 2" when determining whether
retries should be skipped due to CM_REQ_NORETRY.
Change-Id: I9b750e2bab11d28813447b2ee92287b8dcfbbba3
Reviewed-on: http://gerrit.openafs.org/11131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a111d0db7768e0ab924f51666d626ddb3e25ca38
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 24 13:40:06 2014 -0400
libafs: fix lock leak during shutdown
afs_getattr returns EIO when afs is in the process of shutting
down. Be sure to unlock the locks taken before returning.
The bozon lock leak has been present since IBM AFS.
Change-Id: Id3e330c458996abf1519de6364060cc0b8828e6a
Reviewed-on: http://gerrit.openafs.org/11096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d9e14a08129cc70a3baca67c2c1adb8aba5945a2
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Sun May 4 14:33:11 2014 -0400
Windows: Adjust Last Write time handling for -1
The "what date/time gets changed when and by whom" in Windows is badly
defined, but all filesystems support the semantic that if a date is set
using a specific file object (or the timestamp is set to the magic number
-1)
then other changes provoked by that file object will be ignored.
AFS redirector timestamp handling does not support this behavior.
For the LastWrite timestamp (other timestamps are pretty much advisory and
maintained on a best effort basis) the timestamp would be updated by a
write operation even after -1 is set via the file handle.
This patchset implements the -1 behavior for LastWrite. It also follows
the standard Windows practice of setting the LastWrite timestamp to be the
time of close of the handle that performed the write, not the time of the
write itself.
Finally, it should be noted that since RX*FS_StoreXXX operations update
the last write time on the server the client must restore the LastWrite
timestamp at handle close if -1 was specified.
Change-Id: Ica0c566fabb6b3046eb51f827402d622190daea8
Reviewed-on: http://gerrit.openafs.org/11110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a1f5a9d72f795023813c116329cd40dec3bd43af
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 21 05:44:41 2014 -0500
Windows: RDR AFSSubtituteName invalid UNICODE_STRING
The 'ComponentName' parameter to AFSSubstituteName() is a UNICODE_STRING
pointer. Its address should not be passed to AFSDbgTrace when used
in conjunction with a %wZ format.
Change-Id: I12ead951b1ae376e42da12b21e32f65e736375ab
Reviewed-on: http://gerrit.openafs.org/11090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9c10c202f1f2e516dde8b70c3a3b69a73d163070
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sun May 4 05:30:25 2014 -0400
Fix buffer length validation in ktc_GetToken and knfs
The signed int tktLen is checked against a maximum size, then passed
as the unsigned size_t argument to memcpy. So we need to make sure it
isn’t negative.
This doesn’t appear to be exploitable: tktLen comes from the kernel,
which should have previously validated the length within the SETTOK
pioctl.
This bug was found with STACK <http://css.csail.mit.edu/stack/>.
Change-Id: I781bd300cad3d725d3517e7f6ac9e6423c417087
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/11109
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 279345c231d0a2d9f6e8c2f76a5347bafd40e70b
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Wed Mar 6 13:53:29 2013 -0700
doc: recommend cleanup steps in "vos convertROtoRW" man page
vos convertROtoRW leaves the older RW copy on the original fileserver,
although it is no longer in the VLDB. Provide the user with some hints
regarding clean up.
Change-Id: I5f6fcf7d5a516b59438d84e60f163a567d3a64fd
Reviewed-on: http://gerrit.openafs.org/9408
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit c91b2a119a72a2293d9e9ffe5bd97c70d0c22eee
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Dec 9 14:54:18 2013 -0500
Fix typo in rfc3961 namespace-cleaning
Change-Id: If93119ce4345ab8d1eccb9df7196b1681d2762cb
Reviewed-on: http://gerrit.openafs.org/10550
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 074d745a02d80bfd2c16a4e2b7b4222022f8e641
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Apr 7 17:55:09 2014 -0400
vol: Fix build with separate objdir
The volscan-main and volinfo-main source files are in the source
tree, not the object tree; refer to the objects in the Makefile
as dependencies, so that they will be picked up properly. The
objects will be made just fine by the implicit .c.o rule.
Change-Id: Ieec4b32cfbe5d260e1560a08d4ed8162720f9222
Reviewed-on: http://gerrit.openafs.org/10988
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 279e01051600f0884ed3669786543578e53cf518
Author: D Brashear <shadow@your-file-system.com>
Date: Tue Apr 22 11:38:44 2014 -0400
linux: make reading unixusers from proc actually work
our indentation did not match our braces so we would never read all the
objects in each unixuser hash chain. add the missing braces
Change-Id: I001b55f0d43639124b06758095664a31e8230db6
Reviewed-on: http://gerrit.openafs.org/11094
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit bd2137018c87d864ef842aa941b67d4e53bd5300
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Thu Apr 17 12:48:30 2014 -0500
NetBSD: fix rx_kmutex's CV_WAIT_SIG macro
Change-Id: I6550f5c71bafe03290c1dbda545ff3feea01a805
Reviewed-on: http://gerrit.openafs.org/11088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit dd8d2aa871fc5841c281d1292c39ffb8edf1ebd1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 4 16:42:36 2014 -0400
Windows: Deny writes/truncation to files w RO attr
If the readonly file attribute is set on a file, refuse to process
writes, truncations or overwrites. The afsd_service will do so
and this can lead to data corruption.
At the same time, writes from the redirector to afsd_service must
not be denied because of the readonly attribute. That check was
performed during the CreateFile. Otherwise, a new file can be
created with the readonly attribute and then not be writable.
Change-Id: I921a11eb8c1a3e642d60c23fc905b3febc0f0761
Reviewed-on: http://gerrit.openafs.org/10985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e24ed842eba54f62105b08d2b9fb281cc19519f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 12 12:49:40 2014 -0400
Windows: NP Fail requests if AFSGetAuthenticationId fails
If during the processing of a network provider request the Logon
Session AuthenticationId is zero and the AFSGetAuthenticationId()
function is unable to obtain the current thread's AuthenticationId,
then fail the request.
Change-Id: If2aeba836d762f4f1b982d954fac720863a05c1f
Reviewed-on: http://gerrit.openafs.org/10900
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 70299e6c3def0b84520232c02b9071c9cbf8a851
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 15 12:19:21 2014 -0400
Windows: Fix AFSSetBasicInfo attribute processing
The prior behavior of AFSSetBasicInfo() was to let the caller
set whatever it wanted as the new file attributes regardless of
the attributes that are supported by AFS. In doing so, reparse
point and directory attributes could be cleared, and other values
could be set even though they would be lost as soon as the
DirectoryCB object was garbage collected.
New behavior:
1. return STATUS_INVALID_PARAMETER if reparse point attribute
would be altered
2. return STATUS_INVALID_PARAMETER if directory attribute would
be altered.
3. successfully modify readonly attribute
4. ignore all other attribute values
Change-Id: Ic678960101ef99cdad0c0e84b21c9d65c6831ca8
Reviewed-on: http://gerrit.openafs.org/11073
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a4bcc4b1dccf6ab2745be83288c380f5454a2db9
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Mon Apr 14 16:50:36 2014 -0400
Windows: Pin write position prior to defer
If we extend the file prior to defrring the write *and* the write
is set up FILE_WRITE_TO_END_OF_FILE then we have to convert the
FILE_WRITE_TO_END_OF_FILE to an absolute position since we have
already moved the FCB->Header.FileSize.
Change-Id: Ibe1a5d616490a3db152818cbd6bb24d5af251c5f
Reviewed-on: http://gerrit.openafs.org/11069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 564f9fd06777882abd29a0da6274150f5b1e7d7f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 14 16:48:32 2014 -0400
Windows: AFSCommonWrite add bWriteToEndOfFile var
To improve readability add a bWriteToEndOfFile variable which
stores the value of
liStartingByte.LowPart == FILE_WRITE_TO_END_OF_FILE &&
liStartingByte.HighPart == -1
Change-Id: I6594196a6c8c3ab41561ffdbd3eddf3d34b410de
Reviewed-on: http://gerrit.openafs.org/11068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 41b865212b7576c0840bfc0f7c34c900e46f41c8
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Mon Apr 14 16:45:37 2014 -0400
Windows: Do not defer Synchronous operations
There is nothing to be gained by posting a synchronous write.
Let it hang out in CcCopyWrite until there is enough memory
unless the write became synchronous after a deferral in which
case it can be deferred again.
Introduce bWait variable which is set to the result of
IoIsSynchronousWrite( Irp).
This change is being introduced after further analysis of the
FastFat example.
Change-Id: I0942975a142b0413e52076ee94977401c1d00dc9
Reviewed-on: http://gerrit.openafs.org/11067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fe706913190acf176292e8c68d0a0adfc015f487
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 11 10:22:45 2014 -0400
Windows: No RO volume test SetFilePosInfo
Setting the file position information on a file is not a data
changing operation. Do not perform a readonly volume check.
Change-Id: I5dccff569b39187c2891d4339f18db8c54c029a7
Reviewed-on: http://gerrit.openafs.org/11066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a10696d9408b0ac21f8a011fce0a6a72b1c0fe0e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 13:50:11 2014 -0600
Fix rx_EndCall error precedence
Callers of rx_EndCall in various parts of the code handle errors a bit
differently from each other. The correct way to use rx_EndCall is
almost always some form of:
code = rx_EndCall(call, code);
This will cause the call to abort with 'code' if the call is not
already aborted, and will return the abort code for the call (or 0 if
the call ended successfully). It is thus impossible for 'code' to
start out with a non-zero value in the code snippet above, and end up
with a value of 0 after the code snippet.
Most code follows this pattern, because this is how the
rxgen-generated client RPC wrappers are written. So for any non-split
Rx call, this is how the error precedence works.
However, some code (mostly for Rx split calls), needs to handle
calling rx_EndCall itself, and some code appears to think it is
possible for rx_EndCall to return 0 when we already had a non-zero
error. Such code tries to ensure that we don't ignore an error we
already got by doing something like this:
code2 = rx_EndCall(call, code);
if (code2 && !code) {
code = code2;
}
However, this is not correct. If a call gets killed with an abort code
partway through executing an RPC, and the client tries to end the RPC
with e.g. EndRXAFS_FetchData, the client will get an error code of
-451 (RXGEN_CC_UNMARSHAL). The actual error code is in the abort code
for the call, but with the above 'code2' snippet, we can easily return
an error of -451 instead, which will usually get interpreted as some
unknown network-related error.
This can manifest as a problem in the unix client, where if a
FetchData call fails due to, for example, an "idle dead" timeout, we
should result with an error code of RX_CALL_TIMEOUT. But because of
the above issue, we'll instead yield an error of -451, causing the
server to be marked down with the following message:
afs: Lost contact with file server ... (code -451) ...
So, fix most rx_EndCall callers to follow the 'code = rx_EndCall(call,
code);' pattern. Not all of the changes here are to "wrong" code, but
try to make all of the rx_EndCall call sites look more consistent.
There are a few exceptions to this pattern, which warrant some
variations:
- A few instances in src/WINNT/afsd/cm_dcache.c do seem to want to
record the original error before we ran rx_EndCall, instead of
seeing the rx abort code. We still return the rx_EndCall-returned
value to the caller, though.
- Any caller of RXAFS_FetchData* needs to read a 'length' raw from
the rx split stream. If this fails, we need to abort the call, but
we don't really have an error code to give to rx_EndCall. Failure
to read a length indicates that the server is not following
protocol properly, so give rx_EndCall RX_PROTOCOL_ERROR in these
instances. The call should already be aborted by this point, so
most of the time this code will be ignored; it will only make a
difference if the server tries to end the call successfully without
sending a length, which is indeed a protocol error.
- Some Rx clients can encounter a local error they don't want to send
to the server via an abort, so they just end the call successfully,
and only use the rx abort code if they don't already have a local
error. This is in a few places like src/butc/dump.c and
src/volser/vsprocs.c.
- Several places don't care what the error from rx_EndCall is, such
as various call sites in server-side code.
The behavior of the Windows client w.r.t rx_EndCall was changed a bit
into its current behavior in commit
a50fa631cad6919d15721ac2c234ebbdda2b4031 (ticket 125018), which just
appears to be wrong. This was partially reverted by commit
ae7ef5f5b963a5c8ce4110a7352e0010cb6cdbc1 (ticket 125351), but some of
the other call sites were unchanged. The Unix client appears to have
been doing this incorrectly for at least FetchData calls since OpenAFS
1.0.
To make it hopefully more clear that rx_EndCall cannot return 0 if
given a non-zero error code, add an assert to rx_EndCall that asserts
that fact.
FIXES 127001
Change-Id: I10bbfe82b55b509e1930abb6c568edb1efd9fd2f
Reviewed-on: http://gerrit.openafs.org/10788
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d820af6cd0eb1c6655ecf8e210294791825cfbad
Merge: ad71d03 bd2cc32
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 9 14:10:09 2014 +0100
Merge branch 'security-master' into HEAD
Merge fix for OpenAFS-SA-2014-001 into master, along with the fix
for the RX denial of service issue.
Change-Id: I499e7202c9278d21f2d8628d497755e6c593abb2
commit ad71d031ec219ca418303bea3f37e40f59dde05d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 31 12:59:59 2014 -0400
readme: remove ancient build notes
Remove the ancient and unmantained src/BUILDNOTES readme file.
Change-Id: I652fded2526dbe97f6f87ef7263a2b39038486d5
Reviewed-on: http://gerrit.openafs.org/10971
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit e385571ba37fa6d43fecca17e9e5d60a22a414cd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Mar 27 18:12:41 2013 -0500
afs: Raise fake free space reporting
We report 'fake' values for free space, free file nodes, etc for the
'AFS' filesystem, since these values are not meaningful for AFS
itself. Currently we report about 9G of free space for most platforms,
and a few different values for a few others. Raise all of these to
2^32-1, so that trying to copy over 9G of data into AFS does not fail
for those applications that check the destination free space with
statfs(2). Note that one such application is KDE 4.8.x.
Consolidate all places that do this, and put the 'fake' value in one
place, AFS_VFS_FAKEFREE, along with the relevant comments.
Related issues reported by Lars Schimmer, Richard Brittain, and
others.
Change-Id: Ia15175da32744e11f62489c29bedfe1f5560d2b4
Reviewed-on: http://gerrit.openafs.org/9688
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Markus Koeberl <markus.koeberl@tugraz.at>
Tested-by: Markus Koeberl <markus.koeberl@tugraz.at>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit be236140f72fc51e111898abc896f93cc505fac7
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Apr 3 14:12:38 2014 -0400
rx: Remove rx_waitingForPacket
Commit f43c2f4412d670ce1131dc429cb43302352df3e4 introduced
rx_waitingForPacket. Given its current usage, I can't see any
functionality.
It looks like this might have been the result of merging a renamed
rx_waitForPacket from another development branch?
Change-Id: I47fc7a2b25cbfcd59ea4ad1606b734bb9d4ceecc
Reviewed-on: http://gerrit.openafs.org/10981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1b2802b6fbe6f1b6d8d5af08c114bdc182f11779
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Mar 26 10:25:13 2014 -0400
pts: Don't assume that pr_IdToName() was successful
If pr_IdToName fails for some reason, tnames won't be available.
Change-Id: I5270ba0ecf3cfad9bfb909c97b27473d96ca1307
Reviewed-on: http://gerrit.openafs.org/10952
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit cc4e292174f36868008d35df63df57543f033ee4
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Mar 26 10:15:10 2014 -0400
ptserver: Optionally restrict anonymous access to the ptserver
Currently, one could simply query from 0 to 'pts listmax' to determine
all the usernames in a cell. The -restrict_anonymous option will block
access to almost all of the unauthenticated RPC's. PR_NameToID is still
open since aklog still needs access to this RPC. An "attack" against
this RPC would have to scan a much larger key space to determine valid
usernames in a cell.
Change-Id: I7e475bc004f08d28d195c199804befa89f0ceb0c
Reviewed-on: http://gerrit.openafs.org/10951
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Gergely Risko <gergely@risko.hu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 972585c24b5c193a982570ff9264a1971760f48f
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Fri Mar 28 16:46:32 2014 -0400
afs/VNOPS: reduce stack usage
AFSFetchStatus is rather large and is in the stack twice. Allocating with
osi_AllocSmallSpace will save about 160 bytes of stack.
Change-Id: I13ac31814d9d5975f245ba8c66a7befac471503e
Reviewed-on: http://gerrit.openafs.org/10964
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit bd2cc32da969abe57334d20563d5cddf065a905e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Feb 15 12:03:43 2014 -0500
viced: fix get-statistics64 buffer overflow
Range check the statsVersion argument of the GetStatisitics64 RPC to
avoid a buffer overflow in the fileserver, or a huge memory allocation,
by a rogue client.
FIXES 131803
Change-Id: Ib084ca28cbe350d846fa5978d489e523aaae299b
commit 0ec67b0a9a175af14e360da75d1f5429c6c97b24
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 21 15:30:49 2014 -0600
rx: Avoid rxi_Delay on RXS_CheckResponse failure
Currently we rxi_Delay whenever RXS_CheckResponse fails for any
reason. This can result in disastrous performance degradations if a
client keeps sending "bad" responses, since rxi_Delay'ing here will
delay the Rx listener thread. This means we cannot receive any packets
for about a second, which can easily cause us to drop a lot of
incoming packets.
Instead, send the abort after 1 second by scheduling an event. This
will retain existing behavior from the point of view of the client
(it will get the abort after 1 second), but avoids hanging the Rx
listener thread.
FIXES 131802
Change-Id: Id8f9fc46902ae3cf019dd0ece0a96133b9b9d07c
commit 61d80537cae95d125c4b9fed31e2454a281b8b02
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 21 15:26:35 2014 -0600
rx: Split out rxi_SendConnectionAbortLater
Take the functionality in rxi_SendConnectionAbort that schedules a
delayed abort, and split it out into a new function,
rxi_SendConnectionAbortLater. This allows callers an easy interface to
send such a delayed abort with their own delay.
This commit should incur no change in behavior; it is just code
reorganization.
Change-Id: I6503cf6ebb3e664d95b8792f2311ea14ee63c11d
commit db00a2c8b5186c003fc049b8ae6eda97f58ffcea
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Mar 28 09:19:30 2014 -0400
Disable kauth by default
We should actively be discouraging the use of the kaserver and related
utilities.
The src/kauth/ directory will still be compiled, just not installed.
(If we stopped compiling it, it would likely bitrot very quickly so
as to become unbuildable, and having it still build seems a reasonable
goal given our obligations with respect to compatibility with IBM
AFS for the use of the AFS name.)
Change-Id: Ib710af3e177223d85cd9c6099ce75e700b6a2958
Reviewed-on: http://gerrit.openafs.org/10962
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e6110959e802bd9ae60e3724ba41078e7b335bab
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Mar 28 17:08:46 2014 +0100
volser: fix spurious strcat of volume extension.
Fix malformed merge error left over from
commit 4f9ec8396d1c7f12f8fa264cea7c255ce62b7b8d
where we converted strcat to strlcat.
Change-Id: Ibae3e09c8a659f4b084256b18ee5774f11fe9f8f
Reviewed-on: http://gerrit.openafs.org/10963
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 70f825bcd2de3eab9d0c62079318a215f8728cd6
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 27 09:24:16 2014 +0100
viced: disable hot threads
Turn off the rx hot threads feature in the file server. This feature
was an old optimization intended to reduce context switching, however
generally makes performance worse on modern hardware.
Performance improvements from disabling hot threads was identified by
Simon Wilkinson (YFS) at the European AFS and Kerberos Conference (EAKC)
2014 at CERN.
Change-Id: Id3053a61ebdb2d49d2bf36ebe07a35cc07b5d65c
Reviewed-on: http://gerrit.openafs.org/10957
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit da549eea21941681c075796512a27a830259c835
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Wed Mar 12 10:47:17 2014 +0100
doc: bos setrestricted -mode 0 does make sense
Commit 070230ab76e1df338db3f2a7971111ca976a0c1a added documentation of
the mode parameter to bos setrestricted, claiming that the value 0 is
useless, and commit eee0bf5871944d919951cc8b7b4908ee909c3b62 added
documentation of the restrictmode entry in BosConfig, claiming that it
can only be set back to 0 with an editor. Both claims are wrong, since
bos setrestricted -mode 0 will do exactly that (if it succeeds, which
it only can if the server is running in unrestricted mode, which can
be achieved by sending it the FPE signal). Fix the man pages
accordingly.
Change-Id: I07b75f7d0cea2e247fa4f346121de258e35119f5
Reviewed-on: http://gerrit.openafs.org/10885
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 0e9bb718ce231ffd73fe11810d8dc1d3902e4b2d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Feb 26 11:42:16 2014 -0600
viced: Restore some previous log message language
Before commit 6c41b1f740e16b5b9adfe9026630595be6f0699e, we logged
these three messages in the fileserver in different situations:
CallPreamble: Couldn't get client.
CallPreamble: Couldn't get CPS. Fail
CallPreamble: couldn't reconnect to ptserver
After commits 6c41b1f740e16b5b9adfe9026630595be6f0699e and
0a5e878aa0a71c4dfaef1806744ed78bcc13b9f4, these messages were changed
to contain more useful information, but the language was also changed.
The messages now look like:
Client host too busy while handling request from host %s:%d viceid %d fid %lu.%lu.%lu, failing request
Cannot get CPS for client while handling request [...], failing request
Cannot reconnect to ptserver while handling request [...], failing request
While the new messages are more informative, and (in my opinion)
better describe what is happening in those situations, they do look
very different from the old messages. This can break scripts that try
to parse these logs, but in general it is also not clear to
administrators that these messages still refer to the same events.
So instead, put these messages back the way they were. Still include
the extra information, of course, but revert the language to look more
like the old messages. Now we log:
CallPreamble: Couldn't get client while handling request from host %s:%d viceid %d fid %lu.%lu.%lu, failing request
CallPreamble: Couldn't get CPS while handling request [...], failing request
CallPreamble: couldn't reconnect to ptserver while handling request [...], failing request
Thanks to Ben Kaduk for bringing this up.
Change-Id: Ie2389fb598640d79f0f0725c3161c7af7924ffb4
Reviewed-on: http://gerrit.openafs.org/10857
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit a30b98c97d6fbf87018bcb6943e09c1c75a3918d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 13 12:40:17 2014 -0400
doc: volscan man page
Provide a man page for the volscan utility
Change-Id: Ibaecb2b9030ee71d81f13b897694c4cf3b4b9516
Reviewed-on: http://gerrit.openafs.org/10905
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit af2e3d81cff39ed06e3bfbfcbfff52163c503c54
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Mar 12 15:15:32 2014 -0400
volinfo: separate volscan binary
Refactor vol-info.c into several files and change the makefile to
build a separate volscan binary, instead of using the program name
to determine if the user is running volinfo or volscan.
This commit adds new source files for the volinfo and volscan main()
function and a common header file.
Change-Id: I53a2a503812237a850170c39c81ee3fb56c8282e
Reviewed-on: http://gerrit.openafs.org/10903
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 77e4d2146e166c5c70d4255408bde5e6499a06bf
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Mar 12 09:37:59 2014 -0400
volinfo: refactor global options
Move the global options to a structure and pass it to the vol-info
functions. This is a precursor for creating separate volinfo and
volscan programs.
Change-Id: I86ea9e875f73831e6c7ea4b50591e31df3e0c39f
Reviewed-on: http://gerrit.openafs.org/10902
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 8119636976de651ff0b8ccdca6a1a703643f7447
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 15 11:04:31 2014 -0400
volscan: hide -mask option
The -mask option is unneccessary and sets a bad precedent, so
deprecate and hide this option. The vnodes of interest can be found
can be found easily and much more flexibly with a simple command
pipeline.
Change-Id: Ibe75928c6b041d135c0cb5867228947cd7f4e889
Reviewed-on: http://gerrit.openafs.org/10901
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit db2ed13359ce8e3cd6a4981f8ce8e10ba61f6463
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 4 15:10:16 2013 -0400
volscan: avoid printing null mount-point cellname
The 'mcell' field is null when there is no cell set in the mount point,
so do not try to print it.
Change-Id: I363310665313f7bbcca783a4d9be87aaa7b0a8fe
Reviewed-on: http://gerrit.openafs.org/10226
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit dfd416440670d6a14496d44996097d4f501947ca
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 17:34:21 2014 -0500
aklog: those pesky assignments in conditionals
This one should actually be an assignment, and the compiler warning
for having two sets of parentheses is helpful.
Found by clang on FreeBSD 10.0.
Change-Id: Ic906cbdc50a20bcd0b91555581b60c518da2bc81
Reviewed-on: http://gerrit.openafs.org/10823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit b9fb9c62a6779aa997259ddf2a83a90b08e04d5f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 16:11:49 2014 -0500
pioctl.c: removed unused variable
The 'rval' variable is only actually used in the LINUX20 case;
adding another conditional block is making the LINUX20 case
different enough that it should get split out entirely.
Doing so lets the 'else' clause be simpler.
Found by clang on FreeBSD 10.0.
Change-Id: I60c56af355fdb68752d9596ff2cd7a4259b43fe9
Reviewed-on: http://gerrit.openafs.org/10819
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 8beba712d95b637225f215534a759961ff4d80a9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 7 06:55:31 2014 -0800
fs: display cell not available on ESRCH
The cache manager pioctls abuse ESRCH to represent errors due to
unavailable cell information. Give a more sensible error message to
the user when a pioctl returns an ESRCH error, instead of "no such
process", which is the conventional meaning of ESRCH.
The new error message is consistent with the Windows implementation
of fs.
For example, on a host with a misconfigured ThisCell and/or CellServDB.
$ fs wscell
fs: No such process
becomes:
$ fs wscell
fs: Cell name not recognized.
Change-Id: Ibdcb0957118205b9540cae07b3cafa65c51ff497
Reviewed-on: http://gerrit.openafs.org/10824
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 3db647e327bbb4621f4d66f85678424471453703
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 6 10:50:56 2014 -0500
libafs: allow bkg daemon requests without creds
Make the creds argument optional for background daemon
requests which do not need to pass a cred.
Change-Id: Ic4ac69d746e8a84993069e37bdd0440622febd70
Reviewed-on: http://gerrit.openafs.org/10880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit d07fb827a6d142142216b3effd32814cd721cc06
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 8 14:30:27 2014 -0500
libafs: afs_SetupVolSlot function
Move the code block to get and setup volume slots out of
afs_SetupVolume to a new local function called afs_SetupVolSlot.
This new function acquires the afs_xvolume lock and releases it
before returning.
Change-Id: I1bd33f13e0525f9ff050d7e161cf29a511e5c4b8
Reviewed-on: http://gerrit.openafs.org/10879
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit bbda24f9d324493e3f59c216a465fb2383d8f557
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 8 12:35:23 2014 -0500
libafs: put volume disk cache i/o in afs_UFSGetVolSlot
Move the reading of the volume items file to the afs_UFSGetVolSlot()
to make it more clear the volume items file is not accessed when
memcache is in effect.
This changes the afs_GetVolSlot to return an intialized volume slot,
if one can be gotten.
Change-Id: I0c76ca8c8e1cc19677ce950bfb454755bbbee86a
Reviewed-on: http://gerrit.openafs.org/10878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 75e3a5897405eeeba047cca1103ac32ccfaa03dc
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 8 11:41:26 2014 -0500
libafs: afs_InitVolSlot function
Add a new local function to initialize newly gotten volume slots and
move that code out of afs_SetupVolume(). Initialize the slot before
putting the volume in the volume hash table list.
Make it more clear to avoid using record 0. The volume items record 0 is
not used, so avoid setting the tf pointer to the static fvolume buffer
when reading record 0.
Change-Id: Iffba52fbf8d72459c9a36015964e61d485f22ad4
Reviewed-on: http://gerrit.openafs.org/10877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit be36376b244d1d94b24cb8fce44810fb31b7b5ce
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 1 14:52:48 2014 -0500
compile_et macros to generate source and headers separately
Common makefile macros to generate headers and source files
separately using the new compile_et -emit option.
Change-Id: I5848922fbe1d94f9d3cec829a3ed657e7f63d191
Reviewed-on: http://gerrit.openafs.org/10869
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 389473032cf0b200c2c39fd5ace108bdc05c9d97
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Mar 19 11:15:13 2014 -0400
Linux: Do drop dentry if lookup returns ENOENT
Commit 997f7fce437787a45ae0584beaae43affbd37cce switched to using
d_invalidate instead of d_drop to prevent unhashing dentries
which are only temporarily invalid and may still be referenced
by someone having a current working directory pointing to it.
This could result in getting ENOENT from getcwd() after some
transient problems, even when the directory is there and
accessible.
The change had the side effect of potentially leaving something
visible when it has actually been removed, for instance a mountpoint
removed by "fs rm".
If afs_lookup returns ENOENT, we want to forcibly drop (unhash)
the dentry, even if it has current users.
Change-Id: I0e7b6e09b2c4ae551fa6c84235ed31f7df476b45
Reviewed-on: http://gerrit.openafs.org/10928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 5cc3aec78a4329885b450c15ce228fa6fb413fdf
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Sat Mar 22 15:28:46 2014 -0400
bcrypt keys are in the rxkad list, not the rxgk list
Fix the presumed typo in the loop intended to skip them.
Change-Id: I863fb12792b82d528938ad0598aa626880f11a41
Reviewed-on: http://gerrit.openafs.org/10947
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 900427ecac4bde5ef78ae9fc86f9237552cc1dd4
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Fri Mar 21 16:33:36 2014 -0400
vlserver: Add auditing to some more RPC's
A future commit will conditionally restrict access to these RPC's.
Auditing will allow debugging and monitoring of this feature.
Change-Id: Id8a8a1831c82ef967eb6cced1609915d1d6b774f
Reviewed-on: http://gerrit.openafs.org/10939
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit cc39ac77c6e8d120a41ffe67a60896463323ab31
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Fri Mar 21 14:35:46 2014 -0400
volser: remove commented code
Apparently this predates AFS 3.0 so it should be safe to remove.
Change-Id: Ifec145c71da4668066bf428fb594943dfce20e88
Reviewed-on: http://gerrit.openafs.org/10935
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dc2a4fe4e949c250ca25708aa5a6dd575878fd7e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 14 19:38:50 2013 -0500
vos: GetServer search for non-loopback address
GetServer() is used to obtain an IP address for the 'aname' parameter.
'aname' can be either a dotted address or a host name. If it is a dotted
address, it is returned immediately. If it is a host name, then
gethostbyname() is used to obtain an IP address.
The prior version of this function had two failings:
1. It assumed that a struct hostent only contained a single address.
It used the former h_addr field. For all platforms supported by
OpenAFS h_addr is a macro referencing the first address in the
h_addr_list array. If h_addr was a loopback address, it would
ignore any additional addresses that might be in the list.
2. It assumed that if gethostbyname(aname) returned a loopback
address as h_addr that 'aname' must be referring to the machine
that the vos command is being executed on. It therefore used
gethostname() to obtain an alternate name to use for a gethostbyname()
query. The results of this query were not checked to be a loopback.
As a result, a loopback address could be returned to the caller which
in turn could be set into the VLDB.
Change-Id: Ib8d513be9daf650045e9c40718b0187f6b9770a2
Reviewed-on: http://gerrit.openafs.org/10585
Reviewed-by: D Brashear <shadow@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Harald Barth <haba+gerrit@kth.se>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b8589f1b59e520aae8d412170b663ff3bc214667
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jan 18 23:03:44 2014 -0500
libadmin: add missing bubasics dependency
bubasics is a dependency of libadmin. Add it to the top level
makefile.
This missing dependency was found by analyzing the libadmin header
file includes.
Change-Id: I300669387cea95a0fe800cffb4024356641591e6
Reviewed-on: http://gerrit.openafs.org/10727
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 64dd6dd018eb7413636ed6416bd244bb81893d9e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Mar 11 12:40:33 2014 -0400
libafs: reset global icl set pointers on shutdown
Avoid panicking when an icl tracing function is called after
shutdown_icl.
There is a window during shutdown in which pioctls can be requested
after the shutdown_icl is issued. Reset the global icl set pointers
so tracing is disabled after the shutdown_icl, instead of using
pointers to freed memory.
Removed the unneeded afs_icl_FindSet calls and use the global
pointers which were set during the initialization.
Change-Id: I3310868a28850236a2870b8dab858ecb7a815c11
Reviewed-on: http://gerrit.openafs.org/10884
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit cb4ec4e4952b40999013d4f67c0add6bf51ff286
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Mar 19 12:16:48 2014 -0400
Make struct CallBack indentation uniform again
Align the per-field comments.
Change-Id: Ic9da32851c518b29e110fb80428a1f261bbd9cbf
Reviewed-on: http://gerrit.openafs.org/10929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 705f3ee384814bc082817267a2658bd5c918550c
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Mon Mar 10 17:21:21 2014 +0100
volser: use also vn_length_hi in dump size calculation
Only the low order 32 bits of the file length were used.
Now using macro VNDISK_GET_LEN instead of direct FillInt64.
FIXES 131819
Change-Id: Iaecd68764f4b071d6b8c838362e7e657578d9b2f
Reviewed-on: http://gerrit.openafs.org/10876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3a0c348d6ebc375f11d2bab70de9a00f5905fe94
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 15 11:31:27 2014 -0400
doc: fix typo in volinfo man page
Change-Id: I46e13bb879206fb561fe0f0d99a6ed412ab64629
Reviewed-on: http://gerrit.openafs.org/10904
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit cb18fbde6536942e4bc87bd5943a13cc14fbe332
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Mar 14 11:13:15 2014 -0400
libafs: DARWIN: update for Xcode 5.1
(1) remove -mlong-branch from amd64 build
Random internet postings suggest that it has triggered a warning
since at least Xcode 3.2, and the gcc manual page suggests that
it is only applicable on ppc, anyway.
(2) remove -mpreferred-stack-boundary=4 from the amd64 build
The evidence here shows up less readily in an internet search,
but it seems that Apple's compilers will force the stack alignment
to 16 bytes regardless of what is passed here. One poster had
trouble with -mpreferred-stack-boundary being unused in Xcode 4.4.1
This change only fixes warnings reported as errors by buildbot; it
does not attempt to fully synchronize with the flags that Xcode 5.1
uses for kernel module builds.
Change-Id: Iac1fcf3cdb5ab847a04278d1c05761bd371828e2
Reviewed-on: http://gerrit.openafs.org/10896
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 52a9d1929518feab17b81b0a9db7ba45f69d5071
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Mar 13 16:37:10 2014 -0400
Do not use garbage-collection for DARWIN ObjC apps
Xcode 5.1 does not support this feature.
Change-Id: I30457ae73f867637ab154b94d4a6c57089d9b48d
Reviewed-on: http://gerrit.openafs.org/10890
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit 8832cd4e61f04fa5c650060e968bd7834afebd92
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Mar 13 15:33:44 2014 -0400
Use correct include guard for vol_prototypes.h
Correct the case of the 'h'.
Change-Id: Ib78cbff02ac881aa54c46832db94094f7a74ff5f
Reviewed-on: http://gerrit.openafs.org/10889
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3f189f8fe8cbb52aac4b7b5fe767d0de481cb569
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Mar 13 15:30:42 2014 -0400
Remove static const char copyright[]
We do not have copyright strings in our other executables for the other
copyright statements applicable to them, so these are rather exceptional.
They also cause build failures with OS X Xcode 5.1 and --enable-checking .
Change-Id: I0ead56387f77459a49093ff66fdea9c033f02f5a
Reviewed-on: http://gerrit.openafs.org/10888
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0aad06df1d25208659005192e8bbd872d5fb613b
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Mar 13 15:27:16 2014 -0400
opr: removed the unused static_inline initnode
This was included in the initial rbtree import, but is not used.
clang from OS X's Xcode 5.1 now warns about this unused function,
which is an error with --enable-checking .
Change-Id: I896504e83be317394418a7cc1b3f518e675fbb5b
Reviewed-on: http://gerrit.openafs.org/10887
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 62f922445d3501fff4320cc7c8d93b6cd1a6361e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 16 15:41:45 2014 -0400
Windows: Platform specific MIDL output
Add $(CPU) to the MIDL generated _c.c and _s.c output files
to prevent conflicts.
Change-Id: Ie10c85fa0b9cab19b107b44c2cf452925b8ee521
Reviewed-on: http://gerrit.openafs.org/10907
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit faa5195fcfe1e202665462d273c00b900bf5ac17
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 15 12:44:09 2014 -0400
Windows: XP do not mark rdr devices as secure
Commit 9174531dca75f1f2d235ed806f784422792c3ab2 introduced the use
of device characteristics (secure and remote) to the IoCreateDevice()
and IoCreateDeviceSecure() calls for the AFSRedirector device objects.
After this change end users began to report problems on 32-bit Windows
XP SP3 when the initial access to the AFS redirector was performed by
a Limited Access Account.
This patchset conditionalizes the specification of the secure device
characteristic when registering the redirector with MUP on 32-bit
Windows XP.
Change-Id: I0fb9671b8a05a841f2356d100e7031c961a7c482
Reviewed-on: http://gerrit.openafs.org/10906
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 85b747fc549a46b2170c99ab4fb86326894210ef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 12 12:41:45 2014 -0400
Windows: NP AFSGetConnectionInfo AuthId == 0
During the processing of a network provider GetConnectionInfo request
if the provided Authentication Logon Session Id is zero, the redirector
should attempt to obtain the Logon Session Id in kernel. This was
not performed within AFSGetConnectionInfo().
Change-Id: Ia060abfdebc17e52eefac24ac9dc19a7d6434314
Reviewed-on: http://gerrit.openafs.org/10899
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8a6732f9f6d876fc20f5612a4b325533d157d091
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 12 12:39:59 2014 -0400
Windows: NP AFSGetConnection retrieve AuthId sooner
When processing a network provider GetConnection requestion obtain
the Authentication Logon Session Id earlier in the function so that
it can be logged as part of subsequent trace messages.
Change-Id: Ifef7d2da44e0266683b93bc76f25ee825294062c
Reviewed-on: http://gerrit.openafs.org/10898
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 939784c017f065a2f4fce19b48cdde56ac4be83c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 10 05:13:37 2014 -0500
Windows: AFSShareWrite do not assign pFcb too soon
In AFSShareWrite the value of pFcb is used to determine whether
or not the pfcb->NPFcb->Resource must be released upon exit.
Therefore, it must not be assigned a value until just before the
resource is acquired.
Change-Id: I6951d91fcf672c8d236d19e075fff0be3552c9b8
Reviewed-on: http://gerrit.openafs.org/10828
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 01a7c64e472c241798306e7f8137de28efdef37e
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Fri Feb 28 18:47:12 2014 +0100
bozo: remove obsolete bnode_Deactivate() prototype
Commit 54eb2485b59550ba42569ed3a8d76211a3a35019 removed the
implementation of bnode_Deactivate(), which had been #ifdef'd out
for a long time, but left the prototype in place. Remove the
obsolete declaration in bosprototypes.h as well.
Change-Id: I323a3f945fcab97d7c4db191192d3ef11482d64e
Reviewed-on: http://gerrit.openafs.org/10868
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit eee0bf5871944d919951cc8b7b4908ee909c3b62
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Fri Mar 7 11:03:36 2014 +0100
doc: improve man pages related to bos restricted mode
Mention the restrictmode entry and the commands for setting and
querying it in the BosConfig man page, and add/fix cross references
between the BosConfig, bos, bos_getrestricted and bos_setrestricted
ones.
Change-Id: I938ef4c43c1a248335f09975c454b36f7570782c
Reviewed-on: http://gerrit.openafs.org/10874
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 89fdd9084fa31827dea487ddb68355d621170f58
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Wed Mar 5 21:53:16 2014 -0800
cellconfig: move memcpy outside loop
memcpy only needs to be done once prior to each entry into loop,
so move it outside the loop.
Change-Id: I68c09b240756f830b1a4dc9b8a338916f91cd7b2
Reviewed-on: http://gerrit.openafs.org/10872
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 189a17146e789f2cf716ed3a477ed6f54776df12
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Mar 6 11:42:52 2014 -0500
doc: fix typo on ka-forwarder man page
Change-Id: I9cedc1ee2c3fac249ad5b2c66c5e0eef6d5d570c
Reviewed-on: http://gerrit.openafs.org/10873
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8803c35994eb48605e26831296bd1c57f0adf50a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 17 01:12:37 2014 -0500
Windows: cm_ForceNewConnections serverp == NULL
If serverp == NULL, return immediately. Do not dereference a NULL
pointer.
Change-Id: I47781a03f22a83289a23b30ff375249fec18ff51
Reviewed-on: http://gerrit.openafs.org/10845
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4e3ceaccd9dc2b6e6a20e938d82af1ebaa2c43c8
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Nov 21 10:44:05 2013 +0100
redhat: don't package kpasswd
While kpasswd was in the separate openafs-kpasswd package to avoid
clashing with the krb5 executable, openafs-debuginfo still conflicted
with krb5-debuginfo.
Don't package kpasswd at all. Package the renamed executable, kapasswd,
in openafs-kpasswd instead of openafs, together with the renamed man
page. Once we're here, provide the man page for the other executable in
there too.
FIXES 131771
Change-Id: I0d7af82072847a19f0e1ce34dbeeb34623d2ef38
Reviewed-on: http://gerrit.openafs.org/10481
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 7a7ee20bb609ec0b23d36d2376ffc6eda58fa47b
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Thu Feb 13 23:03:59 2014 -0500
doc: Document dependencies required for building everything
Add a new section to README.DEVEL that describes the packages required
to build everything (including all optional code like the FUSE-based
user-mode client). Start with what I figured out for FreeBSD (tested
on a clean 10.0 install) and what Russ Allbery described on the
openafs-devel list in
<https://lists.openafs.org/pipermail/openafs-devel/2014-February/019759.html>.
Change-Id: Ib90cd653a822f8699df613aabdd3442edc10c98a
Reviewed-on: http://gerrit.openafs.org/10844
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b7326e487f6387033282cc5d1128b00a0456673a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Feb 5 18:32:16 2014 -0500
afs_fetchstore: re-avoid uninitialized variable
As noted in the gerrit comments for change 10742, commit
baf6af8a8f2207ce39b746d59ca4bc661c002883 does not handle the case
where the second rx_Read() call fails, and the 'length' variable
can still be used uninitialized.
Instead of using an err label and jumping to it on the case of
errors, initialize length to zero and take care to neither
set nor access *alength if an error has occurred. This is
more consistent with the style of the surrounding code while still
avoiding the use of an uninitialized variable.
Change-Id: I6abfa4a5f051368ca12ada1494fc7687f378d319
Reviewed-on: http://gerrit.openafs.org/10806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 63291be2216762dd89072f41c9a016608b736ceb
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 17:27:28 2014 -0500
fstrace: only declare 'rval' when it is used
... to avoid compiler warnings about unused variables.
Found by clang on FreeBSD 10.0.
Change-Id: I30c9fbc0e2fb0f9af273f0f17861009b6d0577df
Reviewed-on: http://gerrit.openafs.org/10822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 53d7145416c0a6bafa7ecccd113178fc4af04f8f
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 17:01:19 2014 -0500
FBSD: Switch the dummy 'data' for mount(2)
The mount(2) API takes a void*, but 'rn' is const char*, which
is const-incorrect. Our vfs_cmount implementation ignores the 'data'
parameter, but upstream's kernel mount(2) implementation did
have a NULL check until r158611 (in the 6.1 or 7.0 timeframe),
so leave that comment for now.
Arguably we should be using nmount(2) instead of mount(2) anyway,
but leave that for a separate patch.
Change-Id: I22fd85c2f1a32aa849e182d263de119a953690d2
Reviewed-on: http://gerrit.openafs.org/10821
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 758ec15f9391c296f1caa042385148f1a5e0bc84
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 16:22:49 2014 -0500
pointers are not castable to unsigned int
When printing a pointer's value for debugging purposes, use the
dedicated printf format specifier for pointers instead of assuming
that unsigned int ('x') is good enough.
Found by clang on FreeBSD 10.0.
Change-Id: I18c42df0bf03c2d0e9e7c757445b8ff0f616c671
Reviewed-on: http://gerrit.openafs.org/10820
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a52346ae503dc6aedb5115ef6b089ae26f46a58c
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 15:52:49 2014 -0500
Satisfy clang's aggressive strlcpy warnings
Passing something related to the length of the source as the
length argument to strlcpy triggers a warning, which is converted
to an error with --enable-checking (on FreeBSD 10.0). The current
code is safe, since it is using the same expression that was used
to allocate the destination buffer, but switch to using a separate
variable to hold the length and use that variable for both allocation
and copying, to appease the compiler.
Change-Id: I580083d142fd19a4e7828c915b4846868fa8f917
Reviewed-on: http://gerrit.openafs.org/10818
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit add4b8100e9b9624b6e03fa7d471367720ab062e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Feb 6 15:52:42 2014 -0500
Remove unneeded inclusion of <sys/timeb.h>
This file is deprecated on FreeBSD, and is not used anywhere.
Change-Id: If10816f26da91855d10826d53501e5b9974cd292
Reviewed-on: http://gerrit.openafs.org/10817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3e4af71581fa8d174a0127bb225e7fba2450aaae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 22 22:17:56 2014 -0500
Windows: cm_GetCell_gen Fixup cm_server cellp on race
If a race occurs during the instantiation of a new cm_cell_t object,
the created servers will point at the wrong cm_cell_t object after
the race is detected. Before cm_GetCell_gen completes the cm_server_t
objects must be fixed to point to the correct cm_cell_t.
Change-Id: I8341c2cfd2a8ac7be31699d11f78b4b9ced257af
Reviewed-on: http://gerrit.openafs.org/10777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7760acc4570a306390f0b7e5acf4b21e8a8cc90d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 31 00:56:49 2014 -0500
Windows: Support arbitrary callback ports
Reconfigure the advanced firewall to support callback ports
other than port 7001.
This changes the semantics of the afsicf api. AFS_PORTSET_SERVER is now
zero. Any other value is treated as a callback port.
Change-Id: I4df421cc0ceb4dca94a6b5e81990115a4ce0334e
Reviewed-on: http://gerrit.openafs.org/10776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dd9e59805b37a93f0f64c67cfa3ba4d80f1f358c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 31 00:49:44 2014 -0500
Windows: cm_AddCellProc always call cm_NewServer
The current implementation of cm_NewServer handles races and
collisions. There is no need to perform a cm_FindServer() check
first. Just call cm_NewServer() for all server entries.
Move the logging of server creation and cell assignment to
cm_NewServer().
Change-Id: If0cdb2eda9bcb6234eeaef7c2a35edf751a9c0ca
Reviewed-on: http://gerrit.openafs.org/10775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1d1e96219205d83c73d92a68b8390346ef011ef0
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu Feb 6 12:47:16 2014 -0500
bos: Remove last of MRAFS references
A few MRAFS tidbits were left behind during the cleanup in commit
a9301cd2dc1a875337f04751e38bba6f1da7ed32.
Change-Id: I7dcd30797ff87c61d57781c66cb9f7369638fa36
Reviewed-on: http://gerrit.openafs.org/10808
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b490cfd240021d072a3fe8e2ec2a21f218baf5ae
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Fri Feb 7 12:37:57 2014 +0100
libacl: use initialized memory
Replace malloc with calloc to use zeroed memory when converting access
lists.
Change-Id: I17558d1737fee020772919e423c9fba37180beca
Reviewed-on: http://gerrit.openafs.org/10815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9f90b12e14e5511cb1c11cbc4d85cfa291be861f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 31 16:46:12 2014 -0600
afs: Throttle byte-range locks warnings per-file
Currently, the warning messages about byte-range locks are throttled
only according to what the last PID of the locking process was. So, if
that same process performs a bunch of byte-range locks a bunch of
times, we log this warning message at most once every 2 minutes.
However, if we have even just one other process also performing
byte-range locks, the throttling can become pretty useless as
lastWarnPid ping-pongs back and forth between the two different PIDs.
This can happen if multiple unrelated byte-range-lock-using pieces of
software just happen to be running on the same machine, or if a piece
of software uses byte-range locks after forking into separate
processes.
To avoid flooding the log in situations like this, keep track of the
last warn time in the relevant vcache, so we don't get frequent
warnings for byte-range lock requests on the same file.
Change-Id: I446cf6a438a75aa741c5543b93f74f4184ee6508
Reviewed-on: http://gerrit.openafs.org/10796
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1096582bde6156bb469f2e397cbc40d13a8f2822
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Aug 30 14:21:16 2013 -0500
namei: Ignore misplaced files
The namei salvaging/ListViceInodes code currently ignores files where
we cannot derive an inode number from a given filename. However, if a
file is a valid inode filename, but is in the wrong directory, we
still record it. This can cause the salvager to abort, since it
assumes inode e.g. 12345 is present, but when it tries to open 12345,
namei translates the inode to a nonexistant path, and we bail out.
It is unknown how a namei directory structure can reach this state,
but try to handle it. To be on the safe side, just ignore the files,
and log a message about them. That way, if the files are required for
reconstructing the volume or contain important data, they are still
available if needed. And if they contain incorrect or old data, we
don't screw up the volume by trying to use them.
Thanks to Sabah S. Salih for reporting a related issue.
Change-Id: I529e0c51f48b5b7a62d6aab0470fad71788a5b69
Reviewed-on: http://gerrit.openafs.org/10214
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 602e8eb2000be02ef2a6627633b7ba80ea847762
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 3 12:51:41 2013 -0500
salvager: Handle multiple/inconsistent linktables
The ListAFSSubDirs code in namei_ops.c currently detects
incorrectly-named linktable files, and whines about them and says the
salvager will handle them. However, the salvager doesn't really handle
them, since we just use the first linktable we find (FindLinkHandle)
without checking any of the information about it.
So, check for these. Fix FindLinkHandle to only consider a linktable
the "real" linktable to use if it actually matches the volume group id
we're salvaging. Also delete any inconsistent linktables via the new
function CheckDupLinktable later on.
Note that inconsistently-named linktables have been known to have been
created in the past due to a bug in the salvager (fixed by ae227049),
and possibly due to other unknown issues.
Change-Id: Iac461e1254e1f73406a2bc74eaa5a5f53d697304
Reviewed-on: http://gerrit.openafs.org/10322
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 9fca71287d2c9730139a0472c6ee891603e72672
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Feb 15 16:58:16 2013 -0500
vos: move convertROtoRW core logic to vsprocs
Create new vsprocs routine UV_ConvertRO in preparation for adding
new function to vos convertROtoRW.
Change-Id: Ic66ecbf7cacb277891bec9f8783040995ce6ce17
Reviewed-on: http://gerrit.openafs.org/9277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit b78b7f0c3454be02048e4533ee26ef28dc8f78ff
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Fri Jan 31 17:01:06 2014 +0100
RedHat: don't package manpages for binaries not included
We don't package copyauth, aklog_dynamic_auth and rmtsysd.
Omit their manpages too.
Change-Id: I653e24be9ac258bcb1539bc773eebae728d6261b
Reviewed-on: http://gerrit.openafs.org/10781
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 4f253106dc5d1a5280b0a5be393df0e87e00a661
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 31 16:40:35 2014 -0600
afs: Include FID in DoLockWarning
Provide the FID that is being locked when we warn about byte-range
locks, so the user can find what file the process is trying to lock.
Change-Id: I56a185c200ac73045ee29b79410e27222c2637f2
Reviewed-on: http://gerrit.openafs.org/10795
Reviewed-by: D Brashear <shadow@your-file-system.com>
Tested-by: D Brashear <shadow@your-file-system.com>
commit c73883e7846fa0421cfac29830c27c9b6aacf5ed
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 31 16:36:44 2014 -0600
afs: Refactor DoLockWarning
Change DoLockWarning around a little bit, so subsequent changes are
easier to follow. Move lastWarnTime/lastWarnPid so they are only
usable within this function.
This commit should incur no functional change.
Change-Id: I5d25f64e9c088aecee0f0c46b6c401b2caa71ccb
Reviewed-on: http://gerrit.openafs.org/10794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: D Brashear <shadow@your-file-system.com>
commit 997f7fce437787a45ae0584beaae43affbd37cce
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Jan 30 13:50:37 2014 -0500
Linux: When revalidating, don't drop in-use dentries
The Linux client can get into a state where the current working
directory is seen as "deleted" by some tools, while it is still
there and accessible to "ls" and other tools. This has been
reported by several users and sites.
One scenario that has been observed while debugging:
- A process does a chdir() into a directory
- This stores a pointer to the dir's dentry in the task structure
- The server hosting the volume goes offline temporarily
- The dentry for the directory is passed to afs_linux_dentry_revalidate
- afs_linux_dentry_revalidate calls afs_lookup which returns an
error (110 - ETIMEDOUT)
- It then considers the dentry not valid, and calls d_drop()
- d_drop unhashes the dentry unconditionally
- Server comes back up, but dentry is still unhashed
- getcwd() fetches the task structure pointer to the current dir
dentry. If unhashed, it returns ENOENT, and the vfs layer is
not involved at all.
At that point, many things won't work and there is no obvious way
for the user to get the directory rehashed.
Instead of calling d_drop directly, call d_invalidate instead, as
it will only drop (unhash) the dentry if we're the only one holding
a reference. Since d_invalidate will also call shrink_dcache_parent,
also remove that call from our code so it doesn't get called twice.
Change-Id: I03e9872f6f9aebd28cdf6b833e14955edaa2527c
Reviewed-on: http://gerrit.openafs.org/10774
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3ef0bca9ac4705f29d429af6ce2951ad1d39def1
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Fri Jan 10 17:29:11 2014 +0100
Log shutdown progress
Shutting down fileservers with thousands of volumes can take a while and
it is helpful for operations to actually see that there is progress when
detaching volumes. This patch adds a log message to the fileserver log
every time 100 volumes have been detached.
Change-Id: I1685aa62335b223cf7cd3286188781318084c22f
Reviewed-on: http://gerrit.openafs.org/10797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b39833048124030bc15526d116b504fd43e100bb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 30 14:43:57 2014 -0600
afs: Pay attention to fetchOps->destroy error code
The ->destroy function in our fetchops could change our error code, or
even raise a new error. Don't ignore it. This currently doesn't do
much, since fetchDestroy currently won't change the error code if it's
given an error, but this can change in the future.
Change-Id: I6fa98cc709cb0fbd4c1e868ba4b9be53313573ff
Reviewed-on: http://gerrit.openafs.org/10787
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3b5c636480cda73938a532ffd079ba040907f78f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jan 27 00:33:18 2014 -0500
Windows: Add caching to cm_GetAddrsU
Cache the results of VL_GetAddrsU queries and reuse the results
for subsequent calls when possible.
Change-Id: I7e2b086ec311208a46439588bc820a1929d2b2b9
Reviewed-on: http://gerrit.openafs.org/10764
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 74982e6ae1919f81184d221b56aba7f153d188ed
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jan 27 00:30:20 2014 -0500
Windows: cm_GetAddrsU wrapper for VL_GetAddrsU
cm_GetAddrsU() is a wrapper for the VL_GetAddrsU() RPC. The initial
version is a bare bones replacement for the VL_GetAddrsU() call from
cm_UpdateVolumeLocation(). Future changes will add caching.
Change-Id: I7d51d98d8fd21b91f25424bdb795576ea44deab4
Reviewed-on: http://gerrit.openafs.org/10763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 311505170d59360b3c3dd67f789f395b7278bbbe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jan 27 00:14:36 2014 -0500
Windows: replace cm_allServersp list with osi_queue
Replace the cm_allServersp list with an osi_queue. This simplifies
the Add/Remove functionality which will be required in case of VLDB
server uniquifier changes.
Change-Id: I6b118f2a27ee4bd2eb24011aae868865615eb09f
Reviewed-on: http://gerrit.openafs.org/10762
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 335a70653adb59795f262663af3972de016c068d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jan 27 18:03:59 2014 -0600
afs: Translate VNOSERVICE to ETIMEDOUT
Some fileservers will kill calls that are taking too long with the
VNOSERVICE abort code. Our logic for retrying calls is already aware
of this usage, but if we cannot retry the call, we still just return
VNOSERVICE as an error code to our caller.
Don't return this raw, since has the same value as ENOBUFS, which can
cause a confusing error message from logs or applications ("No buffer
space available"). Return ETIMEDOUT instead.
Change-Id: Ic16422585a10cda7f21646a27c92f690b131ce9b
Reviewed-on: http://gerrit.openafs.org/10766
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
commit e459f44efef8d102c54205556f65318d63fec24f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 26 17:17:44 2013 -0500
afs: Fix afs_CheckCode identifier collision
The last argument to afs_CheckCode should be unique so the call site
can be identified if fstrace is turned on. BStore and BPartialStore
were both using 43, so change BPartialStore to 430 to avoid the
collision.
Change-Id: I81a43ee41623fad10d0e70a7d9c8e6029aba30eb
Reviewed-on: http://gerrit.openafs.org/10635
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 34e4a4fed356fbda9fc8ace1d01a080bd09238b0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 26 16:42:46 2013 -0500
afs: Treat vc_error as a CheckCode-translated code
The vcache field vc_error is generally treated as an error code that
has been translated through afs_CheckCode, but this is inconsistent in
a few places. Fix this in a few ways:
- Adjust afs_nfsrdwr so we do not call afs_CheckCode on vc_error,
translating the error code twice.
- Change afs_close to store vc_error in code_checkcode, and have the
logging code check for specific values in code_checkcode as well.
Log unknown values of code and code_checkcode, so we can
distinguish between e.g. a 'code' value of VBUSY, and a
'code_checkcode' value of ETIMEDOUT.
Change-Id: Iab4928efd183fb6c5b0b0f30375b9952ba13b45a
Reviewed-on: http://gerrit.openafs.org/10634
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit d2084563648cc1e8ec697c61f593935a0b5804a3
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jan 18 22:40:12 2014 -0500
libadmin: add header file deps
Add the missing header file dependencies to the library targets.
This is needed for parallel make.
Change-Id: I60d60e68ef808a62b4063a6106672f5178c1b605
Reviewed-on: http://gerrit.openafs.org/10726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 66093e4a2db297afea755d164cca7a6080909bda
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 22 13:36:54 2013 -0500
libadmin: use INSTALL_DATA to export headers
Use the INSTALL_DATA macro instead of cp to export
header files.
Change-Id: Ia460d8227f2fb2f594793a01c27f64ff7ce45273
Reviewed-on: http://gerrit.openafs.org/10515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9b1ffeeeb62cd9535dc2fc1522400abb428a0ac2
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jan 18 22:01:59 2014 -0500
libadmin: makefile rule for afs_AdminError.h
Add a makefile rule to export the libadmin afs_AdminErrors.h header
file, instead of exporting afs_AdminErrors.h as a side effect of
generating the afs_AdminBosErrors error table.
Add the missing afs_AdminErrors.h dependency to the afs_utilAdmin.o
dependency list.
Change-Id: Ib8c7d22d705061615fb20a6a521dc20f0f1d6da0
Reviewed-on: http://gerrit.openafs.org/10369
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9b105c5586a2e9c5c55dce7785e681f73ea0a759
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jan 18 21:56:36 2014 -0500
libadmin: remove duplicate dependency
afs_AdminPtsErrors.h was listed twice in the dependency
afs_utilAdmin.o dependency list.
Change-Id: I4bf37d0502e26e05f912a136045814e32de73c4a
Reviewed-on: http://gerrit.openafs.org/10725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e39e226a13e38bfe0fb12b73633b6415c790c569
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Jan 19 14:15:13 2014 -0500
tvolser: fix makefile clean target
Remove generated source files with the clean makefile target.
Change-Id: I1e7d06c217f63fb9ee749e23bca1531d22babdda
Reviewed-on: http://gerrit.openafs.org/10724
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 31d6467aa058a2b49c22188dfb0ca70b766d127f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Jan 19 14:02:28 2014 -0500
config: use the standard INSTALL_DATA makefile macro
Replace the custom INST makefile macro with the standard
INSTALL_DATA macro for installing and exporting files.
Change-Id: I5d8c41d1c6d2c3ee021e0d6a5fbca8ef9178e74d
Reviewed-on: http://gerrit.openafs.org/10723
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c8e83f0e826bc0a56321408b1c7a2afa137bab05
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 22 12:23:17 2013 -0500
config: parallel-safe param.h makefile rule
Generate the param.h.new temporary file in a parallel-safe
way. The rule to generate the three copies of param.h can
run at the the same time under a parallel make, clobbering
the param.h.new temporary file. Instead of creating this file
inline, create a common rule to generate the temporary file
once.
Change-Id: I823b6a55f3168e991b64660bfe51303d43f693a9
Reviewed-on: http://gerrit.openafs.org/10516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 52fe3f52de95b698c93ca5da3c1ed59447817610
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 22 11:50:11 2013 -0500
libafscp: makefile install rule update
Change the makefile install rules to install the header
file from the libafscp directory, and not the top level
include directory to make the install rules consistent
with the rest of the tree.
Change-Id: Ia06c29e72f7005569f2d11d3d0f6691413e0eeec
Reviewed-on: http://gerrit.openafs.org/10514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9df43aacab0f311c15837b230761a11750f8b9cb
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Aug 1 17:26:33 2012 -0400
comerr: compile_et -emit option for parallel make
Add the -emit option to the compile_et command to support parallel make.
The -emit option allows make to generate the header and the source files
independently, instead of building two files at the some time. This
avoids the issue where one command creates two separate files, which is
difficult to handle correctly for parallel makes.
Change-Id: Ib44a8e358643cf19b4834b3bd4d5b88db6cd0ccf
Reviewed-on: http://gerrit.openafs.org/7921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 501d6d288fcaa195c3cda0be0e3423c7959c9958
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jan 20 14:37:52 2014 -0500
doc: afs_compile_et -h option
Document the afs_compile_et -h option.
Change-Id: I4972bcc1948e8dd7ae73dfcabfbaf822cfbfe64b
Reviewed-on: http://gerrit.openafs.org/10722
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 534f802ac900df4704f4e8397eca0aeccf169023
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Jan 23 14:43:32 2014 +0100
RedHat: Use systemd unit files on RHEL >= 7
Handle rhel >= 7 like fedora >= 15 when deciding whether
to package systemd unit files or sysvinit scripts in the
rpm spec file.
Change-Id: I2f1e807786e484774e5a1a97c297532d86f99265
Reviewed-on: http://gerrit.openafs.org/10631
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 37937a3e924eee7a09c7719ca6355703e65092e1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jan 21 09:26:11 2014 -0500
comerr: long and short form of the -prefix option.
The man page documented the prefix option as -prefix; compile_et
supported only the short form -p.
Document and support both the long and short forms for the prefix
option; -p and -prefix.
Change-Id: Ide5551b06ae888748600677ed09ba674506a584f
Reviewed-on: http://gerrit.openafs.org/10721
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 15c80b1a92516a41d4aed8403db1485e97a7eff6
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Nov 22 15:26:34 2013 -0500
comerr: avoid comma operator
Avoid unnecessary use of the comma operator in compile_et's
command-line argument processing.
Change-Id: If9308d211676be471f3534e144c7d90214994699
Reviewed-on: http://gerrit.openafs.org/10491
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 355ca7b20b8bb9f06b030be966311d4afb40ed00
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jan 21 09:39:56 2014 -0500
doc: afs_compile_et -lang short form
Document the -lang short form for -language.
Change-Id: I4a57bdb23ca5fab4e1565d7e930cdc10097a7414
Reviewed-on: http://gerrit.openafs.org/10720
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit de8ff76f8767246431115bf04a1475a0cf3ad28a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jan 21 09:36:37 2014 -0500
doc: afs_compile_et formatting fixes
Fix two pod formatting errors and remove one trailing
whitespace characters.
Change-Id: I2ba4fd56afb8c26591d2770301c3edfdd1a898fb
Reviewed-on: http://gerrit.openafs.org/10719
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8817308a87ca76bc47a0f5564b97c7942b3be04a
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Jan 24 12:00:20 2014 -0500
FBSD: catch up to 1997 and include if_var.h with if.h
The commit message for upstream's r257244 change includes:
- Make the prophecy from 1997 happen and remove if_var.h inclusion
from if.h.
Despite the clear public posting, we were caught unawares. We made
it down to the cellar despite the missing stairs, but "Beware of
the Leopard" caused us to turn back, apparently.
Since if.h is included in many places and if_var.h is not present
on all OSes, pull the if.h inclusion into the common kernel headers
for afs/ and rx/ , and add in if_var.h (as well as the sys/socket.h
prerequisite).
Change-Id: I228c1560a128388c187804e05c0dd2500fb2853e
Reviewed-on: http://gerrit.openafs.org/10754
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7f58e4ac454f9c06fb2d51ff0a17b8656c454efe
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 20 12:16:37 2013 -0600
afs: Return raw code from background daemons
Currently, a background daemon processing a 'store' request will
return any error code in the 'code' field in the brequest structure,
for processing by anyone that's waiting for the response. Since any
waiter will not have access to the treq for the request, they won't be
able to call afs_CheckCode on that return code, so the background
daemon calls afs_CheckCode before returning its error code.
Currently, afs_close uses the 'code' value from the background daemon
as if it were not passed through afs_CheckCode. That is, if all
background daemons are busy, we get our 'code' directly from
afs_StoreOnLastReference, and if we use a background daemon, our
'code' is tb->code. But these values are two different things: the
return value from afs_StoreOnLastReference is a raw error code, and
the code from the background daemon (tb->code) has been translated
through afs_CheckCode.
This can be confusing, in particular for the scenario where a
StoreData fails because of network errors or because of a VBUSY error.
If we get a network error when the request went through a background
daemon, afs_CheckCode will translate this to ETIMEDOUT, which is
commonly value 110, the same as VBUSY. So, an ETIMEDOUT error from the
background daemon is difficult to distinguish from a VBUSY error from
a direct afs_StoreOnLastReference call. Either case can result in a
message to the kernel like the following:
afs: failed to store file (110)
To resolve this, have the background daemon store both the 'raw' error
code, and the error code that has been translated through
afs_CheckCode. afs_close can then use the raw error code when
reporting messages like normal, but can still use the translated error
code to return to the caller, if it has a translated error. With this
change, now afs_close will always log "network problems" for a network
error, regardless of if the error came in via a background daemon or a
direct afs_StoreOnLastReference call.
In Irix's afs_delmap, we just remove the old usage of tb->code, since
the result was not used for anything.
Change-Id: I3e2bf7e36c1f098df16a1fdb0dc88b45ea87dfa9
Reviewed-on: http://gerrit.openafs.org/10633
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit eb3f8c99edcf005dfba836ae9ab1d3102f162c2a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 22 20:23:29 2014 -0500
doc: fix typo in fs setacl
Fix typo in the dropbox section where 'l' was referred
to as 'read', not 'lookup'.
Change-Id: I6429c125f0561a1b5d4e7816930988ac1b347be7
Reviewed-on: http://gerrit.openafs.org/10750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit e03b026c4d74912152be71885f09ef50ff8c32db
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 23:34:30 2014 -0500
Remove some explicit sbrk() usage
Mac OS X 10.9 now considers this function deprecated and warns on
its use, causing the buildslave configuration to error out.
Use the library routine to get a process's size instead of inlining
the call to sbrk (which is unlikely to have worked as intended for
quite some time -- most malloc implementations in use do not use
sbrk to get their storage).
Change-Id: If616e1ebbea7c0aa541fb96c486820e883363df1
Reviewed-on: http://gerrit.openafs.org/10696
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e605de61e454bc6d2c960c0c5eb514424159da7c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jan 15 09:48:48 2014 -0600
Revert "viced: Enable NAT ping on hosts"
This reverts commit aafdc08cfc49da4c23ecd91f9e690fd70e95df55.
The fileserver-side "NAT ping" behavior has yet to be proven to be
helpful in situations with NATs. If the behavior is not helpful, this
generates potentially a significant amount of extra useless traffic.
So until it can be shown to what degree this is helpful, keep this
behavior out of the fileserver.
Change-Id: Ibf6718eb1d37b2a7e610617acc697f4ee398b89a
Reviewed-on: http://gerrit.openafs.org/10712
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 51d31209dc9a3082461cc9430da0975fdf28b085
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Jan 10 00:00:52 2014 -0500
Use an explicit symbol for uninitialized vnode types
Avoid trying to get clever with stuffing -1 into an unsigned bitfield,
which causes the value to change and generates a warning from clang.
Just use vNull, which is intended to be used for uninitialized/empty
vnodes.
Change-Id: I5662887e5a68c7e687025d19226f821d8f2d6a09
Reviewed-on: http://gerrit.openafs.org/10701
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8c937cf95f95581e63df298766f19f14db00a2b9
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 23:57:37 2014 -0500
Add braces to avoid a 'dangling else' warning
Change-Id: I301d7d2473d651002f0bf6baa18906bce6d46497
Reviewed-on: http://gerrit.openafs.org/10700
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 17c50911f79382e3ba8960e4b6c122b348e9baef
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 23:54:45 2014 -0500
Disable deprecated warnings for krb5 routines
In OS X 10.9 Mavericks, Apple has marked all of the krb5 routines
as deprecated (in favor of the GSS framework). We must disable
these warnings in order to allow the buildslave to have a successful
build.
Luckily, Apple has left in rope for us to programmatically disable
the deprecated attribute with a preprocessor macro. Defining this
macro should be safe everywhere, so do so unconditionally.
Change-Id: Iedc920001fdc5731254336424b0ab7b27274555c
Reviewed-on: http://gerrit.openafs.org/10699
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d72ed6ad4cb568c80d6d0d8e6445f1b2260df680
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 23:40:09 2014 -0500
vol/salvaged.c: Remove unused variable
It was incremented from an uninitialized value, which caused a build
error on the OS X 10.9 buildslave. Since it's unused, just remove
it entirely.
Change-Id: I845e9139ffd27ba7bf4e010cf4e5625658125486
Reviewed-on: http://gerrit.openafs.org/10698
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8105129987e2848f21247eea4103ae31772d68be
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 23:38:36 2014 -0500
viced/callback.c: Ignore dump write errors even harder
Not only do we need to check the return value of write(2), but
we also need to do so in a way that does not leave an empty body
in the if statement, in order to appease the clang-500.2.79 found
on OS X 10.9 with Xcode 5.0.2.
Change-Id: I4564f05927fe14fea3365e9e250834ee948fe387
Reviewed-on: http://gerrit.openafs.org/10697
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5c4e555f93b8db4f36667966a897fae0acd763e5
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Jan 10 12:33:18 2014 -0500
Add a routine to get the size of the current process
Use rusage when available, and fall back to the very old sbrk(0)
hack otherwise.
Change-Id: Ic986fd6b93476b80008908a95f8b8e0c76d9ed9a
Reviewed-on: http://gerrit.openafs.org/10695
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit baf6af8a8f2207ce39b746d59ca4bc661c002883
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 22:42:26 2014 -0500
afs_fetchstore: avoid use of uninitialized variable
rxfs_fetchInit() attempts to do a 64-bit RPC first, but falls back
to the 32-bit StartRXAFS_FetchData() if the server appears to not
support the 64-bit RPCs.
We correctly did not read a length from the call if the FetchData
RPC(s) failed, but proceeded to assign from the 'length' local
variable into the 'alength' output variable unconditionally later on.
Instead of blindly continuing on, jump to the error-handling part of
the routine when we cannot read a length from the call. This has the
side effect of skipping an afs_Trace3() point in the error case.
Change-Id: I4840d5c692c61630c68e97b5e88f9460abade19e
Reviewed-on: http://gerrit.openafs.org/10694
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 5b8133deddc0bb32788362a44507d77ec587aef7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 17:29:04 2014 -0500
rfc3961: Use enctypes, not keytypes
We previously defined the enctype symbols to be aliases for keytype
symbols. The numerical values matched what we wanted (since these
values are specified in an IANA registry), but the C type is not
required to be the same for enctypes and keytypes.
Some of our buildslave configurations notice the type mismatch and
complain, so fix the types by using the enctype enum for enctype symbols
instead of keytypes.
Change-Id: I56ca634d52954ee44baa34e2d8c876271f171288
Reviewed-on: http://gerrit.openafs.org/10693
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
commit 9f8b765bbdbb8913fcadbde8d3362039e9dc8e61
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 9 12:44:44 2014 -0600
opr: Silence rbtree warning
On OS X, gcc can complain that 'child' is uninitialized whenever this
'else if' condition is false. We already handled the case where both
node->right and node->left are non-NULL earlier in this function, so
this should never occur. So, to get rid of the warning, just always
take the path in the 'else if', and assert that the right child is
NULL.
Change-Id: I3575de84ea172d3c7e0e022809fdcd0e3b4dcc27
Reviewed-on: http://gerrit.openafs.org/10687
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b921bf94f6433f831a8d241b5a7e96b63dc5f3f7
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Mon Jan 13 16:08:14 2014 -0500
De-duplicate a couple afs_CheckCode uniquifiers
These uniquifiers are supposed to be globally unique, to identify the
call site within the tree. For whatever reason, a couple of them
were duplicated at different call sites; provide new (unique) values
to disambiguate between them.
There remain a couple of uniquifiers which are used in multiple
places, but those are in different architectures' implementations
of afs/ARCH/foo.c, and thus will be globally unique for any particular
build.
Change-Id: Iff5defcade74143a45d7ef3aaacbdeb7523f2a40
Reviewed-on: http://gerrit.openafs.org/10709
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ba0208f1d69c8c403150fb6312214f9b1c972c6d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jan 13 15:38:44 2014 -0500
xstat: fix a malformed debug message
a munged format specifier obscured the missing rn arg.
Change-Id: Ic0eb20413123b88e86484a9095beb3e37fdd7ed3
Reviewed-on: http://gerrit.openafs.org/10708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cda5e665ebee3da5615dba71b7a11ffff1229c6d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jan 13 15:28:17 2014 -0500
xstat: use ephemeral ports for xstat_fs_test and scout
Instead of trying to bind to port 7101, and then retrying if
the port is in already in use, let the os find an available
port for scout and xstat_fs_test.
This fixes a bug where scout and xstat_fs_test do not call
rx_Finalize() before retrying rx_Init() with a different port
number, causing the program to crash later when more than
one copy of xstat_fs_test and/or scout are running at the same
time.
Change-Id: I64e4916b03b1cae20ef36bb1ae293885962677e7
Reviewed-on: http://gerrit.openafs.org/10707
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ccc5d3f7adceda4d8cf41f04fe02d5cfe376befd
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Tue Dec 3 14:10:00 2013 -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.
Change-Id: I78ae4ea356aef8c9dabe75179ad67db1fd64c28b
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>
commit 9a0a8ca4d186cf953b87d9fae1a35f66090b060c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 4 17:35:01 2013 -0500
viced: Avoid issuing redundant TMAY requests
Currently, if a new Rx connection comes in from a host we already have
a host struct for, we make a TellMeAboutYourself (TMAY) call to the
given host, to verify the UUID (and caps, interface info, etc) is what
we expect it to be. That is, if it's still the "same" host that we
know about. This is necessary because we otherwise have no way of
telling if the Rx connection is from the same host, or from a new host
that just happens to have the same IP address (e.g. in the case that
hosts are moving around and changing IPs). We do this while the host
is locked, so we only issue these TMAY calls one at a time.
If a large number of Rx connections come in from the same host at
around the same time, this can result in a lot of TMAY requests being
issued against the host, even for hosts that never change IPs and
never do anything strange. In these situations, issuing so many TMAYs
is useless. If we have several calls waiting to lock the host to issue
a TMAY, some of the extra TMAY calls are provably useless. So instead
of calling TMAY repeatedly, remember what the last successful TMAY
result was, and reuse it for the "provably useless" calls.
Note that this 'cache' stores the actual raw results of
TellMeAboutYourself. We could save some memory by storing just how we
interpret that data later on in h_GetHost_r, but this way results in
way simpler h_GetHost_r logic. Since, we can use the same code paths
as for a "real" TMAY call.
Change-Id: I6df74e625e90499bd64c9eb34f20db440f6605a6
Reviewed-on: http://gerrit.openafs.org/9711
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5c0a1d4acce78a582187b5ab3d0d4d60b97d7557
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 19 14:04:56 2013 -0600
DARWIN: Convert crfree back into a macro
Commit 1d8937b860509fcaabb041bc14faf7aa3023f3c9 turned crfree on
DARWIN into an inline function to work around an error flagged by
clang. A side effect of this is that the address passed to
kauth_cred_unref will not be the actual address of the value given to
crfree; we are instead giving kauth_cred_unref the address of our
function argument in order to adhere to the semantics of a function
call.
kauth_cred_unref seems to just take a pointer to the cred pointer in
order to set the value to effectively NULL afterwards, so this is not
a huge deal. However, this does mean that our current implementation
undoes any of the safeguards intended by making kauth_cred_unref work
this way in the first place.
So, revert 1d8937b860509fcaabb041bc14faf7aa3023f3c9 and put the crfree
definition back to the way it was. Fix the caller in
afs_StoreOnLastReference to not cause an error by just assigning the
cred pointer to a temporary value. While it's not ideal that some
callers may need to do this, this is the only place where this is
necessary and it's more of an artifact of the weirdness of storing a
cred pointer in linkData, which probably should be changed anyway.
Change-Id: I50557901203d22a7b19028be551eb40f0c4cd751
Reviewed-on: http://gerrit.openafs.org/10614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b0f433986ce344bf153cce1f6372de20750e052b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jan 7 18:24:54 2014 -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.
Change-Id: I356df91ea409245f0c5b1e4ef693ac28ad8f11b2
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>
commit 64d7715c0247734731ef4cc8be5de32ee7c4a1f6
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Dec 23 12:10:36 2013 -0500
vol: reset nextVnodeUnique when uniquifier rolls over
The on disk uniquifier counter is set to 200 more than the current
nextVnodeUnique counter when the volume information is updated to disk. When
the nextVnodeUnique is near UINT32_MAX, then the uniquifier counter rolls
over. This can happen during a volume header update due to
VBumpVolumeUsage_r().
With this change, the nextVnodeUnique customer is reset to 2 and the
uniquifier is reset to 202 when a roll over occurs. (uniquifier of 1 is
reserved for the root vnode.)
With this change, the number of possible uniquifier numbers is limited to
200 less than UINT32_MAX.
The following shows a series of vnode creation/deletions to illustrate
the uniquifier rollover before this commit:
fid = 536870918.4.4294967114, nextVnodeUnique = 4294967115, uniquifier = 4294967295
fid = 536870918.4.4294967115, nextVnodeUnique = 4294967116, uniquifier = 4294967295
fid = 536870918.4.4294967116, nextVnodeUnique = 4294967117, uniquifier = 21
fid = 536870918.4.4294967117, nextVnodeUnique = 4294967118, uniquifier = 22
and after this commit:
fid = 536870918.4.4294967115, nextVnodeUnique = 4294967116, uniquifier = 4294967295
fid = 536870918.4.4294967116, nextVnodeUnique = 2, uniquifier = 202
fid = 536870918.4.2, nextVnodeUnique = 3, uniquifier = 202
fid = 536870918.4.3, nextVnodeUnique = 4, uniquifier = 202
Change-Id: I93c8a7cf47e39b8701265d6507cfc4f8c1352ddc
Reviewed-on: http://gerrit.openafs.org/10617
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1a287c631ead0221828ae70e10c3cfd5563fdfb7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Dec 23 11:42:19 2013 -0500
vol: fix nextVnodeUnique roll over
Fixes for the per volume nextVnodeUnique counter roll over. Uniquifier number 1
is reserved for the root vnode, so reset the unique count to 2 when the
nextVnodeUnique counter rolls over.
Update the disk backed V_uniquifier count when the in-memory nextVnodeUnique
counter rolls over during the creation of a new vnode. If the nextVnodeUnique
rolls over when V_uniquifier is UINT32_MAX, then the V_uniquifier is not updated
and remains at UINT32_MAX until the next VUpdateVolume_r() call for the volume.
This bug is usually masked by the VBumpVolumeUsage(), which on every 128 volume
accesses, bumps the V_uniquifier to be 200 more than the current
nextVnodeUnique counter. This causes the V_uniquifier to roll over before
reaching UINT32_MAX. (The number of access before updating the headers is set
in the usage_threshold volume package option, which is currently set to 128 by
default.)
The following shows the unique counters for a series of vnode
creation/deletions before this commit. The nextVnodeUnique rolls over to 1,
and the uniquifier is not reset. The `usage_threshold' was set to a value
greater than 200 to avoid the VBumpVolumeUsage() calls during this test run.
fid = 536870918.4.4294967294, nextVnodeUnique = 4294967295, uniquifier = 4294967295
fid = 536870918.4.4294967295, nextVnodeUnique = 0, uniquifier = 4294967295
fid = 536870918.4.1, nextVnodeUnique = 2, uniquifier = 4294967295
fid = 536870918.4.2, nextVnodeUnique = 3, uniquifier = 4294967295
The following shows the unique counters after this commit:
fid = 536870918.4.4294967294, nextVnodeUnique = 4294967295, uniquifier = 4294967295
fid = 536870918.4.4294967295, nextVnodeUnique = 0, uniquifier = 4294967295
fid = 536870918.4.2, nextVnodeUnique = 3, uniquifier = 203
fid = 536870918.4.3, nextVnodeUnique = 4, uniquifier = 203
Change-Id: I438670200bf97baeac1486eda7df4cf243aabfc4
Reviewed-on: http://gerrit.openafs.org/10616
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 67232bd9d6db545cc3f0839c59ecc667a3f9965e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Fri Jan 10 16:27:44 2014 -0500
Fix vcache/vnode mismatch in lookup for DARWIN
We have a vcache and need a vnode, so AFSTOV() is the right macro,
not VTOAFS().
It's kind of unfortunate that --enable-checking doesn't catch this.
Change-Id: I924649918dd0149b5fd7e4380b5f2e49d21fc8c4
Reviewed-on: http://gerrit.openafs.org/10702
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 71ec4a3e3d887efd56be7bf712c0fd5da2f92083
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 14 12:53:40 2013 -0600
afs: Don't clear afs_CacheTooFull prematurely
Currently, we can clear afs_CacheTooFull here, even if
afs_CacheIsTooFull() doesn't agree that the cache is no longer 'too
full'. This could theoretically result in afs_CacheTooFull being
cleared, even though the cache is indeed 'too full', according to
afs_CacheIsTooFull(). Just break here, and let afs_CacheIsTooFull()
decide.
This reverts a small part of 488c7c97854a4bd0ec67bcfe17df93b3fd025f88.
This part doesn't seem important to the functionality in that commit,
though; the rest of that commit is still here, and avoids the extra
work if we have calculated no needed space to free.
Change-Id: If0adce7fa2e88a970ddb202de02c8ff048d2ad15
Reviewed-on: http://gerrit.openafs.org/10460
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 81b785774128e9501c1d758340b6f008403b5181
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 14 12:06:56 2013 -0600
afs: Fix some dcache-related comments
- The comments preceding the afs_CacheIsTooFull macro, describing the
cache-related high and low water marks, are a little out of date.
We start freeing on 90% space, not 95%, and we also can take into
account how many free/used chunks we have.
- afs_WakeCacheWaitersIfDrained looks at the number of non-used (free
or discarded) blocks, not just free blocks.
Change-Id: I5bf923b3c24993294e752f4312737815d0102779
Reviewed-on: http://gerrit.openafs.org/10459
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit cef726558d9ae24a5d3dd00d92550a527f3226df
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 11 13:19:02 2012 -0600
rx: Clarify error checks for busy channel check
Commit a84c6b0ece1fdee4f462c6ce27fa78c2e0d419f4 changed this so we
don't just discard an incoming request if the call already had an
error. But if the call already has an error, rxi_WaitforTQBusy is a
no-op, so checking if the error has "changed" is unnecessary and can
be confusing. Just bypass this whole block if the call already has an
error.
Discussed during the 5 Dec 2012 release-team meeting.
Change-Id: Id57d65736f3228d4e7595f56800f42c52e83ef39
Reviewed-on: http://gerrit.openafs.org/8748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 31b518fcf184ba122b6faab54e2e4fa0d37605a3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Aug 14 17:25:44 2012 -0500
viced: Move host quota calculation
Calculate this during initialization, not every time we want to use
it.
Change-Id: I931d2f3f0b4b99add682c098dd51f03c9942f5b4
Reviewed-on: http://gerrit.openafs.org/9710
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 16d8ab09bd9a0bd75319e6c32afb8bc2c5c04e51
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Dec 23 16:10:45 2013 -0500
RedHat: Fix specfile changelog
Oct 29 2007 was a Monday, not a Tuesday. rpmbuild does actually yell
at us about this, so fix this so it will shut up.
Change-Id: I5e13f227ed62c4bbb7ac72f2c844136648c935c7
Reviewed-on: http://gerrit.openafs.org/10621
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 837ec9dd41c4b1e10ad9d32a52b0f34dd665026a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 26 12:56:37 2013 -0500
Fedora: Handle new kernel variant paths
With Fedora 20, Fedora now separates the variant from the rest of the
kernel version with a plus (+) instead of a period (.) . This results
in directories called e.g. 3.12.5-302.fc20.i686+PAE, where right now
we look for 3.12.5-302.fc20.i686.PAE.
Use this new directory scheme for Fedora 20 builds, so we can build
against non-default kernel variants on Fedora 20 and beyond.
Change-Id: I309272f4f4f740058c48e92530e40a1c64d63668
Reviewed-on: http://gerrit.openafs.org/10620
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit cddc732ec5fd40c94126e5f0b7103136592a2efe
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Dec 23 13:32:28 2013 -0500
RedHat: Munge future kernel versions
We currently look for "fc1?" (that is, fc10 through fc19) when trying
to munge the kernel version in some ways. This broke on Fedora 20,
since 20 obviously does not match "fc1?". Similarly, we look
specifically for "el6" for RHEL6 versioning quirks, but these will
break on RHEL7 and beyond.
Change the version checks so that this will work all the way through
Fedora 99 and RHEL 9. That won't work forever, but it will keep us
working for a few versions if the versioning quirks do not change.
Change-Id: I64dfd483eb2cfa57d67c97ae6db09be5bb020195
Reviewed-on: http://gerrit.openafs.org/10618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit cb52cc6e44ed85515cc81685adacd7c40a48b8db
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Thu Jan 9 12:13:27 2014 -0500
ktc: fix up initializer for local_tokens
The old initializer was incomplete (initializing only one of the four
fields in the struct), which prompted warnings from clang
(-Wmissing-field-initializers):
../../../openafs/src/auth/ktc.c:149:2: warning: missing field 'server'
initializer [-Wmissing-field-initializers]
Since the variable is at file scope, it will be initialized to all
zeros anyway, and there is no need for an explicit initializer.
Change-Id: Ib7690759ec3403d1913852e30bb553ef8ac8f019
Reviewed-on: http://gerrit.openafs.org/10686
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2d5f0a971baa05fc1a79726265a8235a0ebca4c0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 9 09:58:56 2014 -0500
Windows: AFSCommonWrite STATUS_PENDING is Success
AFSCommonWrite() can return STATUS_PENDING if the write has been
deferred. In that case, the function exit must not:
* Update the Valid Data Length
* Purge the cache
* or do anything else related to the request
Change-Id: Ib34bef3a1d56d452babcaf1f3cfbf77fe8f93388
Reviewed-on: http://gerrit.openafs.org/10685
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d5bcff7429dd9972b17055a9abd98f3a590dee68
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 9 09:57:33 2014 -0500
Windows: Mark Irp Pending before Deferring
After CcDeferWrite() is called we no longer have access to the
current Irp. If we mark it deferred after calling CcDeferWrite()
we might mark the wrong thing.
Change-Id: Id4b1bbd241b5e2acafc8d015e85966cb80518dde
Reviewed-on: http://gerrit.openafs.org/10684
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6995a56884f31974e9b5a7c0c50e9c1aa0351a45
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 7 10:57:01 2014 -0500
Windows: cm_ConnByServer fix search for replication
Separate connection objects are maintained for use when accessing
replicated and single source volumes. If the matching connection
type cannot be found while holding the cm_connLock shared a second
search is performed after the lock is upgraded to an exclusive lock.
This second connection search was not enforcing the replication criteria.
Change-Id: I408a5d87c3a82da5235fa2255db7d1d7a6bcb6d9
Reviewed-on: http://gerrit.openafs.org/10681
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cccb5e614212c341d2f5e799066d1c30e54ba494
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 7 10:53:37 2014 -0500
Windows: cm_connLock not required for cm_GetUCell
In cm_ConnByServer() there is no need to hold the cm_connLock across
the cm_GetUCell() call. Obtain the cm_ucell_t object before the
cm_connLock is obtained.
Change-Id: I971b55e0aae7748b59895785c1c22b5461c4fd35
Reviewed-on: http://gerrit.openafs.org/10680
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit da7adce6dddd39eb151576abfb1681c559e1e4e5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 27 14:41:18 2013 -0500
Windows: Rewrite LargeSearchTime conversions
Use LARGE_INTEGER to avoid the need for shifting and DWORD casts.
Take into account the size of time_t.
Change-Id: I056d920894b661ebb2060a5010efd9a0cd5a4a5d
Reviewed-on: http://gerrit.openafs.org/10673
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fd9d5318023e977793a4bf62f196e70b45049f10
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 26 22:02:50 2013 -0500
Windows: RDR_EvaluateNodeByName out of order param
The bHoldFid parameter is after the bNoFollow parameter. The
two values were swapped resulting in unnecessary VLDB lookups.
Change-Id: Ia94bd761576d54e9dde847385a4900f2d915c34d
Reviewed-on: http://gerrit.openafs.org/10636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fb6bc16b335d0e50b49ed85570dbe9fc9adfaee0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 18 08:48:44 2013 -0500
Windows: cm_SetupStoreBIOD compute correct scanEnd
The algorithm used to ensure "chunk size" operations attempts to
enforce aligned chunks. There are two problems:
1. an aligned chunk range may extend beyond the end of the file.
2. an aligned chunk might end before the requested length of the
active write.
Protect against scanning beyond the end of the file and do not truncate
writes.
Change-Id: Ibe6caebd78f73d2c93bfef0dcebef379ca843994
Reviewed-on: http://gerrit.openafs.org/10625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4f1d4b63a90e85fd0c2edc592d18bdbe6a0b07f8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 18 00:07:55 2013 -0500
Windows: BUF_HASH use opr_jhash_int2
BUF_HASH takes to 4-byte integers not three and therefore cannot use
the basic opr_jhash which assumes a minimum of three 4-byte integers.
Change-Id: I7f30351025b3e9cd2156f772b0ed550b20964ad7
Reviewed-on: http://gerrit.openafs.org/10624
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d8f75d3206eaa56b3a819a5bc13a4bf3a9130512
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 10 17:02:34 2013 -0600
cellconfig: Do not use 'long' for dbserver IPs
A few places in this file assume that our dbserver IP addresses are
"long"s. A long int can be 8 bytes on some platforms, but we know
these IP addresses are all 4-byte integers. In the rare instances
where we have the maximum number of dbservers, this can overwrite a
bit of extra memory. This can also result in a misaligned access on
platforms such as SPARC v9, since the elements of he->h_addr_list are
not guaranteed to be 8-byte aligned.
So instead, treat these as 4-byte integers. For copying out of
he->h_addr_list, also use a memcpy anyway to be safe, since we are not
guaranteed alignment.
Change-Id: I1afd6e49df32693f86392cb39ce8d7477422aa94
Reviewed-on: http://gerrit.openafs.org/10599
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 76076708a921aae0635975d418dea4b06d2c1af6
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Dec 11 17:56:47 2013 -0500
viced: remove dead code CheckHost()
Remove CheckHost().
Change-Id: I618066d28ef64fdfe94d5ab08ef89adb08a99fd6
Reviewed-on: http://gerrit.openafs.org/10580
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0c5d403076946c7a4f53f5e44df8fe0d986cea06
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Fri Dec 13 11:46:04 2013 +0100
make openafs uninstallable even if /afs is missing
The preuninstall scriptlet of the openafs RPM removes /afs. If, for
whatever reason, that directory does not exist, the scriptlet will
fail and hence break the deinstallation of the openafs package. The
proposed patch makes the scriptlet evaluate to true even if the /afs
has been removed by some other means and allows the package to be
uninstalled.
Change-Id: I3340c94521e15c56fe10840aff7b0b1080009c10
Reviewed-on: http://gerrit.openafs.org/10581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8b8e8c2ab1974ba4c14942cc7bd94aac8602192f
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Wed Dec 18 10:11:48 2013 +0100
doc: fix a nit in fs_newalias.pod
The CAUTIONS section is about fs newalias, not fs newcell.
Change-Id: I16ede184265e03a104fb724bece7fc461ca10415
Reviewed-on: http://gerrit.openafs.org/10595
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e988aa45d765c935fef4bcd35585d6a3594cc497
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 17 17:30:26 2013 -0600
LINUX: Use sock_create_kern where available
Currently, we use sock_create to create our Rx socket. This means that
accesses to that socket (sendmsg, recvmsg) are subject to SELinux
restrictions. For all recvmsg accesses and some sendmsg accesses, this
doesn't matter, since the access will be performed by one of our
kernel threads (running as kernel_t or something similar, which is
unrestricted). Such as: the rx listener, a background daemon, the rx
event thread, etc.
However, sometimes we do run in the context of a normal user process.
For some RPCs like FetchStatus, we tend to run the RPC in the
accessing user thread, which can result in us sendmsg()ing the data
packets with the initial arguments in the user thread. We can also
send delayed ACKs via rx_EndCall, and possibly a variety of other
scenarios.
In any of these situations when we are sendmsg()ing from a user
thread, SELinux can prevent us from sending to the socket, if the
calling user thread context is not able to write to an afs_t
udp_socket. This will result in packets not being sent immediately,
but the packets will be resent later, so access will work, but appear
very slow. This can easily happen for processes that are specifically
constrained by SELinux; for example, webservers are often constrained,
even if most of the rest of the system is not. This can be noticed by
seeing the 'resends' and 'sendFailed' counters rising in 'rxdebug
-rxstat', as well as noticing SELinux access failures if 'dontaudit'
rules are ignored.
To avoid this, use sock_create_kern to create the Rx socket, to
indicate that this is a socket for use by kernel code, and not
accessible by a user. This should cause us to bypass any LSM
restrictions (SELinux, AppArmor, etc). Add a configure check for this,
since this function has not always existed, according to
<https://lists.openafs.org/pipermail/openafs-devel/2004-June/010651.html>
Change-Id: I77e7f87e93be4d750d398e01dc1634efd80657bc
Reviewed-on: http://gerrit.openafs.org/10594
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2ed7023b26acb3277e42eac803a0702b95167e6e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 17 17:27:53 2013 -0600
rx: Remove obsolete comment
This comment refers to the fact that we used to be just checking for
SELinux to see if we should pass that extra argument. Ever since
commit cb1b41b159b98881f66319d7f65d941ba9fab911, we do have a better
test for this.
Change-Id: Idf2ff879f05774f49a11d04f87579afccf385b57
Reviewed-on: http://gerrit.openafs.org/10593
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 61cc913ffeb9468a6e07fa4e6263bb35b6b441d0
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Dec 13 19:07:13 2013 -0500
Sort the rfc3961 library's export symbol list
It was originally committed in an unsorted state.
Change-Id: Ife43b60cd625eae5062865942fc5c8956d6b6aab
Reviewed-on: http://gerrit.openafs.org/10583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Perry Ruiter <pruiter@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d40ed7391670010db0df2202d770341b2ca82f32
Author: Jeff Layton <jlayton@redhat.com>
Date: Fri Dec 6 13:34:04 2013 -0500
Linux: stop trying to use getname/putname
The current code has afs_putname defined as
kmem_cache_free (names_cachep, (void *) name);
This is wrong and will cause a double -free when syscall auditing is
enabled. Fix it to call putname properly.
Instead of that, just create a new afs_getname function that doesn't
bother with struct filename at all, and use that unconditionally.
Signed-off-by:Jeff Layton <jlayton@redhat.com>
Change-Id: I1cd58a7e528abfeb7473cf47ae4cff5b8c8f419c
Reviewed-on: http://gerrit.openafs.org/10547
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeff Layton <jlayton@poochiereds.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ce96143d79ea006f7b1318dd1c962d4c4f79fc1e
Author: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Date: Thu Dec 5 13:57:36 2013 -0500
Remove extra whitespace from macro invocations
On MacOS X 10.9, the compiler has switched to LLVM and as a consequence
generates an error if there is a space between a macro invocation and
the starting left parenthesis.
Based on code originally done by Matt Haught <dmhaught@ncsu.edu>.
Change-Id: I28848f5294d0575d8abb1759c202cc3c2db85ac2
Reviewed-on: http://gerrit.openafs.org/10540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cb53d255a6285c884c6a5ea9a20427327b1ab9b3
Author: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Date: Thu Dec 5 13:53:56 2013 -0500
Packaging support for MacOS X 10.9 "Mavericks".
Based on work originally done by Matt Haught <dmhaught@ncsu.edu>.
Change-Id: Ibc7d79953667dfdfcc2e6c5c1c4c77249f11f4ad
Reviewed-on: http://gerrit.openafs.org/10539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit aac384b2eda823519780afed84e53a868561711d
Author: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Date: Thu Dec 5 13:46:18 2013 -0500
Add support for configuration of MacOS 10.9 "Mavericks".
Based on work originally done by Matt Haught <dmhaught@ncsu.edu>
Change-Id: I331cfc0040fab526c32e24f6af970f352f0a0a8e
Reviewed-on: http://gerrit.openafs.org/10538
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2c8d55bee128071807143db6e880a4a6afaea9ba
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 5 00:41:10 2013 -0500
Windows: RXAFS_GetVolumeStatus no PRSFS_READ check
Since d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a the file server no
longer performs a PRSFS_READ access check for the GetVolumeStatus RPC.
The cache manager should no longer test for PRSFS_READ as a means of
avoiding RPCs that are known to fail.
Change-Id: I67bd849d337d87657db8e1f0ed2839367b7972a8
Reviewed-on: http://gerrit.openafs.org/10532
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 082597be62ce3f0dfd5fb881abd8770e2fa1ad43
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Nov 25 07:13:32 2013 -0500
lwp: rw now depends on libopr
rw (a test program for lwp) needs libopr to build
Change-Id: I489e675f5a1b845c7a8083466b44a73af305f8b8
Reviewed-on: http://gerrit.openafs.org/10517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit faf14be3827fa72914a1c792c9a99a3353717ded
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Thu Dec 5 10:00:42 2013 +0100
Linux: fix whitespace issue
introduced in Change I1e84969b. It does not
follow the overall style.
Change-Id: I5f68fdf425b365d69ee94680cef014de679cf6ff
Reviewed-on: http://gerrit.openafs.org/10529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9b6f79108725dc5b6d4cbea4697199e5e745dc99
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 27 12:26:44 2013 -0500
Windows: RDR capture Cc/Mm exceptions do not break
All of the Cc and Mm functions are wrapped in try/except blocks.
The purpose is to ensure that Cc and Mm do not return an error as
an exception which could result in the afs redirector failing to
release a resource. Instead of calling the AFS exception handler
just handle the exception with EXCEPTION_EXECUTE_HANDLER. This permits
the __except block to capture the exception code.
The AFS exception handler will throw its own exception if the
AFSDebugFlags AFS_DBG_BUGCHECK_EXCEPTION bit is set. This is helpful when
debugging exceptions thrown by errors in the afs redirector code. It is
not helpful when a Cc function throws an exception. For example,
CcReadCopy() will throw STATUS_DELETE_FILE as an exception if an attempt
to read from a deleted file is initiated. This should simply fail the
read operation not BSOD the system.
Change-Id: I2fd1d4db530600441272e59353fbf28b831e2691
Reviewed-on: http://gerrit.openafs.org/10524
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e24762a2cf6590798aa9ce483a1374466c7847b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 25 20:27:10 2013 -0500
Windows: AFSRDFSProvider NPOpenEnum vs no redirector
If there is no redirector device present, return WN_NO_NETWORK
to indicate that this network provider is not ready for browsing.
Change-Id: I3e33769bb2d52a59b0ff993aa07e89d959d60800
Reviewed-on: http://gerrit.openafs.org/10523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 45f7528af726b040062b4c769bbf4fcbb93488d1
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Nov 27 10:26:33 2013 -0500
Remove klogin
It has not been connected to the build since at least the 1.2 days
and should be considered dead code.
FIXES 131777
Change-Id: Id1551e7f9f543934dc8755a29f46aa7b905bfadd
Reviewed-on: http://gerrit.openafs.org/10522
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 06fe2957348cfb2c571f2a0b099e09ef7e9fb3b0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 26 10:52:45 2013 -0500
Windows: Rationalize Freelance vs "fs flush*"
Background:
cm_scache_t objects representing Freelance volume (cell=-1, volume=-1)
are special because they are populated from the Freelance mountpoint
and symlink tables. These tables are in turn generated from the
registry. The tables are regenerated on-demand after the execution of
cm_noteLocalMountPointChange() which increments cm_data.fakeDirVersion
which becomes the new data version value for the (-1.-1.1.1) directory
object.
The next time that cm_GetSCache() is called for a Freelance object
the fake root directory is rebuilt by cm_InitFakeRootDir(). Since the
vnode values are not persistent with regards to directory entry names the
FileId unique is used to distinguish the various versions.
cm_data.fakeUnique is incremented with each call to cm_InitFakeRootDir().
Each time cm_noteLocalMountPointChange() is executed the afs redirector is
notified of the data version change which will force the redirector to
rebuild its view of the directory the next time a path evaluation requires
evaluation of the root (\afs). In other words, on the next request.
If cm_noteLocalMountPointChange() is executed multiple times there is the
possibility of a race between the redirector and the service. When the
race is lost the redirector receives an invalidation event for -1.-1.1.1
as it is in the process of rebuilding the directory contents. The
redirector ends up believing it has the most recent data version when it
doesn't but the service no longer has Freelance mountpoint and symlink
tables representing the requested data version. Hence, the mountpoints
and symlinks end up as CM_SCACHETYPE_INVALID.
fs flushfile and fs flushvolume both had explicit checks to prevent
flushing Freelance objects because each call to cm_FlushFile() on a
Freelance object would execute cm_noteLocalMountPointChange() triggering
the race.
The Problem:
fs flushall is not executed on a specific object (volume or file).
Therefore there was no explicit check to prevent execution against
Freelance objects. For each cm_scache_t in the cache cm_FlushFile() is
processed. If there are N Freelance mountpoints and symlinks, there will
be N+1 calls to cm_noteLocalMountPointChange() in quick succession. Not
only does this risk losing the race described above but it is extremely
wasteful as the Freelance tables may be repeatedly regenerated.
This Patchset:
This patchset re-organizes the Freelance processing in the flush code
paths. cm_FlushFile() and cm_FlushVolume() can simply no longer be
successfully executed against a Freelance object. Both will return
CM_ERROR_NOACCESS.
"fs flush <file>" is not permitted against Freelance objects.
"fs flushvolume <path>" will execute cm_noteLocalMountPointChange() once if
the path is a Freelance object.
"fs flushall" continues to execute cm_FlushFile() on all cm_scache_t
objects. The calls on Freelance object will fail. After all cm_scache_t
objects are flushed then cm_noteLocalMountPointChange() will be executed
once to force the Freelance directory to be rebuilt.
This patchset does not address the race but significantly reduces the
likelihood the race will be lost.
Change-Id: I298dad453432001b7b2e6f4533ddee17e041b02e
Reviewed-on: http://gerrit.openafs.org/10521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0e851b7fcb6f8c802106e5e76c601800867e65e1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 26 10:31:32 2013 -0500
Windows: Reset mp/symlink target during fs flush*
When processing a "fs flush*" command, reset the the cm_scache_t
mountPointStringp which contains the known mountpoint or symlink
target information.
Change-Id: I72bba6101699e82649eed226cdfc73077b13de92
Reviewed-on: http://gerrit.openafs.org/10520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5b67620c7b3ad224ea53075e37ecf1f7e6a7c51a
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Nov 21 15:01:29 2013 +0100
Linux: Fix build for older kernels w/o bool
Commit b7f4f2023b2b3e1aac46715176940fb50cc75265 broke builds against
older kernels which don't have bool defined in linux/types.h . Fix
this by using unsigned char instead of bool for the static inline
functions.
Change-Id: Icbb82446ef66edd2650f33135ed6ccd2b8a920b2
Reviewed-on: http://gerrit.openafs.org/10483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3f4c1099b7b2d1467b1f5b701ea2f953fec20dc0
Author: Ken Hornstein <kenh@cmf.nrl.navy.mil>
Date: Wed Nov 20 13:37:52 2013 -0500
Support for changes to OS X Mavericks VNOP_SYMLINK() function.
Add support for an extra argument to afs_symlink() to return the
newly-created symlink vnode if requested (this is needed on OS X
Mavericks). On OS X Mavericks return the newly-created symlink vnode in
the symlink vnops functions, on all other platforms ignore it.
It turns out that technically OS X has required the symlink to be
created for a while, but code inside of symlink() would call namei() on
the symlink name if the returned vnode point was NULL. The difference
is that on Mavericks the Manditory Access Control Framework has been
enabled, and that turns on some extra code which unconditionally calls
vnode_mount() on the returned vnode pointer, which ends up causing a
panic
Change-Id: I33b2f51cd10f76689eb9868eb05800ab493087c4
Reviewed-on: http://gerrit.openafs.org/10474
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a1b5a1d42280753de13094006dcc130fede978a1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 17 23:03:43 2013 -0500
Windows: cm_Analyze retries vs CM_REQ_NORETRY
CM_REQ_NORETRY is set by threads that want all errors returned
immediately. However, there are some errors that should never
be returned:
RX_MSGSIZE
RX_CALL_BUSY
VNOSERVICE
RX_CALL_IDLE
RXKADEXPIRED
VICECONNBAD
VICETOKENDEAD
For these errors even if the thread has requested no retries a RPC
retry must be performed.
Change-Id: I692f65a9fdbbf27fc880ac8912fc72c1d1357c6d
Reviewed-on: http://gerrit.openafs.org/10470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a95b1f2f15d3f8efff74ad7df5085b8f30885dbc
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Nov 20 13:57:13 2013 -0500
cmd: Correctly initialize cmd_OptionAsString arguments
These are coming from the stack and as such they might not be NULL.
Change-Id: Ia5c6efd08574b4de05a11dceae47021b0160395b
Reviewed-on: http://gerrit.openafs.org/10475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 779ab18bafdea3535b403ba62f3ec8a8b127748e
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Tue Nov 19 09:57:22 2013 +0100
Linux: always include <linux/uidgid.h> headerfile
when it is required. In some linux-kernels (like in SLES11 SP3)
it is not done automatically and the compilation fails.
Change-Id: I1e84969b26e87e36893b071103325a7a532ebbf9
Reviewed-on: http://gerrit.openafs.org/10471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 250a4341bc85a74f1b3a89a2ebd7df324f0b8b71
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Oct 2 15:37:18 2013 -0400
util: remove dup include
Change-Id: I415dbcae5ae549b6347286ecdee5717fb66cc012
Reviewed-on: http://gerrit.openafs.org/10319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Christof Hanke <christof.hanke@rzg.mpg.de>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 38fc16ddbf1e5477050db21c94d55f75bdadf80b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Oct 2 15:35:09 2013 -0400
cleanup potpourri.h references
Clean up references to a header file which was removed some time ago.
Change-Id: I2ddc26afc01edf84bb1bdb21a3488c88dd6c9775
Reviewed-on: http://gerrit.openafs.org/10318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a178a9bd00cdce93a33f7663bfc4989c9eda3979
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Nov 6 08:45:52 2013 -0500
autoconf: Combine the x86/solaris configuration stanzas
This reduces some clutter and makes it easier to see what is
different.
Change-Id: I2bad8b085daf04444d2740287c106008e2650bc9
Reviewed-on: http://gerrit.openafs.org/10463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d067089e444124e723d1405cc13c058883b66e6d
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Nov 6 07:36:02 2013 -0500
autoconf: Combine the sparc/solaris configurations
According to cc's man page:
v9 Is equivalent to -m64 -xarch=sparc
Legacy makefiles and scripts that use
-xarch=v9 to obtain the 64-bit memory model
need only use -m64.
Change-Id: Idd1021f3fef9c427072079f3c7d7aa9ca6fa0060
Reviewed-on: http://gerrit.openafs.org/10462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0570d13a62c6f9416bed4fcbab5cf49a45b4dcc1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 15 17:32:37 2013 -0600
Windows: cm_FindVolumeByFID
cm_GetVolumeByFID() does not query the vldb if the volume group
is not known to the cache manager. cm_FindVolumeByFID() is to
be used in cases where the volume group data must be known for the
operation to successfully complete.
Change-Id: I9bb3bd13f14dea534952495b00a3348aafd2d591
Reviewed-on: http://gerrit.openafs.org/10465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dbedd62b7cb6c2203afea72d6f0ea32b0d623b10
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 12 09:58:44 2013 -0500
Windows: Fix out of range pointer validation
The ACL, Stat, and Volume pointer validation checks did not take
into account that NULL is a valid pointer value. As a result the
cache validation failed.
Change-Id: I538310d534fd4ada383d5bf0dc58d49206fe3dfb
Reviewed-on: http://gerrit.openafs.org/10453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 727e951d8c49a98d2c37378c863cd050b8d768eb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 4 00:12:07 2013 -0500
Windows; GetSystemTimeAsFileTime
As per Raymond Chen's "The Old New Thing" blog
http://blogs.msdn.com/b/oldnewthing/archive/2013/11/01/10462403.aspx
Calling GetSystemTime() followed by SystemTimeToFileTime() performs
two format translations which can be avoided by using
GetSystemTimeAsFileTime() directly.
Change-Id: I3d3de0e045777c9dfdb1c1f4503bfdfe19fb7b73
Reviewed-on: http://gerrit.openafs.org/10430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3f5f3013e91de3fddaee96598ef0311f8f2d5e22
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 30 00:44:25 2013 -0400
Windows: GiveUpAllCallBacks only if non-loopback
If the only ip addresses are known to be loopback addresses, then
do not waste time by attempting to GiveUpAllCallBacks during suspend
or shutdown.
Change-Id: I28b08e61435a7132ba08c9649010185097df0da0
Reviewed-on: http://gerrit.openafs.org/10429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d0a13fe678412464452afae9379d63fa48d41d83
Author: Anders Kaseorg <andersk@mit.edu>
Date: Thu Nov 7 15:37:25 2013 -0500
Linux: Get rid of !STRUCT_KEY_UID_IS_KUID_T case
On the few kernel versions before struct key.uid was converted to
kuid_t (v3.7-rc1~147^2~76), it was not possible to enable both
CONFIG_KEYS and CONFIG_UIDGID_STRICT_TYPE_CHECKS, so this case was
impossible. That’s good, because it also had a typo in its
implementation (and was confusing to deal with correctly).
Change-Id: I4ecd164ed3604558ed4419bf6f9d531bd5d1a9ff
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10443
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f5f53cb0a1f326ed4695621f6a5a63f798444549
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue Nov 12 00:23:47 2013 -0500
Linux: afs_fill_super: Call bdi_destroy on the failure path
Without this, if AFS startup failed, then trying to start AFS again
triggers these warnings:
WARNING: CPU: 3 PID: 657 at /build/buildd/linux-3.12.0/fs/sysfs/dir.c:526 sysfs_add_one+0xa5/0xd0()
sysfs: cannot create duplicate filename '/devices/virtual/bdi/afs'
WARNING: CPU: 3 PID: 657 at /build/buildd/linux-3.12.0/lib/kobject.c:196 kobject_add_internal+0x1f4/0x300()
kobject_add_internal failed for afs with -EEXIST, don't try to register things with the same name in the same directory.
and leads to general system instability. This can be reproduced by
starting AFS twice with an empty cache, dynroot disabled, and no
network.
Change-Id: I8ec1ed365c5b3cf60bd34af0aca94e0c496bcaa3
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10448
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9f6f419b9a93b40280bd2a622ed1561f032361bf
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Oct 3 12:44:30 2013 -0400
build: more configure summary
Improved configure summary, including a check for namei fileserver mode.
Change-Id: Id5117ae8c27126c56e28eb3ab7f6e8ef7fd0558d
Reviewed-on: http://gerrit.openafs.org/10372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 53a50414c23dd8b045eca6b58d4be13707f2f36d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 7 00:05:39 2013 -0600
doc: backup manpage fixes
- Consistently specify -dryrun and -n across various subcommands.
Many did not list -n, some listed -n but no -dryrun, and some
listed -noexecute instead.
- backup_volrestore: Add missing option -usedump
- backup_deletedump: Add missing options -groupid, -dbonly, -force,
and -portoffset
Change-Id: Iec1c36cba0ad0e61d7e6215c9cba81228b95a81f
Reviewed-on: http://gerrit.openafs.org/10441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ad357e4ce49fe034221179e500ce53944b3a8bf4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 7 00:03:17 2013 -0600
backup deletedump: Change -port to -portoffset
Use -portoffset instead of -port, for consistency with all of the
other backup suite commands. Leave -port in as an alias, for backwards
compatibility. Currently -port will mean -portoffset anyway, since
it's an unambiguous abbreviation, but put in the alias explicitly,
just in case some other option comes along starting with -port.
Change-Id: I2f8aaa34fdf9e7c80a8fec1dc1caf63d9b7192b1
Reviewed-on: http://gerrit.openafs.org/10440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dc4384653fed48104016a0e00fc2487851eb6806
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 5 11:00:21 2013 -0600
backup: Display general help on -help
Currently, 'backup' tries to guess if we are running 'backup
interactive' before libcmd actually parses our arguments. This is
tricky, since we run 'backup interactive' if no explicit subcommand is
actually given. One consequence of this is that currently, running
'backup -help' just displays the help for the 'backup interactive'
command, not the help output for 'backup' itself.
The current heuristics for guessing at whether we are running 'backup
interactive' or not are a bit fishy, but at least for now, just make
sure -help works. This should still ensure any other behavior is
unchanged, but just 'backup -help' now works like other command
suites.
Change-Id: I31ecbcad7efffd301d23f109c66eee0417882a90
Reviewed-on: http://gerrit.openafs.org/10439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c870513c5ec576a966f97cd2ab92c900dcbe4410
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jun 12 17:48:46 2013 -0500
doc: Add 'checkman' tool
Add the 'checkman' script, which compares a command's "-help" output
to the options actually documented in its manpage. This command is
certainly not perfect, and may contain false negatives and false
positives. It is not (currently) intended to be run as an automated
check, but is meant to assist a human manually checking the
correctness of man pages. An error reported by 'checkman' does not
necessarily indicate something that should actually be changed.
Change-Id: Iae1965c441279dd3f93c1a7283ea0a0140d5ebe3
Reviewed-on: http://gerrit.openafs.org/10442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a9301cd2dc1a875337f04751e38bba6f1da7ed32
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 15:37:27 2013 -0500
bos: Remove MR-AFS commands and options
The blockscanner and unblockscanner commands, as well as many options
to "bos salvage", were only of use to MR-AFS. MR-AFS is not used
anywhere anymore, and these commands and options were largely
undocumented, so get rid of them. See
<https://lists.openafs.org/pipermail/openafs-info/2013-January/039215.html>.
Thanks to Hartmut Reuter for providing information about this.
Change-Id: I496eb4a23a0310aafd6c224a08c76a8b7464c758
Reviewed-on: http://gerrit.openafs.org/10425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 27768ade8578ced4485b1601e26bff53d5450f50
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 30 23:33:40 2013 -0500
volserver: Remove -sleep functionality
This option is completely useless since the LWP volserver was removed.
Remove the code for it.
Change-Id: I2257ba2ecd2ffeb9c47d21cbb516d6a0abb19b94
Reviewed-on: http://gerrit.openafs.org/10424
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 90753f9dc77ea5a4ec4e13947e78e3aa63d785f0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 30 23:28:16 2013 -0500
volserver: Restore -allow-dotted-principals
Commit cd3492d0 converted volserver command-line parsing to use
libcmd. However, it accidentally also changed the
-allow-dotted-principals option to -dotted. Change it back to
-allow-dotted-principals for consistency with previous versions, as
well as other server processes.
Note that currently there are no public releases of OpenAFS containing
cd3492d0, so no public release has contained the -dotted option.
Change-Id: Ied07f0eb867a13591656daae00bc9e85a2c7f6c8
Reviewed-on: http://gerrit.openafs.org/10423
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 90d4cbc285071bd5c9b6f9d5096879bc6bb43da1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 29 21:22:02 2013 -0500
volserver: Exit on arg parsing failure
If ParseArgs returns an error, argument parsing failed. Currently we
keep going anyway, ignoring the error. Exit instead.
Change-Id: I2f9e4e06d6c3fab8e29921bdb0ea30d714c794b1
Reviewed-on: http://gerrit.openafs.org/10422
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b7f4f2023b2b3e1aac46715176940fb50cc75265
Author: Anders Kaseorg <andersk@mit.edu>
Date: Thu Oct 31 09:11:59 2013 -0400
Linux: Fix build with CONFIG_UIDGID_STRICT_TYPE_CHECKS (user namespaces)
With CONFIG_UIDGID_STRICT_TYPE_CHECKS (a dependency of user namespace
support, CONFIG_USER_NS) turned on, uid_t and kuid_t are different
types, as are gid_t and kgid_t, and we need to use namespace-dependent
functions to convert between them.
We can’t use init_user_ns as the namespace because it’s GPL-only, so
instead we grab the current user_ns at module load time.
This is required to support kernels with user namespace support. We
don’t yet have full support for independent AFS use by different users
in a multiuser container; that will need to wait for future work.
Change-Id: Icc03f9098dd25b483d406db5167264ba960cdcb7
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10386
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 231e50ff9742927188d67099f0e1dbaf09858c3c
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue Nov 5 01:11:15 2013 -0500
afs_linux_pag_from_groups: Stop checking for NOGROUP sentinel
Linux hasn’t used NOGROUP as a sentinel like this since before kernel
2.1.12, and OpenAFS hasn’t used it on Linux since commit
109927bf6f54b58b76ac48ba41c2012c74937fed (Remove pre-Linux 2.6
support).
Change-Id: I0b18de8e5d9b6cd9b20da43ed050163c2d8651ff
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10426
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 076b9b746569ebdfbec2c8ae98a1d338c97a3d70
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 29 21:11:54 2013 -0500
Exit successfully on -help
Running a command with -help is not an error. cmd_Dispatch handles
this correctly, but several server processes call cmd_Parse directly,
and exit with failure on -help. Make them exit successfully instead.
Change-Id: Ieab32ba4a62a182308538469e69320d241dc3aad
Reviewed-on: http://gerrit.openafs.org/10421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d28a21f0d806e867ccef9bd534ce25b52978df62
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 21:58:21 2013 -0500
klog.krb5: Don't hide the -x option
We accept the -x option, even if it doesn't do anything. Don't hide
it, to be honest about what options we accept.
Change-Id: I779558c429b18c97c495c5e9ae81f8630383f572
Reviewed-on: http://gerrit.openafs.org/10420
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e7b75a2e405032990932bf7734e851379c32adf6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Nov 3 18:59:08 2013 -0600
Do not hide -enable_{peer,process}_stats
Both afsd and kaserver accepted the -enable_peer_stats and
-enable_process_stats options, but they did not include the options in
their usage message. We already document these flags in the manpages,
so also include them in the usage message; they are not a secret.
Change-Id: Ic1ff0e8c0dcd07e2721676b09a53c30a3db3ee9d
Reviewed-on: http://gerrit.openafs.org/10419
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 701fe99a58f2be2a82b3dd83658c09bdbc715f55
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Jun 30 17:44:21 2013 -0500
ptserver: Fix argument aliases
It's "-db", not "db". Similarly, it's "-depth", not "depth".
Change-Id: I24a3f08d02f9b14d06ad3f04c52957c46001b2d9
Reviewed-on: http://gerrit.openafs.org/10418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 20faeaaa324c3dc13824727e352bcfba2e2387f9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Jun 30 13:41:47 2013 -0500
bozo: Fix help message formatting
Need a space here to separate [-allow-dotted-principals] from the
following option.
Change-Id: Iabe353fd1c5366064a448c15a7c986d0fcf35415
Reviewed-on: http://gerrit.openafs.org/10417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f2ac99c5b4e905f77d64efea9a9d9ab357331957
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 16:17:44 2013 -0500
viced: Misc argument parsing fixes
- It's -pctspare, not pctspare.
- The -config and -logfile options are already specified in the
"testing" options section. Don't specify them again here.
Change-Id: Ieace97d92d35dc2e310a8122bdec7987246aa723
Reviewed-on: http://gerrit.openafs.org/10416
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5e461e52dcd02e7b18424c89fa64f05f67c8654c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Oct 27 23:19:24 2013 -0500
doc: Add 'fs discon' manpage
Change-Id: I67c3bf50bfb7f4f7c0eb46cd011cc8ae68ec5302
Reviewed-on: http://gerrit.openafs.org/10415
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit e96803d22a7393e280dc206b7db6b008a78f0643
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sat Oct 19 16:12:03 2013 -0400
doc: Add 'fs nukenfscreds' manpage
Change-Id: I51c6cd56f463e10ab51adf20a0cf8505e3361326
Reviewed-on: http://gerrit.openafs.org/10414
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit fb311d271ddc335c38c3a0775720695cb29b08f2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sat Oct 12 23:55:09 2013 -0400
doc: Add 'fs precache' manpage
Change-Id: Ib4101fdb37cf91a547974216425e4a005392d988
Reviewed-on: http://gerrit.openafs.org/10413
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit ff3fca515e558d1ed62955ab11f5b328471a94ba
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 5 00:48:02 2013 -0500
doc: Symlink all dafssync-debug pages
For every fssync-debug subcommand, provide a symlink for the
associated dafssync-debug subcommand. This way, running e.g.
"man dafssync-debug_attach" will actually give you a manpage, instead
of needing to specifically run "man fssync-debug_attach".
Change-Id: I83d71dc14f9f838d9a9900fcc62817677898dd27
Reviewed-on: http://gerrit.openafs.org/10412
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 477f270656171da1cc69902b6b5917d79e19bd3d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Nov 4 10:04:42 2013 -0600
doc: Fix livesys output formatting
If we indent text here, the formatting codes are not interpreted, and
the text is output "raw". So currently, we actually see
"I<system_type>" in this section, which is a bit confusing.
Saying the actual output with string substitutions and stuff here
doesn't seem very helpful when the output doesn't have any constant
text in it. Just describe what the output is instead; an example
immediately follows if this is unclear.
Change-Id: Ib3e0f0c5143afa2dd41a655ff3908c791026a426
Reviewed-on: http://gerrit.openafs.org/10411
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit e3cd2bcc613743f1e49c4da011a7c6bb580ff1ef
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 5 00:26:00 2013 -0500
doc: butc manpage fixes
Add missing -rxbind option.
Change-Id: I25fb205dc058ed345bda4d86bd1d344457432939
Reviewed-on: http://gerrit.openafs.org/10410
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bd8282d7bcd84a96f1007e86782e35d7ed9004d9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 22:14:07 2013 -0500
doc: pt_util manpage fixes
Add missing -help option.
Change-Id: I2edd7bcaf5b5799ba1216777200580df2cd9ca7f
Reviewed-on: http://gerrit.openafs.org/10409
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0ccd02ebae1308d7b73cb5aa257f7cb0a1d1b805
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 22:10:16 2013 -0500
doc: kdb manpage fixes
Add the missing -numeric and -long options.
Change-Id: I83776e64a161bc0a3ca9260944570799c506bbac
Reviewed-on: http://gerrit.openafs.org/10408
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 37cdc7113279d0e04ad4d7e36776d2af963d0bf8
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 21:49:05 2013 -0500
doc: volinfo manpage fixes
We now have a -checkout option, but no -online option. Document
-checkout and remove -online.
Change-Id: Ie8d6e35c6e09abf994b8417b3bb20ee379095a25
Reviewed-on: http://gerrit.openafs.org/10407
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c9b2a191ea87eee909d2bf64b13e95ae90877ed4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 21:00:14 2013 -0500
doc: rxdebug manpage fixes
Add missing option -long.
Change-Id: I23e3bc38e6962b7727a2aaa07bab7b0818ebcee0
Reviewed-on: http://gerrit.openafs.org/10406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 374593ca5790203cd856ea1705dbda721d3c3f3a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 24 18:00:25 2013 -0500
doc: vldb_check manpage fixes
- Add missing option -fix
- Don't use brackets in the option list; we don't do this in most
other manpages.
Change-Id: Ifd87dd749aaab2987b2f9c3224b8e931b7bc221c
Reviewed-on: http://gerrit.openafs.org/10403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a86ca4a49c7d3d693d9fd03e7dad6a1f8d1c57e9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 20:54:20 2013 -0500
doc: upserver manpage fixes
Add missing option -rxbind.
Change-Id: I1e6057c3747cf6c502bf14e1d094b8b64691615d
Reviewed-on: http://gerrit.openafs.org/10405
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit c9dad4dd6f5d43340b8c566ba89365e2e9fa69f5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 26 20:40:50 2013 -0500
doc: afsmonitor manpage fixes
Add missing option -debug.
Change-Id: I48b37cce536987f5cbf3905e1de70238e83664b5
Reviewed-on: http://gerrit.openafs.org/10404
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ade56fa2f9ba8217919dbae301639c3ff10027ef
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sat Jun 29 21:06:51 2013 -0500
doc: Make all vos pages =include common options
Many manpages for "vos" subcommands were not using the "common" vos
fragments, and instead were just repeating the information directly in
their manpage. Make them all use the "common" vos fragment to avoid
duplication.
Change-Id: I62d84a1164b4ba46082e33a6d27fd24e3722014c
Reviewed-on: http://gerrit.openafs.org/10398
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7e49cd3110f4833bd3d8c4f7be85a5edcd3d7e7c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 20 17:45:05 2013 -0500
doc: vos manpage fixes
- Add missing -config option to 'common' vos options, and to the
synopsis for all commands
- Remove brackets in the options descriptions for vos_shadow,
vos_create, and vos_clone. We don't do this in other manpages.
- vos_create: Add missing -id, -roid to synopsis
- vos_clone: Add missing -readwrite option
- vos_shadow: Add missing -toid option
Change-Id: I41fd56509e78116698c82a2f3f4fd07f26cdc95f
Reviewed-on: http://gerrit.openafs.org/10397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 90398d078755e84b9c1b0864485744473f0316f9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sat Jun 29 15:59:51 2013 -0500
doc: fs manpage fixes
- fs_whichcell: Fix formatting typo
- fs_setcbaddr: Change -host to -addr
- Add missing -help to fs_setcbaddr and fs_rxstatproc
- fs_getfid: Add missing -literal to synopsis
- fs_exportafs: List on/off options in single =item. Doing this in
two separate consecutive =items confuses the manpage generator.
- fs_exportafs: Add missing -clipags and -pagcb
Change-Id: I4e986543292f1000fc00456fde486d7da573c9c3
Reviewed-on: http://gerrit.openafs.org/10396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 202c1018b1b8646083368d55ed0dae64229b6a8b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Jun 30 18:59:02 2013 -0400
doc: restorevol manpage fixes
- Remove nonexistent -verbose option from synopsis
- Add missing options -umask and -help
Change-Id: Iedddf78c074ead9ab3454bf151adb90138a562b6
Reviewed-on: http://gerrit.openafs.org/10402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f430e98ce74eebe50417ac2d0cb151b8fe953edf
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Nov 3 19:04:30 2013 -0600
doc: bosserver manpage fixes
Fix -noauth documentation. The current documentation is referring to
the client-side -noauth option, but this is actually the server-side
-noauth option, which is very different.
Change-Id: I65154aef4734e69bb0f3ae485baacac11a718488
Reviewed-on: http://gerrit.openafs.org/10401
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8387a00550c2ac6a195a2c016276de0202c1d26e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Nov 3 19:03:42 2013 -0600
doc: vlserver manpage fixes
- Indent synopsis formatting
- Add missing options -trace, -noauth, -smallmem, -rxmaxmtu,
and -syslog
- Fix some formatting typos in the synopsis
- Document the -db alias by putting it next to the -database option,
separated by a pipe "|"
Change-Id: I4c84baf53d346cb47416cb2843e8b7de2437d147
vlserver: -database option
Change-Id: I7f5539aeebee71441a3901a183033fac05fa411f
Reviewed-on: http://gerrit.openafs.org/10400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1974b55b1cd6dacbf7374e926c6dd94d61687505
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Nov 3 19:02:50 2013 -0600
doc: ptserver manpage fixes
- Indent synopsis formatting
- Document the -db and -depth aliases by putting them next
to -database and -groupdeth (respectively) separated by a pipe "|"
Change-Id: Ic40fa0001feee293afe6c22ade7b85dc46fde938
Reviewed-on: http://gerrit.openafs.org/10399
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit f5340b748bedc3663469c3fb9598a9eb277ecb7c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 20 17:20:17 2013 -0500
doc: Add -help option to fssync-debug manpages
Change-Id: Id90554b1c56437c62ff9982681ac8a64d4d34948
Reviewed-on: http://gerrit.openafs.org/10395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1aaeafb45f9746e98f61a93d14b94f42e2ed223a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 30 23:27:19 2013 -0500
doc: volserver manpage fixes
- Fix synopsis formatting, so option arguments are on the same line
as the option name
- Add missing options -rxmaxmtu, -rxbind, -syslog, and -sleep
Change-Id: I6e6f06d716e7f78be288bfebde97a3701f086924
Reviewed-on: http://gerrit.openafs.org/10394
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3c776a0e5ed5a39e5b48c5885e83631a8c431d4f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 16:54:01 2013 -0500
doc: fileserver manpage fixes
- Fix typo in -syslog option formatting
- Add missing -nobusy
- Add missing -vlrudisable
- Add missing -sync in synopsis
Change-Id: Id63c3228af619c2da5ef88a40e9c2e91888535bb
Reviewed-on: http://gerrit.openafs.org/10393
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fe4bdeaf6dee1d7d499d6e5d70ba9f500d864c28
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 16:15:03 2013 -0500
doc: kaserver manpage fixes
- Add missing -rxbind
- Add missing -crossrealm
- Fix synopsis formatting, so option arguments are on the same line
as the option name
Change-Id: I8c73d0f14396aad83651c3037fde1137d83e6692
Reviewed-on: http://gerrit.openafs.org/10392
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 10b356c1ebb060b8c5c154ca62886dd5a80c5940
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 16:03:40 2013 -0500
doc: voldump manpage fixes
Add missing documentation for the -time and -help options.
Change-Id: I04ca0fe6d4a5c298415e450a38a19b719dca4800
Reviewed-on: http://gerrit.openafs.org/10391
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 070230ab76e1df338db3f2a7971111ca976a0c1a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 15:58:45 2013 -0500
doc: bos manpage fixes
Add missing documentation for the -mode option.
Change-Id: I360dc3d4cc6d7405feb655bbf2a05aee27a41d46
Reviewed-on: http://gerrit.openafs.org/10390
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cb8576d77fd48c2631b76006db56557c1a2d4fa9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 14 15:33:19 2013 -0500
doc: buserver manpage fixes
- Add missing -ubikbuffers
- Remove -enable_peer_stats and -enable_process_stats; we don't
actually accept these options
- Fix synopsis formatting, so option arguments are on the same line
as the option name
- Fix the -noauth documentation. The current text is referring to the
client-side -noauth option, but this is actually the server-side
-noauth option, which is very different.
Change-Id: I11e557e54a8539627ae7bb79cb7af3e8fbc77d25
Reviewed-on: http://gerrit.openafs.org/10389
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 54cecedb429a02b108e18ba92304c659728153f5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Nov 3 17:58:02 2013 -0600
doc: Fix udebug -port bullet list
The formatting gets screwed up if we have multiple =item tags together
like this. To just have each one be a bullet point, just have a bare
=item before each one, without a "tag" or "key" for the =item.
Change-Id: I5cb7a98bd16f5999d529a42a0f822835f6d2f66e
Reviewed-on: http://gerrit.openafs.org/10388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f69bf0b19490ddde05917f7467383bbe248e81c4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jun 12 18:22:27 2013 -0500
doc: pts manpage fixes
- Mention the -help, -auth, -encrypt, and -config options for all pts
commands in their synopsis
- Add the -auth option to the pts.pod page
- Reference the -auth, -encrypt, and -config options from all
subcommand pts pages
- pts_removeuser: Replace -name with -user
- pts_sleep: Add missing -delay
- pts_source: Add missing -file
Change-Id: I4f0889d661c46f6bdd2a9604d8423d809a632d2d
Reviewed-on: http://gerrit.openafs.org/10387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3dc1fb3feba83d2b537039b8384dbff611bf6495
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Mon Oct 14 11:39:02 2013 -0600
doc: add linked cells description to man pages
The man pages previously described linking DCE cells to AFS cells.
OpenAFS and YFS also allow linking between two AFS cells. Update the
description of linked cells in CellServDB(5), aklog(1), and
fs_newcell(1) to refer to AFS instead of DCE.
Add a linked cell example to the CellServDB man page with an
explanation.
Change-Id: Ic9b1c643861b7307c09fcc5a1775f4abf4cb4155
Reviewed-on: http://gerrit.openafs.org/10342
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3fa2f656f3ecc52cf71d17e5f3dadec70b852e93
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Sep 7 13:55:58 2013 -0400
afs: afs_CacheIsTooFull macro refs wrong constant
When afs_CacheIsTooFull tests the number of free blocks it should
use CM_DCACHESPACEFREEPCT (90%) instead of CM_DCACHECOUNTFREEPCT (95%).
Change-Id: I1c9ac4f9a6d03077047837af6ef9a09e256ea07d
Reviewed-on: http://gerrit.openafs.org/10235
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b73fa104ea9e1651114377c1e4f8e05705edc6c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 9 09:20:32 2013 -0400
afs: CacheTruncateDaemon work until Cache Drained
The afs_CacheTruncateDeamon() thread will not sleep until both
'afs_CacheTooFull' and 'afs_WaitForCacheDrain' are true but the
thread will stop freeing space in the cache when 'afs_CacheTooFull'
is true which prevents 'afs_WaitForCacheDrain' from ever becoming
true if it is not already.
Make the conditional for doing work include 'afs_WaitForCacheDrain'.
Change-Id: I9a60da6db65511c8bf2391a53a6f76043f825078
Reviewed-on: http://gerrit.openafs.org/10238
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2fb13e7e795934398bdb49599e5df8abf619a2bf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Sep 7 14:04:32 2013 -0400
afs: afs_CacheTruncateDaemon wake waiters !too full
When processing afs_CacheTruncateDaemon() if the cache is no longer
too full, then wake the waiters.
Change-Id: I114341f8a71654b0a064d6dad2a704dd1fa8dbe2
Reviewed-on: http://gerrit.openafs.org/10236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 13a746abfb4d8a34b17f31a278cfae3148eccd78
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Sep 7 13:27:54 2013 -0400
afs: afs_FlushDCache avoid dup cache drained check
afs_WakeCacheWaitersIfDrained is called as the last statement
of both afs_DiscardDCache and afs_FreeDCache. There is no need
to perform the same check again before exiting afs_FlushDCache.
Change-Id: I11b4c42868ca67e4717fd431b1d33a85ce57bd0f
Reviewed-on: http://gerrit.openafs.org/10234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 765d964f13e49fe94a9a75839571fbffa04a0b65
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 9 12:17:36 2013 -0400
afs: Introduce afs_WakeCacheWaitersIfDrained
Consolidate common code into afs_WakeCacheWaitersIfDrained().
Change-Id: I10e35afbc1f1469038e111a7bbd209c8897c8972
Reviewed-on: http://gerrit.openafs.org/10233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit aa4f70578ec825742567a70213f7acd78a58ce19
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Sep 7 12:26:52 2013 -0400
afs: FreeDCache test afs_blocksDiscarded
For consistency with afs_FlushDCache and afs_DiscardDCache
include afs_blocksDiscarded in the free space test. When afs_FreeDCache
is called it should be zero.
Change-Id: Ic9063280d88eb28d84851cbe6b7e4867a1110659
Reviewed-on: http://gerrit.openafs.org/10232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 064558a69281398d1dc6873453449eee9b3a8d8d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 28 01:06:47 2013 -0400
Windows: RDRLib Worker Thread shutdown
The thread waiting to unload the library is polling the state of
the AFS_WORKER_INITIALIZED flag in the PoolContext->State field
for each worker. Ensure that the thread performs no actions other than
PsTerminateSystemThread() after clearing the AFS_WORKER_INITIALIZED flag.
Change-Id: I0baa92f05a5d5f00219a2cc63ca71c7a6a1f52b5
Reviewed-on: http://gerrit.openafs.org/10383
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c0a33ddd82736d71faf2585495102fe1e4b88eb0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 29 08:24:06 2013 -0400
Windows: Uninitialized TargetNameLength/Offset
In RDR_PopulateCurrentEntry it is possible for TargetNameLength and
TargetNameOffset to be uninitialized resulting in stack garbage being
returned to the redirector. This can result in a blue screen.
Change-Id: Ifa306ba54bea3f26f1938cbd6bdc28521065299d
Reviewed-on: http://gerrit.openafs.org/10373
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6e26922f68d2b0f692212e6150d7955a0d393929
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 18 19:26:56 2013 -0400
Windows: cm_NewSCache skip in hash recycled entries
If cm_RecycleSCache returns an in-hash entry it means that either
it wasn't recycled properly or somehow we raced this entry with
another thread. Just skip it and keep searching.
Change-Id: Ia443a04b063a019003662639d31f96db486d673c
Reviewed-on: http://gerrit.openafs.org/10353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 05ecdb353a7c960a34133002a388889e9882d946
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 18 19:14:00 2013 -0400
Windows: cm_RemoveSCacheFromHashTable scp not found
If the cm_scache_t has CM_SCACHEFLAG_INHASH flag set but cannot be
found in the CH_SCACHE_HASH(&scp->fid) hash chain then search the
entire hash table for the object. At the end of the function we
will know that the CM_SCACHEFLAG_INHASH flag is safe to clear.
Change-Id: I92bfad98b7d3cdc42b5aa6b8fae24d47557465e7
Reviewed-on: http://gerrit.openafs.org/10352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7068836e6bab73e9edcb2c84727b92b25e1a6109
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Sun Oct 20 14:29:35 2013 -0400
Windows: EOF for Synchronous Deferred Writes on XP/2003
The Windows IO Manager is not supposed to issue multiple
outstanding cached writes to a file system for a synchronous
file object. To do so would risk out of order application
of writes that extend the end of file and in turn risk data
corruption. It turns out that on Server 2003 SP2 and more
than likely XP and 2000 as well, if a file system returns
STATUS_PENDING because a write was deferred due to the
Windows Cache Manager failing CcCanIWrite(), the IO Manager
will happily continue issue subsequent write requests.
On OSes older than Vista disable the use of deferred writes
and sit in a spin loop waiting for the Windows cache manager
to make room. This is much less efficient and increases the
write latency but it is safe.
Change-Id: Ic47d62749bdb4d0475661967fcbfd25834f21a72
Reviewed-on: http://gerrit.openafs.org/10351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e1f75c1401c5391a123daa2f59af7544a3418195
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 21 11:26:16 2013 -0400
Windows: Store OS version as a global
In DriverEntry() RtlGetVersion() is used to obtain the OS version
information. Store the result in a global structure that can be
used elsewhere to make run time decisions based upon the OS.
Change-Id: I194e7da6858d1dea755d8de82a9bee70e63ade4d
Reviewed-on: http://gerrit.openafs.org/10350
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c56d99e9dd240b2485acc07f5b81a6195c6e0856
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Oct 25 17:45:38 2013 -0400
Remove bucoord/expire.c
It was not compiled into anything.
Correct references in bucoord_internal to command.c.
Remove the forward declaration of struct cmd_parmdesc and make cmd.h
a prerequisite for this header, since all but two consumers had cmd.h
already.
Change-Id: Id60a550871643610ccd96c226ecf0a3c4acb3955
Reviewed-on: http://gerrit.openafs.org/10363
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7b5f27f944ad773a45f1d47fa9b8962097999783
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Oct 3 21:42:10 2013 -0400
auth: prevent uninitialized key list in AFS config
_afsconf_OpenInternal() may exit early for a number of reasons
before properly initalizing afsconf_dir->listKeys.
This leads to a crash when _afsconf_CloseInternal() attempts
to clean up listKeys.
Prevent this situation by calling afsconf_InitKeys() before any
possible exit from _afsconf_OpenInternal().
Change-Id: I6911427817a2518a576c00a7ea56351f9fb4fd19
Reviewed-on: http://gerrit.openafs.org/10323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit aa440ec7cbb8732ad0d9e1e1401fe4929c2cfd50
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Oct 25 13:47:59 2013 -0400
ubik: fix include quotes
Include the generated header in the current directory.
Change-Id: Iaa22fcfd0e22e5f33e7c9bf8a26a838b25668160
Reviewed-on: http://gerrit.openafs.org/10361
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4af32591f05ce2d3237c0aeaa785799d11680152
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 23 15:32:19 2013 -0500
vos: Remove pthread send/receive select()
Commit 65e701fee4968b17066bb81e25b7adaa4024d4f3 introduced a couple of
select() calls when the pthreaded vos writes to or reads from a usd
pipe, corresponding to the IOMGR_Select() calls in LWP. However, these
select() calls are unnecessary, since the read() or write() calls
themselves will block anyway. The reason they are there for LWP is so
the IOMGR can run another process while we're waiting for the file
descriptor to be ready.
The select() in ReceiveFile currently incorrectly waits for the output
to be ready for reading, even though we're trying to write to it. As a
result, if we try to 'vos dump' to a pipe with the pthreaded vos (such
as stdout), we will hang forever, since it will never be ready for
reading.
To fix this, just get rid of the select() calls, since they don't
really do anything.
FIXES 131749
Change-Id: Ibe8841e0c01f1e55ac4ca1a8a99ab71083654662
Reviewed-on: http://gerrit.openafs.org/10360
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f7c31f865cd6cda9105a362f26fdd82a500adb37
Author: Perry Ruiter <pruiter@sinenomine.net>
Date: Tue Oct 22 05:46:10 2013 -0700
afs: Clarify comment
Fixing a couple typos and rewording a comment for clarity in afs_segments.c
Change-Id: Ic631b6f8d59e4e9a56f61e583a8ef0f8f8794d8b
Reviewed-on: http://gerrit.openafs.org/10364
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1b674ae30925c8459e1a5614e19562af460850d8
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Oct 15 16:56:07 2013 -0400
Sysname and param.h for FreeBSD 9.2 and 11.0
9.2 is newly released and HEAD is now 11-current.
Change-Id: Ic79ff26aa39e08940b6035770fe4c6f15b02c418
Reviewed-on: http://gerrit.openafs.org/10341
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1bdcc3c7bca092f189f434f1f7b174090c24250c
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Oct 15 16:00:01 2013 -0400
Adjust for microtime() ABI on all XBSD
On the BSDs, struct timeval is not two 32-bit integers like our
struct clock, so the ABI is quite incompatible. Use the native type
for the function call and translate to our local type accordingly.
This lets us get rid of a workaround for the FreeBSD kernel build,
wherein particular compiler flags masked the stack corruption that
can occur due to this ABI mismatch.
Change-Id: I68f9947b0875dca7343ecd41a4c529d5c5bc3be5
Reviewed-on: http://gerrit.openafs.org/10340
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Antoine Verheijen <apv@ualberta.ca>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e222b08c4049dae95475eda2d5c54bd43dd45e2e
Author: Benjamin Kaduk <kaduk@mit.edu>
Date: Wed Sep 25 16:57:41 2013 -0400
Fix build for FreeBSD 10.0
Move a rmlock.h inclusion up a bit so that the vm headers can get the
rmlock assertion (and other) macros they need.
The filedesc structure has been expanded on FreeBSD to support a
stronger capabilities system; getting to the actual file descriptor
requires another structure access.
limits.h and stdarg.h need sys/ and machine/ prefixes for inclusion in the
kernel on FreeBSD. Fixing this lets us get rid of some unnecessary -I
arguemnts in the kernel module build, which seem to have not been functioning
as expected, anyway.
Catch up to VM layer changes.
This builds, but crashes at runtime due to some ABI incompatibilities
that appear in the rx event layer; those will be fixed in a separate patch.
Change-Id: Icc253b1e938a58a7ab8d1b789c82b9b940d263fd
Reviewed-on: http://gerrit.openafs.org/10339
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0a5e878aa0a71c4dfaef1806744ed78bcc13b9f4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 17 20:22:48 2013 -0400
viced: Improve client error log messages
Commit 6c41b1f740e16b5b9adfe9026630595be6f0699e improved a few log
messages to include the client ip and port of the request triggering
that log message. Include the viceid and fid (if applicable), too, so
an administrator may more easily identify the cause.
This creates the function LogClientError, so we can use a common
function for logging very similar information. This also modifies
h_FindClient_r to give the viceid to the caller, even in the case of
error. In addition, this modifies CallPreamble to accept a fid and
modifies all callers to accomodate.
Change-Id: I326e17538265ea3251db27a05ede25c33e9a230d
Reviewed-on: http://gerrit.openafs.org/10347
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5828b993c3757665348643de16fe36aa90cb98f4
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Oct 9 08:06:03 2013 +0200
tabular_output: enable compilation on Windows
Add the required directives to the makefile.
Change-Id: I7a6e612b37cbf1f6cb61faf55d7c248f8f85808c
Reviewed-on: http://gerrit.openafs.org/10328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0954c7859939b548afab01d11b7bc6288cdbc3ea
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Oct 9 08:01:35 2013 +0200
tabular_output: move public headers
from tabular_output.h to afsutil_prototypes.h
Like this, tabular_output.h does not have to be included
in any devel-package.
Change-Id: I9e3089fe4a65b2a801c45ba513a8f5dc49ce609b
Reviewed-on: http://gerrit.openafs.org/10327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 950dec0715de719f90a4cf59293f0c70d42841cc
Author: Ben Kaduk <kaduk@mit.edu>
Date: Thu Oct 10 13:50:26 2013 -0400
Convert buserver to libutil's logging
The primary motivation is to get automatic log rotation, but we
also get built-in locking for the logging calls.
This does have a side effect of changing the format used to print
timestamps in the log file.
Export WriteLogBuffer from liboafs_util so as to be mostly compatible
with the ... idiosyncrasy of LogError()'s previous behavior.
Garbage-collect the unused (and un-exported) printHashTable() and LogNetDump().
Change-Id: I860370e60082ea355806b3f1945eee76db7c32e3
Reviewed-on: http://gerrit.openafs.org/10333
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Karl Ramm <kcr@1ts.org>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 600712877ca0883c6ec609d51909336964b06cba
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 3 12:38:08 2013 -0500
salvager: Ignore linktable-only RW volumes
In general, the salvager will try to salvage any volume if we find an
inode for that volume. However, for namei, we'll always have at least
one inode for the RW volume, even if we only have e.g. an RO volume at
a particular site, since the linktable special inode is always marked
as for the RW volume id. So, if we salvage a volume group that only
has an RO, normally we would also try to salvage the corresponding RW,
even if it doesn't exist. We would then recreate the "missing"
metadata files, so after salvaging, the RW appears to exist as a
normal volume.
The salvager currently tries to avoid this by skipping salvaging the
RW if we find more than one volume in the volume group, and if the RW
only has one special inode, and that one special inode is the
linktable. This solves the problem most of the time, but misses a few
corner cases:
- If we found more than one linktable, we'll try to salvage the RW
anyway. This shouldn't happen, but certain cases of corruption can
cause incorrectly-named linktables, resulting in multiple
linktables.
- If we only find one volume (the RW), we'll still salvage the RW,
even if the only inode for it is a single linktable. This can
happen due to botched salvages in the past, or interrupted deletes
and such. It's just cruft.
In any situation like those, we cause an RW volume to be created where
there previously was none. This can be a problem, since the RW volume
is unknown to the administrator, and does not appear in the VLDB. Such
"phantom" volumes can be very confusing and can cause problems in the
future. For example, if that same RW volume is moved to the server
with the "phantom" RW volume, we now have two of the same RW volume on
the same server on different partitions, which is a big problem.
So, to avoid these corner cases, check all of the special inodes to
see if all of them are linktables. Also perform this check if we don't
have any non-special inodes (even if we only see 1 volume), to catch
the "cruft" case above.
Change-Id: I00df021ebedce44f69302a48ed2716bd9bda124e
Reviewed-on: http://gerrit.openafs.org/10321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2286fac1447e2e9e834957ec414cb5605f51e63b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 1 17:31:44 2013 -0500
namei: Set inconsistent linktable linkCount to 0
Currently, if we detect an inconsistent linktable filename (where the
filename indicates it's for a different volume than the directory path
indicates), we don't set the linkCount for the inode info. This means
that our caller will get random garbage for the linkCount.
In many cases this value is ignored, but for the salvager, if this is
the only linktable file we find, we treat it as the linktable we
should be using. Thus, if linkCount contains undefined data, we might
try to INC or DEC the linktable a bunch of times, depending on what
random stack garbage the linkCount is filled with.
The salvager shouldn't be INC/DEC'ing these linktables according to
the their linkCount anyway, but in the meantime, at least ensure that
this doesn't contain stack garbage, so we ensure that we won't try to
INC or DEC this thousands or millions of times.
Change-Id: Ib5e7f45d5739878434cbe57b6f2ab532f002e5b8
Reviewed-on: http://gerrit.openafs.org/10320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0b1ee8c1c359fe16693bf117524f54160ebe53e3
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 29 14:22:46 2013 -0400
Reorder bosserver startup prior to pthreads
The rx calls will take locks when built in pthreaded mode, and must go
after rx_Init(). Some other setup would benefit from using time-domain
locking and should run before we go multithreaded.
In particular, initialize bozo_confdir while single-threaded, as it is
otherwise protected by the afsconf internal locking. While here, pass
NULL to afsconf_SetCellInfo -- bozo_confdir would always be NULL there,
anyway.
Change a couple globals into local variables in main; they are just
used to defer setup after argument parsing.
ReadBozoFile will create worker threads to monitor child processes,
so it cannot move up too far.
Change when we daemonize, too.
Change-Id: If7b6883748919270c9a5a41cd8e6fb724e95aa36
Reviewed-on: http://gerrit.openafs.org/10285
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 54eb2485b59550ba42569ed3a8d76211a3a35019
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Jul 17 15:00:11 2013 -0400
bozo: Remove dead code and minor cleanup
This stuff has been #if 0'd for ages; put it out of its misery.
While here, remove the global bnode_waiting which is not used for anything.
bnode_SoftInt claims to return a pointer, so return NULL instead of 0.
Change-Id: Ie7b32bbc606a105190d246355f47bd7ea885c6f8
Reviewed-on: http://gerrit.openafs.org/10284
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 47124f337b43f8731bfbe3bd71e42d046a4d1075
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Aug 12 17:37:29 2013 -0500
viced: Avoid endless BCB loop
Without this commit, when we break callbacks for a fid, we loop over
all callbacks for the fid, break a few of them, and then start over.
We do this repeatedly until we run out of callbacks. If a client sees
a callback break, and then establishes a new callback promise while
the fileserver is still breaking callbacks, the fileserver can break
the same callback for the same host again and again. This can continue
forever, if the client establishes its new callback promises quickly
enough.
So to avoid this, when we start breaking callbacks, flag all of the
callback structures that we want to look at. Then when we repeatedly
loop through all of the callbacks for the fid, only look at the
flagged callback structures.
This adds a 'flags' field to struct CallBack, and defines a single
flag, CBFLAG_BREAKING.
This is an alternative fix to the issue also fixed in 843d705c. This
implementation avoids allocating extra memory under locks, and has the
slight benefit of not breaking callbacks that were elsewhere deleted
during the BCB. This comes at the cost of a single extra traversal
through our callback list, and the cost of claiming one of the bits in
the CallBack structure.
Change-Id: I6418bd404de61ec7a531261ecf581eeea719a2d4
Reviewed-on: http://gerrit.openafs.org/10172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2482340afb906a9719994742ef26500c6e67ccea
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Aug 20 20:51:04 2013 -0500
Revert "Atomically collect callbacks to be broken"
This mostly reverts commit 843d705ca6f0250c3760ec2aa1f3403d19de3df1.
That commit causes each callback-breaking thread to potentially use up
a large amount of memory, as well as possibly causing large memory
allocations under H_LOCK, which isn't great.
There are other ways to allow for atomic callback breaks. Revert that
commit to allow for alternative methods to be implemented in separate
subsequent commits. Do this in separate commits so pullups to stable
branches are easier.
This does not revert the change in the definition of MAX_CB_HOSTS.
That value can still be large due to the improved multi_Rx
implementation.
Change-Id: I14024b4d80696b0361658b1c5ae7af308629fab4
Reviewed-on: http://gerrit.openafs.org/10171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit de7bd44d00d51272a53eb109efabc14b65021e33
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 30 18:12:21 2013 -0500
salvager: Improve comments
"these used to be asserts" is not a useful comment. This area of code
does maybe look a little confusing at first glance, though, so replace
these with comments that are more informative.
Change-Id: I4e0b9dff3d010931e02559e82165ffbd61c5b189
Reviewed-on: http://gerrit.openafs.org/10313
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6a4831e0e9a003bed06ac2269987c69090d3f7e7
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 30 17:53:36 2013 -0500
salvager: Fix in-memory invalid linktable counts
When we have a nonexistant or invalid linktable, we manually set all
of the linkcounts to 1, since we're recreating the link table from
scratch. However, we also have a linkCount count in our in-memory
allInodes array, which could be populated by garbage if we had a
garbage linktable. So make sure to set our in-memory linkCount to 1
for each inode, so we don't use garbage linkcount data.
Change-Id: I8f4873e12f70f81ee6f2c764957e77136b0a385e
Reviewed-on: http://gerrit.openafs.org/10312
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 93b0e0d50fb14561ca2b8b0c20876826335ec1ab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 30 17:51:40 2013 -0500
salvager: Whitespace formatting
The whitespace here is pretty weird. Clean it up a little.
Change-Id: Ia558d453301ee1231cfb21ee87dc7f190dc905d7
Reviewed-on: http://gerrit.openafs.org/10311
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2bbba424ad6728a221688f782b4df90bf6da4a63
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed May 29 19:18:22 2013 -0400
FBSD: plug refcount leak in pioctl
When gop_lookupname_user returns a non-NULL vnode, the vnode came
from afs_GetVCache (by way of afs_lookup) which takes a reference
on the vnode entry. There's no need to take another spurious
reference here. The existing code already knows that there's a
reference in place, as there is an AFS_RELE down where FBSD80_ENV
unlocks the vnode if it's locked (that code is also suspicious).
Prior to this patch, things like 'fs flush /path/to/file' would
leak a reference on that cache entry, preventing clean shutdown.
Change-Id: Iefb7be16bb76b709ffd7cfc082ef9078adf9e354
Reviewed-on: http://gerrit.openafs.org/9957
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b0d75d0687a3436201411384c570448a49a9db15
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Tue Oct 8 11:53:17 2013 +0200
linux-kernel-module: move keyring-specific
function afs_set_session_keyring into
if defined(LINUX_KEYRING_SUPPORT)
block. Otherwise compilation fails.
Change-Id: I44bb015990782793eac9326b983b704b2248b230
Reviewed-on: http://gerrit.openafs.org/10324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6016d2291a3a14777283c0ea5c9c37d761c9e1f6
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Sep 22 15:29:52 2012 -0400
procmgmt: Introduce spawnprocve_sig
Introduce spawnprocve_sig, a variant of spawnprocve that allows
a caller to spawn a process with a specific signal mask.
This is useful when we want to set a mask that is different
from the current one. It needs to be done after the fork()
so that the current thread is not affected.
Change-Id: I900c85cb70d22756b78562618b0e853dcedf8235
Reviewed-on: http://gerrit.openafs.org/8749
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1cf6678fdaae82871a9aeb4addfed3a2db1954e8
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 12 15:58:34 2013 -0500
ihandle: Make sure we don't ih_attachfd invalid FD
Right now, if you give ih_attachfd_r an invalid fd, and fdLruHead is
NULL, we'll return an FdHandle_t* for an invalid fd. Nowhere in the
code is this possible right now, but the implementation of
ih_attachfd_r and ih_attachfd doesn't make this very clear.
Ideally the "close some fds and retry" behavior in ih_attachfd_r will
be split out, so this code could be easier to follow, and we could
implement open() EMFILE retrying for icreate operations. But for now,
just make the current behavior clearer, so future modifications do not
introduce such mistakes.
Change-Id: Ibc80b32bc6f50480d12e3241fe198bc0587a962c
Reviewed-on: http://gerrit.openafs.org/10249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6bfc2be65bbf39e6be4a8ab7f8cfbfa66bc9363a
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Thu Sep 26 22:07:39 2013 -0400
DOC: afsd man page: give an example of the direct volume mount syntax
The syntax is a little confusing, so an example is needed to clarify it.
Change-Id: I413a5f2af6ccf48e780007c658c35a34384d09e0
Reviewed-on: http://gerrit.openafs.org/10281
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9f4684cd5fac5eacf571b882e965150943383170
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 1 10:57:07 2013 -0500
vos: more details in vos release -verbose output
When running vos release with the -verbose flag, print the reasons for a
complete release, and the reasons for doing a full dump of the volume. When
doing a full dump, have the verbose output print 'entire volume' instead of
'full release', to avoid confusion with a complete release.
Change-Id: I041da692bfea5d7eb0c96d51a5a794e3eeeb6d72
Reviewed-on: http://gerrit.openafs.org/9018
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 341f2af7969842fecf352d2c42c95e56a9216546
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 27 13:35:07 2013 -0400
fix linux build error in osi_probe
Fix a build error for older versions of linux, introduced by
commit 7694f536d3997768b69a635616b0cf24d71a595a
(scsi_command_size became scsi_command_size_tbl)
Fixes a build error on RHEL/CentOS 5.9; 2.6.18-348.3.1.el5.
Change-Id: I7e6f08e7f7cbba47034701e6137eb91fa567dbda
Reviewed-on: http://gerrit.openafs.org/10282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1a42219e63b2e511c8940d1993d886a80a34b78c
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Tue Sep 24 11:01:08 2013 +0200
vos: complain if no fields are passed
to vos "setfields". It might be a misleading if it exists
sucessfully when clearly invoked wrongly.
Change-Id: Ic92f4e17fde0a0dfc182f9713350800c72fa165e
Reviewed-on: http://gerrit.openafs.org/10271
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8fc86de33e95efc5cdcd73131d97a2afd1ad935a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 23 21:23:27 2013 -0400
doc: state klog.krb is obsolete
State upfront that klog and klog.krb (v4) are obsolete.
Update the klog.krb description and remove some redundant
text.
Change-Id: I6ede8084aebbd49c5a27aa427ef9782d99a347aa
Reviewed-on: http://gerrit.openafs.org/10270
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 897e970dbe09d163479719b4c9befa660d99874b
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Mar 22 13:51:02 2013 -0400
Catch up to FreeBSD VM object read/write locks
Upstream r248084 changed the vm_object mutex to be a rwlock,
allowing for future optimizations. This is a KPI change, so
introduce conditionals to be compatible with both versions of the KPI.
Change-Id: I6e3101bc80262480035dee4c5b2d1b9cbc44b57b
Reviewed-on: http://gerrit.openafs.org/10295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dbf68229c6c90d65781fdc16565dd1e9b56248c0
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 9 22:25:50 2013 -0400
build: compile_et rules for parallel make
Change all makefile rules which run compile_et in order support parallel
make. The compile_et generates two outputs, so special care must be
taken in rules which run compile_et.
All the rules for compile_et have been changed to the form:
foo.c foo.h: foo.et
compile_et foo.et -h foo
foo.h: foo.c
The above rules are equivalent to:
foo.c: foo.et
compile_et foo.et -h foo
foo.h: foo.et foo.c
compile_et foo.et -h foo
therefore a parallel make will serialize the builds of foo.c and foo.h,
and should detect that the second is no longer needed once the first is
over. This form works since foo.et is not a phony target, and does not
depend on a phony target.
Previously, the rules for compile_et were of the one of the two forms:
a) foo.c foo.h: foo.et
compile_et foo.et -h foo
or
b) foo.h: foo.c
foo.c: foo.et
compile_et foo.et -h foo
Form a) is problematic for parallel makes, since it is equivalent to:
foo.c:
compile_et foo.et -h foo
foo.h:
compile_et foo.et -h foo
In a parallel make, compile_et will be run concurrently, clobbering
each other's output files.
Form b) is better, but is problematic when foo.h is removed, since foo.h
will not be updated.
Thanks to Russ Allbery for pointing out the automake documentation which
describes issues with commands that produce multiple outputs, and
portable solutions.
http://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs
Change-Id: I14c056606084f80270e05592d3d09a600f804e24
Reviewed-on: http://gerrit.openafs.org/10237
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d477118fbda470c6f9f890a1a3f45ad8bad97be5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 11 10:44:37 2013 -0400
Windows: fix libafscp build directory
NTMakefile specifed the directory as libacl not libafscp
Change-Id: I12af68a19155d0764967f9cd2e8eb2d8795530d5
Reviewed-on: http://gerrit.openafs.org/10299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9132b7e474fce9c8c3513db5279feed6a9daba7c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 4 15:53:57 2013 -0400
Windows: Freelance Do not chase mount points
When adding mount points or symlinks do not chase mount points
when attempting to determine the FID of the added object.
Change-Id: Ic4e070d687cc56407a19c41f185f3e28db7671bd
Reviewed-on: http://gerrit.openafs.org/10298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4f266f14c0721111a9d453c3358cddf77eb2641a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Sep 27 18:02:52 2013 -0400
Windows: cm_MergeStatus avoid lock recursion
It is possible for cm_MergeStatus() to be called while the
cm_buf_t.mx is already held. If it is a panic occurs. Test for
refcount == 0 before acquiring the lock in addition to afterwards.
If the refcount is not zero, then we do not need to acquire the
lock in any case.
Change-Id: I1b73a03f4745e524d7fdf8f9b231b420895ff0fa
Reviewed-on: http://gerrit.openafs.org/10297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7efd78539066bedeeb3b579a613d587d8aa6e623
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 4 13:11:24 2013 -0400
Windows: AFSCreate avoid race leading to NULL dereference
If a test for NULL is performed ahead of an assignment and then
use of the assigned value, there is a race which can result in
the assigned value being NULL if the value being assigned is
altered by another thread.
Perform the assignment first then test based upon that.
Change-Id: I6d50619dab168c2aa12542b14217779f1be08ee9
Reviewed-on: http://gerrit.openafs.org/10296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8e32b11be6ce0517f75588360a3ca8c333358ca3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Sep 11 11:22:20 2013 -0500
Probe directly for com_err.h
com_err.h can be in com_err.h, et/com_err.h, or krb5/com_err.h (for
netbsd 6.1 and possibly other netbsd). aklog currently only includes
either com_err.h or et/com_err.h, depending on autoconf probes
performed by the krb5.m4 macros.
So, also look for krb5/com_err.h. The krb5.m4 macros currently only
look for com_err.h at all if certain other libkrb5 tests return
certain results, so just look for all of them directly in some of our
openafs-specific krb5 probing logic in configure.ac.
Also remove the duplicate check for et/com_err.h in acinclude.m4 while
we're here. We only use et/com_err.h if krb5 support is enabled, so
only check for it in the second of krb5 probes.
FIXES 131716
Change-Id: Ic454b9bf7043f91654dcd1c262ab3790bf2ad272
Reviewed-on: http://gerrit.openafs.org/10244
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4212c7e604bebcb8f20b67c60323263231611bfb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Sep 25 00:25:48 2013 -0500
Whine if single-DES keys are in use
If we are using single-DES keys in our KeyFile, yell at the
administrator, so they have a chance at realizing that they should
migrate to stronger crypto.
Change-Id: Ic37d9e1cea7ee7e12594be0dec02000f11efc896
Reviewed-on: http://gerrit.openafs.org/10273
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d83c1231cf371ac998304cbb2007ca848a514e0c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Sep 18 16:56:23 2013 -0500
vol: Nuke parent vol special inodes
When we "nuke" a volume, we delete all inodes we can find that are for
the given volume id. This currently means that if we nuke an RW volume
id, we delete all of the inodes for file data for the entire volume
group (since they're all stored in the VG id), but we do not delete
the special inodes for any non-RW volumes in that volume group. Those
special inodes left behind are not very useful, since we just deleted
all of the actual file data.
Currently this means that on namei, it's impossible to nuke the
special inodes for non-RW volumes, since the namei nuke will only look
in the subdir for the given volume id. If you give it the RW volume
id, it won't delete the special inodes as menioned above; if you give
it the RO volume id, it will only look in the RO subdir, and won't
find the RO special inodes in the RW subdir.
If a volume group is damaged in such a way that the salvager cannot
fix it (due to a bug), this means that it is impossible to get rid of
that volume group completely from the partition on namei without
manually running "rm -rf" on the relevant AFSIDat directory. Normally
we have a failsafe of running 'vos zap -force', but that doesn't work
for non-RW special inodes, as mentioned above.
So, in order to allow this 'vos zap -force' failsafe to work in
hopefully all situations, also delete the special inodes for the
parent volume. Use similar logic as exists in the salvager's
OnlyOneVolume function.
Change-Id: Id29da48a548c70b2b9ada1dd09f41cb59452bd11
Reviewed-on: http://gerrit.openafs.org/10256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d14ecfc39a88ee5ff802532d69db30e8ae396f68
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Sep 20 15:08:30 2013 -0400
rxgen: cast bool properly
The C type for xdr's bool is bool_t. When casting, use the correct type
Change-Id: I562ee1e48eeffa8fece66176cf13013630d157aa
Reviewed-on: http://gerrit.openafs.org/10261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 21c8f4809ee7af9d2ec76cb37747183cee0c0d33
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Aug 20 16:48:34 2013 -0400
bozo: cap retry delay
Cap the retry delay to a reasonable amount of time instead
of just doubling the delay until it reaches 16 hours.
Change-Id: Ibc7dd75670a9b02f34050842b6e54df4f5a7c315
Reviewed-on: http://gerrit.openafs.org/10148
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1c2dcda92ba246e52860f71513447a045c38082a
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Sat Sep 21 00:46:05 2013 +0000
rx_multi: free the quantity of memory we allocated
Change-Id: I3a666bb5c3b8b9ab222d1170095e46116fac4229
Reviewed-on: http://gerrit.openafs.org/10266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 33154874bf9d1549552ddedf68d01cff2217bf82
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Sep 20 16:47:33 2013 -0400
tkt_MakeTicket5: Use correct bitmask operator
tkt_MakeTicket5 tries to avoid returning heimdal asn1 error codes,
but uses an incorrect expression that's almost always true. Use
bitwise & instead of logical && to fix.
Change-Id: I59bffe8c9b98c6f32b967bc37a7989c98c5720b6
Reviewed-on: http://gerrit.openafs.org/10264
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3d2b8aec7c373ae81c1cbc653a557fbae5605088
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Sep 20 15:27:27 2013 -0400
Add missing clean rules
do libtool cleanup in src/afsd, src/kauth, and src/venus
remove ordinary objects in src/opr
Change-Id: Iddf6bb017a38e20e971b9faf576ee2f9e39625c0
Reviewed-on: http://gerrit.openafs.org/10262
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 43bdcaa855c42681c7034ddf8ce3ca4c44be23b8
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Sat Sep 21 00:36:30 2013 +0000
Remove AFS_NBSD40_ENV block within AFS_HPUX110_ENV block
Change-Id: Id679f07c811c36b9f47556a9e7be94fe7ba303f3
Reviewed-on: http://gerrit.openafs.org/10265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2aa26fcb4e3cf5fa85a3aee3263893a0443a2b75
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Sep 20 15:13:43 2013 -0500
rx: Always call rxi_StartListener
Commit c10f5296 made rx_Init only call rxi_StartListener in the kernel
if we have RXK_LISTENER_ENV. But this doesn't make any sense, since
rxi_StartListener only does anything if RXK_LISTENER_ENV is _not_
defined. As a result, for any non-rxk-listener non-rx-upcall platform,
we never receives rx packets in the kernel, since we never set up our
rx packet callback. The only such platform appears to be AIX, since
while other platforms (HPUX, FBSD, IRIX) have a non-rxk-listener mode,
they also implement an rxk-listener mode that we always turn on.
So, just always call rxi_StartListener, and let the ifdef guards for
the various implementations of rxi_StartListener do the right thing.
FIXES 131725
Change-Id: I209a89bda06f2c790aca2682468066c7b0bb7edd
Reviewed-on: http://gerrit.openafs.org/10263
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f785b7f662bb9f9026a32039aca92ac5cb13030a
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Wed Sep 18 19:37:32 2013 -0500
Add config glue for amd64_nbsd70 and i386_nbsd70 sysnames
Change-Id: I2d0b6848f96aab8d68a41fb6d5892284fca987ad
Reviewed-on: http://gerrit.openafs.org/10257
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 13165c05836bcd4b3f5655ab2bcc979ff859efa2
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Fri Sep 13 11:13:05 2013 -0400
linux: core dump requires write fop
turns out not just writev is unhappy with aio_write (only); core dumping
wants a write file op. always provide it.
FIXES 131729
Change-Id: If099f83973825981b4c568db7572bf30d399c089
Reviewed-on: http://gerrit.openafs.org/10251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fb623d5da30e6d304f672d8485da2e1781afa5df
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Fri Sep 13 11:47:08 2013 +0200
afsd: check if mountdir is an absolute path
if the mountdir in the cacheinfo file is not absolute,
it can confuse commands like "df". Thus, force it to
be absolute.
Change-Id: Idb098b7c83fef6931fe71dd53a85569a953e5e3f
Reviewed-on: http://gerrit.openafs.org/10250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9db8b123e4dab6c25ef4166ad3fa74aaa0f630f4
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Thu Sep 12 09:25:31 2013 +0200
LINUX: Keyring deal with suse-specific key_type op
instantiate_prep used for checking for
STRUCT_KEY_TYPE_HAS_PREPARSE
Change-Id: Ia7411e85467ba418dfefa5cd7c2d570fe20a5a68
Reviewed-on: http://gerrit.openafs.org/10194
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9fea1a29dff48d5f49420c6207255e5d6e7c8053
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Sep 4 14:59:04 2013 +0200
tabular output: fix segmentation fault
inititalize Table->numAllocatedRows=0;
Change-Id: I72c6a687fde69cad3bf9aedd43d59d382455045b
Reviewed-on: http://gerrit.openafs.org/10225
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 286065f6d2fd5338252bf06b7ab6b4627a7bc4c9
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Sep 9 21:27:54 2013 -0400
libuafs: return error on symlink to self
if we are symlinked to ourself directly, return ELOOP.
Change-Id: I408012c4a9afb6bab0e917677c940f65ad59c697
Reviewed-on: http://gerrit.openafs.org/10240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ebcbe8f3fae1cf29c426dc3c5f88b03125d0073c
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Sep 9 21:22:02 2013 -0400
libuafs: move code for uafs_LookupLink
in order that we can make a future version static, move the code.
Change-Id: I67e50ef5f14db3567ecd437b694b62b2c8fdb760
Reviewed-on: http://gerrit.openafs.org/10239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a541cd929c3da567be5c745c0eb94ec56cb0da35
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Sun Sep 8 00:11:47 2013 -0400
libafs: update uio resid in bypasscache
when we do a no cache read, we should decrease the resid as we use
up buffer... otherwise we have no idea in the caller how much data
actually got transferred
Change-Id: I50072fddcde1681b3760002d5065b1c2d9b97605
Reviewed-on: http://gerrit.openafs.org/10231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit db1de98ecf6fd22b9c36b3ba284984f03cb0ae35
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Thu Sep 12 13:34:04 2013 +0200
client: flag in cachemanager if rmtsys is enabled
when processing "fs sysname" on a client, a rmtsys-related
checks are executed by default. These prevent a user with gid
2750 and 274i8 (0xabc and 0xabe) from executing this command.
Add a new flag inside the cachemanager for the rmtsys-
functionality. This flag is set through a new ioctl by the afsd
on startup.
Change-Id: Idf95aa81cc1dbb46c70a11b9ae2ccfa04bfb4c4f
Reviewed-on: http://gerrit.openafs.org/10245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 73ae85bd59cfe9fca2daeb7dc0aa0917368bb5bf
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 6 23:58:39 2013 -0400
auth: fix cellservdb update check
Fix a bug introduced by the check to avoid excessive stats of the
cellservdb. Fixes a bug where cached cell config data is served for up
to one second after a write.
Check the timeRead field which is reset after a write to indicate the
data should be read.
Fixes commit 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af
Change-Id: I209e93a1bc4107a878eefaae92ec0e5e4ada2518
Reviewed-on: http://gerrit.openafs.org/10230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e6af2ffc86af17c4be427384467c4122fc5301b3
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Sep 12 08:09:34 2013 -0400
linux: provide read and write ops even when we have aio
read/write will fall back to aio ops but e.g. writev will
fail if there is not either a write or writev op explicitly.
force the fallback via do_sync_read/do_sync_write
required with 2.6.18-348.x rhel kernels but probably not newer ones
Change-Id: I773a8e38df435015e4bc9fc353d930d14b3e6791
Reviewed-on: http://gerrit.openafs.org/10246
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit c7f5a212025172307e85e09ada03333e5e288cc3
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Aug 28 14:51:13 2013 +0200
Linux Keyring error handling
honour the returncode of key_instantiate_and_link() to avoid
having non-working pagsh without an error.
Change-Id: Ia62c1c24b22e833cd5dc2689181397965901d34e
Reviewed-on: http://gerrit.openafs.org/10179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1f577e41b65e9bd213a915a296ecf5bedd17fcc1
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Tue Sep 3 07:55:14 2013 -0400
Linux 3.11: Adapt to d_count changes
In preparation for upcoming changes in the 3.12 cycle, d_lockref
was introduced late in the 3.11 cycle. The dentry's d_lock and
d_count are moved to this new structure. A new d_lock macro makes
the change transparent for locking, but direct users of d_count
must adapt. A new d_count() helper function is provided and
should now be used.
Use the new d_count() helper function if available, and move
some of the ifdef logic into a helper compatibility function.
Change-Id: I32a21a174d763fb7df8f1e04da3bb7260684571d
Reviewed-on: http://gerrit.openafs.org/10219
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d9db6fbd17db2640648716815a6f0a8e8c0b9561
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Thu Sep 5 22:39:57 2013 -0600
fix src tarball error text in make-release
Correct the error message if make-release fails to create the source
tarball.
Change-Id: Iaf908975d56c0ee4c2959854f0ffd9c855f2c708
Reviewed-on: http://gerrit.openafs.org/10228
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 28de757a65679bff74fb34e65d8cd78cb36d0fc9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 3 08:42:50 2013 -0400
Windows: Do not leak activeRPC count
If a callback race has been lost cm_MergeStatus is not executed.
In that case either the activeRPC count should not be incremented
or must be decremented to indicate that the current call has been
completed.
Change-Id: I417f72bbc482f6d207ed0c09770b1d8a53d078ff
Reviewed-on: http://gerrit.openafs.org/10218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2a1035a49bfb67152f14b500d9c614e4df1013c8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 2 14:38:41 2013 -0400
Windows: Adjust setting of VERIFY_DATA flag
If the CcPurge operation fails or cannot be performed, in addition
to setting the purge on close flag, set the verify data flag. This
ensures that the next attempt to access the file will retry the
purge.
Change-Id: I9ebbdab8b5dd31ace5d316454b6e54cf537686d5
Reviewed-on: http://gerrit.openafs.org/10217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7c8eb2f2288706a75fda67acae52a5b89dc8343f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 2 14:34:32 2013 -0400
Windows: Add trace to track setting VERIFY flag
Add trace statements at each location the VERIFY flag is set or
cleared.
Change-Id: I108d3d44947bc92f147afb66f746af3262435104
Reviewed-on: http://gerrit.openafs.org/10216
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6de822d647c2d2707f4f0af149579101dd0071f8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 2 14:31:38 2013 -0400
Windows: Skip Extent operations if Direct IO
If the redirector is using Direct IO servicing there are no extents
in use. Skip the AFSFlushExtents, AFSTearDownExtents, and related
calls unless extent processing is in use. This will reduce lock
contention and reduce cpu processing.
Change-Id: I2948295bdd6056e6fbdab7d32c46575a8a7aebbc
Reviewed-on: http://gerrit.openafs.org/10215
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 27311ca420c2ee29b38aa2994993cf24d7d769b1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Aug 25 20:07:44 2013 -0400
Windows: Hold Fcb Resource across CcPurgeSection
Now that the Fcb Resource and SectionObjectResource are held in
the FastIo pathway and the Trend Micro deadlock has been addressed
by holding a reference on the FileObject it is time to fix the
lock acquisition ordering. For each CcPurgeSection call the
Fcb Resource will be held exclusive before the SectionObjectResource.
Change-Id: Ica9e3674b39e2789c35bcf13d9fa1f2326420119
Reviewed-on: http://gerrit.openafs.org/10192
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 22d7c8461b16940c3606d63a0b7e232563871cd8
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Sun Aug 25 13:20:28 2013 -0700
Windows: Strip out unused ModWriter Fastio code
The code is no longer used (the fcb->PagingIO resource is taken for
us by the modwriter) so we strip it out to save other making changes
and then remembering/discovering that this code isn't being used.
Change-Id: I0d880049758559ae0860f8c1e12583304a459a68
Reviewed-on: http://gerrit.openafs.org/10191
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 40d93cb9df62031f1dc5b185e690d11d2c2b9d0b
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Sun Aug 25 12:25:55 2013 -0700
Windows: Take FCB resource in presection create.
Fix a lock inversion in the paging query file information path (called
from within section create).
The query file takes the FCB resource, but that is a lower rank
lock than the SOP resource which is taken in AcquireFileForNtCreateSection,
We fix the inversion by grabbing the FCB resource in
AcquireFileForNtCreateSection.
Change-Id: I6ea8d2ebf9d454f78469e86765ae36e1993533b2
Reviewed-on: http://gerrit.openafs.org/10190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1dc051294c48bb81a92d152b2e3e5ae0fac00fae
Author: Rod Widdowson <rdw@your-file-system.com>
Date: Sun Aug 25 09:16:39 2013 -0700
Windows: Pin the Cc FileObject during section create.
This means that if we purge the data cache while the section is being
created then the MJ_CLOSE will not happen until we unpin the FO.
Thus we can drop any embarsssing locks prior to the close and
meddling antivirus products can do odd stuff in the close path.
Note that there may not be a file object, but in that case there
will be no close on the purge since any CcInitialize operations
will wait on us dropping the SOP lock exe - hence the SOP cannot
be set up.
Also note that this only applies to the data section,
but we do not purge the image section.
Change-Id: I63884888d98eb4eb03858ed962d74bd3b4702042
Reviewed-on: http://gerrit.openafs.org/10189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cb53d414bbc4ecaf1b136b4a3c82bea3cc9044b6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Aug 25 20:02:51 2013 -0400
Windows: AFSPerformObjectInvalidate FILE processing
Refactor AFSPerformObjectInvalidate so that all of the non-DIRECT_IO
processing variables are in the Extents processing section. Remove
all references to Extents processing from the DIRECT_IO block.
Change-Id: If1c20f9d09b415f4c032cea600983efe6ab0cdc3
Reviewed-on: http://gerrit.openafs.org/10188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b2713d121e360598fae5c4651d385e0a11ace05b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Aug 25 19:54:52 2013 -0400
Windows: AFSVerifyEntry get rid of bPurgeExtents
The logic in AFSVerifyEntry is such that bPurgeExtents is always
set to true so simplify the code by removing it.
Change-Id: Idfa90f47158eadb71560122aa3d04b80b7410e03
Reviewed-on: http://gerrit.openafs.org/10187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e8226a2aec30bc003ccad4a9332c4d3c232b45de
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 24 20:20:54 2013 -0400
Windows: Fix trace messages in AFSSetEndOfFileInfo
The wrong function name was specified.
Change-Id: I820af87177b84120088a4bd2b60655e9b0f68b80
Reviewed-on: http://gerrit.openafs.org/10186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c7e8b75353e2cd0bb58b05c9faab21df14c73c69
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 23 15:02:44 2013 -0400
Windows: AFSWrite comments
Add various comments regarding lock requirements
Change-Id: I285eb416ef7d05ef29fcffbc5ce9afd5d3d27322
Reviewed-on: http://gerrit.openafs.org/10185
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3f797fc71174a5779cf1cae3ba452f401a668881
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 23 15:00:17 2013 -0400
Windows: Missing try..except in AFSCachedWrite
Wrap another cache manager call with try..except
Change-Id: I2d10fc5a4c9a47f32590a394c57c412d773409f5
Reviewed-on: http://gerrit.openafs.org/10184
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 26276e602046c8dfe408e7c1d0a2ab80dbc7caa3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Aug 22 17:50:39 2013 -0400
Windows: Refactor AFSVerifyEntry AFSValidateEntry
Inside a big switch statement it is hard to follow when there
are multiple 'break' exits within a 'case'. Reorganize the code
so that there is only a single exit for the FILE type. Unnecessary
blocks are removed as well.
Change-Id: I7ae0ae4592a15a23e8526f18a96a9ded9a1d135c
Reviewed-on: http://gerrit.openafs.org/10183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7f706e6b59a04aef002bb3c29f8917b612f70ac1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Aug 22 17:46:19 2013 -0400
Windows: introduce Section Object Resource Trace Subsystem
Section Object Resource acquires and releases are lost in the
noise of all of the rest of the locks. Introduce a dedicated
subsystem just for Section Objects.
Add missing entries at the same time.
Change-Id: Ibf94da7e737d0559a822f731dbbda7ebe96dfa2d
Reviewed-on: http://gerrit.openafs.org/10182
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b4a996b8151322881ae82cee7ae85a6d47a7ba1e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Aug 22 17:43:20 2013 -0400
Windows: afsredirlib afscommonwrite trace msg error
Specify the correct function name in the trace msg.
Change-Id: I08307d873308631af8cc7afd148b78636b4f49ce
Reviewed-on: http://gerrit.openafs.org/10181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cd07888265f372bb380ee68495e645f174586119
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Aug 21 12:27:35 2013 -0400
Windows: Call AFSExeceptionFilter for all exceptions
In many cases we capture exceptions record and the Exception Code
as ntStatus and move on with life. This patchset changes that.
All exceptions are passed to AFSExceptionFilter so we do not miss
anything.
Change-Id: I4bc8836047a8735becf2f9efaca2a6fa7749b3ca
Reviewed-on: http://gerrit.openafs.org/10180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c9651157cdc690dea81caf9419210a00978c6965
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 21 17:07:14 2013 -0500
viced: Clarify comment explaining cba sorting
The current comment here is very brief; it may not be immediately
clear to a reader why we are sorting these, and so why we need the
given CBAs in an array. Expand on it a bit.
Note that it seems like it might be possible to refactor multi_Rx to
not require all calls to be created before any packets are sent. If
multi_Rx were changed to send data as we create calls, it may be
possible to eliminate this sorting, and allow for slightly more
efficient callback traversal when breaking callbacks.
Change-Id: I966cdcf6d40aa5c02f8768f4dd76c580c811ccaf
Reviewed-on: http://gerrit.openafs.org/10170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0cd5c63ebeef7567c9965e1ded7f10c6f452f0c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 17 12:51:06 2013 -0400
Windows: Delay MP Target evaluation until required
Do not evaluate the Target FID of a mount point until such time
as the target directory must be accessed.
Change-Id: I8aa0da50256cacc4433fad6c7675ca8bd3bd5eb7
Reviewed-on: http://gerrit.openafs.org/10154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0edbeb4a3ce86387dbc31b1745e5517accdb4823
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 17 11:35:39 2013 -0400
Windows: modify PopulateCurrentEntry follow mp rules
It is always safe to read the mount point target data, it is not
always safe to evaluate the volume id since the VLDB might not be
reachable.
For directory enumerations do not evaluate the target Fid. Only
do so for eval by name and by id requests.
Change-Id: Ifa0e84b2e9fb0822dceb9d719a47c541fed2a2bf
Reviewed-on: http://gerrit.openafs.org/10153
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b7964e1814d3b7f1f92f0c20c34ad7166110f502
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 17 11:33:45 2013 -0400
Windows: update GetFileVersionInformation fail msg
Include the module name in the error message if GetFileVersionInformation
fails. Its failure means the module has no file version resource data.
Change-Id: If2e0d376613b5b10e58114986f9ae6994a6de6c0
Reviewed-on: http://gerrit.openafs.org/10152
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1c0260c71185a41f1ec3d1c08f20c53c76f31cdd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 17 10:18:53 2013 -0400
Windows: Cap Cache Size on X86
Since we know the cache size cannot be arbitrary size because it
must fit into contiguous process memory and because it is difficult
to compute the actual size limit, cap the size to 716800KB.
Change-Id: I850f489dc8a392875582e52d8d511dedf69aec9c
Reviewed-on: http://gerrit.openafs.org/10151
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7ce1997f01a964463c1c04816c63ef28d4dfcc23
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 17 00:08:30 2013 -0400
Windows: do not return STATUS_RETRY for rx timeouts
Report the RPC server unavailable instead.
Change-Id: I9a6d8eec9d93f66b098b2edc4119d2e759efd9a1
Reviewed-on: http://gerrit.openafs.org/10150
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4bc62d6bd71ece7d1cb91e77d92ac40789f42ddf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Aug 10 00:44:08 2013 -0400
Windows: np AddConnection error code
If AddConnection fails because DeviceIOcontrol fails, do not
return out of memory which is an unsupported error code. Report
a network failure.
Change-Id: Ib0c83a2fc0b681a94483e1b16ab102354767c993
Reviewed-on: http://gerrit.openafs.org/10149
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3f163fad55fb7e88e8206139ab1c16fe4fbe1487
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 16 15:36:32 2013 -0400
Windows: Do not recycle deleted scache on refcnt 0
If the scache object with CM_SCACHEFLAG_DELETED set is recycled
then the deleted state is lost and the cache manager cannot prevent
unnecessary FetchStatus queries to the file server.
Change-Id: Idaed9c3a18fb1d68c9c6d720a5b16591acafce7d
Reviewed-on: http://gerrit.openafs.org/10142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit acad253a357c2c97fcd8f59c489ac2c7cacba7b7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 16 12:01:55 2013 -0400
Windows: Do not remove scp from hash table on deletion
If the CM_SCACHEFLAG_DELETED flag is going to have any benefit, the
cm_scache object must not be removed from the hash table in response
to a VNOVNODE error. Otherwise, a new cm_scache object is allocated,
the CM_SCACHEFLAG_DELETED is not found, and a new callback request
is issued to the file server which in response returns VNOVNODE.
Do this enough times and the abort threshold is triggered and then
the application becomes very unhappy with performance.
Change-Id: I5c6e2495c149f52ca192d195897e2a1822cf0d14
Reviewed-on: http://gerrit.openafs.org/10141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0fb1e4762d2e5f04876726f487afeb224dd99140
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 16 12:01:02 2013 -0400
Windows: CM_SCACHEFLAG_DELETED use InterlockedOr
When setting CM_SCACHEFLAG_DELETED use InterlockedOr.
Change-Id: Ie6ccc8e0a167e5bb6a8b74689606166821168989
Reviewed-on: http://gerrit.openafs.org/10140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 17b45bb8dee9ac53ff22effa472c9c246b792198
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 16 11:58:18 2013 -0400
Windows: buf_CleanLocked no callback for deleted file
If the cm_scache flags indicate the object is CM_SCACHEFLAG_DELETED,
do not request a callback. Simply invalidate the data in the buffer
and move on.
Change-Id: Id461dc20dda53c93eb87f2648f6279877e4a34d6
Reviewed-on: http://gerrit.openafs.org/10139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit af2fa3c56ff21529739c4cf795948b8711d09c80
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Jul 16 17:27:05 2013 -0400
volser: repair volserver -udpsize and -sleep options
commit cd3492d0635708f141dbb9230471434268ef2188 accidentally
broke the parsing of the volserver -udpsize and -sleep options.
Change-Id: Ia900e4d8fda1b4d5759b46932a4b62bf5591707b
Reviewed-on: http://gerrit.openafs.org/10088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0346ed6f53a6f3fb5d75de41c7ec5a139727618f
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Wed Jul 31 16:00:24 2013 -0600
do not ship uncompressed tarballs
There's not much point to shipping uncompressed tarballs in 2013. Delete
them during "make-release".
Change-Id: Ib52bd4a34ef0f5b0eacb973e60f7c1ef921f5ade
Reviewed-on: http://gerrit.openafs.org/10116
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 6c7c185ba3ec6fbdda0651d18868e66edd655809
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Jul 16 20:39:56 2013 -0400
Check for over/underflow while allocating PTS ids
The behavior of signed integer over/underflow is implementation-defined,
but even if the compiler is nice and just wraps around, we could get
ourselves into trouble later on.
Change-Id: I20ea9c790037a36b8527889b3f7adcfd60e74fd4
Reviewed-on: http://gerrit.openafs.org/10091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0d4aae8e6bac495642e7328e26c96d6e5e8144ed
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Jul 17 16:09:09 2013 -0400
Verify, not Assert, for the (util) global mutex
We don't want turning off debugging to force open this lock.
Change-Id: Ia8dd689c506e42a4bf87c83af23d7457df12f8b9
Reviewed-on: http://gerrit.openafs.org/10092
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3a24ed9baef178d34b6d0fb3a5f6a485dea9353b
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Sat Jul 27 09:22:56 2013 -0600
doc: clarify setcrypt defaults
Change-Id: I0145ecc9935786204d215a11459d170f6220657b
Reviewed-on: http://gerrit.openafs.org/10111
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 0013ca2e15b7219400b1615931492436ea987062
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Jul 30 20:17:01 2013 -0400
Do not use a non-literal format string
Now that UKERNEL's panic() is a proper varargs function (gerrit 9877),
we can use a literal format string "%s" to print the panic message.
clang warngs about a non-literal format string, and in some build
environments the warning becomes fatal via -Werror.
Change-Id: I7d8c9390e3edad7efa6ae1217f938b635423d23a
Reviewed-on: http://gerrit.openafs.org/10114
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6b0016dd992b3215cb17c93812e14de9e4916d25
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 31 15:58:41 2013 -0500
budb: Do not use garbage cellinfo
If the -servers option is given, we never initialize cellinfo or the
clones array. So, don't give the cellinfo structure or the clones
array to ubik in that case, or we may crash or do other weird things.
This issue appears to have been introduced in commit fc4ab52e.
FIXES 131706
Change-Id: I87681c697fec7bbfd6c73a8a9a865e4309c95963
Reviewed-on: http://gerrit.openafs.org/10115
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cd0cac7e1aa673de459c3ef29404e43a1ddccbe1
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Wed Jul 31 16:16:16 2013 -0600
enable Perl's strict and warnings in make-release
Declare the undeclared variables $help, $man, and @toCompress, delete
the duplicate declaration for $last, and remove the unused $tag
variable.
Change-Id: I33de42722b84207dc1bbad50539dc5bf92da2f5e
Reviewed-on: http://gerrit.openafs.org/10117
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7f15a1bbb34fa6f0d52800880f31be367d77a64f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 1 14:06:52 2013 -0500
DAFS: Remove AFS_DEMAND_ATTACH_UTIL
Currently we have two DAFS-related preprocessor defines in the
codebase: AFS_DEMAND_ATTACH_FS and AFS_DEMAND_ATTACH_UTIL. DAFS_FS is
the symbol for enabling DAFS code, and turns on demand attachment and
all of the related complicated volume handling; it requires pthreads.
DAFS_UTIL is supposed to be used for utilities interacting with DAFS,
but do not have pthreads and so cannot build the relevant threads for
e.g. the VLRU, so they don't support demand attachment and a lot of
more advanced volume handling techniques.
Having both of these exist is confusing. For example, currently in
partition.c we only initialize dp->volLockFile for DAFS_FS, even
though the structure exists if _either_ DAFS_FS or DAFS_UTIL is
defined. This means when only DAFS_UTIL is defined, volLockFile will
exist in the partition structure, but will be uninitialized!
Amongst other possible issues, this means right now that DAFS_UTIL
users (dasalvager is the only one right now) will try to use an
uninitialized volLockFile whenever they try to use a volume that needs
locking. Since the partition struct is usually initialized to all
zeroes, this means we'll try to issue a lock request for FD 0,
whatever FD 0 is. If FD 0 is not open, we'll fail with EBADF and bail
out. But if FD 0 is open to some random file, the lock will probably
succeed, and we'll proceed without actually locking the volume lock
file. While the fssync volume checkout mechanism still works, the
on-disk locking mechanism protects against race conditions the fssync
volume checkout mechanism cannot protect against, and so handling
volumes in this way is not safe.
This is just one example; there are other issues with the partition
headerLockFile and probably may other things; most instances of
DAFS_FS really should be enabled for DAFS_UTIL as well.
So, instead of trying to account for and fix all of these problems
individually, get rid of AFS_DEMAND_ATTACH_UTIL, and just use
AFS_DEMAND_ATTACH_FS. This means that all relevant code must be
pthreaded, but since the only relevant code is for the dasalvager, we
can just make dasalvager pthreaded. Salvaging does not make use of any
threads or LWPs, so this should not have any side-effects.
Thanks to Ralf Brunckhorst for reporting the issue where we encounter
EBADF when FD 0 is not open, leading to the discovery of this.
Change-Id: I3848eb877f26b9d65833d5ce0e03f5cf7ba28de4
Reviewed-on: http://gerrit.openafs.org/10123
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f393612d8f0a121d0cb8755f3eb9913c0f09606d
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed May 29 10:33:44 2013 -0400
Linux: Remove extra "goto out" from tmpfs fix
Remove a stray "goto out" that should not have been applied in
this spot along with the tmpfs fix.
Thanks to Stephan Wiesand for pointing it out.
Change-Id: I6f798029a948446b974456648513ea7db4469561
Reviewed-on: http://gerrit.openafs.org/9953
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 30fa9480dd99ed93fa642dd8ce9746760fb42180
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue Jul 23 14:37:26 2013 -0400
volume_inline.h: Down with assert, again
Commit 34767c6a0f914960c9a1efabe69dd9c312a2b400 replaced all assert
calls in this file with osi_Assert (now opr_Assert), but shortly
thereafter, commit db6ee95864a8fc5f33b7e95c19c8ff5058d37e92 added
VTimedWaitStateChange_r with two new assert calls. These are
precarious in a public header; fix them to opr_Assert like the ones in
VWaitStateChange_r.
Change-Id: If2055355b45a09940d69dace59ec18bd6a0cc6fa
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/10094
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8b5d3a73f9f29d7952f7fda1c0d98aa14be4afc1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 9 17:50:26 2013 -0400
rxkad: remove warnings from der-protos.h
der-protos.h was generated from Heimdal headers which in turn were
auto-generated. The included a large number of function prototypes
of the form
ret-type func(parm-list, type */* comment */);
where the combination of */* is ambiguous. Does it mean an end comment
followed by a pointer declaration or a pointer declaration followed by
a begin comment. This combination generates warnings on Windows. The
bug was fixed in Heimdal's code generator. Fixing it here by editing
the code.
Change-Id: Ie66a5c70b0144173d70433adfbe3ed453672af81
Reviewed-on: http://gerrit.openafs.org/10101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1630ada4630a90aae64a63025f8e16dad1500490
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 16 20:22:59 2013 -0400
Windows: fix cm_ServerFindByUUID
opr_uuid_equal() returns non-zero if equal.
Change-Id: I6777d4536d002ec227454aa014278e0fc32eb14d
Reviewed-on: http://gerrit.openafs.org/10090
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4376400259e0a407237f8fc2bffb4262cfb1efbc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jul 24 17:54:13 2013 -0400
aix: link afs_dynamic_kerbauth to rfc3961
Change-Id: Ie06fc83382e18f2e90a5f3874a8bb71afa0c4748
Reviewed-on: http://gerrit.openafs.org/10106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0cb982c8b4b3abb8ecb9475ee087955a78cd34b2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jul 24 17:31:35 2013 -0400
Windows: fix building of aklog
patchset 7e4e06b87a09197816b0e1ae132e38dc30090574 was misapplied
to src/WINNT/aklog/aklog.c resulting in a Windows build failure.
Change-Id: I789ee1464f1f2e695d043d7a25a9f7566068733a
Reviewed-on: http://gerrit.openafs.org/10105
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b5df669801b8406dacd5d16b25d4f01a14a473f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 13 21:29:19 2013 -0400
Windows: fix cm_ServerEqual bug
must check svr2 not svr1 in the second uuid check.
Change-Id: I570b06c630a18c31001b3ca3ab09c870c7cbc355
Reviewed-on: http://gerrit.openafs.org/10086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 92148709443ed622bd25aba38e83b25ca77950a1
Merge: e2d458c e79102e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Jul 24 15:55:26 2013 +0100
Merge branch 'rxkad-kdf-master' into HEAD
Merge the current OpenAFS master branch with the branch on which
OpenAFS-SA-2013-003 and OpenAFS-SA-2013-004 were developed.
commit e2d458c11956af6fe721f7151487cb19f07ac16f
Author: Michael Laß <lass@mail.uni-paderborn.de>
Date: Sun Jul 14 21:31:27 2013 +0200
Use -nofork when starting bosserver via systemd
Systemd does not expect the started process to fork unless
"Type=forking" is given. Use -nofork to run BOS in foreground and allow
systemd to track its state.
Change-Id: I024be12b410d6b8299edd16f309d816a3df469ed
Reviewed-on: http://gerrit.openafs.org/10087
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: Michael Laß <lass@mail.uni-paderborn.de>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 961ca14c2eef02fc56052ca983cd44925f9410f6
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jul 12 13:38:08 2013 -0400
Fix typo
The file is KeyFileExt, not KeyFileEx.
Change-Id: Iffd5edc8a60b1a49441822d26dc44fa252bd70e3
Reviewed-on: http://gerrit.openafs.org/10084
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e79102e7918ce5196e870a806879135743ec3abb
Author: Ben Kaduk <kaduk@mit.edu>
Date: Sat Jul 13 10:49:27 2013 +0100
Add support for deriving DES keys to klog.krb5
Change-Id: I5b58585661f34ec501ad8db8f92b659f32919366
commit 2a9a98f40514e36fd3a3a4b559de5c92d552dc8a
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jul 12 12:43:57 2013 -0400
Update the asetkey man page for rxkad-k5
Also add the usage for the six-argument form while here.
Update some generic text to account for the existence of rxkad-k5,
and mention that the Update Server is not the only thing which can copy
around KeyFiles. Give an example of the seven-argument form's usage for
rxkad-k5.
commit fe73ac62fbda1d4e563ef03114813f148c7d321e
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jul 12 12:53:46 2013 -0400
Use the string form of key types in asetkey
Check for rxkad-k5 keys in the six-argument form and warn they are
unsupported. Do sanity-checking on the type.
Change-Id: I571fcf88744dec271265e6a47f7d9831f867115b
commit 7e4e06b87a09197816b0e1ae132e38dc30090574
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Sun Mar 17 21:58:47 2013 -0400
Derive DES/fcrypt session key from other key types
If a kerberos 5 ticket has a session key with a non-DES enctype,
use the NIST SP800-108 KDF in counter mode with HMAC_MD5 as the PRF to
construct a DES key to be used by rxkad.
To satisfy the requirements of the KDF, DES3 keys are first compressed into a
168 bit form by reversing the RFC3961 random-to-key algorithm
Windows has three additional places to get tokens, who knew?
Change-Id: I4dc8e83a641f9892b31c109fb9025251de3dcb27
commit 7ac5dddbfd439e5276ae5bea00ea22cd1b5897d3
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Sun Apr 28 14:27:47 2013 -0400
Krb5 ticket support for server-to-server and localauth
Create a tkt_MakeTicket5 that creates a native krb5 rxkad token with
a service key supported by the rfc3961 library (session keys must be
provided as DES)
Update GenericAuth to search for rxkad_krb5 keys and call tkt_MakeTicket5
if it finds any.
Change-Id: Ia9543fdcffcbf3ca899a003908662ff3daa8ee07
commit 538354d4749ffc0e7cc7e9552338b8f75ed01438
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Thu Apr 11 00:12:36 2013 -0400
Asetkey now handles afsconf_rxkad_krb5 keys too
afsconf_rxkad_krb5 keys can hold any kerberos enctype, not just des.
Allow asetkey to copy them into KeyFileExt and print them, too.
Change-Id: I11a7dc7770da58c8381accd7fa2164cdfcea43ae
commit ea4812f03d498b6a838440fa3349e085fa5ea8b5
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Sat Apr 6 13:42:23 2013 -0400
Use rfc3961 library to decrypt kerberos 5 tickets
Decrypt tickets with non-des enctypes by calling out to the rfc3961 library.
This requires the security object to be given an enhanced get_key callback
that supports looking up keys by enctype.
Include a wrapper around afsconf_GetKeyByTypes so rxkad doesn't have
to know anything about libauth internals/interfaces
Change-Id: Id2b085fb41e2ed3576ec66b2914c03e78c0077ec
commit 94635f727155830b636026441d6d9122803b2e39
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue May 28 22:07:06 2013 -0400
Update the WiX installer to know about afsrfc3961.dll
commit 292196ad944611796370ab1648650be147841194
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Tue Jul 9 19:02:00 2013 -0400
libafsrpc: link afsrpc.dll to afsrfc3961.lib
Change-Id: I5bf48ed29522c0cbdc43dda63487012f14d39bbf
commit 0777382e8e2cc9b428034e0b55b91931b7d9c104
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Apr 5 20:12:12 2013 -0400
Allow some rfc3961 functionality to be disabled
It conflicts with v5gen in rxkad/ticket5.c
Also add include guards, which were missed previously.
Change-Id: If5155661deb5adf73329eb8b90021512c01a290f
commit 08474dd0b51cfe26dfe2b5c661a2e9a4ca24267e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 12 14:57:44 2013 +0100
hcrypto: Add exports for more crypto algorithms
Export some additional algorithms so we can make use
of them elsewhere in the code.
Change-Id: I676318a872a1e7b537112a3d60dac2edff478ae6
commit 7694f536d3997768b69a635616b0cf24d71a595a
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Mon Jun 28 16:27:35 2010 -0400
scsi_command_size became scsi_command_size_tbl
Change-Id: If91922944f90df11d5a09cd09cbb66c16296d366
Reviewed-on: http://gerrit.openafs.org/9964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ba42758ce218e8985adc0129d0ee3ffa8690537f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jun 3 16:28:44 2013 -0500
volser: Use the new IH_CREATE_INIT function
Use IH_CREATE_INIT when restoring volume data, so we don't open each
restored data file twice.
Change-Id: I67b3df1c5777a6b022644b042f405dbd6a1976a0
Reviewed-on: http://gerrit.openafs.org/9970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b17fdcabaf759b8b821e34fc187253ad81f5cf90
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Mon Jun 28 16:27:01 2010 -0400
Make RXGEN_CPPCMD work on unix
Change-Id: Id08d6f02eb117d9d06b6814e39658d69e05bd43b
Reviewed-on: http://gerrit.openafs.org/9963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 859949c39cab727a17ab5c81f0b071891032517e
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed Jun 26 11:18:01 2013 -0400
vos: incorrectly defined alias for -cell parm
Commit 5d42398298ad4af91a08a08ce607754f644b37dc specified
an incorrect offset for the -c alias for the -cell common
parameter.
Change-Id: I5a3bbe9ceb8a9fd4c21970f4ef0c64d77e9cdea4
Reviewed-on: http://gerrit.openafs.org/10021
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 428ab5deff8efa7334987d2fd2fbc4db053a5562
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Sep 20 14:21:44 2011 -0400
libafs/LINUX: update file pos in corrupt dir fix
Change-Id: Ia90740d5d7dda026dbeeee7273555c4f68fde166
Reviewed-on: http://gerrit.openafs.org/9972
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c636db1eca54844f0ba29cd75f4a0b8181df2162
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Sep 13 18:37:24 2011 -0400
libafs/LINUX: Report FID of corrupt directories
When afs_linux_readdir detects a corrupt directory, the resulting
error message is more useful if it includes the directory's FID
instead of just a kernel inode pointer.
Change-Id: If801e7b0325daca3da8ab115a926276e570c1d94
Reviewed-on: http://gerrit.openafs.org/9965
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a2bfa0e853fb4954fd06a00ea6fbc55c39e76b8a
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Wed Jun 12 16:22:36 2013 -0400
libafs/LINUX: avoid leaks due to corrupt dir
When a corrupt directory is discovered, scanning stops immediately and
readdir returns ENOENT. Currently, the vcache lock is unlocked and the
dcache containing the directory is released, but that's not enough.
It's also necessary to unlock the dcache, on which we hold a read lock,
and to clear the vcache state which records an in-progress readdir.
Change-Id: I408e8bc8b1f4a0ebc1740410da5d760f30b4c875
Reviewed-on: http://gerrit.openafs.org/9971
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c854cb31ff2b1ab79de18b5ab926bf2ea2b05663
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Jun 18 23:12:46 2013 -0400
viced/callback.c: Don't ignore dump read errors
When reading a callback state dump, check the return values from
read(2) instead of ignoring them. This adds a new static function,
ReadBytes(), which handles reading a requested number of bytes from a
file and bailing if there is an error.
Change-Id: Ib06d96888b4e6de0a377c8c6503147f9e44960e5
Reviewed-on: http://gerrit.openafs.org/9989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8ecf7bde78272efc11460f783203afa56cf5c0dc
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 4 10:56:37 2013 -0400
ptserver: increase the max lwp threads
Increase the maximum LWP threads allowed from 16 to 64. Increasing the number
of LWP threads can reduce the number of calls waiting for threads.
Change-Id: I66f53c0fbb2db66c94b9982e3ee6b3b1f89a0f01
Reviewed-on: http://gerrit.openafs.org/9707
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit bb36ce66ff5c41da57244ac7562ac36e106b53f0
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 4 10:53:00 2013 -0400
vlserver: increase the max lwp threads
Increase the maximum LWP threads allowed from 16 to 64. Increasing the number
of LWP threads can reduce the number of calls waiting for threads on
busy vlservers.
Change-Id: I1e95366aad8fe4d275794603d2af07c799cd7048
Reviewed-on: http://gerrit.openafs.org/9706
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 45a80388123f637e32bcb9d2e5fb24db5565cbf3
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jun 24 20:51:53 2013 -0400
Make KeyFileExt comment match reality
There is no file format version field as implemented.
Remove it from the format laid out in the comment, and change the
associated text to make more sense.
Change-Id: I3a7e4ca22bb4d556a091abc0e6e22d3409e419cd
Reviewed-on: http://gerrit.openafs.org/10020
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit aec5a1ffabefb1a81fb5c6e4ad095637aaa563c8
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed May 15 11:38:53 2013 -0400
Document the prdb (ubik) file format
Briefly cover the ubik header and mention that it is not part of the
logical database (since it is just used for the consistency procedure).
Describe the fields of the prheader and how they are used. Mention that
all subsequent entries are blocks of the same size, whose type can be
distinguished by a shared flags field. User and group entries are similar,
and supergroup entries are described as a diff from regular group entries,
as only a handful of fields change. Continuation entries can be used
for user, regular group, or supergroup entries.
Call out what fields are invariant within which classes of entry, so that
these properties can be preserved (or knowingly eliminated) for future
extensions to the format.
Change-Id: Id5ca7d8d346c09c2eec50691e5c5fefbe735ac60
Reviewed-on: http://gerrit.openafs.org/10022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3bde02595b061e4fd77f5bb453e5decca5a50d85
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 19:34:13 2013 +0100
build-sys: mark block begin and ends
Done with Egyptian brackets, or K&R style as they are also known.
Change-Id: Ifeaf3ca29be5d4846738ec937ce07728771c5f16
Reviewed-on: http://gerrit.openafs.org/10010
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ab57d699e5cf11d8b51c022b4420b854921177e6
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 18:01:44 2013 +0100
build-sys: use AS_IF instead of shell if clause
Shell if clauses can cause problems.
Change-Id: Ia5fddc78ff43517c37d5abd79f07b35fd18a9058
Reference: http://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Limitations-of-Builtins.html#if
Reviewed-on: http://gerrit.openafs.org/10009
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cc0d3d5232260595e09ae4ec517d537e961c0c81
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 17:28:01 2013 +0100
build-sys: use m4 quoting consistantly
Change-Id: Ie8c5e15fd9ddf521ac74b07ee0e1252b35e7a816
Reviewed-on: http://gerrit.openafs.org/10008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6d054e3d2790b5c304b428d2ce9bf758e4c12786
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 17:20:22 2013 +0100
build-sys: do not check readme and news when automake runs
Change-Id: Idb5bb57efecf0a9776db78466787987ba7680533
Reviewed-on: http://gerrit.openafs.org/10007
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d7aecbaa12796428606a734b28df7f1df7c3edfc
Author: Sami Kerola <kerolasa@iki.fi>
Date: Sat Jun 22 17:17:04 2013 +0100
build-sys: add bug reporting address and home page to configure
$ ./configure --help | tail -2
Report bugs to <openafs-bugs@openafs.org>.
OpenAFS home page: <http://www.openafs.org/>.
Change-Id: I862b7501f3c964eea800e1aad5f2fc0c551b9fb8
Reviewed-on: http://gerrit.openafs.org/10006
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8bf77854874cff730d0cf38a532ebf4ea0f2bc30
Author: Russ Allbery <rra@stanford.edu>
Date: Sat Jun 29 14:29:06 2013 -0700
Fix restorevol sanity check on afs_int32
restorevol reads various values of different lengths into an
afs_int32 and does a sanity check to ensure that there is enough
room to store the desired value length. However, the check was
done against the wrong variable, making it ineffective.
This check is unlikely to ever trigger, but fix it just in case.
Change-Id: Ia81bd9ff9a2ce8e2d93af384c8e8c664f5434d5e
Reviewed-on: http://gerrit.openafs.org/10026
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d5fb2c2bdccedbd539cb2629cf918d5f37b82c7b
Author: Russ Allbery <rra@stanford.edu>
Date: Sat Jun 29 14:27:55 2013 -0700
Fix restorevol crash on corrupt nDumpTimes value
If the number of dump times claimed in the volume header was greater
than MAXDUMPTIMES, restorevol would happily write over random stack
memory and crash. Sanity-check the loaded value and cap it to
MAXDUMPTIMES with a warning.
Bug found by Mayhem and reported by Alexandre Rebert.
Change-Id: Ib0edd9b1b6f540d8b0128151333d3bb0a8ef37fa
Reviewed-on: http://gerrit.openafs.org/10025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ddf98e50b24b2df3dabdce4ce2720eefa19717f8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jul 16 17:50:53 2009 -0400
bosserver dir creation for non-transarc paths
The bosserver attempts to create the server directories with the correct
permissions when bosserver starts. Make the parent directories if needed
as well, using the umask permissions for the parent directories, instead
of failing.
FIXES 125114
Change-Id: I5ee16a8210154e51cda4ace0617393c7797a6622
Reviewed-on: http://gerrit.openafs.org/147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e4ce2a544f8fcec7355f296a456ddcb6b84b7d93
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Sun Jun 16 19:16:05 2013 -0400
Add a tool to find lock ID numbers
This adds a Perl program, src/afs/findlocks, which grovels through the
kernel module source tree, finds every location where a lock is obtained,
and produces an index of lock site ID numbers. This can be used to find
a lock when debugging, or when picking a new number.
Run it as ./src/afs/findlocks src/afs
Change-Id: I7fdcfb807a92dbb1938a0c37637e9122b52addd7
Reviewed-on: http://gerrit.openafs.org/9982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 495d6fcbba1630b136d9c1b4256f0a71666a8a7b
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 9 04:00:16 2013 -0400
libafs: initialize hard mount last errors
Initialize the values of the server last errors
introduced in commit 94a8ce970d57498583e249ea61725fce1ee53a50
to avoid logging garbage for the last error codes.
Change-Id: I0df262bad5d02231407d0dd65e1f1d32d791912f
Reviewed-on: http://gerrit.openafs.org/10082
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 902b8809f03533ffa7731919930bb5178f77df6c
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon Jul 8 10:53:00 2013 -0400
Linux 3.11: Convert from readdir to iterate file operation
Convert the readdir function so that it can be used as the new
"iterate" file operation. This new operation is passed a context
that contains a pointer to the filldir function and the offset.
The context is passed into the new dir_emit function that will
call the function specified by the context.
The new dir_emit function returns true on success, so we must be
careful about how we check for failure since this is different
behaviour from what filldir currently does.
Change-Id: I6b01b4c78a501bdf4f8d583b0d3b94d677c5d541
Reviewed-on: http://gerrit.openafs.org/10051
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 397a086b77c4351e5332a73ae4859faf239bf45e
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Fri Jul 12 11:39:53 2013 +0200
RedHat: support building on ELRepo kernels
Amend the pattern matching in openafs-kmodtool to support
building for kernels from ELRepo.
Change-Id: I1264490bee90fadfd24d5cd04ea87df4f9c8924d
Reviewed-on: http://gerrit.openafs.org/10083
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5e56298876f64b7c5f36c9dbe375b196a2951521
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Jul 9 23:12:43 2013 -0400
Alias "vos e" to "vos examine"
This shortcut broke when endtrans was added, and some people have
strong finger memory.
Change-Id: Ic00fd33a28c35985464b68becfc25082eee92d0e
Reviewed-on: http://gerrit.openafs.org/10081
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fb548e77e7a5cef453f1ebd866e587d23f6d98b1
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed May 8 12:50:27 2013 -0400
Make UKERNEL's panic() a real function, not a macro
In particular, a varargs function, so that osi_Panic() can always
call panic() as varargs.
Change-Id: I2ceee737c0025c146a8cd17b16d6c159e2bbf9d0
Reviewed-on: http://gerrit.openafs.org/9877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d03c81be76a1bca7c2f75d45b3059f55c9e28a33
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 9 09:55:51 2013 -0400
Windows: build UNIX asetkey
With roken and friends it is now possible to build the UNIX
asetkey on Windows. Do so to reduce duplicate code.
Change-Id: Ic7e050b04e6bed7fe2106de1a163d9ae1fde9efc
Reviewed-on: http://gerrit.openafs.org/10070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c2bb5cd21d4aac29bab77555b67ad4e84925d209
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 9 11:42:06 2013 -0400
Windows: define HAVE_KRB5_CREDS_SESSION
Windows builds against the Kerberos Compatibility SDK which uses
the Heimdal API. Define HAVE_KRB5_CREDS_SESSION.
Change-Id: I389cb3e8d79846c94884ea9a786e2ae0f52fa293
Reviewed-on: http://gerrit.openafs.org/10071
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 370a41f6f64ff8c1c20586f984d4cb0293f2b0c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 9 09:54:42 2013 -0400
windows: afsauthent.dll export afsconf_ functions
Export additional afsconf_ functions required for asetkey
Change-Id: Id8d63f7d18563bd8963750aed6b7baaf873716a8
Reviewed-on: http://gerrit.openafs.org/10069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4fd27ef65256f0179d16c91086d5c459c2c367d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 9 09:54:09 2013 -0400
Windows: afsrpc.dll export afs_set_com_err_hook
Change-Id: Icbd33c9ca087e663d2755a7a6c8380de266ee717
Reviewed-on: http://gerrit.openafs.org/10068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 286c41ad6bec8b0a72d07fa42aecd21c3d744f63
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 9 09:53:25 2013 -0400
Windows: HAVE_TIMEGM provided by roken
Change-Id: I110e0667cdc68ab0877fe8c1d0a4f9e48e60621d
Reviewed-on: http://gerrit.openafs.org/10067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1aa43164d565ff5fdb5c789d394229a090fe0a09
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 8 20:29:24 2013 -0400
bos: Fix Windows import of afsconf_SawCell
IBM created a global variable 'afsconf_SawCell' in the kauth package
and manipulated its value from within bos.c as part of the calling
of ka_Init(). Patchset d52398940d58ccdba4114a9975762f48cc24ad15
exported afsconf_SawCell from afsauthent.dll since bos.exe is built
pthreaded. It was previously mixing pthread and not-pthread libraries
to access the variable.
Unfortunately, the export was declared as a function pointer instead
of DATA. Importing a DATA element from a library also requires that
the variable be __declspec(dllimport). The use of afsconf_SawCell
needs to be replaced but in the meantime fix the import so that bos.exe
can start without crashing.
Change-Id: Ic780971b55d64e41e1ba9627cdeadd6c27c451fb
Reviewed-on: http://gerrit.openafs.org/10054
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b185c3f00d8530e4341ac4f990126f8505fce0f5
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Fri Apr 5 20:12:12 2013 -0400
Build 3961 library in userspace, and add enctypes
Build the 3961 library in userspace, with support for the common
kerberos enctypes des3-hmac-sha1, arcfour-hmac-md5, and aesXXX-cts-hmac-sha1-96.
Export new symbols as well, and suppress deprecated warnings.
Rename all symbols, both exported and not, with an oafs_h_ prefix
so as to reduce the chance of conflicts.
Rename heim_octet_string to avoid confusion about where things are coming
from.
Change-Id: If5155661deb5adf73329eb8b90021512c01a290f
Reviewed-on: http://gerrit.openafs.org/10050
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 522d5de7131631b56cf9d3070f17bd6f1713e1e3
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 8 11:56:26 2013 -0400
hcrypto: export weak key routine
We only export it on Windows, but the DES3 routines in the rfc3961
library need it everywhere.
Change-Id: Ide0328e40b7753d8ebca79db9eb8b6211bfd7f14
Reviewed-on: http://gerrit.openafs.org/10053
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1b45846692e2bc419e8d7027fd6b2c4f78296a29
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jul 8 11:39:52 2013 -0400
Export RAND_bytes from hcrypto on Windows
Unix already did so, and we need it for the rfc3961 library.
Change-Id: I75401b49a5a2078056360be8f1963d789581c8ed
Reviewed-on: http://gerrit.openafs.org/10052
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ef860802add62076ca6097808458706d3db8d0da
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Jul 2 11:13:25 2013 -0400
Disable some heimdal bits
For the rfc3961 library, we don't want linker exposure to an
entropy-gathering daemon, and we don't want to be leaving entropy
seed files around in user homedirs.
Change-Id: I54546ad44fcdfac8227e72b68a33fa4f61df50b0
Reviewed-on: http://gerrit.openafs.org/10049
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f388f0a85a53a42c3e8f4075d4228b64d0fc558c
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Sun Apr 28 09:31:12 2013 -0400
Add krb5_free_context stub to rfc3961
Change-Id: I5df22e74ea9a5a057994b6684a09eb0f03da98d2
Reviewed-on: http://gerrit.openafs.org/10048
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 09912a3fcc9ae5f0995fb47aedc3b7279b663ad2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 12 14:57:44 2013 +0100
hcrypto: Add exports for more crypto algorithms
Export some additional algorithms so we can make use
of them elsewhere in the code.
Change-Id: I676318a872a1e7b537112a3d60dac2edff478ae6
Reviewed-on: http://gerrit.openafs.org/10047
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a25434430815ebf020407fdfaedd46db94475412
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jul 5 14:06:33 2013 -0400
Use rk_mkdir from libafsroken
The latest import added it; add it to the build and export list.
Change-Id: I588de000868d063c61753a1a4a2e73931e84005f
Reviewed-on: http://gerrit.openafs.org/10046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6c6e01a87fd58d09c1b8f6022e43b6d2bb9f4f73
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Fri Jul 5 16:39:34 2013 -0400
Import of code from heimdal
This commit updates the code imported from heimdal to
5dfaa0d10b8320293e85387778adcdd043dfc1fe (git2svn-syncpoint-master-311-g5dfaa0d)
Upstream changes are:
Ben Kaduk (1):
Be friendly to krb5_generate_random_block consumers
Jeffrey Altman (6):
roken: include limits.h unconditionally
Avoid unused variable warning on Windows
roken: include direct.h if HAVE_DIRECT_H
roken: Define S_IRWXU and friends on Windows
roken: Add rk_mkdir()
libkrb5: Add missing KRB5_LIB_FUNCTION/KRB5_LIB_CALL
New files are:
krb5/crypto-algs.c
krb5/crypto-arcfour.c
krb5/crypto-des-common.c
krb5/crypto-des.c
krb5/crypto-des3.c
krb5/crypto-null.c
krb5/crypto-rand.c
roken/mkdir.c
Change-Id: I77d67afc2b060574a5834fc5c266553c5ff49a25
Reviewed-on: http://gerrit.openafs.org/10045
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 50fa08813b0fa68135e292fa76ce50ee75142884
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 12 13:02:40 2013 +0100
Add additional files to import from Heimdal
Import more RFC3961 crypto definitions from Heimdal, so we can
support a wider variety of encryption algorithms
Also pick up the new mkdir, otherwise we get linker errors.
Change-Id: I5dfe705d3957b646ae05a0e06da1f0f2cfb60e75
Reviewed-on: http://gerrit.openafs.org/10044
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7565cb420366d79df319e344678a8d9ceab6db08
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Fri Jul 5 12:50:36 2013 -0400
bos: Do encryption if requested
Commit d008089a79 didn't replace the processing of the aencrypt
flag passed to the GetConn() function, causing all bos connections
to be un-encrypted. This causes "addkey" to fail with an error
from the server, and "listkeys" to silently ignore the -showkey
option to display keys.
Set the AFSCONF_SECOPTS_ALWAYSENCRYPT flag, and don't set
AFSCONF_SECOPTS_FALLBACK_NULL since fallback is not acceptable if
the caller requested enrcyption.
Change-Id: I6a15fa20c172ab2ddfc6494fbcd62ec6bc7fc442
Reviewed-on: http://gerrit.openafs.org/10043
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5dee9ac3468f9d5a929f9b42bd671411e38092fb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jun 29 00:26:52 2013 -0400
Windows: validate pointer consistency
When cm_ValidateCache() is executed validate pointers to ensure
that they are in the valid range for the class of pointer.
Change-Id: I151489010430919999af85843079f81143359739
Reviewed-on: http://gerrit.openafs.org/10040
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bff2b8792c669649a81e86633de878f449b6bf01
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 26 11:00:00 2013 -0400
Windows: Protect all Mm and Cc calls with try..except
Wrap all Memory Manager and Cache Manager operations in a try..except
block to protect against leaking the SectionObjectResource if an exception
is thrown. Failure to release the SectionObjectResource will result in
subsequent deadlocks.
Change-Id: I92096c1d4bfd5a23069bcc364b68b07327d662ae
Reviewed-on: http://gerrit.openafs.org/10039
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6115ab76d2c877a33ed84fdbd7e65e1b922a49aa
Author: Russ Allbery <rra@stanford.edu>
Date: Sat Jun 29 13:52:46 2013 -0700
Diagnose calling compile_et -v without another argument
Output an error message instead of crashing with a segmentation
fault due to a NULL pointer dereference.
Bug found by Mayhem and reported by Alexandre Rebert.
Change-Id: I484f76411ed6899ea9af81256c1d392a84830d16
Reviewed-on: http://gerrit.openafs.org/10024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 15b5353759984bf0942dff9c3df2959f0a59b405
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Jun 26 18:57:01 2013 -0400
Update windows build documentation
Mention Win7 in a few more places, and talk about VS 2010/2012.
I've had the best results with VS 2005, though.
Update dead URLs.
The old version of WiX 2.0 no longer seems available (at least not from
the listed URL); replace it with
Remove coverage of NSIS installers.
Update example OpenAFS version to 1.7.25.
De-emphasize VS 2003.
Update some ntbuild.bat settings and comments to be more useful and valid.
Change-Id: Iee305833e6d2b01dd7995a78863327682fe5a8eb
Reviewed-on: http://gerrit.openafs.org/10029
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2386dca751cbc209ade754fa9d81b3f00dc1230a
Author: Russ Allbery <rra@stanford.edu>
Date: Sat Jun 29 13:33:28 2013 -0700
Fix spelling error in fs_getverify man page
priviledges -> privileges
Change-Id: I56d233feb7a05d184b26d24d80fbdd4c1e0d0896
Reviewed-on: http://gerrit.openafs.org/10023
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 21d8df0432af14a95dcf6bd583ba2122afb10b28
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Jun 18 23:34:45 2013 -0400
Make opr_uuid_toString return a status
Don't assume that converting a UUID to a string will always succeed.
Instead, opr_uuid_toString should return a status result to indicate
whether the operation was successful or not.
Change-Id: I49e6bf53b2a878342d3137510d2eca522e58604d
Reviewed-on: http://gerrit.openafs.org/9990
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6aefd0d93b28383bc5dd5fb616f6ac45f34982dd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 19 13:53:51 2013 -0400
Windows: Wake waiters on failed cm_SyncOp exit
If cm_SyncOp exits due to failure and there are threads waiting
to use the cm_scache object, wake them before exiting because there
will be no cm_SyncOpDone() operation to wake them later.
Change-Id: Ibf54ebd575cf22b8e9d3577eeb039ff69cc728b6
Reviewed-on: http://gerrit.openafs.org/9994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ab4b8629ac273a631ba9db62766a7190e0d0ae21
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 19 13:52:51 2013 -0400
Windows: cm_scache flags missing interlocked ops
A small number of |= operations on the cm_scache.flags field were
not converted to _InterlockedOr. Do so now.
Change-Id: Iebd361d53e46527bf3ffa0d20d006a5e90ab4967
Reviewed-on: http://gerrit.openafs.org/9993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8ba81c38a5ebe53cb7a12673e7cd100b1dbd29ff
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Fri Jun 21 10:50:16 2013 -0400
libafs: track dynroot locks for cmdebug
the dynroot dir and symlink locks are not currently tracked;
it would be helpful to know when these locks are in play for tracking
contention
Change-Id: Ibe18586fa5d0ef0e3ea9e7153d79ab64df46ebf3
Reviewed-on: http://gerrit.openafs.org/9997
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aaa2584c0498037529a30c985ac8a437ec7d842c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 30 17:53:56 2013 -0500
namei: Create the IH_CREATE_INIT function
Create a new function that combines calls to IH_CREATE and IH_INIT
into one operation; the new function is called IH_CREATE_INIT. This
allows a caller to create a file and then use it, without needing to
open() the file twice.
This is currently only implemented for the Unix namei backend; other
backends result in effectively the same functionality (but can use the
same API).
Change-Id: I93d531a9892beeb0c1ceac18458cbe0f1e3a0ded
Reviewed-on: http://gerrit.openafs.org/9969
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit f40e20d5671310500fb4f6acf38980e158a74c66
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 30 17:52:32 2013 -0500
ihandle: Refactor ih_open to split out ih_attachfd
Refactor the function ih_open, so part of its logic gets split out
into the new ih_attachfd_r (and ih_attachfd) function. This allows
other code to splice in an existing fd, without going through the
normal "open" path.
This patch should incur no functional change; it is just code
reorganization.
Change-Id: I89fd32377c123f2c55b77b01e1db4e14a199bf8e
Reviewed-on: http://gerrit.openafs.org/9968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 48344381d7a87a3617ec14ffc9f2d9735805ada6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 30 17:40:58 2013 -0500
ihandle: Fix fdInUseCount leak on EMFILE
Here, we close closeFd, but currently we don't decrement fdInUseCount.
Since we retry the open immediately afterwards, this means we can leak
fdInUseCount references. For example, if we retry this 5 times and get
EMFILE on each attempt, we will close 5 FDs, but not decrement
fdInUseCount at all.
To fix this, decrement fdInUseCounter when we close a file for EMFILE.
Change-Id: I347e37a8d670a6dde7e1d24eeb893c145d9e34e5
Reviewed-on: http://gerrit.openafs.org/9967
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 43439f6312bc8f631d3eb1e28282730aac47b0eb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jun 11 14:40:30 2013 -0500
Make the inode fileserver backend build again
- Unconditionally build int64_to_flipbase64 and flipbase64_to_int64.
These are only used by namei, but are referenced by the
liboafs_util export list
- Include rx_queue.h in listinodes.c, so the queue elements in
various structures are defined.
- Rename vfsck's getline, so we don't conflict with stdio's getline
- Fix the includes in vfsck/dirutils.c so we get a definition for
VolumeId
- salvageserver needs libsys for various ihandle operations
Change-Id: Ibed3439c1eca499e2ada785e1e8186f4480117a4
Reviewed-on: http://gerrit.openafs.org/9966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 68e02987f62e1c507ddf7fd35847338b130c243d
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Jun 18 12:35:36 2013 -0400
userok.c: Fix fixed-size on-stack path buffers
Several functions in src/auth/userok.c construct pathnames in fixed
size buffers on their stacks. Those buffers are simultaneously too
small for the purpose for which they are used and too large to be
placed on the stack. This change replaces these fixed-size buffers
with dynamically-allocated buffers which are either exactly the right
size (due to asprintf) or have size AFSDIR_PATH_MAX.
FIXES 130719
Change-Id: I49b1c03d4d3525b87e155eb2d6eedf4b199a33c5
Reviewed-on: http://gerrit.openafs.org/9986
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7af86ecffb737b050f67908b63f247e8361eacdc
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Jun 19 16:48:23 2013 -0400
db_dump.o depends on budb_errs.h
Add INCLS and budb_errs.h accordingly.
budb had this already, in 6fda61ba2e2290dac818b42440fac1346d05b73d.
Change-Id: I5ef372e8f8b9ad270b83e158d0ce14109e0f9ef1
Reviewed-on: http://gerrit.openafs.org/9996
Reviewed-by: Jeffrey Hutzelman <jhutz@cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5cd6407c936f8c069336faf94a12b4a475aac0db
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jun 13 22:29:39 2013 -0400
Windows: fixup cellular make mount
Ensure that all input strings contain a trailing dot.
'fsvolume' contains the trailing dot so do not add an extra one.
Change-Id: I183581d3b06a586da872edc4af54c5e34798cdf4
Reviewed-on: http://gerrit.openafs.org/9974
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0edef53073e153a4bdcfdf2518f136d924ec49f1
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Wed Jun 19 00:56:29 2013 -0400
Import of code from heimdal
This commit updates the code imported from heimdal to
dc87425f93bdd3d9c88be1a380ed5372980235bf (git2svn-syncpoint-master-290-gdc87425)
Upstream changes are:
Ben Kaduk (1):
Always provide a usable PATH_MAX
Jeffrey Hutzelman (1):
hcrypto/rand-unix.c: Ignore write(2) result harder
Nicolas Williams (1):
Winsock connect returns WSAEWOULDBLOCK...
Change-Id: I10a001a3a606c799f7b9ab7db42ecef4ad5a5c21
Reviewed-on: http://gerrit.openafs.org/9992
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e16bef6136f83d0fc9a691051fc54a2ae5f573c9
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Jun 18 23:12:46 2013 -0400
viced/callback.c: Ignore dump write errors harder
When writing a callback state dump, test the return values from
write(2), but don't do anything based on the test. This avoids
compiler warnings when building on Ubuntu 12.10, with gcc 4.7.2 and
eglibc 2.15-0ubuntu20.1. This adds a new macro, WriteBytes(), which
handles writing a requested number of bytes to a file and ignoring
errors.
Change-Id: Icead6b25a290cea09a91184dc12b7449cfaaf6f7
Reviewed-on: http://gerrit.openafs.org/9991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ad9343e1241c8c879aa5e426e6384aa346347464
Author: Russ Allbery <rra@stanford.edu>
Date: Tue Jun 18 11:30:28 2013 -0700
Fix spelling error in fs_getcrypt man page
priviledges -> privileges
Change-Id: I2026b8df83f3620565d8d8c522209fe354498418
Reviewed-on: http://gerrit.openafs.org/9984
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cfecac2e71bca14f9207e5879b7c04f965776737
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Tue Feb 12 15:08:38 2013 -0500
Fix scanf buffer overflows
Fix potential buffer overflows caused by misuse of the scanf function
in the fileserver and ptserver.
Also fix similar issues in the client side fs command and libadmin
library.
Change-Id: Ia6a46981c50537da1673507c2bc777f96e43f95a
(This change was applied to the 1.6 branch as a security fix for 1.6.2 as
commit d1855f8e04; this commit brings the fix into master.)
Reviewed-on: http://gerrit.openafs.org/9962
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0789772b1745f84c58cef4f36c61c927afec6ad8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 25 17:05:10 2013 -0400
rx: test for active calls in rxi_ChallengeEvent
The challenge event fires when an outstanding challenge request
has not been responded to. If there are no calls in the ACTIVE or PRECALL
state on the connection when the challenge event fires do not re-issue the
challenge. Clients do not respond to challenges when there are no active
calls.
Change-Id: If71b49e953ca94b8bcce767b8c2a63a054d750fe
Reviewed-on: http://gerrit.openafs.org/9943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 23fb42352a2ae1725df057d74319d951252ee189
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Apr 17 13:42:49 2013 -0400
salvager: report actual uniqs for a too low error
when salvager fixes a "uniquifier too low" error, report
what it is fixing and what it was looking for.
Change-Id: I021bd7f69225ff02f4981aec1f6e64a4b1f3fc00
Reviewed-on: http://gerrit.openafs.org/9795
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 29c7f07583fbbc15bb181a1537597357d657f448
Author: Jeffrey Hutzelman <jhutz@cmu.edu>
Date: Tue Jun 29 12:56:29 2010 -0400
Include user and build host in version string
Make the version string used in AFSVersion and cml_version_number
include the names of the user doing the build and the host on which
it is done. Also, remove extraneous whitespace and the content-free
word 'built' from cml_version_string, since Rx debug packages provide
space for only 64 characters of version string.
Change-Id: I128f6c175bb93b1fb5a4d531f64aa81bd2841ce7
Reviewed-on: http://gerrit.openafs.org/2279
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 20a9568b508353ace1fa4d188673e3b686068344
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Apr 25 11:13:09 2013 -0400
salvageserver: Add -logfile option
Allow an alternate location to be specified for the logfile.
Change-Id: I55a05576746e115478a8e48df22f4fdb26634f05
Reviewed-on: http://gerrit.openafs.org/9831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dea3eb17ad4325ac20d1535c1c030a9ac580da81
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Apr 25 09:26:46 2013 -0400
viced: Add support for -config and -logfile options
Add options to the fileserver to specify alternate locations for
the log file and the config. This will be useful for testing
purposes.
Change-Id: I3550bd993fe5fd2cd9b90425962c95cb1c7d98ea
Reviewed-on: http://gerrit.openafs.org/9830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 27ab5d92dbcabe2547d441c620264837d9aea8b3
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Apr 25 10:50:11 2013 -0400
salvaged: Clean up command line parsing
Clean up the command line parsing in the salvage daemon by making
better use of the cmd library and avoiding hard coded offsets.
Change-Id: Ia300840cfdbb5e03173936148c183ac391e11454
Reviewed-on: http://gerrit.openafs.org/9829
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 11a92242676edbf9dfe88d401844e433f6ccb81b
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu Apr 25 08:57:27 2013 -0400
volser: Add -config and -logfile options
Add options to specify alternate locations for the configuration
files and the log file. This will be helpful for testing.
Change-Id: I4169bc1944719773155931860c6a6dd2fd672f53
Reviewed-on: http://gerrit.openafs.org/9828
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cd3492d0635708f141dbb9230471434268ef2188
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Apr 24 13:25:36 2013 -0400
volser: Convert command line parsing to cmd
Convert argument parsing to use the cmd library.
Change-Id: I2bf9d7ce482d49f50cec59a1660a431bae17017a
Reviewed-on: http://gerrit.openafs.org/9827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dfd74696844df7ffacc5c2db01393bad3fce9dcc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jun 1 00:48:51 2013 -0400
Windows: Protect against cm_GetVolServerList failures
In cm_Analyze, if cm_GetVolServerList() fails volServerpp will be
NULL which will trigger an exception if passed to either
cm_SetServerBusyStatus or cm_ResetServerBusyStatus.
Change-Id: I75b4b855b8c3ccfc014532b0c2eb3135807647ef
Reviewed-on: http://gerrit.openafs.org/9960
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 12e2d47a1c318d13e43c19d0afd1cd3401e03a8d
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Apr 3 16:09:53 2013 -0400
tests: Improve afstest_UnlinkTestConfig cleanup
Make afstest_UnlinkTestConfig clean up and remove the specified
directory regardless of which files are present. This means
the function no longer has to track the current state of which
files may be present as tests are added and modified.
A sanity check is added to prevent damage in case the function is
called for an inappropriate directory.
As before, no cleaning is done if the test is run outside of a
"make check".
Change-Id: Idd092040496aaa2566c8693496fefd7d6f247565
Reviewed-on: http://gerrit.openafs.org/9703
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 61caad06b7a95c27eae7aca0536bcffe61d3e31a
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon May 6 23:03:42 2013 -0400
Apply cast from cfc9b348 to the else clause
Clang on FreeBSD complains about format string mismatch as well.
Change-Id: I8bf17571807acdcac460efb94d0388b5cac4fa6c
Reviewed-on: http://gerrit.openafs.org/9855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3767cf8bf420bd59c3426a4287259b1e97178e96
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed May 22 09:26:57 2013 -0400
Linux: Fix tmpfs cache support
As of kernel 3.1, tmpfs no longer has a readpage() operation in its
address space operations. Some of the cache manager code relies on
this, causing an oops if tmpfs is used as backing store for the
cache.
As a minimal fix, detect that there is no readpage() and disable
the optimizations that depend on it.
Change-Id: I6e2236cd53f893d77a8d6568eae7e200ad8d1ac0
Reviewed-on: http://gerrit.openafs.org/9949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dcd2b052b97bbef9e3d9952c9f8bfa0055381a39
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri May 24 14:02:11 2013 -0500
cacheout: Add -encrypt option
Add the -encrypt option to cacheout, for forcing communication with
servers over encrypted channels.
Change-Id: I1a2a9faf2fb72238102b018b7692a6691a7c0054
Reviewed-on: http://gerrit.openafs.org/9941
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 1e8788927ed61c7bcc1d8ccb2c50582488fcfb6e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue May 28 11:40:12 2013 -0400
Windows: cm_DumpServers "down" is string not enum
When dumping the state of the servers, "down" is a string not an
enum value.
Change-Id: I603755cf0db28515d01bc03253a4d3e6528b13aa
Reviewed-on: http://gerrit.openafs.org/9946
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fca4252621b80c5126e1ae3d84a54da5ebc677ba
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed May 15 15:19:22 2013 -0400
Linux 3.10: Include linux/aio.h directly
This file needs bits from linux/aio.h, but gets them indirectly
from the inclusion of aio.h by sched.h. That gets removed for
Linux 3.10.
Since this header is not of general interest elsewhere, just include
it directly here.
Change-Id: I432bde282a1c5425ba6780bca28e308bf70a79e7
Reviewed-on: http://gerrit.openafs.org/9912
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e37ec7817aae9a856be527bd9c8b920c1a2dbc03
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 13 06:45:34 2013 -0400
vol: return VNOVNODE if vnode is not allocated
If a request for a vnode fails because the vnode is not allocated
within the volume, the error returned to the client should be VNOVNODE to
indicate that the requested FID does not exist and not VIO indicating a
transient disk i/o error or other transient internal inconsistency.
Change-Id: I2f875593d4a49b7ca8ed26a2f147a1c3c9109a6d
Reviewed-on: http://gerrit.openafs.org/9902
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 68d32db60e3ba04341b00ac7886c620a0bae3ee9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat May 11 20:20:38 2013 +0100
Sort all libtool symbol lists
The original plan for the libtool symbol lists was that they be in
alphabetical order. This should make them easier to maintain, as it
becomes harder to accidentaly introduce duplicates, and makes merge
conflicts when adding new symbols less likely.
However, not all of them are properly sorted. Update the ones that
aren't. This was done with
for A in `find . -name *.la.sym`; do sort $A -o $A; done
Change-Id: I6a3fd621098466e8275b2e42c0fe54cfb38b5128
Reviewed-on: http://gerrit.openafs.org/9900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8ebe4ecac6d208a84c56ab5c08abf430145c6281
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Mar 5 19:38:34 2013 -0500
libafs: fix Afs_syscall definition for UKERNEL
For the UKERNEL case, Afs_syscall is prototyped and used as (void).
Make the function definition use the void keyword to avoid a warning
about an old style definition.
Change-Id: Ic22f58a6c646d6f557e5891ce2ed51fba50fba35
Reviewed-on: http://gerrit.openafs.org/9402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit eb7b3dac482ed0427b6e618bf60507a7a1a99769
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon May 20 11:32:04 2013 -0400
volser: -log restore operations
Add vos restore to the list of operations which are logged
when the volserver is running with the -log option. Example
log line:
admin on 172.16.50.141 is executing Restore 536870969
Change-Id: Ia6eb07258831865dfe2c85d1b9df078f33c4b640
Reviewed-on: http://gerrit.openafs.org/9926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c4fce52a5474310070dff812dfbb2bdbd4499ffe
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Thu May 9 10:43:36 2013 -0400
Remove kauth from libuafs
Remove the uafs_klog() apis from afs_usrops. Nothing uses it except
the obsolete afsweb stuff that isn't built anymore.
Stop linking in all kauth and pts components. Also remove some other
objects from libauth, rxkad, and com_err, that were only present as
dependencies of kauth and pts components
Change-Id: Idf83b3dd1098e874d90244fe72609666b13216a4
Reviewed-on: http://gerrit.openafs.org/9887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f805569211263e84b1b1c7ddfaf710cfa0d63dd6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 27 16:15:19 2013 -0400
man-pages: build bos getrestricted / setrestricted
build missing bos man pages on windows.
Change-Id: I37ccc402487bae04a7344a4276d246bd535bf1a6
Reviewed-on: http://gerrit.openafs.org/9944
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9b24013426e03a501fcaa6334ba5a9b48a8da3d1
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Mon May 6 20:20:07 2013 -0400
Linux 3.10: Replace create_proc_entry() with proc_create()
Add an afs_proc_create() compat function that uses the
appropriate kernel function based on a configure test.
Change-Id: I4f3929849af032f2a483bc06bc5769f64085f1c4
Reviewed-on: http://gerrit.openafs.org/9854
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit caa90b2d7a22549e586d92961b7a6b677e4c22e2
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Sat May 25 10:43:45 2013 -0400
volser: Adjust TLV tag range
Tag values up to D_MAX cannot be used as TLV tags, as the parsing
logic assumes anything up to D_MAX is a control tag. Adjust
MIN_TLV_TAG to 21 so that the TLV range sits just above D_MAX.
Change-Id: I8d55f536b82e209847400b5ac6689364abe44090
Reviewed-on: http://gerrit.openafs.org/9942
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 22907839904dcaa9676b796735bcf48e002573ab
Author: Dan van der Ster <Daniel.Vanderster@cern.ch>
Date: Fri May 24 10:12:14 2013 +0200
linux: remove linux osi_alloc hash stats
The bucket stat vector is maintained but never read. And it is
occasionally annoying since it can flood messages with
"afs_get_hash_stats: Warning! exceeded max bucket len ..."
Remove it.
Change-Id: Ibc2101c038e40c9ff6ab0401c89fd41af75ed831
Reviewed-on: http://gerrit.openafs.org/9937
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 25a0cf6fbc34988439172eb6c03477aa945c1071
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 23 16:57:21 2013 -0400
Windows: Return bytes_read count from cm_GetData
The existing interface for cm_GetData takes an input buffer and
a buffer size and no method by which the number of bytes read into
the buffer can be returned. Add an output parameter to permit it.
Change-Id: I777d2fba850fb39d4323b006e3c79afa5ff4c2ff
Reviewed-on: http://gerrit.openafs.org/9930
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7cca447e2343ccce9b36a3ebe9df1375882a9c34
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 13 15:33:42 2013 -0500
DAFS: Avoid useless attach2 error message
Since commit 53230846a202a50f6c3a61b38d62ccba8876f89d, attach2 logs an
error when we force a volume to an error state due to attachment
errors. This is to ensure that we never end up with a volume in an
error state without logging a message about it.
However, while this is useful for the fileserver, for non-fileserver
programs this situation is very common for VNOVOL errors and does not
represent an actual problem. For the fileserver, nonexistent volumes
should be caught before we hit attach2 (in e.g. GetVolume when we
can't find a volume structure), so errors here can be significant and
should be rare. But for e.g. the volserver, when we try to use a given
volume id, we just try to attach it directly, so if the volume doesn't
exist, we will hit this code path.
This can happen pretty often for the volserver, since many volume
operations try to determine if a volume already exists by trying to
attach it. In those cases, this error message is pretty much useless
noise. So, get rid of it if we are non-fileserver, and the error we
got is VNOVOL. It is not as important for non-fileserver that we put a
volume in an error state, since volume states are much more transient
for non-fileserver programs, since the volume structs don't stay
around very long.
Change-Id: Ie2c221af2b55af70d725f0f52dacbb7fd8788349
Reviewed-on: http://gerrit.openafs.org/9907
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ccb66323a0a74b35b44aa901a49490a5021d46e0
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon May 13 13:59:50 2013 -0400
vldb_check: print vlentry file offsets
To aid in debugging, consistently print the vlentry database "address"
and the file offset when displaying errors for vlentries. Print the
vlentry file offsets when printing all the entries with the -entries
option.
Change-Id: I3ef37e6654280f0cff9b2449da29aebe7c5e3aad
Reviewed-on: http://gerrit.openafs.org/9906
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7a89c4f94440ac1c8ebf16107ece3b56c178ffc9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon May 13 13:47:06 2013 -0400
vldb_check: cope with broken names and volids
Fix-up broken vlentry names and rw volid so entries can be looked
up in the vlserver and can be deleted with vos delentry if needed.
Change-Id: Ide4855b0ef149977b04e3f0b5c966b13dd1cf417
Reviewed-on: http://gerrit.openafs.org/9905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 50083ea0df9610d0c652931af58e013e7f494c19
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Apr 24 09:11:09 2013 -0400
linux: Fix leaked dentry reference in the revalidate op
In one error case, we exit the function without release the
reference on the parent dentry. This dangling reference can cause
an oops when the client is shut down.
Change-Id: I1632b581f6e7a557bb54a999dc1837c31b8381bf
Reviewed-on: http://gerrit.openafs.org/9802
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cc07c8b99ae56dc777a07b4b818a2fa6e8a7afa3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 15 15:37:39 2013 -0400
roken: export rk_vasprintf
missing on windows
Change-Id: I59778e0af6ba407efcdfbcbddec5f8be6e740951
Reviewed-on: http://gerrit.openafs.org/9913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 436836d81ad17d78ddfe794db0c3bbf8f31a2783
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 17 12:06:00 2013 -0400
Windows: Protect against infinite VIO retries
Keep track of the number of VIO errors reported by the file servers.
If the count exceeds 100, abandon the request.
Change-Id: I4d18ccca732802752c94c9ca1b36ca9a827c72de
Reviewed-on: http://gerrit.openafs.org/9923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 594c97675fd961b347b451bd000804962df1b721
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 16 15:47:11 2013 -0400
Windows: AFSNameArrayClone leak in AFSCommonCreate
Do not leak the AFSNameArrayClone if AFSLocateName fails.
Change-Id: I01ea5ac7261de2cd2e715e7d110cb5e09173938c
Reviewed-on: http://gerrit.openafs.org/9922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f4b78c3eb12afc70d5ff3021313d3f868cb9f661
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 16 06:47:13 2013 -0400
Windows: remove unused and leaked uniRootFileNameClone
In AFSCommonCreate remove the allocated but never used but leaked
'uniRootFileNameClone' Unicode string.
Change-Id: I02a4a1a2383c5a85f2a939b4d18e38def4cf2687
Reviewed-on: http://gerrit.openafs.org/9920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 975c11cb357f553f9f90a231546e0b42c6e79d31
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 13 10:09:11 2013 -0400
Windows: NotifyHardLink avoid null ptr reference
In AFSNotifyHardLink, if the TargetDirectoryCB out parameter is non-NULL
but pDirNode is NULL, do not attempt to increment the
DirOpenReferenceCount because doing so will trigger an exception.
Change-Id: I9d50e05aff9a4922113f814dd3d50e115725ecca
Reviewed-on: http://gerrit.openafs.org/9903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4a91ac6f8383daa0be43d15da3be7be8d54034ac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 9 12:26:31 2013 -0400
Windows: Fix trace msg typo in AFSDeleteDirEntry
The name of the function in the trace messages is wrong.
Change-Id: I7a1b86765ca8fde828615069c66e51f5e5dce4ca
Reviewed-on: http://gerrit.openafs.org/9899
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ad6e31d5fea221bf5eefcd35a416667bc7c1f9be
Author: Anders Kaseorg <andersk@mit.edu>
Date: Tue May 7 00:27:33 2013 -0400
Linux: osi_TryEvictVCache: Don’t skip the first dentry if D_ALIAS_IS_HLIST
An hlist doesn’t begin with a sentinel like a list does, so the old
code would skip the first dentry or crash with a NULL dereference if
there wasn’t one. Use the kernel’s list_for_each_entry or
hlist_for_each_entry macros instead of trying to do it manually.
Should fix a crash observed by Alex Chernyakhovsky on kernel 3.6 and
newer.
Change-Id: I6d7bd190013a0250ca896af8d5182df55a3376b0
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/9857
Reviewed-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 13a3ba7ba2d660a08925a3ccd05d74eedcf8c5cd
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed May 1 15:59:41 2013 -0400
pt_util: gcc warning fix
it's claimed these are not initialized before use.
squelch compiler errors. has to be in parent as otherwise
we will zero them in our loop where we potentially want the
parent group id, which is not on "this" line as we add members.
Change-Id: I3014765ad1935cbe20421560329b5bdf465db8af
Reviewed-on: http://gerrit.openafs.org/9840
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 00b230d693fa501d11a6a6d45f65b5a09499ebbf
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed May 1 15:58:50 2013 -0400
pt_util: be admin
cheat and use the noauth flag so we pass the admin checks
Change-Id: Ie064db4fb930529fe474317d096238c915d1ef5b
Reviewed-on: http://gerrit.openafs.org/9839
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c42912d6da6ff7536b1301b4fb7f556513e8692c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 9 21:48:16 2013 -0400
Windows: AFSCleanup move CCb access inside try block
A crash dump was examined which showed a deadlock due to the leak
of a SectionObjectResource in a code path in which the holding thread
could not have obtained it. The FileObject->FsContext2 (Ccb) pointer
referred to invalid memory which may have been due to pool corruption.
The only code path in which the SectionObjectResource is held exclusive
and then the Ccb pointer is used outside of a try-except block is in
AFSCleanup(). Move this reference inside the try-except block just in
case. If the Ccb is invalid, at least this way AFSRedirLib will catch
the exception and free the SectionObjectResource before continuing.
Change-Id: I08c9baacfc8897ae8d8b551a74976daf7effbcef
Reviewed-on: http://gerrit.openafs.org/9892
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dcae72c87e63b595c4e86cb199ff75332b51506a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 9 18:31:19 2013 -0400
Windows: AFSClose Set FsContext* to NULL
After the Fcb OpenReferenceCount is decremented it is no longer
safe for the Fcb pointer to be referenced. Set FsContext to NULL.
After the AFSRemoveCcb() call, it is no longer safe to reference
the Ccb pointer. Set FsContext2 to NULL.
Change-Id: I5be1367c599222df02269bf1ed85ec89ac5d279c
Reviewed-on: http://gerrit.openafs.org/9890
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6c42bc9090324a5ce57678b31b76ad5ef8ed1d34
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 9 18:30:42 2013 -0400
Windows: AFSClose remove dead code
Change-Id: Ia844d7e01bcf7a04a7115416e83d45bf5319d739
Reviewed-on: http://gerrit.openafs.org/9889
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d1577c80bb8f6752b775a64af68649b648c659d9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 9 18:28:09 2013 -0400
Windows: AFSCommonWrite do not leak SectionObjectResource
If the write request is neither an extending write nor a non-cached
write and (liStartingByte.QuadPart + ulByteCount) >=
pFcb->Header.FileSize.QuadPart, then the SectionObjectResource pointer
will be leaked. Instead release it before retrying.
Change-Id: Id1ea7a3829a6e2be19280f366e665a11e14fba62
Reviewed-on: http://gerrit.openafs.org/9888
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 641b2fd8d6a270a2fc202450ab8dce044afc48a2
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Thu May 9 12:30:39 2013 -0400
ubik: Avoid use of freed string
If cellName was just set to dir->cellName, afsconf_Close() will
free the string before fprintf uses it. Just change the order
so we don't access freed memory and print garbage.
Change-Id: I66792dc50addf2d8242f71923db09fcc178cc450
Reviewed-on: http://gerrit.openafs.org/9886
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2608ce67f1ba5ed1ed63525fad90db9d67547ec6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 8 14:10:01 2013 -0400
Windows: RDR_GetVolumeInfo do not always return success
If the call failed because all servers are down or all instances
of the volume are offline or busy, tell the caller. Do not return
fake data.
Change-Id: I4e89cefba19161c7d75cfdfd04a1cf7dfc2398f4
Reviewed-on: http://gerrit.openafs.org/9882
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5342de7a58c4516259fa48ee2d282bc6046830cb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 8 14:08:59 2013 -0400
Windows: cm_Analyze if no retry don't sleep
If error handling response is not going to result in a retry of the
call, do not sleep.
Change-Id: I12435612f94a2e6afb77b5a2975f90f66e02823a
Reviewed-on: http://gerrit.openafs.org/9881
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 663f32e93ec2d17ca59c64c8115cd51183ea3629
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 8 13:08:30 2013 -0400
Windows: only retry ALLBUSY for five minutes
Add a volbusyCount field to cm_req_t. Increment the count each time
CM_ERROR_ALLBUSY is processed by cm_Analyze for a given request.
Wait 15 seconds between retries and retry up to 20 times and then
fail. This prevents requests from blocking for a volume that isn't
going to come back online for hours.
Change-Id: I25e68565700dddceebecedf552d1e04cbe39b22a
Reviewed-on: http://gerrit.openafs.org/9876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a63e6747abd33fef40da16312dfc22d052bffd00
Author: Ben Kaduk <kaduk@mit.edu>
Date: Thu Mar 28 17:10:29 2013 -0400
FreeBSD: VOP_MMAP has been dead since 1996
Clang complains that our (K&R!) declaration of struct vop_mmap_args
will only be visible within the (empty) function.
With the kernel's CFLAGS, though, this is fatal.
Remove the dead code.
Change-Id: I8fd768b36b73f9e2f727dae4e748931f307444c8
Reviewed-on: http://gerrit.openafs.org/9856
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 79c7b34afd3231a80a7aa4f163b89cb6eca4dfb7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue May 7 21:50:40 2013 -0400
Windows: Release Notes updates
Document ReparsePointPolicy registry value.
Document known Explorer Shell Paste bug.
Update ShortNames registry value.
Document Cygwin 1.7.18-1 support for AFS Symbolic Links.
Change-Id: Ifdcea9c71fb23d4e9cf9ad50907dd6f50c5c619e
Reviewed-on: http://gerrit.openafs.org/9869
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4cda20f3d7846b10905645ec915a3ea29bce4f28
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 6 15:12:54 2013 -0400
Windows: AFSLibExFreePool*() macros
Introduce the AFSLibExFreePool() and AFSLibExFreePoolWithTag() macros
which simply call ExFreePool() and ExFreePoolWithTag().
The prefix AFSLib indicates that memory allocated by
AFSLibExAllocatePoolWithTag() must be freed before unloading.
AFSExFreePool*() cannot be used because that is a pointer to a
function provided by AFSRedir.sys which may not be assigned when
memory must be freed.
The only time that ExFreePool() should be used is if the memory was
allocated by a system function.
Change-Id: If56b762d2b6d857dbe415171401d64ca10a1e9ea
Reviewed-on: http://gerrit.openafs.org/9853
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b655055a2693c44605995abe638673d842ebd5d9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 6 15:05:10 2013 -0400
Windows: Use AFSLibExAllocatePool for library local
If the memory allocation is for an object that must be freed before
the afsredirlib.sys driver unloads, use the AFSLibExAllocatePoolWithTag
interface. AFSExAllocatePoolWithTag allocates the memory from
afsredir.sys which prevents Verifier from being used to detect leaks.
Change-Id: I3e384ff2da069a594d2cafe7b4b1a9bb942cbd08
Reviewed-on: http://gerrit.openafs.org/9852
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5ea6e66433826c9745e4a211bd2801995e35fa5e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue May 7 18:36:16 2013 -0400
Windows: RDR_Initialize must cleanup threads on failure
If RDR_Initialize() fails after instantiating the worker thread
pool it must call RDR_ShutdownFinal() to destroy the pool before
exiting. Otherwise, the threads will spin endlessly as each
DeviceIoControl call to the redirector fails.
Change-Id: I347a509703a44c6b8ca25a084ea10dc0df801eb9
Reviewed-on: http://gerrit.openafs.org/9860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ff2a5fed4da67907cc86162553d3689db3a22c06
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 17 18:21:40 2013 -0400
Windows: IOCTL_AFS_GET_DEBUG_TRACE
Pemrit the active Debug Flags and Trace Configuration to be
queried by administrators.
Change-Id: I0c798bd2eb8f2445c81a0b45c112bbaf72d15522
Reviewed-on: http://gerrit.openafs.org/9798
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit edea22524a4d348f570e969dd75cd7f9e3876b32
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 17 18:18:30 2013 -0400
Windows: Add IOCTL_AFS_GET_REPARSE_POLICY
Introduce IOCTL_AFS_GET_REPARSE_POLICY to permit the global
and active authgroup reparse point policies to be queried.
Change-Id: I9ec4bfd177cac1a4ed77f3b376694ec6864a479c
Reviewed-on: http://gerrit.openafs.org/9797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aa09c830709a4f5bbe5c259e0934e4bed4b8e832
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 14 21:08:20 2013 -0400
Windows: "ReparsePointPolicy" registry key
HKLM\SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters
DWORD "ReparsePointPolicy"
Valid values are:
0 - No global policy set
1 - Reparse Points to Files treated as the target File
Change-Id: Ib8f4f6a4c5c3b2faaf86a6650a4ce3ebcbbdf0e0
Reviewed-on: http://gerrit.openafs.org/9789
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6a3eca32a6a89bf533d3075ac5cb3b24da1b1326
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 3 23:10:51 2013 -0500
Windows: CreateFile Reparse Point to File as File
Apply the Reparse Point to File as File Policy to CreateFile. If the
FILE_OPEN_REPARSE_POINT flag is specified to the CreateFile operation
and AFSIgnoreReparsePointToFile() returns TRUE, evaluate the target
object (if possible) and if the object is a FILE, then ignore the
FILE_OPEN_REPARSE_POINT flag. Otherwise, re-evaluate the request to
attempt to open a reparse point if it exists.
Change-Id: Ia1a3d5f4c4d638d7d94209c9b4a9dfc2e8aa2005
Reviewed-on: http://gerrit.openafs.org/9343
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dfd8ec397cc24b7ed991a5ef9c544162a7228abc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 2 01:06:52 2013 -0500
Windows: DirControl Reparse Point to File as File
Implement the Reparse Point to File as File Policy for directory queries.
Change-Id: I6458ae4721f6d8ddea59e78731893fa7b108de19
Reviewed-on: http://gerrit.openafs.org/9342
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f782d1dd20ee6048ca165e808adc9a01b2666746
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 14 18:57:53 2013 -0400
Windows: AFSRedirLib AFSIgnoreReparsePointToFile
AFSIgnoreReparsePointToFile() is a helper routine that uses the
global reparse point policy to decide whether or not a reparse point
whose target is a file should be reported to applications as a file.
When per-AuthGroup or per-Process policy is supported, this function
should be modified.
Change-Id: Ifa1b82f92859ede1cef311680ff93a1e38a81a6d
Reviewed-on: http://gerrit.openafs.org/9788
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1ff59729dce57dbcf02e593310e7065d92d73bb7
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Feb 27 08:51:44 2013 -0700
Windows: IOCTL_AFS_SET_REPARSE_POLICY
IOCTL_AFS_SET_REPARSE_POLICY is a new ioctl that can be executed
by anyone to alter the behavior of AFS Symlink-to-File reparse point
processing. Policy can be set for a global default or for the active
authentication group. If the AFS_REPARSE_POINT_TO_FILE_AS_FILE policy is
active, afs symlinks will not be reported as reparse points if the symlink
target is known to be a file.
This patchset implements the ioctl but not the "reparse point to file as
file" functionality. Per authgroup policy setting is not permitted by the
ioctl but is not supported at this time.
This patchset was modified by Jeffrey Altman.
Change-Id: I6fd8b3c7f94dd97e15d6b82642f43cb2d8193563
Reviewed-on: http://gerrit.openafs.org/9341
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5ae397146a8b33eb924f6a3420e2247f1986b1ad
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 4 11:56:30 2013 -0400
Windows: Report Case Sensitive Search
Return the FILE_CASE_SENSITIVE_SEARCH volume flag as part of afs
volume properties. NTFS does and our search algorithm is case
sensitive first, then case insensitive.
Change-Id: I64857cdf8712847064c8271956cebe2bdbe487df
Reviewed-on: http://gerrit.openafs.org/9850
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0e2d4c0fcb45389d20dad93ae29b1c84364b59bf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 3 11:23:31 2013 -0400
Windows: Introduce CM_CONN_FLAG_NEW
The new CM_CONN_FLAG_NEW flag is set on the cm_conn object whenever
a new rx_connection has been created. The flag is cleared in cm_Analyze
if the call succeeded or if the error is one that is generated as a
result of communicating with the peer. If no communication with the
peer has taken place the connection is considered "new".
For errors that would result in forcing a new connection, check whether
the existing connection is already "new". This avoids an extra
RX_CALL_DEAD timeout period in the case where a "new" connection was
already in use.
Change-Id: If23a5f4b98e7599e4b4e62b474661e9d91aba81b
Reviewed-on: http://gerrit.openafs.org/9847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1fed4439da374a134975726c1e1efa52a5359264
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 3 11:21:39 2013 -0400
Windows: Use interlocked ops for cm_conn flags
cm_conn flags can be modified by multiple threads.
Use interlocked operations for thread safety.
Change-Id: Iaaec54ca0962f8f78e1ddaee2c0a8a68041f5ed9
Reviewed-on: http://gerrit.openafs.org/9846
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b5550d1877ceb1660d8058e8bc3609d6d85fbb41
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Fri May 3 09:11:50 2013 -0400
Windows: Use mtafsutil library when linking with pthreads
Use the multi-threaded version of the util library in a few places
that are linking with pthreads but use the standard version.
Change-Id: If4b72d4785fb3bfac9b7c133d323ebf95c72f804
Reviewed-on: http://gerrit.openafs.org/9844
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e6a2bf764993b6ae6c6f194a0398a70b70a32983
Author: Marc Dionne <marc.dionne@your-file-system.com>
Date: Wed Apr 24 16:05:51 2013 -0400
doc: Fix a few typos in vlserver man page
Fix a few errors in the vlserver manpage, a typo in a word and a
few missing delimiters that mess up the formatting slightly.
Change-Id: I1ec9887dfcbfd4f2a38c0a15fe7760d99682a194
Reviewed-on: http://gerrit.openafs.org/9804
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7eed34dc81e4543e31007e5f33f9913a5b9584c4
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu May 2 08:32:51 2013 -0400
dasalvager: use pthreads
salvageserver already uses this code, and it appears to do the
right thing.
Change-Id: I4c0f2ec503f2388a1483e89a04ff78eda270659b
Reviewed-on: http://gerrit.openafs.org/9843
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 53ac98931adf9f04c150d9bc084cae31f3913476
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed May 1 16:07:09 2013 -0400
pt: let pt_util create the groups it wants
if you are rebuilding from pt_util, data sanitization should
not randomly chown and/or rename your groups. likewise,
an admin should have the ability to do this.
Change-Id: Id76cd16acc4af712b9be6d0c7110e8db10ce3fff
Reviewed-on: http://gerrit.openafs.org/9841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 32d823c52f212fb79816708418ad7d958eb32a01
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Tue Apr 30 21:59:32 2013 -0600
doc: quote list items in POD
Recent versions of Pod::Simple complain if we use integers or other
special characters in an =item list. We have a couple bulleted lists
that happen to have integers or other special characters as the list
values. Quote the items with C<> so that Pod::Simple can correctly parse
them again.
Change-Id: If456781fe219b73ae01feb9aef2fb2639e097534
Reviewed-on: http://gerrit.openafs.org/9838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d97c96d67f61b797df6ceee410ac4a66b48f8f5d
Author: Ben Kaduk <kaduk@mit.edu>
Date: Thu Apr 25 17:47:06 2013 -0400
Remove unused variable
volser has apparently never supported bcrypt from the intial IBM
import. There's no need to keep around the code to fetch that key.
Change-Id: I6c903f0016ef8129da7e52b4f08b38c390b847e9
Reviewed-on: http://gerrit.openafs.org/9808
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9c391e7f7d0e5dfdfe947d385e2db9a8b8ca3610
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 30 11:30:15 2013 -0400
pt_util: fix group line check for input files
Fix the check for requiring group lines before any membership lines. Do
not clear flag indicating the presence of a group after reading each
line. (This error was caught by the pt_util-t unit test.)
Fix for commit 12ced70c95fe8efbcec09a372f0af81d819bb8cd
Change-Id: Iaa47e3ab7936668e8a5b761dd8d3f933d459a16a
Reviewed-on: http://gerrit.openafs.org/9832
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 04605389d7ac89c32e4b2576d4894b4da94d3a24
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 30 15:38:24 2013 -0400
tests: make a plan for man page checks
Split the man page check routine into two routines; one to get the list
of sub-commands for a command, and another to verify a man page exists
for each sub-command. Use the list of sub-commands to set up the
Test::More plan before running the tests.
Setting the plan before running the tests allows the the man page tests
to run on systems which ship older versions the Test::More module.
Change-Id: I1ed6fb87989e1deff4696562f3b917140592ed17
Reviewed-on: http://gerrit.openafs.org/9835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b88ff242df03f7332945793422e7c16c423b7e76
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 30 19:57:21 2013 -0400
tests: posix signal constants in rx/perf test
Export the posix signal constants in the rx/perf perl test. Fixes a
perl syntax error on solaris.
Change-Id: Iaad361b8533787f9ad97fa00221e01e687f50723
Reviewed-on: http://gerrit.openafs.org/9836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 479c34614f33859131258e330e7a3f8494e0bc80
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 30 14:37:54 2013 -0500
afs: Do not invalidate all dcaches on startup
Commit 20b0c65a289e2b55fb6922c8f60e873f1f4c6f97 changed
afs_UFSGetDSlot to always treat a dslot entry as invalid if
'datavalid' was 0. This was to force the invalidation of the given
dslot if we were reading in a dslot from the free or discard list,
since the data in that dslot is not valid.
However, 'datavalid' is also 0 when we read in dcache entries from
disk on startup. So, this means that we invalidated all cache entries
when the client started up, effectively making our persistent cache
worthless.
Fix this by only forcing this invalidation when we are reading from a
free or discarded dcache, and not during the initial cache scan. That
is, when 'indexvalid' is 1, and 'datavalid' is 0.
The parameters for these Get*DSlot variants should maybe be changed to
be a little more clear, but for now, this is a targeted fix for this
specific issue.
FIXES 131655
Change-Id: Ic23f1e17cd966b8468849f54fc6fda37e1f61c0c
Reviewed-on: http://gerrit.openafs.org/9833
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a7165067d79814bacabd55e9bab66c6a3ae45b76
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 24 23:30:53 2013 -0400
Windows: pSrcObject instead of pSrcFcb->ObjectInformation
In AFSSetFileLinkInfo and AFSSetRenameInfo consistently use the
variable pSrcObject instead of pSrcFcb->ObjectInformation. pSrcObject
is a local alias. Mixing both forms in the same function is confusing.
Change-Id: I6b078d783389eb57ed5d36cbc463018e6199e17d
Reviewed-on: http://gerrit.openafs.org/9810
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cb9d0ff3da5c42667afb6f702523d1ffd2d72a5f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 17 20:17:09 2013 -0400
Windows: AFSLocateNameEntry incorrect pCurrentObject
pCurrentObject is supposed to be an alias for pDirEntry->ObjectInformation
but it was not always being updated when pDirEntry was replaced. As a
result several tests were being performed incorrectly and the wrong data
was being logged.
Change-Id: I69913788acd243d0bfdfee88e281a1eaa2adca6a
Reviewed-on: http://gerrit.openafs.org/9809
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 18ba93882f9dad15899624bc4f439e70d584982a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 17 18:35:36 2013 -0400
Windows: More ObjectInformation RefCnt Protection
Protect addition ObjectInformation Reference count
transitions with the VolumeCB.ObjectInfoTree.TreeLock.
AFSProcessUserFsRequest
AFSSetRenameInfo
AFSInvalidateCache
AFSInvalidateVolume
AFSAllocateObjectInfo
AFSDeleteObjectInfo
AFSGetObjectStatus
AFSDeleteDirEntry
Change-Id: Icd108bb8253e5e84c673f3de04f882afea725274
Reviewed-on: http://gerrit.openafs.org/9799
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5952cc139c102035591e8c95bbba313cf709d332
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 13 01:57:56 2013 -0400
Windows: AFSExamineVolume drop TreeLock if waiters
After each call to AFSExamineObject drop the ObjectInfoTree.TreeLock
if there are threads waiting for access. The garbage collection process
should not delay real work.
Change-Id: I2bd009d71b534d92d7e1b321b6db2204643e4666
Reviewed-on: http://gerrit.openafs.org/9786
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a6037b153d78791d68b694a487456fbb52e410d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 13 01:56:39 2013 -0400
Windows: AFSPerformObjectInvalidate hold TreeLock
When decrementing the ObjectInfoCB reference count hold the Volume's
ObjectInfoTree.TreeLock shared.
Change-Id: I6ac2fe3cc19bcc97a2a6e38f2e1a4b3d0952b304
Reviewed-on: http://gerrit.openafs.org/9785
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d2b54c0ac42625715e9f74e06fa20820c2b7aa28
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 13 01:55:26 2013 -0400
Windows: ObjectInfoCB update last access time
Each time the ObjectInformationCB object is looked up
from the ObjectInfoTree the LastAccessCount field should be updated
except in cases of invalidation, garbage collection, and extent
processing. This is particularly important when an ObjectInfoCB
is attached to DirectoryCB in AFSInitDirEntry and when constructing
directory snapshots or validating directory content.
Change-Id: Ife412b723a1bdc922ffdfeca71061fcfd1ce721a
Reviewed-on: http://gerrit.openafs.org/9784
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c51e9b35813b8630a297094df722d2f2a2e60927
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 13 01:52:45 2013 -0400
Windows: AFSFindObjectInfo update last access time
Add a boolean parameter to AFSFindObjectInfo() which is used
to indicate whether or not the last access time for the found
ObjectInfoCB should be updated.
Set the new parameter in all calls to AFSFindObjectInfo().
Change-Id: Ib50d772af6857db7b8c13f2054e910f1ef5a1b7e
Reviewed-on: http://gerrit.openafs.org/9783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ed76e573ae5db4fb83d57217562c4998ffa845cb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 12 11:12:13 2013 -0400
Windows: AFSInvalidateVolume ObjectInfo refcnt decrement
In AFSInvalidateVolume a reference count is obtained in order to
ensure that the object is valid throughout the invalidation request.
Although the refcnt is obtained while holding the TreeLock the refcnt
was not released while holding the TreeLock which could open the door
for another thread to race.
Change-Id: I5c7ee91b78a2ce5f03cdc5f835b15357ecbec443
Reviewed-on: http://gerrit.openafs.org/9782
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a1aa06e82ca770456884b1b96b4f0c109cd06a85
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 12 10:58:47 2013 -0400
Windows: AFSInitDirEntry allocated ObjInfoCBs valid
In AFSInitDirEntry the pattern was to find or allocate an
ObjectInfoCB then destroy it if the DirectoryCB creation fails
for some reason. The problem with this approach is that once the
VolumeCB ObjectInfoTree.TreeLock is dropped the ObjectInfoCB is findable.
That means that the contents of the ObjectInfoCB must be valid.
This patchset makes three changes. First, in the case where the
ObjectInfoCB is allocated, the fields of the ObjectInfoCB are populated
from the DirEnumEntry before the TreeLock is dropped. Second, if the
DirectoryCB allocation fails the ObjectInfoCB is not deleted. It is
perfectly valid and can be used by a subsequent AFSInitDirEntry call.
Perhaps one that is racing with this thread. It will eventually be
cleaned up by the AFSPrimaryVolumeWorkerThread. Finally, when the
ObjectInfoCB reference count is decremented the TreeLock is held shared in
order to prevent races with other threads that might be incrementing it
themselves.
Change-Id: If3091d4fa640bbb614a1a405c3afc910d649aad6
Reviewed-on: http://gerrit.openafs.org/9781
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9fd825790e4e61aa5fdf8996874fc9be8b1d1cc0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 12 01:53:54 2013 -0400
Windows: AFSSetDispositionInfo Verify Dir Enum
Before testing whether or not a directory is empty, the directory
must be enumerated. If it is not, enumerate it.
Change-Id: I0302733821e1d5c6be3198be7fe75333d8e01245
Reviewed-on: http://gerrit.openafs.org/9780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e11da4c5869a0534b7767e2566d4743bc7e8189e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 25 11:16:11 2013 -0400
Windows: Reset CM_VOLUMEFLAG_RO_SIZE_VALID flag
The CM_VOLUMEFLAG_RO_SIZE_VALID flag was being reset using the
wrong field which resulted in the flag never being cleared and
the correct volume size not being reported.
Change-Id: Ic6cefcefcd2c0ad20ad79a98cf0603f09efabcba
Reviewed-on: http://gerrit.openafs.org/9805
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4512b47be83d708f4dfe6e45a205653635658c23
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 24 23:33:13 2013 -0400
Windows: fail if pSrcParentObject cannot be resolved
In AFSSetFileLinkInfo and AFSSetRenameInfo return STATUS_INVALID_PARAMETER
if pSrcParentObject cannot be determined. Otherwise, a NULL pointer
dereference will occur.
Change-Id: I0e265433aa85066005e90b3584f8e865c5be79c8
Reviewed-on: http://gerrit.openafs.org/9807
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0653c81c2abc658f32e07fc6cc1a1ff2b35a9041
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 24 23:34:45 2013 -0400
Windows: SetFileRenameInfo Do not replace pSrcParentObject
If pSrcParentObject is replaced by pTargetParentObject then the
reference count obtained by the AFSFindObjectInfo() call at the
start of AFSFileRenameInfo will be released on the wrong object.
This will result in a reference leak on pSrcParentObject and an
undercount on pTargetParentObject. pTargetParentObject can then
be garbage collected while it is in use.
Change-Id: Id10db257afbd4996a31eb98ad7eca69343297274
Reviewed-on: http://gerrit.openafs.org/9806
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e31240732cbe449fedea5095037ac08d1d513fa9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Apr 17 18:04:58 2013 -0500
LINUX: Sometimes let dentry_open handle refcounts
When Linux changed dentry_open to use a 'path' argument, they also
changed it so dentry_open handles incrementing the relevant ref
counts. So now, sometimes we need to inc the dentry and vfsmount
refcounts ourselves, and sometimes we need to leave them alone.
To accommodate this, change afs_dentry_open to also handle refcounting
itself, and 'get' the given dentry and vfsmount if necessary.
Also note that currently, afs_linux_raw_open can call afs_dentry_open
twice in the case of an error, but it does not dget(dp). This means
that dp could be undercounted, since dentry_open on older kernels will
dec the refcount on the given dentry in the case of an error. This
change should also fix this so dp is not undercounted in that case.
FIXES 131613
Change-Id: I0e9deb7ce57633ff65b76d2444a0416ecbe329fd
Reviewed-on: http://gerrit.openafs.org/9801
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
commit a373f0b7461158c8f17bad9a5d0511d67c765a0a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Apr 17 17:39:09 2013 -0500
Revert "LINUX: Avoid duplicate mntget in afs_linux_raw_open"
This reverts commit 5ccbbda19f11e7027300409c46715155f439424a.
dentry_open, at least on older kernels, decs the refcount on its
arguments in the case of an error. So calling mntget for each
dentry_open invocation actually is the correct thing to do.
This code may need to be further fixed in order to work for newer
kernels, but for now, at least put it back the way it was so we don't
undercount ref counts on older kernels.
Change-Id: Ie5e064b065bc41321c1cea8e0272cc4ea697e3b5
Reviewed-on: http://gerrit.openafs.org/9800
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2632c3f459dc47946b2e973c045056c3dca719f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 12 01:14:39 2013 -0400
Windows: RDR_DeleteFileEntry test for empty directory
RDR_DeleteFileEntry should check to see that a directory entry
that is a directory is in fact empty. The most frequent use of
RDR_DeleteFileEntry is to check whether the object can be deleted
prior to setting the DeletePending state which in turn results in
the object being deleted during Cleanup. If the directory is not
empty during Cleanup it is too late for the error to be seen by
the application.
Change-Id: I3207bab0527406e3003e97bccf4195abeed31423
Reviewed-on: http://gerrit.openafs.org/9779
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6c73b8350a4bc67db271a5294c5fdf1e51e9033a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 12 01:11:22 2013 -0400
Windows: cm_MapRPCErrorRmdir EEXIST == ENOTEMPTY
If the file server is asked to remove a directory that is not empty
one might expect it to return UAENOTEMPTY but instead it returns UAEEXIST.
The error translation function cm_MapRPCErrorRmdir did not include
EEXIST in the list of errors that convert to CM_ERROR_NOTEMPTY.
Prior to IBM AFS 3.5 the file server did return ENOTEMPTY and if a
particular platform did not define ENOTEMPTY, ENOTEMPTY was defined to
be EEXIST. To late to change things back now.
Change-Id: I737ff468575a088e9299a5134b31142dd0ba555e
Reviewed-on: http://gerrit.openafs.org/9778
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5e8bfcb42cbb3652238fec2dbe1c1d65bc2c1ccd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 12 01:09:13 2013 -0400
Windows: cm_BPlusDirIsEmpty
Provide a function to determine if a directory is empty or not.
Change-Id: Ib1fa642b02ad67ffdba73da1b7c6091a799de0c3
Reviewed-on: http://gerrit.openafs.org/9777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit eb5190eb4a7cd95166866a89e0a8f3a69bbc6e8f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 29 13:40:41 2013 -0500
Make ihandle sync behavior runtime-configurable
The actual behavior of FDH_SYNC has changed a bit over the years, and
some people want one behavior, and some want another. Make it possible
to make this choice at runtime with the new -sync option, instead of
making this decision by running with different patches.
Note that FDH_SYNC is not a macro anymore, nor is it an inline
function. While it could be a macro, it would look a bit complex, and
there are some oddities with trying to use vol_io_params inside the
FDH_SYNC expansion (vol_io_params is not declared for LWP, for
example). And having it be an inline function causes problems with
some odd linking dependencies. For example, vlib.a contains volume.o,
but does not contain a definition for DFlushVolume (dir/buffer.c),
which is referenced in volume.o. 'vos' uses vlib.a, but does not
bring in anything that defines DFlushVolume. Currently this appears to
not cause a problem because 'vos' uses nothing from volume.o, so the
dependencies of volume.o don't matter. Adding an inline FDH_SYNC for
platforms that don't support 'static inline' would add a dependency to
volume.o (via vol_io_params), which causes an error for the lack of a
DFlushVolume.
Those are possibly just some problems, and may not be all. So instead,
make it so we don't have to deal with that and just have a normal
function. While FDH_SYNC may be called in a performance-critical
section, the overhead of a real function call is nowhere near the
delay of an actual fsync(), so presumably any overhead doesn't matter.
Change-Id: I23620bd8ac31b9019e9d55cb46ec9f3a75f5675c
Reviewed-on: http://gerrit.openafs.org/9694
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5ccbbda19f11e7027300409c46715155f439424a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Apr 17 01:33:07 2013 -0500
LINUX: Avoid duplicate mntget in afs_linux_raw_open
In the unlikely event that our afs_dentry_open call fails with
cache_creds, we call afs_dentry_open again with the current creds as a
fallback. However, we call mntget on afs_cacheMnt for each call. So if
we actually hit the second call, we'll have added 2 refs to
afs_cacheMnt, but we only actually opened one file, causing a slight
overcount on afs_cacheMnt refs.
To avoid this, just call mntget once, before any of the
dentry_open-related calls.
Change-Id: I7ec3e8c193dd7782ab629fb5d7615d83f8385b6c
Reviewed-on: http://gerrit.openafs.org/9791
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e019429d4548348c6ab8674305d985feee040476
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Apr 17 01:27:47 2013 -0500
LINUX: Avoid duplicate mntget in afs_dentry_open
Our caller already got a ref to 'mnt'; getting another one here will
overcount refs on 'mnt'.
This can make it impossible to unmount the filesystem the cache
resides on (even after the client is stopped), since it's ref count
will be very high.
FIXES 131613
Change-Id: I3f0cd0fd6c0c2ced74f2d799ea0d8f8701a20141
Reviewed-on: http://gerrit.openafs.org/9790
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7647c6c4a1a23bdf3ffe502d31f26ed052d0378a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 11 09:20:03 2013 -0400
Windows: cm_Analyze VICECONNBAD and VICETOKENDEAD
cm_Analyze forces new rx connections in response to VICECONNBAD and
VICETOKENDEAD errors but failed to mark the cm_req_t with
CM_REQ_NEW_CONN_FORCED and failed to set 'forcing_new' to true ensuring
that a retry would take place even if the cm_req_t included the no retry
flag.
Change-Id: Ieb2bf141279192a591eb66eacab8150c10d029ce
Reviewed-on: http://gerrit.openafs.org/9773
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 545ea65599230641ffaaff4077f72430aa5e7038
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 11 09:17:53 2013 -0400
Windows: Force new connection upon RXKADEXPIRED
cm_Analyze invalidated the credentials for the cell upon receiving an
RXKADEXPIRED error from a server but failed for force the establishment of
a new rx connection to the server. As a result, the expired credentials
would continue to be used until the credential expires.
Change-Id: I93a4146d5ca708ce1cca467e7e5f72fea950f8ae
Reviewed-on: http://gerrit.openafs.org/9772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6580f37357e9c9c85404d81fb0fca8eb3e28b3c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 9 10:48:12 2013 -0400
Windows: Comment CommonWrite VDL Change
Add a comment reminding the reader that CcSetFileSizes only needs
to be called on a ValidDataLength change if the VDL value has decreased.
A write operation cannot result in a decrease therefore CcSetFileSizes
does not need to be called from within AFSCommonWrite().
Change-Id: Iaf867ec876a6265dc2c8a7ba2319fdf67503a467
Reviewed-on: http://gerrit.openafs.org/9757
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aa0046a7220d8b21f2694d7f9534d7383422731b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 9 10:35:52 2013 -0400
Windows: CcPurge range modified by non-cached write
When a non-cached non-paging write occurs, the update bypasses the
Windows cache. As a result any cached data in the modified range is
now invalid and must be purged.
CcPurgeCacheSection is known to trigger some filter drivers to open
the file from a worker thread. To avoid a deadlock on the
Fcb->NPFcb->Resource that resource must be dropped. Holding the
SectionObjectResource exclusive is sufficient to protect against races
with other writes, reads and SetEndOfFile operations. While purging the
cache prior to calling the service might be more desireable, it cannot be
done safely without violating the lock hierarchy. Therefore, the purge is
performed after any call to the service completes.
Change-Id: I953a74a0675875eb6be85f85ce924473deb3347f
Reviewed-on: http://gerrit.openafs.org/9756
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7bb300ad2cfe2fec9698523c59a4e800b4fe635a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 9 08:12:29 2013 -0400
Windows: Race between NonCached and Cached Writes
The following race was identified by Rod Widdowson.
A. File is complete up to 1000 Eof=1000, VDL=1000
B. File Eof is set to 2000. Eof=2000, VDL=1000 (SetInfo doesn't move VDL)
C. Locks dropped.
Thread1) Write comes in for 1000 for 500. This is not extending.
Locks taken shared.
Thread1) Data Written to Server. Thread stalls.
Thread2) Read comes in for 1000 for 1000. Locks taken shared
so it proceeds.
Thread2) CcRead calls CcZero and so the cache get zeros from 1000 to 2000
Thread1) VDL moves forward.
The windows cache is now poisoned between 1000 and 1500 and protected by
the VDL. Any future reads gets the wrong data and any write to that part
will cause an overwrite of zeros.
Instead of holding the Fcb->NPFcb->Resource and
Fcb->NPFcb->SectionObjectResource shared during a NonCached write, hold it
exclusive because the write is occurring behind the back of the windows
cache.
Change-Id: I2244e1247dcee2c3ca0d95e6ee11de3187d491c5
Reviewed-on: http://gerrit.openafs.org/9754
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4a40c1f663590a8e402a0109967fdff58df56385
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 6 16:38:59 2013 -0400
Windows: DirectIO AFS_INVALIDATE_DATA_VERSION
Implement cache flush and purge operations in response to
AFS_INVALIDATE_DATA_VERSION requests when DirectIO processing is in use.
Change-Id: Ib97b1ecd0d9f65b8648f2d7d01ee7043d6be2b83
Reviewed-on: http://gerrit.openafs.org/9744
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 16feb54d0e194f1b429ab938667babd132a7cb52
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 6 16:31:07 2013 -0400
Windows: AFS_INVALIDATE_DATA_VERSION only by service
Let the service make all decisions regarding when a data version
invalidation should be initiated. If during directory enumeration
or entry validation a data version change is noticed, that is an
indication that the meta data should be updated.
Change-Id: I8872fb5500b08ef2c6b64ab5fd13beeee4267aa2
Reviewed-on: http://gerrit.openafs.org/9743
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 20328455d1519936f78025727d42ae91cf8e1e7d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 7 08:26:18 2013 -0400
Windows: Update ValidDataLength on all nonPagingIo
Instead of updating the Fcb->Header.ValidDataLength only when
processing cached writes, update it for all non-PagingIo extending writes.
This ensures that a file that is extended by a mixture of cached and
non-cached (NO_INTERMEDIATE_BUFFERING) writes will properly trigger a
page fault when the Windows cache manager does not have a complete page
cached.
Change-Id: I255bb667e33fadd07eb8961901d33707812a8406
Reviewed-on: http://gerrit.openafs.org/9742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3cf2d46a8c29039a6c8d33a952888370aa885801
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 8 08:56:31 2013 -0400
Windows: hold locks during non-cached writes
Writes can alter both the EndOfFile (Fcb FileSize) and the ValidDataLength
which must remain synchronized with the data known to the service.
Dropping the Fcb.Resource and the SectionObjectResource prior to
performing non-cached writes opens the possibility of a race in which
data changes and length updates can be altered independently.
Efforts are made to avoid holding locks across calls to the service
because they can result in deadlocks with object invalidation or extent
management. However, object invalidation for data version changes are
now handled in a worker thread. It should be safe to hold onto the
Fcb Resource and SectionObjectResource across non-cached write processing.
The locks are not held in the paging IO path so paging non-cached
writes (which cannot be extending) will not prevent cached writes from
taking place in parallel.
The reason it is critical for the ValidDataLength and the FileSize to
remain in sync with the data for non-paging non-cached writes is that
these values are used to determine whether the Windows cache manager
should trigger a page fault to read data from the service upon receiving
an extending cached write that doesn't fill the page.
Change-Id: If3edb2a7412623dbec10a6efd2ee8d3b92ac992d
Reviewed-on: http://gerrit.openafs.org/9745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 675cd4b2c2e1202f75e42ebb3f0cf898ae5d4661
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 8 23:41:48 2013 -0400
Windows: DOS Device VolumeInfo max name length
In 1.7.2200 the AFS Redirectory began to return
cellname{%,#}volume
as the volume label in the Volume Information response. For UNC
paths this is fine but for DOS devices on Windows 7 and earlier returning
a volume label that is longer than the NTFS maximum label length (32
characters) results in the Explorer Shell treating the volume as if it
does not support long file names.
From this patchset forward if the FileObject->FileName indicates that
the query is for a DOS Device, only return the AFS volume name and not the
cell informmation in the Volume Information response.
FIXES 131632
Change-Id: Iee26a00e0042e2594a5e039ee57688b61b10da45
Reviewed-on: http://gerrit.openafs.org/9751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3b6cbed404d5a2d7d189406ba8dbd3a0e41c817a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 8 23:37:39 2013 -0400
Windows: \\afs\all is not a server for NP enumeration
\\afs\all is a special share name that refers to the global root
which in the AFS redirector is actually \\AFS. However, from the
perspective of the network provider interface \\afs\all is just a
share which refers to a directory. Do not treat attempts to evaluate
it as if they were the same as evaluating \\AFS. One is a global
enumeration (\\AFS) and the other is just a hidden share name.
Change-Id: I24af24ec005c729bb1430c55254f2b68689932ed
Reviewed-on: http://gerrit.openafs.org/9750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 16a42ac3adcb1f5f8c9f9f83b8a0d306711b3077
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 8 21:54:57 2013 -0400
Windows: AFSConfigureTrace process DebugFlags
Do not ignore the DebugFlags value if it is only value that has
been changed.
Change-Id: Ibaad12d2a8a47711adf09f4c0811efbaad1df7fc
Reviewed-on: http://gerrit.openafs.org/9749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1eccf8df16d9216a4c09e99d4123a86cbcf610a0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 8 21:51:48 2013 -0400
Windows: Runtime RDR Trace Toggle
Modify the IOCTL_AFS_CONFIG_LIBRARY_TRACE DeviceIoControl message
to pass an AFSDebugTraceConfigCB which is used to toggle the value
of the Library's AFSDebugTraceFnc pointer. When the trace log is
enabled, the AFSDbgLogMsg parameter is non-NULL and when the log is
disabled, the parameter is NULL.
Change-Id: I71b951f244b760487f2ece94409cefaa7a73ea31
Reviewed-on: http://gerrit.openafs.org/9748
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ce72155dc09e592adc94ef7f0b4bf241d0c0c2e8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 8 09:26:28 2013 -0400
Windows: CM_CONFIG_DATA_VERSION 23
The cm_volume_t data structure changed. Increment the data version
for the 1.7.24 release.
Change-Id: I324525db34e644cf7ac915742e5da6895f351531
Reviewed-on: http://gerrit.openafs.org/9746
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 639453196dd9f71a86e61d2c83e2e8ae0d8bf45f
Author: Antoine Verheijen <antoine@ualberta.ca>
Date: Mon Apr 8 20:51:52 2013 -0600
Increase size of space for ACL in "up" command.
The amount of space allocated for use by the pioctl call to
obtain the ACL for the source directory in the "up" command
is not large enough and the call fails when access lists get
sufficiently large.
This change increases the size of the space provided to
pioctl to the maximum possible. This allows for much larger
access lists and is consistent with a similar call in the
"fs listacl" command).
Change-Id: I177387e7346a9e2788f3556fd8754a7f93a2794b
Reviewed-on: http://gerrit.openafs.org/9753
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b39461fc67d4f258d31e0a13b5d8dcb3c5fae49f
Author: Antoine Verheijen <antoine@ualberta.ca>
Date: Mon Apr 8 20:29:58 2013 -0600
OpenBSD 5.3: Replace use of copyinstr for setting mount point name.
As a result of a realignment of kernel memory in OpenBSD 5.3,
the copyinstr() routine no longer works for copying the mount
point name into the internal mount table structure. It also
fails silently, so it's not noticed until someone looks at
the mount table and discovers that the mount point name for
AFS is missing.
This patch replaces the use of copyinstr() with strlcpy() for
copying the mount point name in OpenBSD 5.3.
Note that this is consistent with how other similar device
support has addressed the same issue in OpenBSD 5.3.
Change-Id: I57619f989e51a8c1a320be7d451683b7c0abb7c1
Reviewed-on: http://gerrit.openafs.org/9752
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 31d73b7e43058d421c2a1b6179e71b7b98a269f3
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Apr 3 10:54:11 2013 -0400
budb: fix signedness of hash address logging
lots of places we print an unsigned int as a signed int.
the resulting output is confusing. so. stop that.
Change-Id: I5659139b92de225ffb9593e5bf7f5ae997d5d212
Reviewed-on: http://gerrit.openafs.org/9702
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1942d2a4fc90703e64e1c97ba10d2918ba584e73
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Mar 28 16:42:58 2013 -0500
aklog: Probe for libasn1 on heimdal
aklog uses encode_EncTicketPart and some other encode_* ASN.1 routines
when we're building against heimdal. Our krb5 autoconf logic from
c-rra-util is not guaranteed to include libasn1 in KRB5_LIBS, since
it's not required for functions in the krb5 API. So, specifically test
for it.
Related issue reported by Måns Nilsson.
Change-Id: I5d1ab07ec481e48710bafcdc53fe58f529cc6dde
Reviewed-on: http://gerrit.openafs.org/9693
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 88deedc55a8410c055336486d8816840f9d2f028
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Apr 5 14:19:35 2013 -0500
liboafs_ubik: Export DISK_GetFile
The symbols StartDISK_GetFile and EndDISK_GetFile can be useful to
ubik users. Put them in the export list.
Change-Id: I6aa9c7261e68d66de19981154a7c42efc69e91f2
Reviewed-on: http://gerrit.openafs.org/9725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6aa6639b619636c5d63d6413956ed980844160b1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 4 10:47:38 2013 -0400
Windows: Avoid unnecessary Ccb->DirectoryCB->ObjectInformation
In almost all cases where an AFSCcb is present the associated AFSFcb
is also present. The AFSFcb has a direct pointer to the AFSObjectInfoCB.
This patchset replaces the Ccb->DirectoryCB->ObjectInformation references
with Fcb->ObjectInformation. This avoids one level of pointer indirection
and will make it easier to remove the DirectoryCB ObjectInformation
pointer in the future.
Change-Id: I2a6f5d2ed8ef1ad85691f07f425f99e3fb6cce31
Reviewed-on: http://gerrit.openafs.org/9724
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e762eec9ac9b648e9878e03e4b3bf185d2e2a1c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 3 23:37:53 2013 -0400
Windows: AFSInitPIOCtlDirectoryCB Vol ObjInfoTree
Hold the VolumeCB->ObjectInfoTree.TreeLock exclusively when calling
AFSAllocateObjectInfo() in order to protect the lists of child objects.
Change-Id: I16f104b8112e972fa8c60da2b0dbcb07ad42456c
Reviewed-on: http://gerrit.openafs.org/9723
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dd73c9c1ef98b94ee1f4e870b52e2604422595e3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 3 23:33:40 2013 -0400
Windows: Switch to Interlocked ops for RDR Set/Clear
Switch to using interlocked operations for the SetFlag and ClearFlag
macros.
Change-Id: I2b071ae49f69d557c30d1280fb7877dde7f76f40
Reviewed-on: http://gerrit.openafs.org/9722
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 76e33082d12eaeaaf87df53986b46a508c7ad68d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 2 14:13:57 2013 -0400
Windows: AFSDeleteDirEntry set input to NULL
AFSDeleteDirEntry() frees the memory allocated to the DirectoryCB.
To ensure that an invalid memory pointer is not accidentally used
by the caller after the memory is freed, use
InterlockedCompareExchangePointer() to set the input parameter to
NULL prior to destroying the DirectoryCB.
Change-Id: I2e92d4277d1f9baee164bfb941821aa11a1ad738
Reviewed-on: http://gerrit.openafs.org/9721
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ba78ac675c2a90359dedc9cf16e38e6d7e606eaf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 2 00:46:27 2013 -0400
Windows: AFSPrimaryVolumeWorkerThread reorg
Periodically there is a lost race which results in a valid DirectoryCB
with a non-NULL ObjectInformation pointer that refers to freed memory.
This major reorganization simplifies the logic and attempts to close
potential loopholes.
First, the AFSExamineDirectory() function is removed and replaced by
a call to AFSDeleteDirEntry(). The AFSExamineDirectory() function
examined all of the children AFSObjectInfoCB objects which in turn
duplicated much of the logic of AFSExamineObjInfo at the cost of
increased complexity due to the additional layer of locked objects.
Once the AFSDirectoryCB is removed a subsequent pass of the worker
thread will free the AFSObjectInfoCBs.
Second, the AFS_OBJECT_REFERENCE_DIRENTRY category had been used for
both DirectoryCB references and the Pioctl references. A new
AFS_OBJECT_REFERENCE_PIOCTL category has been created to improve the
ability to track the allocations and releases.
Third, the AFSPrimaryVolumeWorker thread now attempts to hold onto the
VolumeCB TreeLock exclusively. Previously the lock was held shared.
However, it is not safe for both the garbage collection and the find
routines to both be shared. One has to be exclusive. Although holding
the TreeLock exclusively in the garbage collection processing will result
in the lock being held for extended periods of time, it is more likely
that there will be benefits from parallel access during AFSFindObjectInfo()
calls.
Attempts to obtain most other locks are non-blocking. If the lock cannot
be obtained, the object must be in use. Therefore, it should not be
garbage collected.
Change-Id: I75e0302c1737aadfbd9afc0c8a03e28513e785f5
Reviewed-on: http://gerrit.openafs.org/9720
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9285cc3d5270306377ef3d6f90468129a8cfd376
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 2 00:40:54 2013 -0400
Windows: FindObjectInfo refcnt under lock
AFSFindObjectInfo performed the search of Volume object tree protected by
the TreeLock but dropped the lock before incrementing the reference count.
This behavior contributed to a race with the AFSPrimaryVolumeWorkerThread
which has to drop the VolumeCB TreeLock periodically in order to safely
cleanup FCBs.
Change-Id: I0cba4a118e4835edee7702db97846567618e0adf
Reviewed-on: http://gerrit.openafs.org/9719
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 559674b36b0f58060e564786b4969ab9e6f777a8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 28 00:32:37 2013 -0400
Windows: AFSDeleteDirEntry Protect against NULL reference
Now that AFSDeleteDirEntry can be called with a DirectoryCB
whose ObjectInformation pointer can be NULL, protect against unintentional
dereference.
Change-Id: I6ffd21c35da5581a7ebac6987324e2ff3a8ccd2b
Reviewed-on: http://gerrit.openafs.org/9691
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a8383140c9ca238657e8bf1ce63f8ef7d571cdac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 09:02:00 2013 -0400
Windows: AFSDeleteObjectInfo AFS_OBJECT_HELD_IN_SERVICE
Move the check for AFS_OBJECT_HELD_IN_SERVICE until after the TreeLock
is held.
Change-Id: I38d095c83dc5878770a7a31bee08048a777cb3cb
Reviewed-on: http://gerrit.openafs.org/9674
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 774bc5eb6be5cc7cab5d86dd40438e18cc7f3da7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 09:01:17 2013 -0400
Windows: Add comment to AFSInitDirEntry
Change-Id: I6e6164b1dd5c7c8a2c51bcb4cba47667bd343e79
Reviewed-on: http://gerrit.openafs.org/9673
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f915b4ef15bf815d9405284130e031bd558ce8f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 08:59:14 2013 -0400
Windows: AFSDeleteDirEntry deleted flag shuffle
Move the assignment of the deleted flag earlier in AFSDeleteDirEntry()
to avoid potential invalid memory access.
Change-Id: I6d0e1272cc9f2bb491ad291a65b94c53ced9a354
Reviewed-on: http://gerrit.openafs.org/9672
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7252f3125da093a1f9de5ef7ded470ddad12eb9d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 08:56:19 2013 -0400
Windows: Protect AFSDeleteObjectInfo calls
Only permit AFSDeleteObjectInfo() to be called if the reference
count returned by AFSObjectInfoDecrement() is zero.
Change-Id: I6fd65ac41467ec2aa82d4f86f0d57f91595930c1
Reviewed-on: http://gerrit.openafs.org/9671
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 36fee95e32835cf20286c5225e56b303dd4563da
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 08:52:59 2013 -0400
Windows: AFSExamineObject() refcnt underflows
Now that the reference counting is likely to be correct, do not
garbage collect objects with negative reference counts. If the
reference counts are wrong the objects will never be destroyed but
that is now a safer choice than freeing memory that might be in use.
Change-Id: Ic8e781c4a775f8bcc66227b6f08f894c2fb85157
Reviewed-on: http://gerrit.openafs.org/9670
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0a063815cc27ed065bcc9e4a91fb3a7b280818bb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Apr 3 16:39:07 2013 -0500
vos: Restore some VNOVOL error messages
Many places in vos/vsprocs have code to delete a volume. Commit
f4e73067cdef990262c69c38ac98761620a63f25 tried to refactor them by
consolidating the common "delete" code into DoVolDelete. However, not
all of the removed code had exactly the same behavior, and some of
these variants were not handled by DoVolDelete.
One such variation is that DoVolDelete always printed an error message
if the target volume did not exist. But for some call sites this
condition is not an error, and prior to the refactoring they did not
print such an error message. Commit
1092cbe34fc8519826b3fa0565505b7bd81bc922 tried to correct this by
suppressing the error message if the target volume does not exist.
However, this means that all DoVolDelete calls do not print such an
error, where some should and some should not print an error. This
means that in some edge cases when we encounter an unexpected VNOVOL
error, we now skip printing the specific error we got and instead go
right to cleanup/recovery/exit. For a few other cases, we used to
print an error and continue (because it is a non-fatal error or a
warning), but now we print nothing when we encounter a VNOVOL error.
Fix this by specifically printing an error for the VNOVOL error for
DoVolDelete call sites that used to print such an error. Do this for
all such sites except ones where we obviously print an error
immediately afterwards anyway.
This is just a quick targeted fix. A future more robust fix should
involve altering DoVolDelete to handle all of the different behaviors
expected by its various callers.
Change-Id: Ia79bce3d2fed4acd62d517064db5b6be77f6e987
Reviewed-on: http://gerrit.openafs.org/9704
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5c2a770e0ed02b2cae658a7cbf30e91105194a57
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 30 20:16:48 2013 -0400
Windows: FileSystemAttributes = FILE_READ_ONLY_VOLUME
Instead of testing for Characteristics = FILE_READ_ONLY_DEVICE
which applies to the entire device, only return media protected
errors if the volume FileSystemAttributes include FILE_READ_ONLY_VOLUME.
Change-Id: Ice716083c7f0ecb9e80d0ca9e3e143249293d28e
Reviewed-on: http://gerrit.openafs.org/9699
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9174531dca75f1f2d235ed806f784422792c3ab2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 30 20:15:42 2013 -0400
Windows: RDR DeviceObject Characteristics
Set both FILE_DEVICE_SECURE_OPEN and FILE_DEVICE_REMOTE when
creating Device Objects for the AFS Redirector.
Change-Id: I336287817d913c612e2fe7cfbb4198900a846b0f
Reviewed-on: http://gerrit.openafs.org/9698
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8f04ab0b61d3b254d187b6c057c781ba9ebd7a0d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 30 19:58:12 2013 -0400
Windows: Move AFSVolume functions to new file
In an effort to declutter AFSFcbSupport.cpp, move AFSVolume
functions to a new source file, AFSVolume.cpp.
Change-Id: I663352d7bc4004c41bbab55fdf5bd8e36b373cf9
Reviewed-on: http://gerrit.openafs.org/9697
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7cfbfc3d2c8157978d2faaf55ce88c9ada88ffac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 30 19:54:11 2013 -0400
Windows: Move Name Array functions to new file
In an effort to reduce some of the clutter in AFSGeneric.cpp,
move the Name Array functions to AFSNameArray.cpp.
Change-Id: I97c9c5c67229851cbe937a603a93a2db97d6c12c
Reviewed-on: http://gerrit.openafs.org/9696
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 199cfb4a885b98b583f538ed14dff7ec5c9f9990
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Mar 26 17:50:31 2013 -0500
volser: Make VolListOneVolume errors consistent
Currently, VolXListOneVolume errors out with ENODEV if any attachment
error occurs with the specified volume. But VolListOneVolume always
returns success if it can find the indicated volume, and any
attachment errors and such are reported in the 'status' field of the
volume info structure.
These two functions do pretty much the same thing; VolXListOneVolume
just provides more info than VolListOneVolume. So make them behave the
same way, and provide more specific information, whether or not
somebody ran 'vos examine' or 'vos examine -extended'.
The 'vos' binary has always handled errors in the 'status' volume info
structure for both "extended" and non-"extended" queries. This
difference appears to just have been a mistake from OpenAFS 1.0.
Change-Id: Iab16ef6a25487d492fdb046db93973a1e64ca70a
Reviewed-on: http://gerrit.openafs.org/9680
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 71afa42cdd9107b071fb79f0adaf96c5fcf145da
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Mar 26 17:26:23 2013 -0500
volser: Restore Vol*ListOneVolume error handling
In the 1.4 series, the volserver VolListOneVolume function always
returned success if the specified volume was found in any way, and
ENODEV otherwise. The VolXListOneVolume returned ENODEV if the volume
was not found, or if any error occurred.
DAFS (specifically, commit ed25934c1fe96b143715025b49104e75dce9a361)
changed these so they both behave the same way. That is, they both
return success if the volume was found at all, and ENODEV otherwise.
Commit 53cc2ebaea5e5488d5285f0d13ffa47069ee986f changed both of these
functions so that we always return an error on any attachment error.
These changes mean that a 'vos examine' for a volume with an existing
volume transaction now indicates that a volume is offline/unattached,
but in the 1.4 series, the volume was indicated as "busy".
So, restore the original 1.4 behavior of these functions, so the
volume status is reported as it always was. This effectively reverts
53cc2ebaea5e5488d5285f0d13ffa47069ee986f, and slightly changes the
post-DAFS code to look more like the 1.4 code. This also removes the
'code' variable from VolListOneVolume and adds an explicit comment
about what's going on, to make this a little more clear.
While changing the behavior of VolXListOneVolume to match that of
VolListOneVolume perhaps makes sense, for now just restore the exact
1.4 behavior, and make the function flow look a little more like the
1.4 code did. A future change may make them the same again.
Reported by Andy Malato.
Change-Id: I0e109ad97a1b1bd9b3b25677eb9744a4f7bd5412
Reviewed-on: http://gerrit.openafs.org/9679
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bc1b79d030eb9e2b9076edb90cce7807dae5d949
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 28 12:06:34 2013 -0400
Windows: AFSDeleteObjectInfo InterlockedCompareExchangePointer
Correct the third parameter passed to InterlockedCompareExchangePointer
in AFSDeleteObjectInfo() which prevented *ppObjectInfo from being set
to NULL.
Change-Id: I4edc1d69114c02ffff8181b176a5f0bac82f6802
Reviewed-on: http://gerrit.openafs.org/9689
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a8a6b8dd93082579d08282c65a6437d66fc5facc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 28 00:28:35 2013 -0400
Windows: additional AFS_SUBSYSTEM_OBJECT_REF_COUNTING
Add missing cases of reference count value changes which were
not being logged.
Change-Id: I8bc26f31f2725e2c324831bce3da0b68a7fb91d9
Reviewed-on: http://gerrit.openafs.org/9690
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e731198751f442ced3080280d757fb7997ae261
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Wed Feb 20 16:09:06 2013 +0100
packaging: remove largefile-fileserver option from spec file
Remove the obsolete --enable-largefile-fileservers option from
the RedHat spec file.
Change-Id: I8334c0bfc53125243f78c04a064e23c987a2a4fc
Reviewed-on: http://gerrit.openafs.org/9144
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f2e6a92f4435df8d6a632995b08f2b98bb65e0bc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 08:21:49 2013 -0400
Windows: add AFS_OBJECT_REFERENCE_FS_REQ
Add a new object reference category AFS_OBJECT_REFERENCE_FS_REQ which
is used to avoid overloading AFS_OBJECT_REFERENCE_DIRENTRY.
Change-Id: I428940005dd7b4502329d4171b7307282099af44
Reviewed-on: http://gerrit.openafs.org/9668
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 50faf84b4b46b337cd576f4bcaceed423d63544b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 27 00:49:56 2013 -0400
Windows: cache readonly volume size information
Cache the volume size information for .readonly volumes which can
be reset when the volume callback is broken. This reduces the number
of RXAFS_GetVolumeStatus RPC calls issues on .readonly volumes.
Change-Id: Ie0e63ca9082a004da71098e28df1315d42d364ff
Reviewed-on: http://gerrit.openafs.org/9681
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b518ffc0da37d38f05fa1d35852500784caefba6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 26 09:08:58 2013 -0400
Windows: btree enumeration bulk stats
Each of the btree enumeration bulk stat operations include the
directory object in the bulk stat list. If the only object in the
list is the directory object, do not perform the bulk stat rpc as
it just wastes time. All of the required objects are already cached
with current callbacks.
Change-Id: Ic0fac50f36bdca1e79f48ca308c373a2b3152675
Reviewed-on: http://gerrit.openafs.org/9675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7aa9eaecb6181ccf987b99f1be902c8bff69c384
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Mar 26 17:57:28 2013 -0400
Fix build with separate objdirs
The conversion of pam/ to use libtool introduced references to
file names with LT_CCRULE that are not subject to make's vpath
searching.
Sprinkle ${srcdir} accordingly to fix the build.
Change-Id: Ia500fe2a57813fdd93ca1767e243fd947d6b8e1e
Reviewed-on: http://gerrit.openafs.org/9677
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3929282d2767bd35e54037e5477e917979c84be3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Mar 26 17:00:05 2013 -0500
volser: Indicate busy volume with VBUSY
Commit 34fc86bcc749f3bd059831b7e5dae03dc09a9393 changed several uses
of VBUSY to VOLSERVOLBUSY in order to detect retriable operations.
However, one such change did not change an Rx abort code, but instead
was used for the 'status' field for a volintInfo or volintXInfo
structure. That is not really a general error code, but a field with a
few specific known values (at least, that is how existing clients
interpret it).
Go back to using VBUSY, so clients indicate the volume as busy,
instead of as offline/unattached.
Reported by Andy Malato.
Change-Id: Ia569633d98266cb15c059e66150d8d7f91d20dca
Reviewed-on: http://gerrit.openafs.org/9678
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 95240a5a5030a1053ce9966b54037eda2d37140b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Mar 26 13:27:33 2013 -0500
aklog: Only try to use krb5-weak.conf if it exists
The logic we use for using krb5-weak.conf to allow 'weak crypto'
requires us to know where the default krb5.conf is. The default
krb5.conf local can vary significantly depending on the platform, and
we don't have a good way of figuring out what it is, so we guess. We
may guess wrong.
To limit the cases where we guess wrong, only try to do this
workaround if the krb5-weak.conf file actually exists.
Change-Id: Id3905268b5cc22dafb4dd539b9f3d323a656fee2
Reviewed-on: http://gerrit.openafs.org/9667
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6ad2cc0275cd1074316d6bc70cd8758d25f94467
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Mar 26 17:42:38 2013 -0400
Fix DARWIN build with clang
In 1d8937b86050 we added a function call to kauth_cred_unref in the
DARWIN100 case (replacing a macro), but added the inclusion of
sys/kauth.h only when using versions older than DARWIN80.
On DARWIN100 and above, clang detects that the now-implicit function
declaration is in conflict with the actual prototype, which is included
later through afs/sysincludes.h when compiling the kernel rx code.
Since including sys/kauth.h seems to have been harmless for old versions,
just include it always.
Change-Id: I4b65f5405a3de918091f8c25440801d0ce9f90b8
Reviewed-on: http://gerrit.openafs.org/9676
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cd1ffc1073d6f9a191e07cb72e8d0b4ec8cd6347
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Mar 26 13:14:30 2013 -0500
aklog: Search for /etc/krb5/krb5.conf
aklog tweaks the KRB5_CONFIG environment var when performing one of
our 'weak crypto' workarounds. We assume that the default krb5.conf is
/etc/krb5.conf, but for Solaris 11 libkrb5, krb5.conf is in
/etc/krb5/krb5.conf. Although this file could be anywhere, try
/etc/krb5/krb5.conf too, so we at least work on stock Solaris.
Change-Id: I1f53b9b58549da04f2a27f1f579dd0084796e51d
Reviewed-on: http://gerrit.openafs.org/9666
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 42351db75e04e46012208d38f80dc17be7ab776d
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Mar 12 22:13:20 2013 -0400
dafs: prevent corruption in large fsstate.dat files
If while writing to the fsstate.dat file, it exceeds the current
size of the file (multiples of FS_STATE_INIT_FILESIZE (8MiB)),
we call fs_stateResizeFile. This un-mmaps, truncates, and
re-mmaps the file. Unfortunately, fs_stateMapFile() resets the
state->mmap.offset and .cursor, so any writes in flight over
the resize will overwrite the first bytes of the file (and leave
zeros in the file where the data should have been written).
Upon return from the write that caused a file resize, the offset
is eventually corrected and the state dump continues with a
silent failure. Eventually the state dump completes and the
file header is rewritten; this may conceal some or all of
the overwrite damage at offset 0. However, any zeros near the 8MiB
offset (and its multiples) remain as corruption.
Add a flag to fs_stateMapFile() to allow the caller to specify if
the offset and cursor should be preserved. Modify fs_stateResizeFile()
to use this capability.
testing note: temporarily reduced FS_STATE_INIT_FILESIZE to 256 bytes
during testing in order to make the problem easier to reproduce.
This problem would normally occur only on relatively large/active
DAFS fileservers.
Change-Id: I9b6c57ef7727837ae7cfc00d02192983355dad2b
Reviewed-on: http://gerrit.openafs.org/9599
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e8faeae6dcae0e566de2b21d53d3f78f3cc44e3f
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Jan 25 18:47:49 2013 -0500
salvager: prevent assertion during -orphans attach
Improve JudgeEntry() detection of orphaned directories to
prevent unintentional deletion of their '.' and '..' entries.
This in turn prevents a later assert (opr_Verify) when we try to
delete and re-add '..' in order to attach the orphan.
In JudgeEntry(), 2 sources of information about a
directory entry are compared for consistency:
- vnodeEssence (unique) from its vnode index entry
- name, vnodeNumber and unique from its dir blob entry
A directory entry may be ignored, deleted, or repaired/replaced,
based upon the results of these and other tests (e.g. dirOprhaned).
The '.' and '..' entries are treated as special cases because
we do not want to delete them at this point if this directory
is orphaned. However, the current test for orphanhood
(vnodeEssence->unique == 0) is not sufficient; it could be
zero for other reasons. This commit now uses the dirOrphaned
flag to test for this.
However, we are still interested in doing the right thing
for '.' and '..' entries with vnodeEssence->unique == 0.
This may indicate that the dir blob entry is pointing at the
wrong vnode, and that vnode has unique==0. The current code
incorrectly ignores (returns 0) this case. This commit now
now falls through to the repair/replace code so that we can
find the correct vnode for this entry.
The current code assumes that the 'vnodeEssence == 0 &&
!dirOrphaned' case doesn't exist.
Thanks to Andrew Deason for his assistance.
Change-Id: Id7c466fcc0f031b8fccb52dc51493eeed040cf95
Reviewed-on: http://gerrit.openafs.org/9104
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e93360ecc79822dd8149990a6eb5f3235b7cca1f
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Mar 13 13:27:32 2013 -0400
Enable dvolser and tvolser for FreeBSD
The top-level Makefile did not recurse into dvolser or tvolser for
FreeBSD. They compile just fine, so enable them.
Change-Id: Id85e3a72f53b85e6b155b224268e2fe587fe3406
Reviewed-on: http://gerrit.openafs.org/9598
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f36a72bf28c0e17080d96c4367aa858cc9c02716
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 19 16:14:18 2013 -0400
util: fix dirpath use of clntEtcDir on Windows
When commit 9b0a7f5d13115fe5760db16587fe81dd35a5a0ef added the variable
'clntEtcDir' it failed to assign it a value on Windows.
Change-Id: I02cfb994a28e3e1032741d1b2710acb5d40d9bfd
Reviewed-on: http://gerrit.openafs.org/9635
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dd903ce729c24c9d1ed78b227a261b2549482461
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 14 23:27:25 2013 -0400
vol: remove duplicate stmp declaration
Patchset 38cf31463e3f3c675de727c1e793e117a90e6d20 added a definition of
afs_ino_str_t stmp which should have replaced the b64_string_t stmp
declaration that was already present.
Thanks to Jason Madar for noticing.
FIXES 131620
Change-Id: I780efd55dea33f1f7893b68285c841e80660b3f3
Reviewed-on: http://gerrit.openafs.org/9608
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5123deebdcbf634151b236bf7ff7ac7ca099b11e
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Mar 14 10:35:30 2013 +0100
Update NEWS for 1.6.2.1
Change-Id: I2c08474cc6034d40cef0d77d94c070bcdd8d4563
Reviewed-on: http://gerrit.openafs.org/9602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Paul Smeddle <paul.smeddle@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b74728590ce14f9b6c3235f0b51f8865caa9427d
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Thu Mar 14 10:16:30 2013 +0100
Make NEWS match the 1.6.2 Release Notes
Change-Id: Ic98bbb37e2f81e36724e69af348c06a2c6b8b5c3
Reviewed-on: http://gerrit.openafs.org/9601
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 35b248b06ac82fd911b3901e2afb0507fb866d1c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 22 21:14:48 2013 -0400
Windows: Create Symlinks in Volume Roots
Permit the CreateSymbolicLink API to create symlinks in volume
root directories.
Change-Id: I779f127f9a7e4ddfee41fe7a9398f20175843be0
Reviewed-on: http://gerrit.openafs.org/9656
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0b018b9dec68f07537e76f7fe9f7441f7e1e7b9d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 22 16:10:54 2013 -0400
Windows: Robocopy Symlinks
This patchset enables AFS Symlinks and DFSlinks to be copied to
a local NTFS disk using robocopy's /SL option.
Separate print names and substitute names are now provided permitting
the reparse data copied from AFS to be applied to a local disk object
for recreation.
Change-Id: I7bab4e8352a069a14b9ac4b3b2e22819f3de7a23
Reviewed-on: http://gerrit.openafs.org/9655
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a0b015ecb214f9d655b28b895093dbb09fd8f001
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 21 07:57:34 2013 -0400
Windows: NPAddConnection no local name and connected
The WN_ALREADY_CONNECTED error is only to be returned if a local
device name (aka drive letter) is provided in the request. Otherwise,
the proper return status is WN_SUCCESS if an unnamed connection is
requested.
Change-Id: I1e1ca47a84e353db66e2830ec11f968a3578c4f6
Reviewed-on: http://gerrit.openafs.org/9642
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f7cf559480c04989c7c46126f2036fe78f301705
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 20 16:23:59 2013 -0400
Windows: NPCancelConnection without drive letter
When canceling a network connection to a UNC path, do not match
connections that have drive letters assigned. Only cancel the connection
if there it matches the UNC path and has no local name.
Change-Id: I2c27c6d08cec65406f7e7f9eb61cd6d6c7be1f5c
Reviewed-on: http://gerrit.openafs.org/9640
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ef5ea5120ea0af85d73fa7588dd0efc947a174d9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 22 00:54:36 2013 -0400
Windows: AFSDeleteObjectInfo InterlockedExchange
Use InterlockedExchangePointer to disconnect the ObjectInformationCB
pointer from the caller. This ensures that only one thread can
successfully call AFSDeleteObjectInfo on the same object at a time.
Change-Id: Ie70f52fc443f88c3cb4be41f12caa91466d92905
Reviewed-on: http://gerrit.openafs.org/9644
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ed1b562b8174028502099bd224e7e73740a89362
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 21 19:34:25 2013 -0400
Windows: FSCTL_SET_REPARSE_POINT NULL ptr dereference
Avoid a potential NULL pointer dereference if the ParentObjectInfo
object cannot be found. If the Btree lookup fails, do not call
AFSCreateSymlink() and do not decrement the ObjectInfo refcount.
Doing so will result in a BSOD.
Change-Id: Ibd3e4ebb343f6c3cff8bf1cb160e42938d0f906c
Reviewed-on: http://gerrit.openafs.org/9643
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8ce8ff9cbf66ad78a9b9dc5871a4bc4f3f9ee15d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 21 06:28:25 2013 -0400
Windows: Remove Driver Verifier warning of memory leak
Work items are now queued in an AFSRedir.sys data structure
and are not freed when AFSRedirLib.sys is unloaded. Therefore,
do allocate the memory with AFSLibExAllocatePoolWithTag().
The allocation by AFSLibExAllocatePoolWithTag results in a false
Driver Verifier warning of a memory leak on unload.
Change-Id: I268c4b6d20090e88114456a24b7648eef59f6289
Reviewed-on: http://gerrit.openafs.org/9641
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3a31f5d90c490a23b3f59f50aa9ced63b8cb98af
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 20 10:10:03 2013 -0400
Windows: buf_ClearRDRFlag and cm_directIO
When 'cm_directIO' is true, there are no RDR held buffers therefore
there is nothing for buf_ClearRDRFlag() to do. Do not pass 'Go',
do not obtain cm_scache.rw exclusive nor buf_globalLock shared.
Simply return immediately.
Change-Id: I4c6d1486e3a2bef987a3eb36d8de446e9009e0d2
Reviewed-on: http://gerrit.openafs.org/9638
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d3c04329a396cc82a71321bb209b783a1524018e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 20 10:08:21 2013 -0400
Windows: buf_RDRBuffersExist and cm_directIO
If 'cm_directIO' is true, then no RDR buffers exist. Return immediately,
do not pass 'Go', and do not lock and walk the buffer hash table.
Change-Id: I9c6499d429d7591c8bd67ce3077ff4c4e7d6d62d
Reviewed-on: http://gerrit.openafs.org/9637
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cda4f6c3ff92a35e2ff8b2eb114729144fff165f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 20 10:04:41 2013 -0400
Windows: buf_CleanVnode avoid lock contention
In the middle of the big loop do not obtain buf_globalLock unless
cm_buf.qFlags & CM_BUF_QREDIR is non-zero. buf_globalLock is heavily
contested and any reduction in contention is an improvement.
CM_BUF_QREDIR is never set when 'cm_directIO' is true (now the default)
so this is a huge win.
Change-Id: I0b150bf77a0f1d748f94026d3b74bc7d90e7c3c6
Reviewed-on: http://gerrit.openafs.org/9636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f9dac53a75aff66696f78255ed08cc49c696d337
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 19 11:48:42 2013 -0400
windows: AFSQueryDirectoryQueryDirect no Symlinks
When evaluating symlinks for directory enumerations, the response
must properly set the FILE_ATTRIBUTE_DIRECTORY flag based upon the
file attributes of the target. At the present time the target is
not evaluated by the service and AFSQueryDirectoryQueryDirect does
not have the correct context in which to evaluate the target.
Instead of returning an incorrect result to the application, exit
AFSQueryDirectoryQueryDirect() returning STATUS_REPARSE_OBJECT which
is interpreted by AFSQueryDirectory() to perform a full directory
enumeration.
Change-Id: Ic35dcff31f1098b9f40f3a37534b79439e0e3f1f
Reviewed-on: http://gerrit.openafs.org/9633
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 46a61f61c2432c53a787724e88925cb823fac012
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 18 22:43:09 2013 -0400
Windows: 1.7.23 Release Notes
Add explanation of Win 7 Explorer Shell Read-Only Volume vs Network Drive
Letter Mapping bug.
Change-Id: I7cf1300c9ec91cbbd347030d0bb9642c78607398
Reviewed-on: http://gerrit.openafs.org/9634
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9cfd7f768ca350d3b750e89e7ddb186bdad6f726
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Mar 5 20:54:50 2013 -0500
Linux 3.9: hlist iterator change
hlist iterators have been reworked to not require a temporary
node parameter.
Change-Id: Ibea1295163bd39ff2901a2194aa46c3d342f5128
Reviewed-on: http://gerrit.openafs.org/9403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b5675b57f815722f8c37fcfed5a2bd7b1ef112d6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 18 12:07:55 2013 -0400
Windows: Avoid cm_Analyze race on cm_serverRef lists
cm_Analyze() accepted as a parameter a pointer to the first element
on a cm_serverRef list which is only ever used for VL operations.
cm_Analyze() would separately call cm_GetVolServerList() to obtain
the cm_serverRef list for RXAFS operations. Then the variable 'serversp'
would be set to the first element of the list.
'serversp' was then used to refer to the list and would be passed to
cm_SetServerBusyStatus() and cm_ResetServerBusyStatus() which would
in turn obtain the cm_serverLock while it manipulated the cm_serverRef
status flags for the elements in the list.
The problem is that passing a pointer to the first element of the
cm_serverRef list without holding cm_serverLock can permit the list
contents to be altered including removal of the first element. If the
race is lost and the memory associated with the first element is freed
before access, the afsd_service.exe will crash.
This patchset makes a number of changes. First, the cm_serverRef_t
parameter is changed from a pointer to the first element of the list
to be a pointer to the HEAD pointer of the list. Since it is ever only
used for cm_cell.vlServerp lists, the parameter is renamed to
'vlServerspp'. Second, a separate "cm_serverRef_t ** volServerspp"
variable is allocated for the return value from the cm_GetVolServerList()
operations.
cm_SetServerBusyStatus() and cm_ResetServerBusyStatus() are altered to
accept a pointer to the HEAD of the list instead of a pointer to the first
element. The cm_serverLock is now held read instead of write because the
list itself is not being altered. All of the state changes being applied
to the cm_serverRef objects are atomic.
Finally, cm_serverLock is held across all list traversals within
cm_Analyze(). A read lock is obtained if the elements of the list are not
being removed or inserted and a write lock is obtained if they are.
Change-Id: I48464e90a828706dad442c019c75a717b06d690b
Reviewed-on: http://gerrit.openafs.org/9625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 19dc2fac408bd619f67c2e7ee29b42c81c1150bc
Author: pete scott <pscott@kerneldrivers.com>
Date: Wed Mar 13 07:54:00 2013 -0600
Windows: Replace AFSDbgMsgLog func with macro
In order to reduce computation overhead when trace logging is not
active replace the AFSDbgMsgLog function call with a macro,
AFSDbgTrace.
Change-Id: I7bccee0ddffcd8488f81fcebbb970aa15c8dc52e
Reviewed-on: http://gerrit.openafs.org/9621
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1437789abaf86a6448d7a2d8dc197876ab2a9ea6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 17 08:43:39 2013 -0400
Windows: Test AFS_DBG_FLAG_BREAK_ON_ENTRY earlier
During AFSRedir.sys initialization, check the AFS_DBG_FLAG_BREAK_ON_ENTRY
registry flag before initializing the trace log system.
Change-Id: I928fab78b40dce51d2c0686bce68eb76f941b214
Reviewed-on: http://gerrit.openafs.org/9622
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f493a652b28e5e5606e0ec6741b884545b5d1902
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 15 11:40:29 2013 -0400
Windows: Increase AFS DeviceObject StackSize
Increase the StackSize parameter of the DeviceObjects allocated
by the AFS Redirector framework. The StackSize parameter is used
to notify callers how many Irp Stack frames will be consumed. Now
that the redirector is using IoCompletion routines, an additional
stack frame is required to handle calls to the AFS Redirector library
driver.
Thanks to Peter Scott for identifying the solution.
FIXES 131618
Change-Id: Ib66f884911f0d425e6e07f338a36b3ebedeb8871
Reviewed-on: http://gerrit.openafs.org/9609
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 830744ff437a27b00044e7e94f3824b0db969c0b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 16 01:18:14 2013 -0400
Windows: File Attribute Reporting Consistency
Do a better job of consistently reporting file attribute information
via directory queries and file information queries. Avoid computing file
attribute information for file information queries that do not return them
(e.g., Name Information) because computing it is expensive.
Change-Id: I5c8120698261f555edfa98e92230705b593aca36
Reviewed-on: http://gerrit.openafs.org/9613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 170bbbdb93df64d3657026e13aba26c40d93f51d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 16 01:15:01 2013 -0400
Windows: netbios name comparisons are case insensitive
When parsing the symlink target string to categorize it as AFS Symlink
or DFS Link, the comparison with the netbios name string must be case
insensitive. Otherwise, symlinks are reported to the redirector as
DFS Links. For the most part they will work since the AFS redirector
requesting MUP to Reparse the \\AFS path will call back into the AFS
redirector. However, the attributes on symlinks to files will be wrong
as DFS Links can only be links to directories.
Change-Id: Ia9652991549b0783f7a534b071ff99ceabdd3382
Reviewed-on: http://gerrit.openafs.org/9612
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a8599a126513548bac790a2cbe4cbd1153312ef5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 16 01:13:01 2013 -0400
Windows: add RDR_ExtAttributes
Add RDR_ExtAttributes to compute the file attributes for redirector
queries. The attributes reported via the RDR interface need to be
different from the SMB interface because the SMB interface does not
support reparse points nor does it support DFSLinks.
Change-Id: I5d5172f5afc1d50e2622e2068e20447cd1098fbb
Reviewed-on: http://gerrit.openafs.org/9611
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e5966117c4f0db631e0e25fc27f63e4caa76fa23
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 15 13:07:21 2013 -0400
Windows: drive mapping enumeration infinite loop
If WNetEnumResource returns an error as opposed to success, such as
ERROR_UNEXP_NET_ERR, the enumeration loop would retry forever passing
zero for 'cEntries' which in turn results in a successful response
containing zero entries.
Change the while conditional to test for continued success instead
of ERROR_NO_MORE_ENTRIES.
Change-Id: I93af73b379aa455de7a8b3264b5178d482bb52b0
Reviewed-on: http://gerrit.openafs.org/9610
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 086b47404f7c79acd95fea04684a6af6fb09df1a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 14 19:40:14 2013 -0400
Windows: remove last bits of BIOD from Direct Store
Direct I/O Store operations are performed directly against a memory
buffer stored in the background direct store rock structure. There is no
BIOD used in the current implementation. Remove the BIOD from the call
stack.
Change-Id: I78d7b898a6eec5eb39c943e760a678913b42bf0d
Reviewed-on: http://gerrit.openafs.org/9607
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit adb6add99a6cd1c22a4a11f531e6e94e66c45d9b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 14 13:05:28 2013 -0400
Windows: VolumeInfoReadOnlyFlag registry option
Windows 7 Explorer Shell has a bug when processing drive letters
mapped to UNC paths whose target volume information specifies the
FILE_READ_ONLY_VOLUME flag. When set, not only is the .readonly
volume treated as read only but all volumes that can be accessed via the
drive letter. This bug is fixed in Windows 8.
Add a registry configuration option to permit configuration of the
behavior. Sites that do not use drive letter mappings will want to
enable it even on Windows 7 because it permits the Explorer Shell
to disable the "Delete" and "Rename" options and others when the current
directory is read only.
The default is disabled on Win7 and below; enabled on Win8 and above.
Change-Id: I73bbaf7d40918650b1a217ed44409c0679920536
Reviewed-on: http://gerrit.openafs.org/9606
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ec5fd2ce07d2e8adfa5c34d978bc786f36dac044
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 14 12:30:36 2013 -0400
Windows: Protect against DirEntry with NULL ObjInfo
During cleanup protect AFSExamineObjectInfo() and AFSExamineDirectory()
from DirectoryCB objects that have a NULL ObjectInformation pointer.
Change-Id: Id46f6b53ec4861f5ac2d28b918d073201d2433ce
Reviewed-on: http://gerrit.openafs.org/9603
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1092cbe34fc8519826b3fa0565505b7bd81bc922
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Mar 7 09:34:55 2013 -0500
vos: noise messages when attempting to delete non-existent volume
With vos refactor commit f4e73067cdef990262c69c38ac98761620a63f25,
some formerly conditional volume deletes are now unconditional.
This regresses 'vos move' output with harmless "error" messages
when AFSVolTransCreate() returns VNOVOL:
"Failed to start transaction on <volume>"
"Volume not attached, does not exist, or not online"
Modify DoVolDelete() to return early (and silently) with VNOVOL
in this case, allowing the caller to handle this appropriately.
Change-Id: I21a72e38f330335adf97ac50a7ac7d0fb97c1a9c
Reviewed-on: http://gerrit.openafs.org/9596
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bb42c02ce56aec29e3860bec47e47157d0406f20
Author: Antoine Verheijen <antoine@ualberta.ca>
Date: Mon Jan 21 02:30:58 2013 -0700
OpenBSD: Replace "vnodeop_desc" with "vops" in kernel module.
In OpenBSD 4.9, the vnode operations vector in the "vnode" struct
was changed from using a "vnodeop_desc" struct to a new "vops"
struct. This patch makes the appropriate changes to the OpenBSD
kernel module support to accommodate the change.
Change-Id: Ib47259e1213e29658a691ce3a53d7ac88e8d746b
Reviewed-on: http://gerrit.openafs.org/8928
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fd06af146d3f1953e87478cb4196362f1e15c094
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 12 10:59:44 2013 -0400
Windows: ReleaseNotes updates
explicitly list WinRT as unsupported.
Mention KFW 4.0.
Update Reparse Point text.
Update JPSoftware Take Command references.
Update UNC path processing text. Reference PowerShell 3.0 and Cygwin.
Change-Id: Ib3d4d33173cf4808792c92737eb88a909d7d176b
Reviewed-on: http://gerrit.openafs.org/9589
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4811f432ba51b53be4edf8288eaa61613e6b787c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 12 00:38:05 2013 -0400
Windows: avoid null cellp dereference during dump
When performing a memory dump if cm_ucell_t.cellp is NULL, do
not attempt to print the cell name.
Change-Id: I146b90b5424b93d0c52a758b33fcff1bcf441e77
Reviewed-on: http://gerrit.openafs.org/9582
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3e4daf06a6e18d1a151b7de0b76b1a1698bdc814
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 6 23:28:56 2012 -0500
Revert "Windows: Treat all cached writes as write-through"
This reverts commit 5130681fa2d4a35d3f0b578d92c5db1892fdfb18.
Change-Id: If33a6e1f6969628eaa74d5a56f2eec5560d827f4
Reviewed-on: http://gerrit.openafs.org/9572
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit eecf7a1372f8fcb01d73b628850b488414d9ca3a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 11 00:43:26 2013 -0400
Windows: Enforce free space checks every 1MB
Instead of performing a free space (or quota) check on every extending
write, perform the check only when the file length is increased beyond
the next 1MB boundary. The file server permits 1MB quota over runs
and issuing the volume status rpc to the file server is extremely
expensive. Especially for append only applications that write just a few
bytes at a time.
Change-Id: I74ff17ba5a95adb41350add24bc09a74c950a4fb
Reviewed-on: http://gerrit.openafs.org/9555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8b76110e23160e33716234f9560d22ca5275cb0a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 8 16:15:51 2013 +0000
bos: Remove theoretical overflow in DateOf
DateOf copies the results of ctime into a static buffer. Typically
ctime will return a 26 byte string, but if you pass it a year larger
than 9999 (which we shouldn't), you can get a 32 (or more) byte string.
Get rid of this unlikely event by using strlcpy for the copy. We already
truncate at 24 bytes when we remove the \n, so this shouldn't cause any
further problems.
Really, this whole thing should be rewritten to use strftime.
Caught by coverity (#985776)
Change-Id: I18f6828d6ec3d79ecaf1dad8e27d3e8691ce87d5
Reviewed-on: http://gerrit.openafs.org/9551
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4e9c6eb9d5192888d79a07042c9cb6029def9726
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 8 13:02:26 2013 +0000
bos: Don't overflow buffer with key data
When parsing key data from the command line, don't overflow the
buffer used to hold it - instead just give an error if the data
is too long.
Caught by coverity (#985775)
Change-Id: I44fb62d30c5022e650475b3ca51a28bcb7cf1e06
Reviewed-on: http://gerrit.openafs.org/9550
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 45993e3ad55358c3e94105e2e3aa13df43f5fdd3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 8 13:01:28 2013 +0000
bos: Don't overflow cellname buffer
Don't overflow the fixed sized cellname buffer when copying the
information in from the command line - instead, just use a
dynamically allocated buffer.
Caught by coverity (#985775)
Change-Id: If87b1ba9bcb990d3145a89627e212144cd78f5a0
Reviewed-on: http://gerrit.openafs.org/9549
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 21166744bf15f13bc04c25d68a28fe803a960b0a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Mar 4 16:34:20 2013 +0000
butc: Init volheader before using it for hton
When converting a volume header from host to network order, make
sure that any unused fields in the structure are zero'd, so we don't
end up filling them with stack garbage in the network version of
the structure.
Caught by coverity (#985956)
Change-Id: I3e039ffcb102a97afeb0e2223de12523f53b0a67
Reviewed-on: http://gerrit.openafs.org/9548
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit cfeda375fd4155a2f8a01717e8733be937fa7a48
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Mar 4 16:31:50 2013 +0000
bucoord: restore requires server and partition
The VolRestoreCmd sub command requires that the user specifies
the server and partition - calls which don't do so won't get past
libcmd. Don't check again in the handler that they have been supplied,
as it confuses things.
Caught by coverity (#985953)
Change-Id: Id4548c117b677bd2048744ade8fd91bb15e0e35e
Reviewed-on: http://gerrit.openafs.org/9547
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d672d5ee78d7673f3c42a7a343989b2bd4dca02b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Mar 4 16:22:08 2013 +0000
upserver: Don't overflow file and hostname buffers
If the user specifies a ridiculously long command line, don't
overflow the filename or hostname buffers with what they supply.
Caught by coverity (#985911)
Change-Id: Ia73f9fb94491f5691358eec1d13dbdd2651a604c
Reviewed-on: http://gerrit.openafs.org/9546
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ceac74a6baad79155adaa692639b1d9f403525b6
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Mar 7 06:53:16 2013 -0500
afscp: null-terminate root.cell dir if needed in dynroot mode
instead of doing a check for something which will never be true,
and then terminating, just terminate if it's not already
null-terminated.
Change-Id: I8ad18800de22c8d10eb27fbcb2fffb2b3a5a9127
Reviewed-on: http://gerrit.openafs.org/9439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2998ab45353e631a348d1dded9ff21b8438628a0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 8 01:41:22 2013 -0500
Windows: Use Microsoft IO_REPARSE_TAG_SYMLINK tag
For symlinks and DFS Links use Microsoft's NTFS Symlink tag,
IO_REPARSE_TAG_SYMLINK, instead of the OpenAFS assigned tag.
The DeleteFile() and RemoveDirectory() Win32 APIs do not delete
non-Microsoft reparse points and instead delete the target object.
While it is possible for Take Command and potentially Cygwin to
alter their behavior with AFS specific knowlege, it is not possible
to alter the Explorer Shell, cmd.exe and powershell.
Using the Microsoft tag is a violation of Microsoft policy.
Change-Id: I90a419fe21637bb871d08528463d1178078a9947
Reviewed-on: http://gerrit.openafs.org/9497
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 241382e3bf588269b5115fea1be0f782de43ca2a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 00:54:32 2013 -0500
Windows: GetReparseData UNC path format
When specifying UNC paths for Symlink and UNCLink targets output
the paths using true UNC notation "\\server\..." instead of "\server\...".
Change-Id: I51ecc6578fb0a984a5ad44b1bf1e40556e737465
Reviewed-on: http://gerrit.openafs.org/9426
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 470b57cc4a60d18aaab41a58b6a93f8baa3caead
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 09:25:09 2013 -0500
Windows: cm_BPlusDirEnumBulkStatNext index error
In cm_BPlusDirEnumBulkStatNext the 'next' variable was being set
even if the FileId was not added to the list of objects added to
the cm_bulkStat array. Delay the assignment to ensure that 'next'
refers to the first element in the array.
In the CM_ERROR_BULKSTAT_FAILURE processing, 'next' is used to
obtain a reference to the cm_scache object that is supposed to
correlate to the [1] entry in the array. If 'next' == -1, there
is no such entry. Add a conditional to ensure that 'next' is not
used when its value is -1.
Change-Id: I4ebc49de4bf67eee5a28790cd49f0128891cc202
Reviewed-on: http://gerrit.openafs.org/9450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ee79fb61f5a0c996b76a37392b58be01bc8cf19e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 00:59:01 2013 -0500
Windows: PopulateCurrentEntry Symlink Targets
Handle a broader range of symlink target formats and be more
precise regarding what is an afs symlink or a dfs link.
Change-Id: Ia37c1adf5d64ba44fffca976885a455e6900a047
Reviewed-on: http://gerrit.openafs.org/9428
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit abbee864c48fb2e439c4141130ada184fad23db5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 00:56:15 2013 -0500
Windows: Claim success for Delete Reparse Tag
The typical pattern for deleting a reparse point is
1. open reparse point object
2. delete reparse tag
3. set delete on close
4. close handle
Claim success when we receive delete reparse tag fsctl so that
the delete on close disposition can be set.
Change-Id: I8f4212dd6ba04be95455eaa210e632ca59cfa7c8
Reviewed-on: http://gerrit.openafs.org/9427
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d64cd65a23996a7bb79cfecfdc0383de72601497
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 11 00:03:38 2013 -0400
Windows: Report actual volume creation time
The cm_scache.volumeCreationDate is populated by any non-bulkstat
callback issuing operation. If it is not set at the time the
redirector requests volume information, force an RXAFS_FetchStatus
and then use the resulting timestamp in the response.
Change-Id: I8ab471767dd6525efc71deff073d54ae38f1f462
Reviewed-on: http://gerrit.openafs.org/9554
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 002d97363f01e0099519c35fc2f5a2af4305267e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 10 10:51:47 2013 -0400
Windows: RDR_UpdateFile dscp != scp
Do not set bScpLocked when obtaining scp->rw as scp != dscp.
Change-Id: I878166cd510a188a0e56cc92660e74b9625c3ab6
Reviewed-on: http://gerrit.openafs.org/9553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 75ee4fb1afce75316fd05b013b36a24f218118dc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 6 09:53:41 2013 -0500
Windows: Service processing for Symlink creation
Initial support for symlink creation via the Win32 CreateSymbolicLink api.
Add support for AFS_REQUEST_TYPE_CREATE_SYMLINK redirector requests via
the new RDR_CreateSymlinkEntry() function.
Since CreateSymbolicLink api creates a new directory or file object and
then assigns the Microsoft reparse tag data to that object,
RDR_CreateSymlinkEntry must first delete the empty directory or file and
then create the new symlink object in its place. If the empty object can
be removed but the symlink cannot be created, STATUS_FILE_DELETED is
returned to indicate to the redirector that a failure occurred that
changed the state of the directory without creating a new object.
If the empty object cannot be removed, a STATUS_ACCESS_DENIED error will
be returned and the empty object will unfortunately remain in the AFS
directory.
Target path translation is performed. Absolute AFS paths are stored in
UNIX notation. Absolute non-AFS UNC and device paths are prefaced with
"msdfs:".
Change-Id: If8b4729dd5fffddc71221750852b8be731c83cab
Reviewed-on: http://gerrit.openafs.org/9425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1c582768df98494775caf197da23612d59425509
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Mar 3 17:47:49 2013 +0000
auth: Don't overflow lower case cell string
When building tcell_l in kerberosSuperUser, make sure that we
don't overflow the string that we're constructing.
Use the opr_lcstring function to do the lower case conversion,
rather than rolling our own.
Caught by coverity (#985772)
Change-Id: I6e28cfc54883aac7e3a3eb2f4e2b2bf7ebc0bc63
Reviewed-on: http://gerrit.openafs.org/9544
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cc95fca8e16f83d7dda3f09a5133dc9294299d61
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 13:01:14 2013 +0000
auth: Don't overflow buffer in CompFindUser
The fullname buffer in CompFindUser is theoretically big enough
to take the data usually supplied to it. However, play it safe by
using strlcat and strlcpy to catch buffer overflows.
Caught by coverity (#985771)
Change-Id: Icc80d012b61ae90e1a62a814f7a6d552bb264294
Reviewed-on: http://gerrit.openafs.org/9543
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8c664a8c0f25e472bd3ba30f31fbbf707fa4e873
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:55:18 2013 +0000
auth: Catch long cells in backwards compat code
ktc_SetTokenEx can fall back to calling the SetToken pioctl when
the kernel module doesn't support the newer call. When we do this,
we have to transform the token structure into the older format.
Catch tokens whose cells are too long to be represented in the
older format, and bail with KTC_INVAL, rather than overflowing the
array.
Caught by coverity (#985770)
Change-Id: Ibaa1cc92c494cc6f4e56ebe7b16109d4558db131
Reviewed-on: http://gerrit.openafs.org/9449
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b0b3def56c15161df28059e270f0360c31241217
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:38:49 2013 +0000
audit: Fix overflow in file backend
If the filename passed to open_file was larger than MAXPATHLEN-5,
then we'd overflow the oldName buffer when creating the backup
filename. Fix the overflow by using a malloc'd buffer instead.
Caught by coverity (#985767)
Change-Id: Ie364aae0749b3658ab11a354844878d10c6970ab
Reviewed-on: http://gerrit.openafs.org/9448
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 249a5934605106f9025643321eb8e24f113fdd2a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 10 10:49:42 2013 -0400
Windows: IsSpaceAvail lock order violation
cm_IsSpaceAvailable() obtains the cm_scache.rw lock of the volume
root directory. Therefore it is a lock order violation to call the
function while any other cm_scache.rw lock is held belonging to an
object in the same volume. vnode 1 is always less than any other
vnode value.
Change-Id: Id34591b6ccec8d7e8e0fe48e3357c991cd99acfb
Reviewed-on: http://gerrit.openafs.org/9552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f6180b9da6d2e89c9b8bbe62dc49f02f9ab6829a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 9 15:43:14 2013 -0500
Windows: Fix directory to service null mask lookups
The direct to service for non-wildcard lookups, commit
b7ba97ad537bd0e9a241f052ddd1c3a50c74745b, introduced a bug when the search
mask is left unspecified. Do not set bNonWildcardMatch to TRUE
when the mask is NULL.
Change-Id: I6c4846b443acc7e5e42d4e83e75ef383fc400db9
Reviewed-on: http://gerrit.openafs.org/9542
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 816834cc03317bdda7f9fad0afdd838aa3cea52a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 22:05:20 2013 -0500
Windows: Permit deletion of reparse points
AFSSetDispositionInfo did not set the AFS_DIR_ENTRY_PENDING_DELETE
flag if the DirectoryCB type was mountpoint, symlink, dfslink or invalid.
This patchset permits the flag to be set so reparse point objects can be
deleted without using the AFS "symlink.exe remove" command.
Change-Id: I03e1cb7b08989950a4307e59073e5fb712d1a901
Reviewed-on: http://gerrit.openafs.org/9475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 540a73dc18bfacebc72dfac2e3c3d9f06c87e18f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 17:39:05 2013 -0500
Windows: AFSLocateNameEntry Backup Volume Change
When AFSLocateNameEntry() calls AFSBackupEntry() in the name array it is
possible that the DirectoryCB returned belongs to a different VolumeCB.
If so, pCurrentVolume must be updated and reference counts must be
adjusted.
Change-Id: I9fcd30374b20f2e1c214a019feeab55c30ce9666
Reviewed-on: http://gerrit.openafs.org/9465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c9846c9e804299de41a298adf69c9c0666d8ec85
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 7 17:28:36 2013 -0500
Windows: AFSLocateNameEntry OutVolumeCB can be NULL
It is possible for the AFSLocateNameEntry OutVolumeCB parameter
to be assigned a NULL value upon return. Handle it in the callers.
Change-Id: I15e4581d4655dbaca7c4ca4b9e9af758e97c5c95
Reviewed-on: http://gerrit.openafs.org/9464
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0cc602a065f5df9959f735ff14e05a6798b9b0b9
Author: pete scott <pscott@kerneldrivers.com>
Date: Tue Mar 5 13:21:41 2013 -0700
Windows: RDR SymbolicLink create support
Permit the redirector to handle Microsoft's IO_REPARSE_TAG_MOUNT_POINT
and IO_REPARSE_TAG_SYMLINK requests. The IO_REPARSE_TAG_SYMLINK request
is issued as a result of a CreateSymbolicLink Win32 API.
Creating a symlink in Windows is not equivalent to the way a symlink is
created in AFS or UNIX. Instead of creating a symlink object whose data
string represents the target and mode bits indicate that the stream should
be treated as a link, on Windows it is a two step process.
To create a symlink to a directory, create an empty directory and then
assign the reparse tag data to the directory object. To create a symlink
to anything else, create an empty file and assign the reparse tag data to
the file. Deleting a reparse point simply removes the reparse tag data
and not the underlying directory or file.
The way this will work for AFS is that assigning reparse data to an
existing directory or file will require that the object be deleted from
the directory and a new symlink object be created in its place. This is
why upon successful completion of the upcall to the service the directory
object information has the AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED flag
cleared.
This patchset permits symlink creation but does not do anything to support
symlink removal.
Symlink target data is not validated.
Change-Id: Ie7019445a7c307dcb2cd47beee47d02e1a82145f
Reviewed-on: http://gerrit.openafs.org/9424
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1b048f1f571eb02976a78a4dabafb3c677fbf9d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 5 07:52:37 2013 -0500
Windows: Avoid race during cm_FreeServerList
cm_FreeServerList obtains cm_serverLock exclusively and in some
circumstances will call cm_FreeServer(). cm_FreeServer() will
drop the cm_serverLock if the cm_server_t.refCount is zero in order to
avoid a lock order violation when calling cm_GCConnections() since
cm_connLock is higher in the lock hierarchy.
The call to cm_FreeServer is performed after the cm_serverRef_t
to be deleted is identified but before it is removed from the list.
There is the potential for two threads calling cm_FreeServerList()
to race and for more than one thread to attempt to delete the same
cm_serverRef_t twice.
Fix this by:
1. maintain a private copy of the cm_server_t pointer, delete the
cm_serverRef_t and update the list pointers before calling cm_FreeServer().
2. obtain and release a refcnt on the next cm_serverRef_t to ensure
that it is not deleted out from underneath the thread in case the
cm_serverLock is dropped.
Change-Id: Ia7b6eed66e9ba306c07d47027262e1a8ad1e52ac
Reviewed-on: http://gerrit.openafs.org/9391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f4373e7867abd50b3fe39716073811794fe62379
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:21:06 2013 +0000
aklog: Fix buffer overflows in next_path
Use strlcpy and strlcat
Caught by coverity (#985765)
Change-Id: I2fc3d04a762f6872c31fe728e1ab0247ac16e6de
Reviewed-on: http://gerrit.openafs.org/9447
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2902ef93976fd4baa1a1ed07f4940c5979702856
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:15:22 2013 +0000
aklog: Protect against overflows from cmdline
The cell, realm and path arrays are populated based on the user's
command line, and xlog_path is populated from their passwd map
entry. Protect against all of these overflowing, by making suitable
use of strlcpy and strlcat.
Caught by coverity (#985764, #985904)
Change-Id: Ia8f1816b010eb2b85b537e156de2b7983e4626ba
Reviewed-on: http://gerrit.openafs.org/9446
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 19d2683d711f95165adc16fac765bb4a31c99043
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:09:42 2013 +0000
aklog: Avoid overflows in get_afs_mountpoint
When working with the fixed length cellname buffer, use
strlcat and strlcpy rather than strcat and strcpy.
Caught by coverity (#985763)
Change-Id: Idfb3a0562d4028f5d1aa134b7ab0b5fa2dd60edb
Reviewed-on: http://gerrit.openafs.org/9445
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 788a6b67a088e2565c3b47ecb6e594a7b15f2757
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:04:46 2013 +0000
aklog: Fix overflows in auth_to_path
In the auth_to_path routine, don't use strcpy and strcat when
working with the fixed length pathtocheck buffer. Instead, use
strlcpy and strlcat to ensure that all string operations fit within
the buffer limits.
Caught by coverity (#985762)
Change-Id: I66ae11e1f49c66574d457fd79e97dd647ac98a73
Reviewed-on: http://gerrit.openafs.org/9444
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 95cd5b1d950ecb820179e4279b8570d8ad6780f5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 12:00:47 2013 +0000
afsmonitor: Fix theoretical overflow of handler string
Don't do an unbounded copy into the thresh structure's handler
string, in case the caller has passed us a string which is too
long.
Instead, switch to strlcpy for all string copies.
Caught by coverity (#985761)
Change-Id: I80e3d35d7a9a4b57e8efc0cb0c7b2dc12f021063
Reviewed-on: http://gerrit.openafs.org/9443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 98191d77617206c1923e73f2ce71ef2bd9c85161
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Mar 7 22:28:12 2013 +0000
afsmonitor: Use roken
Include the roken.h header, and remove the redundant system
includes from afsmonitor.c
Change-Id: Ia3eb8a7a0bb1e77d928d26cdfc87f818e6791e16
Reviewed-on: http://gerrit.openafs.org/9463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fcb7974b838c2b37a8b81b88b11905c6ece398f6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 10:27:47 2013 +0000
util: Avoid overflow in GetNameByINet
We copy the results of gethostbyaddr into a fixed length buffer
without checking whether they fit. Add a length check, and use
strlcpy to do the copy to make sure we can't overflow.
Caught by coverity (#985912, #985872)
Change-Id: I1e8f0fbb2577199c25201940f54646a4acdbbd37
Reviewed-on: http://gerrit.openafs.org/9393
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cc194827a841f057654f1dbe4dcb3f6de98c1c60
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:35:01 2013 +0000
kauth: Don't overflow stack when building username
knfs constructs the userName by combining the clientName.name
and clientName.instance arrays, along with a dot separator. Make
sure that the userName array is big enough to hold these, and
use strlcpy and strlcat just to make sure.
Caught by coverity (#985829)
Change-Id: I75431212c8464861a26546c9e47d13acbff08967
Reviewed-on: http://gerrit.openafs.org/9351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 25011b4544e48dffd5978201669f7b9e23da3144
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 12:08:46 2013 +0000
fs: Fix improper use of readlink
readlink returns a non-NUL terminated buffer. If we are going to
terminate its response, we need to make sure that there's space to
do so. So the length passed to readlink should be one less than the
real length of the buffer.
Caught by coverity (#985596)
Change-Id: I47081877a54a7b3d99ab8e6ec52d4663acd2eeb6
Reviewed-on: http://gerrit.openafs.org/9328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 908105fe8d51551e45692de4e145022138a0356c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:49:13 2013 +0000
fstrace: Don't read uninitialised data
The pftix variable points to the next free element in the
printfTypes array, so when we iterate through that array to
read that data back, we should stop when our iterator equals
pftix, not when it is greater than it.
Caught by coverity (#986013)
Change-Id: Ie08ebdd28cdde6647e91da5c5f67512096ecb34c
Reviewed-on: http://gerrit.openafs.org/9442
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d81271640891fb8c364e8625e7a9f6ede21572f4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:44:02 2013 +0000
readpwd: Make sure user supplies a passwdfile
If the user supplies enough command line arguments, but doesn't
provide a passwdfile, then we can end up trying to open whatever
garbage is on the stack.
Once we've finished parsing the command line arguments, make sure
that a filename was supplied.
Caught by coverity (#986009)
Change-Id: Ice2fca16458a90d73ae6b5fadb0efa22ed0b185a
Reviewed-on: http://gerrit.openafs.org/9441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3c564444cf1c0bad25792b10edc158030e180369
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:44:02 2013 +0000
readgroup: Make sure user supplies a groupfile
If the user supplies enough command line arguments, but doesn't
provide a groupfile, then we can end up trying to open whatever
garbage is on the stack.
Once we've finished parsing the command line arguments, make sure
that a filename was supplied.
Caught by coverity (#986008)
Change-Id: Iaea60027cf4bd81f9af04e995ce5c395275be833
Reviewed-on: http://gerrit.openafs.org/9440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5cf4415c8ad400a92fc9c7f436ae52256db2ef09
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:36:31 2013 +0000
libadmin: Don't pass garbage to pts_UserCreate
The libadmin pts_UserCreate function uses the value passed to
it in newUserId to control whether the user is being created
with a user supplied ID or not.
Initialise this value in the caller, so we don't end up creating
users with corrupt ids.
Caught by clang (#985979)
Change-Id: I89492a02db9f981a4d2040ea913a7e75f5f0b272
Reviewed-on: http://gerrit.openafs.org/9401
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ece7bd669af0c58dcaa2589e093387adb7d1756a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:36:31 2013 +0000
libadmin: Don't pass garbage to pts_GroupCreate
The libadmin pts_GroupCreate function uses the value passed to
it in newGroupId to control whether the group is being created
with a user supplied ID or not.
Initialise this value in the caller, so we don't end up creating
groups with corrupt ids.
Caught by clang (#985978)
Change-Id: I5c3e2cec5b39b8eecbea316e351480863d3d7761
Reviewed-on: http://gerrit.openafs.org/9400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f5b462c9d4a56be0ae4696db08fb92a1e7390e2c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:09:08 2013 +0000
libadmin: Don't double check for required param
The server, process and stat_type parameters are declared as
required when the command syntax is set up - so they must be
present when the command handler is called. So, don't bother
checking for them.
Caught by coverity (#985963, #985964, #985965, #985966, #985967,
#985968, #985969, #985970, #985971, #985972,
#985973, #985974, #985975, #985976, #985977)
Change-Id: Ic0565aa50c5a998b327efe60d460a182a93c7552
Reviewed-on: http://gerrit.openafs.org/9399
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8260d86dda766a21e9f457994e7a3b259ba3a31b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 11:02:09 2013 +0000
libadmin: Don't free garbage pointer
If we jump to the error handler early on in pts_GroupOwnerChange,
idlist may not have been used, and so we will end up trying to
free stack garbage.
Initialise the structure to 0 at the start of the function, so it
is always safe to enter the error handler.
Caught by coverity (#985962)
Change-Id: If70102e3da07135a9ec695f13caebe6298eff8ca
Reviewed-on: http://gerrit.openafs.org/9398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b535059d48ac592760e2e5b87414d9010143c993
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 10:54:16 2013 +0000
kauth: Use strl* functions in ka_log
Switch to using the strlcat and strlcpy functions in ka_log, to
avoid potential buffer overflows.
Caught by coverity (#985824)
Change-Id: Icb537567f8ae67ecb42332cda4413274edeaa681
Reviewed-on: http://gerrit.openafs.org/9397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 508674486a5b1b3b25d7f28febb41e8712d8592d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 10:48:50 2013 +0000
kauth: Handle calls to ka_log with no principal
If ka_log is called without a principal string, then the resulting
buffer will be garbage, as we don't start with a string for strlcat
to append to.
Caught by coverity (#985959)
Change-Id: I928b2807c093ac3f71a28150a117fd7b7eb29b05
Reviewed-on: http://gerrit.openafs.org/9396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a666bfd67bd14028aac5eb49f1bf02576fb58405
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 10:42:27 2013 +0000
vsys: Avoid uninitialised variable warning
Initialise the parms array to 0 so that we don't get warnings from
the compiler when we call syscall() using it.
Caught by coverity (#985949)
Change-Id: I134841bcb334d06146386e55ebfa38c7be993311
Reviewed-on: http://gerrit.openafs.org/9395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f322b0ff1ec44d713c23d567f4d304e3dc65e702
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 10:15:10 2013 +0000
rmtsys: Don't overflow pathname buffer
When we're constructing a homedirectory path to look for the
.AFSSERVER file in, we copy the HOME environment variable into a
static buffer, with a risk of overflowing that buffer.
Instead of using a static buffer, just allocate one with asprintf.
Caught by coverity (#985910)
Change-Id: I2daa5613609f2c09712b12a7ce7e59b1c0028ef2
Reviewed-on: http://gerrit.openafs.org/9392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b32d92268f77608b57adf350d963941a94a31604
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 10:35:42 2013 +0000
fsprobe: Get rid of unused hostname buffer
When we copy the user supplied hostname into the fixed length
hnamebuf array, we might overflow it. As we never use this buffer,
just get rid of it.
Caught by coverity (#985913)
Change-Id: I4cda6279cd667343856deeb425dceaf00f7904b6
Reviewed-on: http://gerrit.openafs.org/9394
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fed5dac9f25f7fbd74b6834ce6f087eaf31be2f2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:59:20 2013 +0000
auth: Don't overflow hostName array
afsconf_cell's hostName structure is a fixed length. Don't overflow
it by writing whatever comes back from gethostbyaddr into it. Use
strlcpy to catch an overflow, and if one occurs, just use
"UNKNOWNHOST", rather than a truncated host name.
Caught by coverity (#985906)
Change-Id: Iaa927f3e4860d99166789e8dc4950a03ea2237e4
Reviewed-on: http://gerrit.openafs.org/9354
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 79abe9d68ea041a2ea6261c6f7bb1f055a45bf0a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:47:53 2013 +0000
libadmin: Don't overflow volume name
The maximum volume name length in the VLDB RPCs is VL_MAXNAMELEN
(65), not 64 as used as a hardcoded value in vsprocs. Switch to
using the defined value, and also use strlcat to check that we
don't overflow this.
Caught by coverity (#985849)
Change-Id: Idde2cf8362bbd48538fafcd8c8d98e1f71cc15e1
Reviewed-on: http://gerrit.openafs.org/9353
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4f9ec8396d1c7f12f8fa264cea7c255ce62b7b8d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:47:53 2013 +0000
volser: Don't overflow volume name
The maximum volume name length in the VLDB RPCs is VL_MAXNAMELEN
(65), not 64 as used as a hardcoded value in vsprocs. Switch to
using the defined value, and also use strlcat to check that we
don't overflow this.
Caught by coverity (#985849)
Change-Id: I860d4bd4ed9a22185f4a83408d163ce20d21e751
Reviewed-on: http://gerrit.openafs.org/9352
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 77aa6c65b74e46c77dfaf440745496ab98b14244
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:33:12 2013 +0000
kauth: Don't overflow cell string
The cell string within a ktc_principal is only 64 characters long.
Be careful not to overflow it.
Caught by coverity (#985829)
Change-Id: I761dfcf5eebf1bd4ef31aa5982a2593e5317257b
Reviewed-on: http://gerrit.openafs.org/9350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 362728d2d6d53011603dc39f691707db20866434
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:26:05 2013 +0000
auth: Don't overflow cell string
If the kernel gives us bogus data back from the VIOCGETTOK pioctl,
we might overflow the cell string when copying in to it. Use
strlcpy to avoid this (unlikely) occurrence.
Caught by coverity (#985768, #985769)
Change-Id: I2583b017e7a366f4271f356216bdd60f3a7b7911
Reviewed-on: http://gerrit.openafs.org/9349
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2fac53522e7ef5b3a376e191bffdc1f6784e6995
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:16:10 2013 +0000
aklog: Fix improper use of readlink
readlink doesn't NUL terminate its return string, so it is up to
us to do so.
Caught by coverity (#985739)
Change-Id: Ifb858d628845bd963928e25834e540bbb3a187c8
Reviewed-on: http://gerrit.openafs.org/9347
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6a54bf735871d93bc77e5cf166e506f4f2423d0a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 2 09:01:59 2013 +0000
vlserver: Use correct literal in bounds check
The base array has VL_MAX_ADDREXTBLKS elements. Use this when
checking for an array overflow, rather than VL_ADDREXTBLK_SIZE.
Caught by coverity (#985600)
Change-Id: Ie60ad5cc79c41245028887871759776549694426
Reviewed-on: http://gerrit.openafs.org/9346
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6c41b1f740e16b5b9adfe9026630595be6f0699e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 22 22:46:12 2013 -0600
viced: Improve CallPreamble error messages
These messages are not very useful right now. At least try to say what
host we sent an error to, so we know which host may be experiencing
some troubles as a result.
Change-Id: I8b41b46511ebd4760d5021ea2fe2011842450998
Reviewed-on: http://gerrit.openafs.org/9381
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1c4dc26584533afe3c6c7cfd24a0418cb1552a00
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 19 17:11:40 2012 -0600
ihandle: Remove ih_sync_thread
ih_sync_thread currently syncs files flagged as needing
synchronization in the background every 10 seconds. This practice has
caused severe data corruption on more than one occasion over the past
few years (124359, 131530). It has also been argued repeatedly that it
provides no meaningful additional on-disk consistency, so there is no
reason for it to exist even if it were error-free.
Syncing files in the background provides no guarantee on the
consistency of the file contents, since the files are not synced in
any order with respect to each other, or with respect to what
filesystem operations may be occurring in the application.
Additionally, journalling filesystems common on fileserver backends
will typically ensure some consistency after a certain amount of time
(by default, 5 seconds on ZFS and ext3+), so doing this sync ourselves
is often redundant or even counterproductive.
So, to avoid current and future issues with ih_sync_thread interacting
with other ihandle users, just get rid of it. Files flagged as needing
sync are still synced (not in the background) during IH_REALLYCLOSE.
FIXES 131530
Change-Id: I29571c82c5b7454cd834b339fd48baeb9963a87b
Reviewed-on: http://gerrit.openafs.org/8797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a3a79c5a15bff7e978ff4bae2d2a480b73750392
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 3 22:54:53 2013 -0500
Windows: AFSPopulateNameArrayFromRelatedArray change
Modify AFSPopulateNameArrayFromRelatedArray so that the DirectoryCB
parameter can safely be NULL. A NULL DirectoryCB input is required
to copy the entire NameArray.
Change-Id: Id125bb22df89c93e60d485e178bc7be0ab3c313e
Reviewed-on: http://gerrit.openafs.org/9340
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1ac432b7d0259a01e158016307966c76b3ba9d79
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 3 22:10:39 2013 -0500
Windows: AFS_NAME_ARRAY_TAG value
The AFS_NAME_ARRAY_TAG value collided with AFS_NAME_BUFFER_TEN_TAG.
Change its definition.
Change-Id: I29ff2d4cb7f5d1afebea91cbb5c294ecedbe50a2
Reviewed-on: http://gerrit.openafs.org/9339
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 89b07844d318637cf8c643d60dd174cb1f71db87
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 3 14:16:35 2013 -0500
Windows: Add AFSCreateSymlinkCB data strctures
AFSCreateSymlinkCB and AFSCreateSymlinkResultCB
Used for creating a symlink to either a file or a directory.
Change-Id: Ic7dc49d48fc7ba3863752b3732c932f57d674d99
Reviewed-on: http://gerrit.openafs.org/9338
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3ae1c025693a0a20f359dc0c3b7532c13b96e9f3
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sun Mar 3 22:03:41 2013 -0500
src/rxosd/Makefile.in: avoid infinite recursion in CC variable
src/rxosd/Makefile sets CC=$(MT_CC).
src/config/Makefile.config sets MT_CC=$(CC).
Since both are recursive-expansion variables, this causes an infinite
loop, and make complains about it:
Makefile:25: *** Recursive variable `CC' references itself (eventually). Stop.
This patch avoids setting CC in src/rxosd/Makefile.in altogether, since
it does not appear to be necessary, as suggested by Jeffrey and Derrick.
Change-Id: Ieaa5c5ed21d83629ea713a745e76d17ac7f76ec1
Reviewed-on: http://gerrit.openafs.org/9336
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fe9f4a93183c972225541b1ebf5ed5b5f484adff
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sun Mar 3 21:14:22 2013 -0500
afscp: Fix check for bare root.cell dirs in dynroot mode
A previous fix (git commit fb1d7491fbe2e90300b23284f213cac2bdcd56ac)
added a check for '!p' in gettoproot(), but p is always a non-NULL pointer
(in part since it's dereferenced just above in the code), so the check
is always false.
Instead, I suspect the original author intended to check for '!*p',
which this patch does.
Change-Id: I1c0a2dd1d582a6b5e82275db18474343efa679a2
Reviewed-on: http://gerrit.openafs.org/9337
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 80875f8aa1540bf032073a4843566bbe6b1fe301
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 12:12:07 2013 +0000
up: Fix improper use of readlink
readlink returns a non-NUL terminated string. If the string must be
terminated, we need to have space in the buffer for it. So, the
buffer passed to readlink must be 1 less than the real length of
the buffer.
Caught by coverity (#985597, #985610)
Change-Id: Id9a6f8227d756140960ac295330aaf17dca2ec03
Reviewed-on: http://gerrit.openafs.org/9329
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 28a441ebd8323437bf762a790b4ec5e6301e4bec
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 12:01:19 2013 +0000
util: Fix overflows in address parsing
The extractAddr function (which turns a dotted quad into an IP
address), has a number of overflows when one or more elements of
the quad are more than 31 characters in length.
The array allocated for each portion is 32 bytes long, but we only
stop writing into the array when the indexing pointer reaches 32,
which doesn't leave us with space for the trailing NULL.
Rework this so we always allow space for the NULL, and use a #define
for the array length to make it more clear whats going on.
Caught by coverity (#985591, #985592, #985593, #985594)
Change-Id: I33ecc78ba6c90e44c3a4f2df171abba1d58562b3
Reviewed-on: http://gerrit.openafs.org/9327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a4ae9a4c3cc1fa5ca2b813174040dce36284a4b9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 11:47:03 2013 +0000
ubik: Don't overflow server's addr array
We're checking to see if we've overflowed the array _after_ we've
looked up an element within it - so on the final iteration, we
always read past the end of the array.
Fix this by swapping the order of the tests in the for statemen
Caught by coverity (#985590)
Change-Id: Ibbf0eb88083166f0a23316edf0612e94593c07ce
Reviewed-on: http://gerrit.openafs.org/9326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a1d8109c8fa8c10e3ce5ed67cda03b3b557608ff
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 11:35:05 2013 +0000
rxgen: Don't overflow PackageIndex
PackageIndex++ returns the pre-index value of PackageIndex, so the
error statement isn't run when PackageIndex == MAX_PACKAGES. This
means we go on to overflow all of the arrays that are MAX_PACKAGES
in size.
Caught by coverity (#985583, #985584, #985585, #985586,
#985587, #985588, #985589)
Change-Id: If81f9ff89edc4cfd56677ff51cea71281ebe1e3b
Reviewed-on: http://gerrit.openafs.org/9325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ff7fd58b49a41bf85df492b9f470004d4433800e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 11:31:31 2013 +0000
unlog: Don't overflow cells array
cells has a maximum size of MAXCELLS. Doing cells[MAXCELLS] overflows
that array. Clamp our maximum number of cells at one below this to
avoid the overflow.
Caught by coverity (#98551)
Change-Id: I45fd8a55e31ad7ea86a996b593359536c7078891
Reviewed-on: http://gerrit.openafs.org/9324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 30e25c74376dd8aa24018116015e57c47c1dfaf9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 11:22:26 2013 +0000
kauth: Don't overflow cellinfo hostAddrs array
The hostaddrs array has MAXHOSTSPERCELL (8) available elements.
The ubik connections list has MAXSERVERS (20) elements - when copying
from the ubik list into the cellinfo hostaddrs list, be careful not
to overflow it.
Caught by coverity (#985577)
Change-Id: Ie51cb939a6e3381a285787ad125342ca7a9e7cbb
Reviewed-on: http://gerrit.openafs.org/9323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c0fba6eab519bd1bb6929b788361219f97da7212
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 11:09:04 2013 +0000
bucoord: Remove theoretical overflow of ubik array
The ubik connections array is NULL terminated, so we have to
ensure that there is enough space for the trailing NULL. As the
array is MAXSERVERS elements long, this means that we can only
store MAXSERVERS-1 connections in it.
This problem will never be encountered by the correct code, as
the number of hosts returned from afsconf_Open is capped at
MAXHOSTSPERCELL (currently 8). MAXSERVERS is currently 20. However,
fix the bug in case we increase MAXHOSTSPERCELL at some point in
the future.
Caught by coverity (#985576)
Change-Id: Icd3f4afe929cbf05522e44132f055a3955c4d23c
Reviewed-on: http://gerrit.openafs.org/9322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 59def405ba9404954debd35da539346b1ccd4096
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 10:54:07 2013 +0000
Unix CM: Fix stray semicolon
Commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85 introduced a
stray semicolon in the osidnlc code. Fix it.
Caught by coverity (#989030)
Change-Id: I1f68b6149bb4325995c96d8599c45565c4979f16
Reviewed-on: http://gerrit.openafs.org/9321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 64630d07b893199431b601a73de23c303c61db40
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 1 10:52:32 2013 +0000
xstat: Add the residency RPC to the list of fs ops
Include the ResidencyRpc in the list of fs operation numbers that
can be display by xstat_cm_test.
Caught by coverity (#989029)
Change-Id: Ib8059fe53e5254d212722db59c05a0f0822883e2
Reviewed-on: http://gerrit.openafs.org/9320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bdd9ad146c8a3d05b926dba3e01299ce79cd5ad3
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Mar 2 10:06:47 2013 -0500
crypto: make krb5_enomem a static inline function
With the recent update to the imported heimdal code, krb5_enomem
is used in a few places as a simple statement that doesn't make
use of the value. With the current definition, this triggers
compiler warnings because the statement has no effect.
Replace the definition with a static inline function that returns
the expected value.
Change-Id: I799022b69a43ab635560a1a5ea8f67f0a8f7230a
Reviewed-on: http://gerrit.openafs.org/9335
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1c4e7ddb498f86b232f0f1de1f40690e97bf6a65
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 28 17:11:57 2013 -0500
Windows: afslogon !KA_USERAUTH_AUTHENT_LOGON
Patchset 305133cde60fec7fb1050caf60a4319cdcf88a27 halted the practice
of calling ka_UserAuthenticateGeneral2() with the alternate smbName.
It should have halted the practice of passing flag
KA_USERAUTH_AUTHENT_LOGON which indicates that the smbName parameter
has been provided. Passing KA_USERAUTH_AUTHENT_LOGON without the smbName
field results in a KTC_INVAL error.
This error only impacts sites that still use kaserver or Kerberos v4 for
authentication.
Change-Id: I9eb7adc4fdb7b3ffa0aedca377e2f91bc01b30ea
Reviewed-on: http://gerrit.openafs.org/9318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bf78bf2c115659b78c34d3bc9d1934bcff21c8cc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 22:07:12 2013 +0000
libadmin: Don't free garbage
Make sure that we initialise the nbulkentries structure to 0 before
we start work, so that if the failure handler is called, it doesn't
try to free garbage.
Caught by coverity (#985980)
Change-Id: If55faadd44f7bbc80abbdcd7842603d586db7581
Reviewed-on: http://gerrit.openafs.org/9317
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3beca62928665868294ec3e9d34ab63b41e12645
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 17:14:20 2013 +0000
afsmonitor: Fix multiple NUM_CM_STAT_ENTRIES overflows
If an array is n elements long, accessing element array[n] is an
overflow. Fix various places where we apply loop bounds incorrectly
using the NUM_CM_STAT_ENTRIES constant.
Caught by coverity (#985571, #985573)
Change-Id: I24a53e8044d3d5d39d070909400329a82f22b6b9
Reviewed-on: http://gerrit.openafs.org/9316
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4ea1c8440aad6bb6dc9cdb598b5708c685603219
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 17:14:20 2013 +0000
afsmonitor: Fix multiple NUM_FS_STAT_ENTRIES overflows
If an array is n elements long, accessing element array[n] is an
overflow. Fix various places where we apply loop bounds incorrectly
using the NUM_FS_STAT_ENTRIES constant.
Caught by coverity (#985570, #985571, #985572)
Change-Id: I8a28f06059771f91415ebc989714929cfd09f296
Reviewed-on: http://gerrit.openafs.org/9315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 74d0d0d5e686d82e18f896889870af666c4d495d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 17:07:31 2013 +0000
afsmonitor: Add missing items to fsOpNames array
The Lookup and Residency fs stats counters were missing from the
fsOpNames array. Add them in - Lookup has been missing since the
IBM release, Residency was missed when the MR-AFS code was merged.
This is still rather fragile, as there's no guarantee that
AFS_STATS_NUM_FS_RPC_OPS matches the number of elements in this
array. However, this is now correct until someone breaks it again...
Caught by coverity (#985569)
Change-Id: I22496050d5e786276a6646aa763d036449a3660d
Reviewed-on: http://gerrit.openafs.org/9314
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2c8e4f839fc253abb8051bbf89d36e94a2200590
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 17:05:29 2013 +0000
Unix CM: Update AFS_STATS_NUM_FS_RPC_OPS
There are actually 30 elements in the AFS_STATS_FS array. When the
ResidencyRpcs counter was added, the total number of operations
wasn't updated.
Fix this so that it is correct, although this still remains rather
fragile.
Change-Id: I92a0d2bf3741bc7aaeae837d6dcbcd30616e17ae
Reviewed-on: http://gerrit.openafs.org/9313
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d2437d02a6f59d972dd0690f7eb1c46cf7cc4b85
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 15:26:15 2013 +0000
Unix CM: Fix hash table overflow in dnlc code
In GetMeAnEntry, we can end up overflowing the nameHash array by one
element if the stars are particularly badly aligned.
nameptr is a static across function calls, so nameptr and j are not
equal. If nameptr is increment to NHSIZE in the same loop iteration
as j reaches NHSIZE + 2, the loop will terminate. We'll then
lookup nameHash[NHSIZE], which is 1 element passed the end of the
array.
Add an if statement which loops nameptr outside the loop (in the
same way as the if statement in the loop)
Caught by coverity (#985568)
Change-Id: I47075f363fad10e8c19276359699566755779cca
Reviewed-on: http://gerrit.openafs.org/9312
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ff8bae8938532d95f792258d2c520705e095e7af
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 13:45:00 2013 +0000
Unix CM: Don't overflow ICL logs array
When checking whether a user supplied index into the ICL logs array
is out of bounds, we need to check whether it is greater or equal
to the maxmimum number of elements. Otherwise we can access one
more than the number of elements in the array.
Caught by coverity (#985567)
Change-Id: Id90f02eae1d5689b9b2c9a82bce0e503941387da
Reviewed-on: http://gerrit.openafs.org/9311
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8f51502e5f45a43fba130d260813716be894d51e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 12:15:29 2013 +0000
dumptool: Remove newlines safely
The code currently does
fgets(cmdbuf, ... );
cmdbuf[strlen(cmdbuf - 1)] = '\0';
in order to remove new lines from cmdbuf. Coverity thinks there's
a danger of strlen(cmdbuf) being 0, and thus the strlen being negative.
That shouldn't happen, but if fgets hits EOF midway through a line, we
might get a string that doesn't have a trailing '\n', and end up
removing the wrong character. Tidy this up by checking that the string
isn't 0 length, and that the character we're zapping is a newline.
Caught by coverity (#985430)
Change-Id: I8dae925debdc2473a6a51db021ce843e957a1557
Reviewed-on: http://gerrit.openafs.org/9310
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bc70828f0713891597cf0042bc3e204f3d923271
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 10:22:43 2013 +0000
ptuser: Clear return value from pr_ListMembers
Make sure that lnames is zero'd on entry to pr_ListMembers, so that
an early error return doesn't also return garbage.
Change-Id: I78c35f0c18d9c7ec3f638c8e80609ac28d362925
Reviewed-on: http://gerrit.openafs.org/9309
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a80cb27ae89877c96c6074ab2f6a7b3e51485768
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 28 10:20:22 2013 +0000
readgroup: Don't use results if error occurs
If pr_ListMembers returns an error, don't try and use the results
it provides, as they could be garbage.
Caught by coverity (#92119)
Change-Id: Idcfb464953dcdec68cba988d3fb1ab6ddad08340
Reviewed-on: http://gerrit.openafs.org/9308
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ed3f1134460546888e2306262d88d6886beae7e1
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Fri Jan 11 11:38:58 2013 -0700
RedHat: fix makesrpm.pl version discovery
We stopped defining the OpenAFS version in AM_INIT_AUTOMAKE a while
back. Use git-version script instead.
Change-Id: I56ef9792cf653921161e177a7c6f143a4b41ace2
Reviewed-on: http://gerrit.openafs.org/8908
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 87f2a92afb58660846d39c71ce630c3acfb72020
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 27 15:21:56 2013 -0500
Windows: Build libafsauthent.dll against mtafsubik.lib
Instead of building a private copy of the ubik objects, link
against mtafsubik.lib.
Change-Id: Ic72e0ea963ddb870d082f7a3746f978ba785bbbc
Reviewed-on: http://gerrit.openafs.org/9302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9d4f7ca48cf1f553bbb566e715fe986627a5d47f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 27 15:19:41 2013 -0500
Windows: afsio reduce library link list
When linking afsio many of the libraries specified in the EXELIB3
list were unnecessary. The only lib in the list that is required
is libcmd.lib. Rename EXELIB3 to LIBCMD and prune the rest.
Change-Id: I87bf0583f312d7b3dadc5581c08fedaa6b754c77
Reviewed-on: http://gerrit.openafs.org/9301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e2ef4ce23d0cd0eddadfb39a39a29593093f0b6f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 27 15:07:57 2013 -0500
Windows: Remove RXAFS* from afsrpc.dll
afsrpc.dll is supposed to be the multi-threaded dynamic loadable
version of the RX package. It has also included the RXAFS and
RXAFSCB client functions from src/fsint. Including the RXAFS* is
nice in theory but in practice the afsd_service.exe must link to
afsint.lib anyway in order to obtain access to RXAFSCB_ExecuteRequest()
which is part of the server portion. Linking to both results in
multiple instances of the same symbols in which case afsint.lib
must be linked to first and the dynamic version of the functions
are ignored.
The only other module that used RXAFS* functions from afsrpc.dll
is the adminutil library from the libadmin package. adminutil
doesn't implement the server functions but it can just as easily
link against afsint.lib.
Removing RXAFS* from afsrpc.dll results in a library that only
contains RX, RXSTATS, core xdr and rxkad.
This patchset also fixes some minor bugs:
1. $(UTILOBJS) were not being linked to the library due to
a typo.
2. Always use multi-thread safe versions of afsutil.lib
Change-Id: I5cc6d485a763d5a17735abd35d193fb7b0d280e5
Reviewed-on: http://gerrit.openafs.org/9300
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d6cfcf46a8f3ec03e2f805aca6e5012eb6633803
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 27 22:16:33 2013 -0500
Windows: Move grmutex, etc. to afspthread.dll
afsauthent.dll exported:
pthread_recursive_mutex_lock
pthread_recursive_mutex_unlock
grmutex (DATA)
even though a dedicated afspthread.dll existed and all pthreaded
modules must link to afspthread.dll and not all link to
afsauthent.dll. Move these functions and the global mutex variable
to afspthread.dll to ensure that only one instance of the variable
is present in any binary.
Also remove from src/libafsauthent/NTMakefile the local building
of src/util object files and link to mtafsutil.lib.
Change-Id: I9f8e76165f9c1b1be7ed1a90cdaac03b629d9591
Reviewed-on: http://gerrit.openafs.org/9303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 44e806431bec3149a78127f5d1003e84e3a0b072
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 27 10:34:59 2013 +0000
ubik: Avoid unlinking garbage
If SDISK_SendFail fails before the pathname to the temporary file
has been constructed, then the failure handler will unlink stack
garbage, with variable results.
Initialise the string, and check to see if it has contents before
calling unlink
Change-Id: I1de898d5f0f0dc608e9c9c62dc66e6b4b9fdc5bf
Reviewed-on: http://gerrit.openafs.org/9299
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 816b0c76738b7e404c9384a745b58b4d90bfc30d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 27 10:28:05 2013 +0000
Unix CM: Don't free cell, then release lock on it
If afs_NewCell fails, then we can end up releasing a lock on a
section of memory that we have already freed. As this only happens
if the memory we're operating on is newly allocated and not yet
visible to anyone else, it is safe to release the lock before
starting to tidy things up.
Caught by coverity (#986054)
Change-Id: Ie8651c61790d57a9fd7bbbafcaf78e37b8222bae
Reviewed-on: http://gerrit.openafs.org/9298
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ce20f1f15103226667bc872378cf9b2e4b3e8cd7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 27 10:11:21 2013 +0000
libafscp: Can't unlock something we've freed
When we call _StatCleanup on a stored statent structure, it
deletes the mutex, and frees the structure itself. This means it
can't be called with a locked structure as the mutex deletion
will fail, and then we'll try to reference freed memory when we
later unlock that mutex.
Fix this by unlocking the mutex before calling _StatCleanup. This
is safe because the only reference to the structure visible to other
threads must have been deleted by the time we reach this point.
Caught by coverity (#986058, #986059)
Change-Id: I346d4c8a7cd478db044af919662c1cf1c093e205
Reviewed-on: http://gerrit.openafs.org/9297
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 12ced70c95fe8efbcec09a372f0af81d819bb8cd
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 27 09:23:07 2013 +0000
pt_util: Protect against corrupt input files
If we have an input file which contains a group membership line
(with a leading space) before any group definitions occur, pt_util
would use stack garbage as the group to create these members in.
Avoid this by requiring the presence of a group line before any
membership lines.
Caught by coverity (#92180, #986000, #92248)
Change-Id: I536f089d67041dbf90f35b6dfeed5ba3303318a8
Reviewed-on: http://gerrit.openafs.org/9296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 62a10e063b4fe6721bd9768611d5f0c13b303189
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 27 09:21:30 2013 +0000
pt_util: Catch sscanf failures
If there isn't sufficient data in the input line to satisfy sscanf,
fail with an error, rather than continuing with potentially corrupt
data.
Change-Id: I5f963b5623176ac7631693b093d23cf9f0405edc
Reviewed-on: http://gerrit.openafs.org/9295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a332ce9d0e87fab55f3d286690026fe075f624dd
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 22:40:04 2013 +0000
kauth: Fix overflow when writing ticket file
krb_write_ticket_file uses a fixed length buffer to store the name
of the ticket file, but copies into this from an environment variable.
Remove the fixed length buffer, and use a mixture of the variable
itself, and dynamically allocated strings.
Caught by coverity (#985909)
Change-Id: I997fd1812c45e730db39497a27a5e168f102fee5
Reviewed-on: http://gerrit.openafs.org/9294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a5324a6bb6ff127997c48b54f8ad0e98189f3f1e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 22:31:49 2013 +0000
auth: Refactor afsconf_Open failure handler
Refactor the code which returns a failure from afsconf_Open into
a single section, rather than having multiple copies through out
the routine.
Change-Id: I70b3fec98321bf89e6d59055545d5d4193026d28
Reviewed-on: http://gerrit.openafs.org/9293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 41d9ea697bf5e81e5003ad7b208788223c25536b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 22:27:25 2013 +0000
auth: Fix buffer overflow in afsconf_Open
If we fallback to the .AFSCONF file in the user's homedirectory,
the results of getenv("HOME") are copied into a fixed length string,
without checking for overflows.
Instead of risking this, just use asprintf to dynamically construct
a string, and free it when we are done.
Caught by coverity (#985905)
Change-Id: Id8769ede841165d3ff3104143e55767d550d6f87
Reviewed-on: http://gerrit.openafs.org/9292
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit debf43714b0f00fa00a0ef3384e098de78d28ed6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 21:30:20 2013 +0000
bos_util: Fix buffer overflow
Get rid of a buffer overflow in the bos_util utility, by just
printing the key from the 'tbuffer' string, rather than copying
it into 'x' which is too small for it.
Change-Id: Ia364fb63edb9e40a887e77aad833689a99b4ea7c
Reviewed-on: http://gerrit.openafs.org/9291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ddc37043351056c402158610477312f0d7d01c13
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 21:28:52 2013 +0000
volser: Fix bad readlink usage
readlink fills the buffer passed to it with a non-terminated string.
It can legitimately fill the whole of this buffer. So, if we require
a string to be NUL terminated, we must give readlink one less than
the string length so that the termination character can be safely
appended.
Caught by coverity (#985611)
Change-Id: Ie6c651a9c0fd94d83bd05395204341d71e353146
Reviewed-on: http://gerrit.openafs.org/9290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit caabad98232557220f153461520fc0cf1c6978fb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 20:52:47 2013 +0000
afsmonitor: Use NULL, rather than (struct foo *)0
Change-Id: Ib011da471465dae056d47f5bbaad5a27b5c85966
Reviewed-on: http://gerrit.openafs.org/9285
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5a61e826fa0de6a5987f06257199476f79d2473a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 20:51:34 2013 +0000
afsmonitor: Check correct variable is non-NULL
Before freeing curr_fsData, check that it is non-NULL, rather than
checking prev_fsData in error.
Caught by coverity (#985289)
Change-Id: I8fb74ce0c4e447de65924f2afb6075213d839760
Reviewed-on: http://gerrit.openafs.org/9284
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c04de52da4e89e15b211b4a19a3d9bc4d612b209
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:10:17 2013 +0000
bosserver: Return error if key is bad
If a key is bad, have SBOZO_ListKeys return an error, rather than
silently ignoring the result from ka_KeyCheckSum.
Caught by coverity (#988413)
Change-Id: Ifacc9bac654d2632bd31731995795b786d485327
Reviewed-on: http://gerrit.openafs.org/9270
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c705a815a808e7eafd2043fe0ec0881d602342c5
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Wed Feb 27 05:08:40 2013 -0500
ptserver/testpt.c: remove dead code in ListUsedIds
A part of the current ListUsedIds code is:
range = abs(startId - maxId);
if (range < 0)
range = -range;
The only way abs() could return a negative value would be if its
argument was INT_MIN (-2147483648) to begin with, because -INT_MIN
cannot be represented in two's complement. However, calling
abs(INT_MIN) is undefined behavior in C [see C99 7.20.6.1], and for
that matter, so would be computing -range (-INT_MIN) in that case,
so we could still be left with a negative range value.
Luckily, (startId - maxId) can never be INT_MIN. If startId < 0,
then maxId <= startId, so in the worst case, when maxId = INT_MIN
and startId = -1, (startId-maxId)=INT_MAX. If startId >= 0, then
maxId >= startId, so in the worst case, when maxId = INT_MAX and
startId = 0, (startId-maxId)=-INT_MAX=INT_MIN+1.
This patch removes the useless if statement.
Change-Id: Ia754fcf3e59354afb40dbbbb95623e27285a5f82
Reviewed-on: http://gerrit.openafs.org/9289
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cc703d9562455c74767fcd6d2055339109fa9243
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:38:59 2013 +0000
volser: Catch EOFs when reading dumps
When reading a standard tag, make sure and catch an EOF error
from iod_getc. Otherwise we'll end up trying to parse 0xFF as a
tag length.
Caught by coverity (#985603)
Change-Id: Iae0b1bf71ed495b4f454975a1bfe3aef8fca3e9e
Reviewed-on: http://gerrit.openafs.org/9275
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 96131593b329a319b22368a9ef37788fb4e5d4f4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:30:00 2013 +0000
ptserver: Zero ubik header before writing to it
When using pt_util's ubik shim, if we're creating a new ubik label
make sure to zero the whole structure before writing it out to disk.
Otherwise we get a shorts worth of stack garbage in the resulting
file.
Caught by coverity (#986010)
Change-Id: I0abb8b7968d4f25c97dc0927d63dd01099b829b7
Reviewed-on: http://gerrit.openafs.org/9274
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5d42398298ad4af91a08a08ce607754f644b37dc
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Feb 26 09:31:43 2013 -0500
vos: Unrecognized or ambiguous switch '-c'
The documented abbreviation '-c' for '-cell' no longer works since
the -config option was added. Add a parm alias '-c' to restore
compatibility with previous syntax.
Change-Id: Ie98e470d204ea2186a95668bba2581cf3e88f729
Reviewed-on: http://gerrit.openafs.org/9276
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit daed548f70a2187c679232e4f79d703389419c4e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:26:36 2013 +0000
ptserver: Rename ubik.c as ptubik.c
Coverity gets confused between ubik/ubik.c and ptserver/ubik.c,
and produces a load of false positives. Rename the ptserver ubik
shim (which is only used by pt_util) in order to reduce this
confusion.
Change-Id: Ida606fccebcb4edfed706405424ff3ee4858020f
Reviewed-on: http://gerrit.openafs.org/9273
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4587ddc130547b4cce723476cfa798a03ccc0320
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:06:15 2013 +0000
bosserver: Catch failures to create daemon thread
If we can't create the bozo daemon thread, then don't keep going
regardless. Just warn the user and exit.
Caught by coverity (#988414)
Change-Id: I46445b1744f7c3c944e917b33a6fc6fb669df002
Reviewed-on: http://gerrit.openafs.org/9269
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8192554e36272d5ed21007b4c0e3b6c56511457d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 11:59:56 2013 +0000
libadmin: Catch VL_GetNewVolumeId failures
If ubik_VL_GetVolumeId fails in the vos ProcessEntries routine,
report the failure and give up, rather than continuing with a
0 maxVolid
Caught by coverity (#988417)
Change-Id: I281e1c518813f9d7fab46e4f87a091fac6b3a754
Reviewed-on: http://gerrit.openafs.org/9268
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fb483acf626088ebce6f148c1e9644ce9c8c2045
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Feb 11 17:05:34 2013 -0500
afs: removing trailing semicolons
Remove spurious trailing semicolons from macros.
Change-Id: I26550a4ca8e8fe5232dad4cdb2c42a5f44a28f32
Reviewed-on: http://gerrit.openafs.org/9092
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d8fa251a14e9469fb6ec722d100b6a8557248694
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:21:59 2013 +0000
ubik: Zero header before writing to disk
The ubik disk header contains a padding field, which is never
zeroed before being written out to disk. This means that there is
a shorts worth of stack garbage in every ubik label!
Just zero the whole structure with memset before we populate it.
Caught by coverity (#986011)
Change-Id: Ib9f8b45111a83178372409c717c30ccb6a1044f4
Reviewed-on: http://gerrit.openafs.org/9272
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e191cb889c941848fe09f04c24d969111e6dc494
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 12:17:29 2013 +0000
viced: Don't write out garbage when extending file
When we extend a file, we write a single byte of data to it - tlen
is used as a source for this single byte. However, in the current
code, tlen is used uninitialised. Set it to 0, so we don't write a
byte of stack garbage.
Caught by coverity (#986015)
Change-Id: I11480a5ba0a5544437e18a6b314ff98ba6256df0
Reviewed-on: http://gerrit.openafs.org/9271
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3ad7ba106dea28277b9e1f7a7370ba17b9fb3d17
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 11:55:32 2013 +0000
fs: Catch pioctl failure in mkmount
If the VIOC_FILE_CELL_NAME pioctl fails in fs mkmount, return an
error to the caller, instead of ploughing on with potentially bad
data.
Caught by coverity (#988418)
Change-Id: I68df5dd26d955db860dd016c76109f7d262bad17
Reviewed-on: http://gerrit.openafs.org/9267
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 99929488511d13dab94491cac1d477062f9da741
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 26 11:52:01 2013 +0000
libafscp: NULL return value not pointer
When afscp_FindCallBack sets its return-by-reference value to NULL,
it should do so to the value itself, not the pointer to it.
Caught by coverity (#988419)
Change-Id: I6b227465d7aa945d871b2db1cc4d1357cae493d3
Reviewed-on: http://gerrit.openafs.org/9266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2ddec075985446e80fb12eb8a7d48b2088067b69
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 25 23:13:47 2013 +0000
Add krb5_enomem for config parser & kernel crypto
The imported code form Heimdal that forms our config file parser
and kernel rfc3961 library now makes use of krb5_enomem. Provide
an implementation so we build again ...
Change-Id: Ie7162d73aa97e6f7594c0e7c68ed6939f57ae884
Reviewed-on: http://gerrit.openafs.org/9265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a9fd0810d2425f9e0936c3c52903d73e9e74a6ab
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Mon Feb 25 23:00:46 2013 +0000
Import of code from heimdal
This commit updates the code imported from heimdal to
66f4c441e9e0de68fbcf81763642779ac5c33631 (git2svn-syncpoint-master-199-g66f4c44)
Upstream changes are:
Kumar Thangavelu (1):
unning "kinit --fast-armor-cache=xxx" against a Win2K3 domain resulted in a crash with the attached backtrace. FAST is not supported with RC4 keys which are used in Win2K3. The code already handles this but the error code is not propagated up the stack.
Love Hornquist Astrand (1):
add socket_set_nonblocking
Roland C. Dowdeswell (3):
Optimise _krb5_n_fold() a bit.
Use krb5_enomem() more consistently in lib/krb5.
Further improvements to lib/krb5/n-fold.c:
Change-Id: I3b652e3ea3c84a939c4988bc8c24b3edee06446f
Reviewed-on: http://gerrit.openafs.org/9264
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 961fcc63640ee95e9b1cfebe92d71e3b9f3d9f52
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 16:18:26 2013 +0000
crypto: _afscrypto_strdup must copy trailing NUL
The _afscrypto_strdup helper function was failing to alloc enough
space for the string's trailing NUL, and to copy that NUL over.
Caught by coverity (#985580)
Change-Id: I61c9a96275a79682a9521846ab52615ea5bc061d
Reviewed-on: http://gerrit.openafs.org/9263
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 00601179625ffb71461bbcc46629791895cf4793
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 20 14:54:55 2013 +0000
volser: Make it clear what's copied from partList
XVolListPartitions uses partList to maintain a list of partition
IDs - it does not use the partFlags field. Make it clear when we
populate the partEntries field that we are only copying the
partition list.
Caught by coverity (#986030)
Change-Id: I8c46ee5c220f0cb2b65943ad5faa80877ca46685
Reviewed-on: http://gerrit.openafs.org/9262
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2d4c9c08ea6e61c40df482d5aa2e1413179f6b94
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 25 10:32:22 2013 +0000
bucoord: Remove dead assignments in cmd init
Don't assign command syntax objects to 'ts' if we're not going
to add any parameters to them
Change-Id: I69f6e090fc115ab213c1f20dc46da81f2878e0a3
Reviewed-on: http://gerrit.openafs.org/9260
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e2f4f60e3e3eb1476eefbff6cb98d6853cddc0df
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 25 10:28:31 2013 +0000
butc: Remove dead initialisation
The 'bytesread' variable is set by all code paths, so don't bother
assigning a default value each time we pass through the loop
Caught by clang-analyzer
Change-Id: I8b79bc888ba23e2bcfa9befb5bf034db8f3ca3f8
Reviewed-on: http://gerrit.openafs.org/9259
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5474e1ccd77a3a40db3601f94556001610c82b95
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 25 10:26:33 2013 +0000
volser: Don't catch errors in cleanup
We can't do anything if cleaning up the clone volume fails, so
don't bother storing the error code.
Caught by clang-analyzer
Change-Id: I5249dbad9a1bb732aba73e7a09f74c83e606b45d
Reviewed-on: http://gerrit.openafs.org/9258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f63f7b90ebbd4133b9e12ca643c8d3ccb8d445be
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 25 10:24:53 2013 +0000
bucoord: Remove dead initialisation
matchLength is set regardless of what the separator is, so we don't need
to provide a default value.
Caught by clang-analyzer
Change-Id: Iac8fe8db8832cf2b3347ec1bdacc7245bddf542b
Reviewed-on: http://gerrit.openafs.org/9257
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ec5ec48956e91932279ef025f0d98946f0f32585
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Feb 25 10:15:10 2013 +0000
butc: Remove dead initialisation
code is set to a real value on every code path, so don't bother
initialising it to 0 midway through the function.
Change-Id: I334286f2ae854c57df781af8df78e5a1bf8e9b2b
Reviewed-on: http://gerrit.openafs.org/9256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 92011f4e93209319b0ef41a962aefff40e4938e1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 13:05:13 2013 +0000
volser: Remove redundant success flag
In UV_RestoreVolume2, there is a success flag whose only use is ...
success = 0
[ ... ]
success = 1
if (success) {
[ ... ]
}
It's pointless, so just remove it, and one clang warning
Caught by clang-analyzer
Change-Id: I7d57531c4dfb8955b813d534ad3b72b182fdbc76
Reviewed-on: http://gerrit.openafs.org/9255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 356bdc8ca77a42e359fed64bef7d77d70e14e4a4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 13:02:19 2013 +0000
budb: Don't double initialise iterator
The blockaddr iterator is initialised as part of the for loop.
Don't also initialise it immediately before.
Caught by clang-analyzer
Change-Id: I97e7ced15fe204b3b2d797abbdce8b3f9a2b0c8d
Reviewed-on: http://gerrit.openafs.org/9253
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit dce2d8206ecd35c96e75cc0662432c2a4f9c3d7a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 12:53:59 2013 +0000
budb: Store dumper information correctly
Change f498c18a6f7300eb89ca3b9d9b85c4d461fa8474 attempted to fix
a problem with using an inappropriate function to copy the
ktc_principal value 'principal' into the d.dumper structure element.
Originally the code read:
principal_hton(&principal, &d.dumper)
which copies the 'host' principal principal into the 'net' structure
d.dumper. However, this was changed to
principal = d.dumper
Which populates 'principal' with whatever garbage is in the d.dumper
structure.
Fix this so that the assignment is done the right way around.
Caught by clang-analyzer
Change-Id: Id9865a36b5a9351d013c695ed301b627ddc4a915
Reviewed-on: http://gerrit.openafs.org/9252
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2a2cae72d653fbfdada7dddd4b7e5d8aeedea2ee
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 12:43:27 2013 +0000
budb: Simplify scanHashTableBlock
We don't need to maintain two copies (entryAddr and nextEntryAddr)
of the entry address - rework the while loop so we just use one,
and make clang a little happier
Caught by clang-analyzer
Change-Id: I6f5d76e114ad09a4fd3fc36b4d64f63daa9e1e78
Reviewed-on: http://gerrit.openafs.org/9251
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d09b300a96691b4848760fde02b4d0e741bc2584
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 12:36:02 2013 +0000
viced: Unused sentinel in h_stateVerifyUuuidHash
The 'found' sentinel in h_stateVerifyUuidHash is unused, because
as soon as we set it, we jump out to the 'done' label. Simplify the
function's logic, and remove a static analysis warning, by just
removing the variable.
Caught by clang-analyzer
Change-Id: I02e5ccf857f5d84cd24975b7a1b9d516624ecd64
Reviewed-on: http://gerrit.openafs.org/9250
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9894b0ded9212e96308fc7df44005c513e8e6672
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 10:48:14 2013 +0000
bucoord: Remove dead initialisation
offset is simply used as a copy of nextOffset for the GetText
function call. We don't need to initialise it to 0 at the start of
the loop (and arguably, as it is passed to the function by value,
we could just remove the copy entirely)
Caught by clang-analyzer
Change-Id: I137ea3ba1ff44d94b90287d9735db69d6ff8717d
Reviewed-on: http://gerrit.openafs.org/9249
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 82b3760c4ff71f9315c3e2d07c35b2ebd7ba6942
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 10:45:41 2013 +0000
butc: Remove dead assignment
We never use the value of mvFlag once the string has been restored,
so don't bother reseting it.
Caught by clang-analyzer
Change-Id: I12db6957c9b8ec3bb9c43f10d9e9754d4afa3ed7
Reviewed-on: http://gerrit.openafs.org/9248
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3fbdc609dc025cfcaac6949485d6fb072bf34764
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 10:43:52 2013 +0000
budb: Fail if afsconf_GetExtendedCellInfo does
Rather than silently ignoring the failure of
afsconf_GetExtendedCellInfo, and then using garbage cell
configuration, just fail to start if afsconf can't parse the
config directory.
Change-Id: Ib3d26bc67844de10f7eb8c2ef555c5e607e4bf61
Reviewed-on: http://gerrit.openafs.org/9247
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ca6d6bb9b06b54728ebe2c84e7b7d0ea1067aaa9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 10:42:00 2013 +0000
volser: Remove dead assignment
Don't initialise code immediately before we assign a real value
to it various UV_ functions
Caught by clang-analyzer
Change-Id: I91d9300715d44fafd73b1a61be548589468e3209
Reviewed-on: http://gerrit.openafs.org/9246
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e4862e284832420e9dbf5a6f437f6f7c8801f7dd
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 10:39:53 2013 +0000
butc: Catch failures to start keep alive thread
If we can't start the keep alive thread, in either the LWP or
pthread versions of a code, report an error and exit instead of
carrying on regardless.
Caught by clang-analyzer
Change-Id: I0a25a236aadeedf10d3c0c129d716b1397c9a4e3
Reviewed-on: http://gerrit.openafs.org/9245
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0cb0d44da3d35a9d58ad9714042ea15c7b85c65a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Feb 24 10:36:57 2013 +0000
butc: Remove dead loop pointer allocations
All of these *Ptr values are reset upon each iteration of the
while loop, so we don't need to NULL them immediately before
we go around again.
Caught by clang-analyzer
Change-Id: Iaa5ff6c7b154072e23eae272031919b424568eff
Reviewed-on: http://gerrit.openafs.org/9244
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a10e96b3aa631a0488532f88d3959fdf22265d35
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 25 00:17:46 2013 -0500
Windows: Test NameArrayReferenceCount before deletion
In commit c753d398f2005c886932f20b49af15efc489a829 the
AFSDirectoryCB.DirOpenReferenceCount was split and the
NameArrayReferenceCount field was added. However, it failed to modify all
of the DirOpenReferenceCount checks prior to calling AFSDeleteDirEntry()
to include a check on the NameArrayReferenceCount. This patchset corrects
that oversight.
Change-Id: I8db1a68e5240088bcfeb226bd1eafac0c83a0b69
Reviewed-on: http://gerrit.openafs.org/9254
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 50a993385673ed083145f587c16d0c9dd444262e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:25:12 2013 +0000
kauth: realm can't be NULL when calling CellToRealm
Despite what the static analyzer thinks, ka_CellToRealm can't be
called with a NULL realm. Just add an assert to close down that
code path, and stop it from producing an error.
Change-Id: Ifc8cf7e5dca5ae29eaaa91c5b238a97197d89ee3
Reviewed-on: http://gerrit.openafs.org/9174
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ff649d5bf51d78959de769e35eec61a5667d5939
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Feb 24 14:01:28 2013 -0500
Windows: no side effects from AFSDbgLogMsg calls
Do not perform assignments or call side-effect resulting functions
as parameters to AFSDbgLogMsg.
Change-Id: I76eca3a82377543f4148d03af51a07886127b385
Reviewed-on: http://gerrit.openafs.org/9242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ea0441520138d2129b5c6b2bd16c7640a8680146
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 10:23:43 2013 +0000
viced: Allow GetCapabilities to return an error
At the moment, the GetCapabilities RPC handler ignors errors from
CallPreamble or CallPostamble. Instead of silently swallowing these,
and potentially reutnring a bogus capabilities structure, make
it possible for the RPC to return failure to the caller.
Caught by clang-analyzer
Change-Id: Ic36e59e8cce8be4920f041a86d5636d54668d887
Reviewed-on: http://gerrit.openafs.org/9241
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1d1ba5f74102ae703ef657aa19150729edfe6ab2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 10:20:58 2013 +0000
viced: Catch GetCellInfo failure
If GetCellInfo returns a non-zero result, catch the error, rather
than just carrying on regardless.
Caught by clang-analyzer
Change-Id: I6b9ca91c8cea2ff0d68873913abdc0daadcc0e27
Reviewed-on: http://gerrit.openafs.org/9240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 11e1107684c92a6c9e3646d7d7c329ae1556147b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 10:16:10 2013 +0000
viced: Don't store rc from IH_DEC on error path
If CopyOnWrite has already failed, and is taking the volume offline
for salvage we can't (and don't) do anything with further errors from
IH_DEC. Instead of assigning these to 'rc', just ignore them.
Caught by clang-analyzer
Change-Id: I7bcd82f124740e3ca3d11cb2b079aa7ea5751cf9
Reviewed-on: http://gerrit.openafs.org/9239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 66fea9b7d3cf4799600e8bab71729b3567497df9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 10:09:39 2013 +0000
scout: Fix a lot of dead assignments
In lots of places scout takes the return value of a graphics
function, then decides it doesn't actually care about the result.
Get rid of the assignments, as they provide a false sense of
security.
Caught by clang-analyzer
Change-Id: I1ea8514b969777f1276b4e8f8ab946a4d36a870c
Reviewed-on: http://gerrit.openafs.org/9238
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f238d0d09e7cf6f28a47368bb026b45bd57be8d1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 10:35:48 2013 +0000
gtx: Return failure if gtx_Init can't start thread
If LWP_CreateProcess fails in gtx_Init return NULL, rather than
silently swallowing the failure.
Caught by clang-analyzer
Change-Id: I5db5667f9dae3f405e88cf9c57e6b8a069ea28a3
Reviewed-on: http://gerrit.openafs.org/9236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 75ef02d9dfb43079f111ea22ae351cf0eec13fab
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 10:30:56 2013 +0000
afsmonitor: Allow CBSTATS collection to work
The switch which selects the collection number was missing a
'break', so selecting the CBSTATS collection would always fall
through to the default, error, case.
Caught by clang-analyzer
Change-Id: I354873d711c5f49ddad51f1b9fb332af91a6d13a
Reviewed-on: http://gerrit.openafs.org/9235
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bd8f9528b0edae12bd534a70e7b31e4e40a45aab
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 21:57:56 2013 +0000
bosserver: Don't store result when renaming core file
The bosserver doesn't do anything if the core file rename fails, so
don't bother storing the result code.
Caught by clang-analyzer
Change-Id: I9b1b7d77404b0fd560c7735646e5afe1fbcc0752
Reviewed-on: http://gerrit.openafs.org/9232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 054c587fcc397be6123e90115e960bd63a7c4ba0
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 21:44:43 2013 +0000
bosserver: Remove dead assignment
In the Restart RPC handler, don't assign a value to code
immediately before we use it to hold the return value of
bozo_WaitStatus.
Caught by clang-analyzer
Change-Id: I0781c57c87088cb3ba6170ca1e5c8d5053cf9001
Reviewed-on: http://gerrit.openafs.org/9231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e28294a9def87b306be1e99c4eebdb86bd138405
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 20:53:02 2013 +0000
bosserver: Remove dead assignment in SaveOldFiles
We don't care about whether the renames succeed in SaveOldFiles,
so don't bother assigning their results to a variable
Caught by clang-analyzer
Change-Id: I0605fc71d243ef0f587706f9f3856aa4d722fb82
Reviewed-on: http://gerrit.openafs.org/9207
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d149f391b39f59428b2cbb55bdc5dc2429c99dfb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 20:50:07 2013 +0000
Unix CM: Remove dead assignment in readdir
len is zeroed at the start of the next block, so don't bother assigning
tlen to it if we're not going to do anything with it.
Caught by clang-analyzer
Change-Id: Ie1cd5a4d9dd96920018f054b6edfc18c569c9807
Reviewed-on: http://gerrit.openafs.org/9206
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ee0d57bb488e9fd74b46547273904a9821e20c57
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 20:36:19 2013 +0000
libadmin: Fix a lot of dead assignments in vsprocs
Tidy up a lot of places where we initialise a variable, then
immediately assign a proper value to it, or store a return value
that we don't actually care about.
Caught by clang-analyzer
Change-Id: Icf0ec713dac6f2c4f0a60e8ead52a8d3e19381f0
Reviewed-on: http://gerrit.openafs.org/9205
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c35c167d446810b3e5952b6b753632c0e4341f2c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 20:12:35 2013 +0000
gtx: Remove pointless assignments from gtxtest
Remove assignments to 'code' when we're not going to pay attention
to them.
Caught by clang-analyzer
Change-Id: Ib2f8c20c0bc741d0bb1b8ed4fdb46ea61511fc95
Reviewed-on: http://gerrit.openafs.org/9204
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3bbff16c6d34c905fab8fcb792c8606ea356e2a8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 19:34:47 2013 +0000
Unix CM: Catch ICL initialisation failures
If afs_icl_CreateLog fails, don't still call afS_icl_CreateSet.
If afs_icl_CreateSetWithFlags fails, don't ignore its error code.
Caught by clang-analyzer
Change-Id: I245f4391bbbf183492e8c13fb8f091b339cea80a
Reviewed-on: http://gerrit.openafs.org/9203
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cb8a103cb73aaa229ba34abc1b9704ab7ad5ba02
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 13:04:01 2013 +0000
rx: Fix wrong loop iterator in rx_clearProcessRPCStats
Fix the use of an incorrect variable as loop iterator which would have
resulted in a crash.
Caught by clang analyzer.
Change-Id: I785d06b9be0915bc540c37b43d1001a562a7cde4
Reviewed-on: http://gerrit.openafs.org/9202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 63d1b17c255e6287e6b2cda3c28b2f5824bec345
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 20 11:18:28 2013 +0000
volser: Fix a couple of assigned but not read errors
Fix a couple more errors where we assign to a variable, but never
read the result back out.
Caught by clang-analyzer
Change-Id: I78f8f1403d166c4231b0abdb607de77e9ed62a27
Reviewed-on: http://gerrit.openafs.org/9201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1b2a0e9fa78da65e9d9f56fe1cac514465fc14d2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 20 11:17:41 2013 +0000
volser: Don't assign code when we don't care
When we're cleaning up temporary volumes, we don't care whether
it succeeds or not. Don't assign code to the results of these
volume deletions, only to then discard it.
Caught by clang-analyzer
Change-Id: I81583cc82e78db38de8aad92c7c7d0c2f44eb33d
Reviewed-on: http://gerrit.openafs.org/9200
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ec53e0e71496ded3bc86efeb880a34b4a1f64fd5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Feb 20 11:16:25 2013 +0000
volser: Don't NULL conn right before assigning it
Don't do
conn = NULL;
conn = rx_newConnection();
and similar, equally pointless things.
Caught by clang-analyzer
Change-Id: I54d9ccd9f3910624b3289ce067a27622e29e4a34
Reviewed-on: http://gerrit.openafs.org/9199
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fa9558532b49b62af5876dbdd2aaf91cfe4a0c57
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:25:46 2013 +0000
fs: Remove redundant variable assignments
Remove a number of redundant variable assignments that clang warns
about.
Caught by clang-analyzer
Change-Id: I248e0e3a9f9241084436604532424d6e4b900e31
Reviewed-on: http://gerrit.openafs.org/9194
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 064f7ef2e8d8e2a7500ffdfe4d55d3ebc48f8226
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:22:08 2013 +0000
fs: Free parent_dir later in lsmount and flushmount
If lsmount or flushmount encounter an error, then they may include
the contents of parent_dir in their error message. However, in both
cases, this was freed a couple of lines earlier.
Just move the free() later, so that the contents of this variable
are still available.
Caught by clang-analyzer
Change-Id: Ideba52b7ba98f034baf923194007239a6cf0221f
Reviewed-on: http://gerrit.openafs.org/9193
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b6439fd4b0b381a2b2e33af5f0c76db1e72971bb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:19:53 2013 +0000
up: Notice errors on both file handles
Report errors on both filehandles in up's Copy routine, rather
than just on the second one that we close.
Caught by clang-analyzer
Change-Id: Ia3aa9be91ccfca2993a4f27c291332e0b0d350f5
Reviewed-on: http://gerrit.openafs.org/9192
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b7baf62d56cb8c1f207b885fb7c7a7b7105edef5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:18:13 2013 +0000
fstrace: Remove redundant variable assignment
Don't reset the value of 'code' when nothing else references it.
Caught by clang-analyzer
Change-Id: Ifd361ed6eb8c6b8740466f6c1a337669160874f4
Reviewed-on: http://gerrit.openafs.org/9191
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c457b106f14086bc1e0feab2eb8e27a3bcb87213
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:15:42 2013 +0000
fstrace: Avoid accessing icl log after zapping it
The for loop in icl_EnumerateLogs looks up the next pointer in the
current entry after zapping it. Depending on reference counts, this
may result in us looking up freed memory.
Take a copy of the next point before zapping the current entry, just
in case.
Caught by clang-analyzer
Change-Id: If38f0af2b01c5b8ea00e68e4432c6ad5517578c8
Reviewed-on: http://gerrit.openafs.org/9190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d02757985de45b66e2d291d07918dffae15319a2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 16:56:38 2013 +0000
xstat: Ignore return value from xstat_*_Cleanup
We're about to exit anyway, so we don't care whether Cleanup
succeeds or not
Caught by clang-analyzer
Change-Id: I6350d60e6a5d29b8aaa272a54cf9ead47fdb5fad
Reviewed-on: http://gerrit.openafs.org/9186
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bdce4701b2d4f75cacf1fbdf472bcac395345e32
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 16:45:39 2013 +0000
afsmonitor: Ignore return codes as appropriate
When we're not interested in the return value of a function, don't
assign it to a variable.
Caught by clang-analyzer
Change-Id: I5b576f312376780c98c2dbe4f9b85e00d529ddd8
Reviewed-on: http://gerrit.openafs.org/9185
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7b0b710e03fc7030252470501cf16a2a8f2cdd40
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 16:34:14 2013 +0000
sys: Flag rmt_Quit as AFS_NORETURN
Help out the static analyzer by telling it that rmt_Quit never returns
Change-Id: I5ee0d2ea444706e68af5a1298fd638e7d0d7f41d
Reviewed-on: http://gerrit.openafs.org/9184
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f9eab19d82a99b1bbec2b66b42c9eb81dbbe7f97
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 16:31:28 2013 +0000
rxkad: Remove redundant checkCksum initialisation
checkCksum is assigned to by both sides of the if() expression, so
there's no need to initialise it to 0.
Caught by clang-analyzer
Change-Id: Id0e286943e11b6948231577085cdb0ce96bb0b97
Reviewed-on: http://gerrit.openafs.org/9183
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 58529bd8b055dc1afc567d0cb7749841ce2897d5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 16:15:29 2013 +0000
ubik: Don't leak memory if mutex init fails
If we can't initialise the ubik_client mutex, don't leak the
structure when returning an error.
Caught by clang-analyzer
Change-Id: Ib36d2ddf585a31b628e56dce1f33ee859fc835bc
Reviewed-on: http://gerrit.openafs.org/9182
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b92fbc217c80af7554bbf6dc34de720da8f01c5c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 16:13:34 2013 +0000
ubik: Don't record result of select()
We never do anything with the return value from select(), so don't
bother storing it into code.
Caught by clang-analyzer
Change-Id: I6e0352b74f0e90b62ad32a3ef1a9d0173bf307ee
Reviewed-on: http://gerrit.openafs.org/9181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5cefa0247fe4f22f769e366a207fb177ee8fb94f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 09:51:24 2013 +0000
kauth: Don't ignore GetExtendedCellInfo failures
Don't ignore a failure from afsconf_GetExtendedCellInfo, as it will
leave buffers that we later read uninitialised.
Caught by clang-analyzer
Change-Id: Ia0c2675a3083385d011fd340f36bf13373f89feb
Reviewed-on: http://gerrit.openafs.org/9180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4213ef986ffbb4eee7a859a8edd4493deed08362
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 09:47:57 2013 +0000
kauth: Catch ka_KeyCheckSum failures
If ka_KeyCheckSum fails, typically because the key being used is bad,
catch the failure rather than just silently ignoring it.
Caught by clang-analyzer
Change-Id: Id51174fdf94356db10961690808670da372bc60e
Reviewed-on: http://gerrit.openafs.org/9179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e7035b876f6c3e1bcf1053910f6ae74115f7b039
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:15:42 2013 +0000
kauth: Fix some unnecessary variable assignments
Remove various places where a variable is assigned to, and then the
result never read.
Caught by clang-analyzer
Change-Id: Id8b7aeb6c54b7c93093ad44df5a9fe01575f2fbe
Reviewed-on: http://gerrit.openafs.org/9172
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5acb1a0f323a6692cca66ee3aa4c7e5f1a0f24f2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 22 16:54:17 2013 +0000
Unix CM: Fix byte accounting for storebehind
In the current version of CacheStoreDCaches, the stored variable is
maintained within the for loop that iterates over the chunk list. This
means that it is reset to 0 each time we handle a new chunk.
However, this means that our progress is no longer accurately tracked,
as (bytes - stored) no longer gives the number of bytes which remain to
be transfered. In fact, as stored is zeroed with each loop iteration,
(bytes - stored) == bytes. This means that store behind is no longer
activated according to the users settings.
Prior to commit 334114ac58b0039ae90d7e29fa2f019fe068bd79, the
stored variable was maintained within the outer, function, scope.
Just move it back there to restore the previous behaviour.
Caught by clang-analyzer
Change-Id: I248ed81f1331f4d3d4ed2e1206acebb0a8200762
Reviewed-on: http://gerrit.openafs.org/9237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e76966e22ec234070157ef9179d96c2ccdb80075
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 22:15:11 2013 +0000
Unix CM: Don't zero args on dcache failure
Even if allocating the dcache fails, there's no point zeroing the
parameters to the allocation function, as those changes aren't
visible outside of that function.
Caught by clang-analyzer
Change-Id: Ieb91b525e818b73e38b8d78a55d170d36273177c
Reviewed-on: http://gerrit.openafs.org/9234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 983d67616b670c5d57c8c67578fdb52f2bb3ddbd
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 22:10:38 2013 +0000
Unix CM: Fix bogus character in license string
A stray $ had crept into the license string in afs_dcache.c. Fix it.
Change-Id: I1ab096aadb947cb08318a56b9ae21ed0786d3339
Reviewed-on: http://gerrit.openafs.org/9233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6ef224da14da88318ede836a2c80998299c93e2f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 21:29:56 2013 +0000
bos: Don't set up the conenction twice in AddKey
AddKey calls GetConn twice - once at the start of the function,
and then again immediately before calling BOZO_AddKey. This leaks
a connection...
Caught by clang-analyzer
Change-Id: I5c593de56e7f61fb21b973a34bea1a5b4f4a3177
Reviewed-on: http://gerrit.openafs.org/9230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7684dbd82a4ff4883fed40f3a84269d93fa23e4b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 21:24:33 2013 +0000
bosserver: Don't check if daemon thread starts
We don't do anything with the return code from the LWP_CreateProcess
that starts the daemon thread, so don't bother recording it at all.
Caught by clang-analyzer
Change-Id: I9310bdd90236a90d71dc202c73d7e06ea58a31f8
Reviewed-on: http://gerrit.openafs.org/9229
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fc527bf139c2149657a93b91abe2b7406484f55b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 21:16:40 2013 +0000
vlserver: Remove dead assignment
Don't assign the serverNumber to j, when we're just about to try
and get it from a multi homed extent record
Caught by clang-analyzer.
Change-Id: I79349ff211b5df2d16e6ee9122dbb28b04ad7823
Reviewed-on: http://gerrit.openafs.org/9228
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5d2d68f8acc31568b48a8cdf7959600cb56e8f9e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 21 20:55:35 2013 +0000
bosserver: Remove a couple of dead assignments
Remove a couple of places where we initialise a variable, only to
assign a new value to it a few lines later.
Caught by clang-analyzer
Change-Id: I096b80cce851f3494475e6f9683715b081ff8375
Reviewed-on: http://gerrit.openafs.org/9208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e595d35c182e47abcbcddfc5b1de9cc780214ee9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:12:54 2013 +0000
afsio: Remove redundant assignment
tbuf is assigned to during the initialisation phase of all of the
for loops that follow, so just remove this assignment
Caught by clang-analyzer
Change-Id: I3f2ffc8cee93768bd03e0abf3b391e1f6c45c70f
Reviewed-on: http://gerrit.openafs.org/9189
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9a8fa5d64fa5ab35dcd9dbced48eee00a0d614cc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 16 20:22:27 2013 -0500
Windows: ReleaseNotes reformatting
Oxygen 14.2 automatically reformatted the text.
Change-Id: I387627948f449c96ed3ab112371752f4673b24d9
Reviewed-on: http://gerrit.openafs.org/9212
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2ca80b4b6a3fde34b5eeeba37d2df5a9e253d787
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 16 12:42:17 2012 -0500
Windows: Direct IO Support for Service
This patchset implements and enables by default the new
Direct IO pathway between the AFS redirector and the afsd_service.exe.
When Direct IO is enabled all reads and writes are performed by the
AFS redirector locking memory allocated by the kernel and mapping it into
the service's memory address space.
The service supports cache bypass in this mode when the
AFS_REQUEST_FLAG_CACHE_BYPASS flag is set in the request from the
redirector. When cache bypass is active, the AFSCache file is ignored and
data is either directly fetched from or stored to the file server. Cache
bypass is enabled by IIS and other applications that request no
intermediate buffering when opening file handles. This is often done
because the application implements its own data caching. All cache bypass
store operations are synchronous.
When cache bypass is not enabled, the memory region provided by the AFS
redirector is either used to populate the cm_buf_t objects or is populated
by them. When cache bypass is not enabled, one outstanding store
operation can be in flight asynchronously to improve performance.
Direct IO is enabled by default and can be disabled by creating the
registry value.
..\Services\TransarcAFSDaemon\Parameters
"DirectIO" DWORD 0x0
Change-Id: I3cac3660c8b8eded58226ba4a819692c454704a8
Reviewed-on: http://gerrit.openafs.org/9211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit be0296a8ade48c8944056999eab787bc0db1a01f
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Fri Jan 25 00:46:37 2013 -0500
Windows: Direct IO for AFS Redirector
Implement a new IO processing model in which extents are not passed between
afsredirlib.sys and afsd_service.exe. Instead the AFSCache file is
maintained exclusively by the service and the redirector locks kernel
memory, maps it into the service's address space, and permits the service
to manage all IO directly.
This interface adds an AFS Cache Bypass option to the AFS Redirector which
is activated when the file handle has been opened with the no intermediate
buffering option.
This patchset implements the kernel interface. A subsequent
patchset will implement the service component.
Assisted by Jeffrey Altman <jaltman@your-file-system.com>
Change-Id: I25a4764db060b3b3f2b0de4006479dd3a220c6eb
Reviewed-on: http://gerrit.openafs.org/9210
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 49329541a13cdee3361d0246256a27d2a5ee8bef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 02:21:27 2013 -0500
Windows: Add flag BUF_GET_FLAG_BUFCREATE_LOCKED
Modify the buf_Get() and buf_GetNewLocked() interfaces to
permit the cm_scache.bufCreateLocked lock to be held prior to
calling to buf_Get(). Holding the cm_scache.bufCreateLocked lock
before the buf_Get() call prevents a race with another thread
that attempts to set the file size.
Change-Id: I54b13c83801a4d9a2078552d5be7ada6f4607850
Reviewed-on: http://gerrit.openafs.org/9209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 225b0e80854ac5c1584b46a75358caeb6638cd24
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 16 17:51:12 2013 -0500
Windows: Set AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED
Set the ObjectInformationCB AFS_OBJECT_FLAGS_DIRECTORY_ENUMERATED flag
from within the AFSEnumerateDirectory() function and not from its callers.
Change-Id: I2bddedba1165557679ddd9c637dbeb85cd74e1de
Reviewed-on: http://gerrit.openafs.org/9119
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b7ba97ad537bd0e9a241f052ddd1c3a50c74745b
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Fri Feb 15 08:44:06 2013 -0500
Windows: Permit direct to service non-wildcard lookups
The AFS redirector has required that directories be fully enumerated
when the directory object is opened. This is a very expensive
operation involving large numbers of file server RPC round trips for
directories with tens of thousands of objects and those containing
symlinks.
This patchset delays directory enumeration for the last component
in a path until such time as dirctory data is requested by the
application. If the request is for a non-wildcard pattern, the
service will be asked to provide the details for just the one required
object.
Delaying the directory enumeration improves performance for
GetFileAttributes[Ex], GetDiskFreeSpace[Ex], GetVolumeInformation,
and GetNamedSecurityInfo Win32 API calls. In those cases it is
no longer necessary to enumerate the target directory at all.
Change-Id: I7ef2fbafff925697d8b40e56837ef53bfcc78542
Reviewed-on: http://gerrit.openafs.org/9118
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0dd623ea9a933091ea9f9624558885ec6961b0f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 18 23:11:27 2013 -0500
Windows: EvalByName pass LastComponent flag
Add AFS_REQUEST_FLAG_LAST_COMPONENT flag for use with
AFS_REQUEST_TYPE_EVAL_TARGET_BY_NAME requests to the service.
When set the service will perform cm_Lookup calls without the
CM_FLAG_CHECKPATH flag set.
Change-Id: I47ec2fb8b1e2699f2d87a6625b1db549ecb4e03d
Reviewed-on: http://gerrit.openafs.org/9133
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6896ca2cc33bfc80e72a71af2b0588e74234644c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 18 21:26:23 2013 -0500
Windows: EvaluateByName support case-insensitive lookups
Directory lookups in AFS should favor case-sensivite matches
but permit case-insensitive matches otherwise. The service
should not follow mount points. The redirector exposes mount
points as junctions.
Change-Id: I34c9244e2756a926f29bbf184dc250e7a29d264f
Reviewed-on: http://gerrit.openafs.org/9132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 03bac87d167c101ae8042162b11c246a95575528
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 18 10:37:49 2013 -0500
Windows: IO Subsystem Trace modifications
Display file offsets consistently as %0I64X.
Change-Id: Ib1484ef99fbf055ec4bc00e17469e0daa9661e96
Reviewed-on: http://gerrit.openafs.org/9129
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6e6c1b9aa2e1937c7b6dbbf2a6987181e3ff7711
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Tue Feb 19 16:12:26 2013 +0000
Windows: Move work item queues over to the Control Device
Currently, when the library is unloaded it stops all worker
threands and then evaporates the work item queues. Thus
any work items which are pending will disappear.
Whilst it is OK that the threads going away, any work items need to
remain queued so that when the library is restarted the work
can continue. This checkin does this by moving the work item
queues and their synchronization primitives into the FS maintained
Control Device Object Extension. The list of worker threads
remains in the Library Device Object Extension.
Change-Id: If5c7cd3bdfea1a368c8df69649e627bac3a9585f
Reviewed-on: http://gerrit.openafs.org/9139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6136b236c4ac1b63531665862701d0e2d2916d35
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 18 10:34:59 2013 -0500
Windows: Initialize Irp->IoStatus.Information earlier
Initialize Irp->IoStatus.Information to zero immediately upon
beginning processing of the IRP in the write path.
Change-Id: I8d5a717ae8cd3bc44c2a9a65b34fd0549862d293
Reviewed-on: http://gerrit.openafs.org/9128
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 11aa3e09e591b325e80c5d4a420051923f121b82
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Mon Feb 18 10:33:29 2013 -0500
Windows: Call CcDeferWrite rather than loop
If we are about to write into the cache and we do not have enough
memory we call CcDeferWrite and return STATUS_PENDING. This allows
the cache to call us back when there is memory.
The write is performed on the IO queue which is shared wth paging
writes. However this does not cause paging writes to block in a
memory shortage situation since the request will either be deferred
again (releasing a thread to service a paging write) or will complete
quickly. Further we allocate all our resources upfront so we fail
fast and in the appropriate place.
Change-Id: I4efbc14a97d3b34236643973f1f8f85c7ea194a6
Reviewed-on: http://gerrit.openafs.org/9127
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 82161c478a871d959daf7f3ffb4d38d1bfabe6d6
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Feb 15 05:57:29 2013 -0500
Windows: Allow the Library to pend a write request
If the library pends a request pending memory becoming available
then the FS must ensure that the library stays loaded until the
IRP is completed.
Change-Id: Idbfdd84ecd364c99d3ad9cd8dd7e000f47be4b58
Reviewed-on: http://gerrit.openafs.org/9126
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6c1d28958db1c0ec50b41274dffa9c58e448a9db
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Feb 15 06:48:08 2013 -0500
Windows: AFSWriteCommon collapse redundant condition
We never get non cached and yet paging IO. Even if we did it would
be inappropriate to call CcCanIWrite. Therefore, collapse two if
statements into one.
Change-Id: I95c9030836e4f7dc4f7867a8b8b09b97bf57b429
Reviewed-on: http://gerrit.openafs.org/9125
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5e859ff2c35735729a030e9297e296595f750e22
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:11:50 2013 +0000
afsio: Ignore return values from afscp_SetDefault*
We don't do anything with the return values from afscp_SetDefaultCell
or afscp_SetDefaultRealm, so just ignore them.
Caught by clang-analyzer
Change-Id: Ib7d9e637e5d08df28ad0085302811b243fb21768
Reviewed-on: http://gerrit.openafs.org/9188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ba8afdc344a482487008dad325442d71c8bbe526
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:09:15 2013 +0000
afsio: Don't leak memory on GetVenusFidBy* failure
The GetVenusFid functions all allocate the fid structure immediately
upon entry to the function. When we return with an error, that structure
is never freed.
Update the call sites so that we don't leak this memory.
Caught by clang-analyzer
Change-Id: Iec62316d0fd542e70634f384c8319f90ba6b2649
Reviewed-on: http://gerrit.openafs.org/9187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f67e4a3cdfb1856e31dda0d4741c8d34df13f8fc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:53:11 2013 +0000
libafscp: Actually return callback from FindCallback
Fix FindCallback so that it actually returns the callback that it
found. This requires changing the function prototype so that the
third parameter is passed by reference, and updating the single
call site.
Caught by clang-analyzer
Change-Id: I420647e9cfd119cf1a26456a91d595b8154ddd85
Reviewed-on: http://gerrit.openafs.org/9198
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 86c7369ffadecb0666f75c87469370b66132877f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:46:04 2013 +0000
libafscp: Move server lookup inside AFSCP_DEBUG
We only use the results of the server lookup when AFSCP_DEBUG
is defined, so only bother actually doing the lookup when that
is set.
Caught by clang-analyzer
Change-Id: If79177e9d06817592b0630db7050cf3d40f3ee5f
Reviewed-on: http://gerrit.openafs.org/9197
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 735c9cff53bbf6f2b250a719507d7909e77c48e2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:30:14 2013 +0000
libafscp: Don't free bogus ptr in ResolvPathFromVol
afscp_ResolvPathFromVol makes a copy of the path passed to it using
strdup. It then iterates across that, removing initial '/' characters.
However, this iteration means that 'p' no longer points to the start
of the allocated memory - when we free 'p', we may actually be freeing
an offset into the block, which will make malloc unhappy.
Make a copy of the result from strdup, and use that to free the block.
Caught by clang-analyzer
Change-Id: I0e7d8c7cf3b70baa4868c65fb4c3a32474557628
Reviewed-on: http://gerrit.openafs.org/9196
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f82acb79f25ab97b565c74ef64a7d3573a13b682
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 17:28:12 2013 +0000
libafscp: Fix leak when afscp_ResolvPath errors
If afscp_DefaultCell fails, then afscp_ResolvPath returns without
freeing the memory allocated to 'p' by strdup.
Fix this by adding a free() in the appropriate place.
Caught by clang-analyzer
Change-Id: Ic2691d209c913cd600d9a9a1ebb4614dff35aa3b
Reviewed-on: http://gerrit.openafs.org/9195
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 860c34ba938602387f78c10c2f548fb8a523a9cd
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:43:29 2013 +0000
ptserver: Don't ignore ubik_Write failures
If we can't write to the ubik database, then that's a bad thing.
Don't ignore it.
Caught by clang-analyzer
Change-Id: I08b57a74405cc563c6141251fd3d433b2904ea0e
Reviewed-on: http://gerrit.openafs.org/9176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit df0b2d6775523d12fe18043bf392c80533c7b38a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:46:52 2013 +0000
ptserver: Tidy malloc handling in readpwd
Tidy up the malloc handling in readpwd, so that we don't leak memory
if the user specifies multiple -c arguments. Also avoid assuming that
free(NULL) will always work.
Change-Id: I95f3fe908572cb5be2d30345ccae0a2858622bd5
Reviewed-on: http://gerrit.openafs.org/9178
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7f9f54c9192715af39a9653004807ac31ccef7fb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:44:21 2013 +0000
ptserver: Remove some unnecessary assignments
Remove some assignments where we do nothing with the results
Caught by clang-analyzer
Change-Id: I6990a6b21ced10500275176af3f85b7f1cabd334
Reviewed-on: http://gerrit.openafs.org/9177
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0ecd78058c5f78bbb88952993abd0003625b82e7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:27:58 2013 +0000
libacl: Remove unnecessary assignment
Don't assign i to j, when we never use j again in the function
Caught by clang-analyzer
Change-Id: I9dd2d929019ac3cc84cde4e44c4883806bd5964a
Reviewed-on: http://gerrit.openafs.org/9175
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a2aad6f4519cba38f3f0aaa03d108de4b0119be5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:23:25 2013 +0000
kauth: Don't store the old signal routine
If we're not going to make use of the return from signal() don't
bother assigning it to a variable
Change-Id: I03cae7ab91d49e90f150a9dc4358c173920adc28
Reviewed-on: http://gerrit.openafs.org/9173
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 95a05f49ea303b2a25c4465bf1bbe333fb869911
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:11:33 2013 +0000
kauth: Remove unused assignments to bp
We never use the character pointer once we've advanced it past the
slash, so don't bother doing the work of advancing it.
Caught by clang-analyzer
Change-Id: I8ea561d6756685a13892f0635fa2e19b3f1233ab
Reviewed-on: http://gerrit.openafs.org/9171
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 68ce3aa814a7e3085242e705f013f05ed5da2d5c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 15:09:41 2013 +0000
kauth: Remove unused lclpw structure from klog
klog assigns into, but never references, the lclpw structure. Just
remove it.
Caught by clang-analyzer
Change-Id: I8e94f97ee3ee6cb15193ad80dd9aef39e6f8490b
Reviewed-on: http://gerrit.openafs.org/9170
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 37a3417f23b16a828485de496e495eb71f03fd1e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 14:59:10 2013 +0000
volser: Remove needless initialisation
Remove a number of places where we initialise a variable to NULL
immediately before we assign a real value to it.
Caught by clang-analyzer
Change-Id: I74ece8f3a82a5c768d769b74b4ccce12195fc216
Reviewed-on: http://gerrit.openafs.org/9169
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit edbbcf5b6283db5f3d9b7b06b072bb43b5019baf
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 14:51:30 2013 +0000
volser: Remove masked assignment in vol_split
The declaration (and assignment) to size at the outermost scope
in the copyVnodes function is masked by a later declaration at a
inner scope.
Just remove the outer declaration to clarify what's happening.
Caught by clang-analyzer
Change-Id: If23bdcf8a4c2d23d6224762fecce35be9cf15873
Reviewed-on: http://gerrit.openafs.org/9168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9122f81d15f777c996fd26fa52071807886b511e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 14:44:14 2013 +0000
vos: aserver is private
The server specified on the command line is used directly to
initialise the attributes structure. Move the variable so it's
local to the block which uses it, and remove the function-wide
initialiser.
Caught by clang-analyzer
Change-Id: Ia636fae2ed505f6958cefbfbaa72ef7e37edec98
Reviewed-on: http://gerrit.openafs.org/9165
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e816db093b7d4e85eaa23661bb9dba851b1e534e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 12:59:08 2013 +0000
auth: Avoid double free in key parsing
There was an error path whilst reading an extended key file which could
result in a key being freed using free(key), and then freed again
through the afsconf_typedKey_put() mechanism. Remove this double free.
Caught by clang-analyzer
Change-Id: I40bff56eddf4cb499ae5b7effdaf82f22379109d
Reviewed-on: http://gerrit.openafs.org/9147
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2ee578d80034d8c636ebc1b242942865eb338f4f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 13:54:18 2013 +0000
ptserver: Use correct structure type in malloc
prentries is a list of 'struct prlistentries' objects, not a list of
'struct prentry'. Use the correct type in our call to malloc.
Caught by clang analyzer
Change-Id: I6c36e4b875eafb8aff6506cf800d47b45a79825d
Reviewed-on: http://gerrit.openafs.org/9150
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d7e7f18887ab8cd4b4539aaf978a7d98a9b38a27
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 14:48:59 2013 +0000
vol: nuke() doesn't need to zero code
We don't need to zero the result code two lines before we assign
a new value to it - just remove the pointless assignment
Caught by clang-analyzer
Change-Id: I8fefdc839ef9980d7f7703add3b11b089d524d38
Reviewed-on: http://gerrit.openafs.org/9167
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c696be982773ffbee5e7442cc1425f664078aace
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 14:47:56 2013 +0000
vol: nuke() doesn't need to maintain next inode ptr
ni is unused on the true side of the if expression in nuke() - so
just don't bother populating it.
Caught by clang-analyzer
Change-Id: Idfd088f999f4c4bcdabc03b8b86636aa02541343
Reviewed-on: http://gerrit.openafs.org/9166
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 538f8d836376116edf99af17b040bc1aeea72390
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 16:35:08 2013 +0000
rxgen: Remove pointless assignment
The value we assign to defp is never used (it's almost immediately
overwritten), and it is guaranteed to be the same as the existing
value. So, just remove the assignment.
Caught by clang-analyzer
Change-Id: I362fe08c623b5046f2c8b0b16c42dcfa12009981
Reviewed-on: http://gerrit.openafs.org/9162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 58cb6e60a8189e05cb5fd15172b09cbe6120fdc7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 16:10:18 2013 +0000
rxgen: Fix memory leak
Don't leak the definition structure when we hit the end of the file
Change-Id: Ief44bb3bdff274167760fda5bcc16903ef8c11ce
Reviewed-on: http://gerrit.openafs.org/9159
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0d28f8c0cec91d68023795e6ba9c769d60869f9e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 16:05:33 2013 +0000
rxgen: Fix NULL pointer dereference
Avoid a NULL pointer dereference if strchr doesn't find any occurence
of '*' in the string. Whilst we handle the not found case when inserting
a mid string terminator, we don't handle it when restoring the string to
its previous value.
Change-Id: Ie0b3e18d89073a1694bba2749111c73f59150bdb
Reviewed-on: http://gerrit.openafs.org/9158
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e4800e1c6caf168890c3933855d741bc1312335
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 16:01:26 2013 +0000
rxgen: Silence some uninitialised variable warnings
Change-Id: Ida939533afbbf2afb81cce44ea6693d33c172062
Reviewed-on: http://gerrit.openafs.org/9157
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6d2d18dfebaea74a30f263e743bdbd1fb14f0580
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 11:55:37 2013 +0000
Fix incorrect sizeof() arguments in allocations
In a number of places we have
struct X *val;
val = malloc(sizeof(struct Y));
If sizeof(struct Y) < sizeof(struct X) this is obviously dangerous,
but it is incorrect regardless of the relative sizes of the
structures. Fix all of the occurences of this that clang points out
to us.
Caught by clang-analyzer
Change-Id: Iad32b4ae460d3f40a45cf33624973bf52fd167d4
Reviewed-on: http://gerrit.openafs.org/9156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 03c04c081a170668e52127be3c150582e458e1ed
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 11:37:47 2013 +0000
Don't allocate objects of 0 length
Fix assorted places in the code where we might have asked malloc to
allocate a block of zero length.
Caught by clang-analyzer
Change-Id: I6e1226ad83a52984ee7c53cbed8c867f38e4f866
Reviewed-on: http://gerrit.openafs.org/9155
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 429b9ec350670a9d51948fff3e555371a45f7905
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 16:23:16 2013 +0000
aklog: Don't reference freed node whilst deleting
Because deletion is implemented using a for loop, the step of the
loop that moves us to the next node references freed memory when
we've deleted an element. Fix this by just shortcircuiting the
return from the function so we immediately exit.
Change-Id: Ia820b20ce5937ac86d849cb746b3bc21f46550fa
Reviewed-on: http://gerrit.openafs.org/9161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e2e415e9846ee45297af53f659e43d06e49ee6ea
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 14:41:26 2013 +0000
vos: Remove unused 'done' loop variable
In SendFile we break at the same time as setting the done flag,
so its value is never checked. Just remove it as it is redundant
with the current loop logic.
Caught by clang-analyzer
Change-Id: Ibf8f756b06fd26cb2013ece97eb9196c71ad88bd
Reviewed-on: http://gerrit.openafs.org/9164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 17154a3c0afa88f7bb25e2b642fc13ee69c2b7db
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 22:34:36 2013 +0000
libadmin: Don't try to release garbage connection
In bos_ServerOpen, initalise the contents of bos_server structure
to 0 using calloc, so that if we jump to the error handling stuff
before they are assigned real values we don't end up trying to
release garbage.
Change-Id: I687d0b637833a08425e75391eb92a2dd4a150301
Reviewed-on: http://gerrit.openafs.org/9163
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a208292dd5867f1bb964c7c38585105d249bd9f4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 16:13:20 2013 +0000
asetkey: Handle unknown key types
If the user tries to create a key which is not rxkad, error out
rather than attempt to add a random blob of memory to the KeyFile.
Caught by clang-analyzer
Change-Id: Id2803fe29153f01ab352747caed31b0d0cb4f573
Reviewed-on: http://gerrit.openafs.org/9160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5529d5712f650845c4712b9a61aed377099ae857
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 14 20:08:07 2013 +0000
Unix CM: Don't check if var is 0, then zero it
There's a couple of places in afs_daemons.c where we do:
if (code != 0)
return;
code = 0;
The final line is obviously redundant, and makes clang sulk at us.
So, remove it.
Caught by clang-analyzer
Change-Id: Ic55edf1b05f3f45eb1f0cecdb3c2318e6f7bd0ec
Reviewed-on: http://gerrit.openafs.org/9154
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1992fbc71406a5c6d5db5d9e920506025d415883
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 14 20:05:43 2013 +0000
Unix CM: Remove unecessary lastXMinCheck init
Don't init stuff to 0 that's then immediately reinitialised with
a proper value.
Caught by clang-analyzer
Change-Id: Ic0d8b227908fa716167acf64d7653b636e406816
Reviewed-on: http://gerrit.openafs.org/9153
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d8bee6e4702ddddcd4024601f73f439e5abaa071
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Feb 14 20:04:05 2013 +0000
Unix CM: Remove unused security class initialisation
Caught by clang-analyzer
Change-Id: Iab28a305ae377cabc455132fde3b90146921100b
Reviewed-on: http://gerrit.openafs.org/9152
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ea24520b3152e4197b2f1e1c3f3dd937340660a6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 14:07:10 2013 +0000
usd: Can't call usd_FileStandard* with NULL
It doesn't make sense to call usd_FileStandard{Input,Output} with
a NULL usd_handle_t (and doing so would crash later in the
function), so don't check for attempts to do so.
Caught by clang-analyzer
Change-Id: I03c0b627056108fe0d6f78d8028323cc4ed74758
Reviewed-on: http://gerrit.openafs.org/9151
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 519d43cafb74dc99dc63a1f6333ebf818c343906
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 13:15:16 2013 +0000
vlserver: bulkaddrs are unsigned ints
bulkaddrs_val is a pointer to an array of unsigned ints, not to
an array of ints. Fix the sizeof() used in the call to malloc to silence
a clang warning.
Change-Id: If39f34756984200fed1cd3f3de5833012b86af21
Reviewed-on: http://gerrit.openafs.org/9149
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0f46f6b333b92e66ad987778f5084e3620cff30a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 13:12:47 2013 +0000
ptserver: Simplify malloc assignment to shut up clang
Using a temporary variable of type (char *) to store the results
of malloc and realloc, and then casting the tmp variable to the
real type causes clang-analyzer to complain. Just simplify this
code by always using the real type in order to shut it up.
Change-Id: I607bb36d1899dc617fdbd9e09e18ff10c9fa9ce9
Reviewed-on: http://gerrit.openafs.org/9148
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 06ad9d96b0100d35ba61ddd1d1d5bead9067e78d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 12:24:44 2013 +0000
auth: Handle memory errors when parsing key file
Return an IO error if we run out of memory whilst parsing a key file
Caught by clang-analyzer
Change-Id: I783a193fe9315f08d76d1be9b1c77089df25fd64
Reviewed-on: http://gerrit.openafs.org/9146
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a14cf594067481b3594f469797d44cb9cb7a0c38
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 12 12:19:42 2013 +0000
auth: Remove unecessary assignment
When we're counting the number of keys available, we don't need to
actually extract each key entry - remove the unused assignment.
Caught by clang-analyzer.
Change-Id: I98a30afccaf9a455ea0a7e77e7ca0d648abe4e70
Reviewed-on: http://gerrit.openafs.org/9145
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 94eb76caf16558ab39841571df19cec40f732294
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 17:23:51 2013 +0000
dumpscan: Unsigned ints can't be less than 0
'y' is an unsigned int, and therefore can never be less than 0, so
don't bother checking if it is.
Caught by clang-analyzer
Change-Id: I65e9e6e2a6f72a4a1a861234c5db89cc9d99ef15
Reviewed-on: http://gerrit.openafs.org/9138
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 304fac42b8cd4a71d0df063cafe88b2888e4d175
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 17:22:02 2013 +0000
vol: Don't assume enum is an int
The type that an enum is promoted to for arithmetic is compiler
dependent. We can't assume that it's an int, or a short.
Explicitly cast the volume state enum where clang gets upset.
Change-Id: Iab285d3a04dac698797ab0df2337aee75e3876b2
Reviewed-on: http://gerrit.openafs.org/9137
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1c3492149153ca82b18a36402f7f196f97a8512e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 17:12:45 2013 +0000
viced: Avoid clang errors with modeBits
The modeBits element of the VnodeDiskObject structure is defined as
a 12 bit wide bitfield. This causes clang some problems when doing
integer arithmetic, as it appears to the compiler that the field is
being overflowed. For example...
targetptr->disk.modeBits &= ~04000;
Produces the error:
implicit truncation from 'int' to bitfield changes value
from -2049 to 2047
Marc Dionne suggested changing this to
targetptr->disk.modeBits = targetptr->disk.modeBits & ~04000;
in order to suppress the clang error.
Change-Id: Iadb53a3db911f5771d3ab2437ccd43abce2a8ecb
Reviewed-on: http://gerrit.openafs.org/9136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f63047a3d1d0ed27c1efdde9ca81b0e62f9f6e69
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Feb 15 17:08:45 2013 +0000
Fix warnings-as-errors for clang
It seems like some versions of clang have a problem with using
pragmas to stop particular warnings being converted to errors with
-Werror. These compilers require that the warning be ignored completely
in order to suppress it.
Make the necessary changes to afsd and bozo, and update README.WARNINGS
to note the problem.
Change-Id: I66038130695d2ad27c289f29bcd8f6f2eddf1ded
Reviewed-on: http://gerrit.openafs.org/9135
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5fc0746ac902dea7f5f8419b7eb735ccc0c54a10
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Feb 19 10:15:33 2013 +0000
hcrypto: Suppress empty body warning
clang now complains about statements of the form
if (blah)
;
There's one of these in hcrypto. Until we can get this fixed upstream,
just mark the file as no-error.
Change-Id: I86d1362552ca9ee7b2c47a7c92bd8d6484ab7dbd
Reviewed-on: http://gerrit.openafs.org/9134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 252a5b65c30636bf5f62a49a79e5777004ecd17d
Author: Ben Kaduk <kaduk@mit.edu>
Date: Tue Feb 19 13:06:36 2013 -0500
butc: do not use stack garbage for secobj
The butc only ever handles connections over rxnull anyway, so just
specify an array of security objects of length one.
Change-Id: Ia073157488ac6b887f972448074ad1615422e26e
Reviewed-on: http://gerrit.openafs.org/9140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 85f2a66ceafd7a13f51d0352c62b5d69f4620edb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Feb 17 19:34:06 2013 -0600
rx: Assert call error for RXS_PreparePacket error
If we've received an error from the underlying security class, we must
not try to send the given packet, or we risk security issues. We
currently achieve this by setting an error on the connection. It is
slightly indirect in how this yields an error on this specific call,
and so it may not be immediately clear, but doing so is critical. If
somehow the call does not have an error by the end of this, we cannot
proceed as this is an error condition we do not handle. So, assert.
Change-Id: Ie0106ab170ecb77bb102c5afa3ec44ba2b704283
Reviewed-on: http://gerrit.openafs.org/9122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 03d3dacae16847352af754ac13c854ca0df0c08c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jan 14 12:45:04 2013 -0600
rx: Honor RXS_PreparePacket errors
rxi_PrepareSendPacket calls RXS_PreparePacket to allow the security
class to modify the given packet appropriately (to be undone by
CheckPacket on the other endpoint). However, currently
rxi_PrepareSendPacket ignores all errors generated by
RXS_PreparePacket, and processing continues as if there was no error.
For rxkad, an error often results in the given packet being untouched.
This means that the security checksum is not calculated, and thus not
populated in the packet, and for encrypted connections means that the
packet contents are not encrypted.
This occurs for any error generated by the security class
PreparePacket routine. For rxkad, the most common error is probably
RXKADEXPIRED, though some other internal errors are possible as well.
This behavior has a few effects for rxkad:
1. When any error is generated by PreparePacket, the other endpoint
generally bails out with the error RXKADSEALEDINCON, since the
security checksum of the packet is 0, which does not match what the
checksum should be. This results in error messages like 'rxk: sealed
data inconsistent'. This can be very confusing if the actual error
is, say, just that the given credentials have expired.
2. For connections requiring encryption (rxkad_crypt), an error from
PreparePacket means that the packet payload is sent in the clear.
This can happen for about a window size's worth of packets.
3. If a client ignores errors/inconsistencies with the checksum and
encryption, etc, they can keep reading data for the call forever,
even after their credentials have expired.
To fix this, make an error from RXS_PreparePacket cause a connection
error for the given connection, and immediately send a connection
abort. No further error checking should be necessary for the callers
of rxi_PrepareSendPacket, since they already check for call/conn
errors before sending any actual packets.
Change-Id: I87de833730424881dcd3d659870f71191eabafe4
Reviewed-on: http://gerrit.openafs.org/8909
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0a528a52f5da5e225567f3b9deab9f7d08022f9f
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Feb 17 13:29:38 2013 -0500
tests: Improve failure mode for unresolvable hostname
In the case of a host where gethostbyname is unable to resolve
the hostname, afstest_BuildTestConfig() may return NULL which
can cause several tests to crash.
Add a common function to look out for this condition and use it where
appropriate. When it occurs, the current module is skipped and
the user gets an error message that indicates the configuration
problem.
Change-Id: I7216876eb2424368f415e5759e2b95009ad055b2
Reviewed-on: http://gerrit.openafs.org/9120
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4051c5e96e921b69ac2a6e7bcb805cbc0a8f7993
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Feb 14 10:51:34 2013 -0500
salvager: incorrect comment
The comment for the code handling the -showsuid option was incorrect.
Change-Id: I0a63211cf5dd8a3b2636d4e4a2cc45a55c3bf62a
Reviewed-on: http://gerrit.openafs.org/9109
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7c31bd5e2d0da3a1c9e29337d5a90147f3b03158
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 14 14:43:58 2013 -0500
Windows: Ensure pResultCB exists before Authentication
When processing requests from the redirector it is possible for
the ResultCB to not be allocated. This can occur either due to
an out of memory condition in a synchronous request or due to
an asynchronous extents or byte range lock request.
Move the assignment of the Authenticated state after the allocation
of the ResultCB from the stack in case of out of memory conditions.
Change-Id: I7e98edde712b532010aa15705a62cf91dd9d0ebf
Reviewed-on: http://gerrit.openafs.org/9110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9b48daff341773580b3635e476fea112374986f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 14 09:26:16 2013 -0500
Windows: Unique file ID is per volume
The unique file ID returned as part of the BY_HANDLE_FILE_INFORMATION
data structure obtained via GetFileInformationByHandle() is only
guarranteed to be unique within the volume where volume uniqueness is
determined by the volume's serial number.
It therefore doesn't make sense to return the volume id as part of
FILE_INTERNAL_INFORMATION IndexNumber. Instead return Vnode and
Unique as that is what ensures uniqueness within an existing AFS
volume.
Unfortunately, {VolId, Vnode, Unique} does not guarantee uniqueness
for when multiple cells are in use.
Change-Id: I6c6ea4a04aa79778cce811560d8106a3a5e373cb
Reviewed-on: http://gerrit.openafs.org/9108
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cb414f6899212f314313a781b63486661e9d1394
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 7 16:53:45 2013 -0500
Windows: RXAFS_BulkStat failures
The RXAFS_BulkStat RPC is quite brain dead. The client requests
status information on up to AFSCBMAX FIDs. The file server replies
success only if all of the client credentials provide access to
all of the requested FIDs. If status info cannot be provided
for any one of the FIDs, the error code of the failure is returned
with no context as to which FID failed.
To simplify the logic within the cache manager a new local error
code, CM_ERROR_BULKSTAT_FAILURE is introduced to replace whatever
error was received from the file server. This error is returned
by cm_TryBulkStat and cm_TryBulkStatRPC. The caller of either of
those functions should interpret the error to mean that the current
user context cannot be used to perform a bulkstat operation against
the provided cm_scache directory. Instead, individual RXAFS_FetchStatus
operations must be performed.
This patchset implements such error handling for both the SMB and
RDR interfaces. This change permits the Windows cache manager to
properly enumerate a directory for which the user only has list
permission and cannot read the status info for files and symlinks.
Change-Id: I8cc47a5cedfd4e7bf0db55efffc5e95be5172e85
Reviewed-on: http://gerrit.openafs.org/9080
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3eb7c4f42946b48fc7b63c9caf8e3e262ca9f88f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 12 16:32:18 2013 -0500
Windows: cm_BPlusDirNextEnumEntry return all errors
Return all entries in the directory enumeration regardless of any
errors returned from cm_BPlusDirEnumBulkStatNext(). Set the error
code in the returned cm_direnum_entry_t.errorCode field so that
the caller can determine how the error should be handled on a
per entry basis.
Change-Id: I90a90ab0b0220c8d1e045f9473f5edd0bd01e45e
Reviewed-on: http://gerrit.openafs.org/9103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 210ebcfbe428687c263a06ead80893393402d608
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 13 14:04:28 2013 -0500
Windows: Add Cell name to AFSProcessRequest parameters
Knowing the cell name for the request can be useful to the file
system driver which otherwise does not have access to a conversion
from FileID.CellID to Cell name.
Change-Id: Ia10bae0d9c8bc7824a400ff30268d7ac0b9b2935
Reviewed-on: http://gerrit.openafs.org/9107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4382c9902f28a99e2163c9fe583d3f4861e6043e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 13 21:53:46 2013 -0500
Windows: Add Cell to FS Volume Information Label
Add the Cell name to the VolumeLabel field of the
FILE_FS_VOLUME_INFORMATION structure. This permits "cell#volume" to be
displayed by cmd.exe's DIR command and other applications that call the
GetVolumeInformation() or GetVolumeInformationByHandle() Win32 APIs.
Change-Id: I6cc7a7c2b79cb7d0d96cbddcf34dce68e52bf987
Reviewed-on: http://gerrit.openafs.org/9106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6373d01ca010aa687e6aa0c218d1379e57e60888
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 13 13:12:34 2013 -0500
Windows: CellLength reported in octets
CellLength must be converted from WCHARs to BYTEs in the response
to the redirector.
Change-Id: I79656cc0533c6cdc31a977aa486755c4a506510f
Reviewed-on: http://gerrit.openafs.org/9105
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 85bac1ae40123810fd6bd30625999e276af5ab75
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Feb 8 17:08:28 2013 -0500
libafs: cleanup redundant assignment
Cleanup redundant clearing of the avcp pointer in lookup, which
looks to be a cut and paste error from the ibm afs days.
Change-Id: Ib554d862bd8485be2a4dbeb38fcaacac57c1e818
Reviewed-on: http://gerrit.openafs.org/9085
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6f7ae535bbac2a5376358801b7f2c9e072f2d141
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 8 17:24:28 2013 -0600
afs: Avoid SetupVolume panic
Currently SetupVolume panics if it cannot successfully read a
volumeinfo entry from disk. Try to return an error instead, so we
don't panic the machine.
Change-Id: Iad3c2c857f1b736fcf4a142338d9e219bab68969
Reviewed-on: http://gerrit.openafs.org/9094
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8f95dc9eb92cb31f9d29eb87daac747f53b5a1cc
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 8 17:26:32 2013 -0600
afs: Move SetupVolume tv initialization after loop
The fields in tv are not used by the loop looking for the given volume
on disk. If we wait until after that loop to initialize the fields in
tv, it is easier to handle errors encountered in the loop.
This should incur no functional change.
Change-Id: Ib678542bfebaa89ecfa4aad39230fc502ec83edb
Reviewed-on: http://gerrit.openafs.org/9093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 50879d5727c183982a40bd242d6039ed470d835d
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Feb 11 18:49:21 2013 -0500
Linux: Add missing semi-colon
Add a missing semi-colon in the error case when missing symbols
are detected. The effect is strictly cosmetic - a few additional
error messages would follow the "undefined symbols" error.
Change-Id: I2a8bfb0a3ef12b5bcee6946804df025c75d84830
Reviewed-on: http://gerrit.openafs.org/9095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e9af3e644205d7fff2a47e6eaa4a028e783d2df4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 6 11:58:55 2013 -0500
Windows: Do not pass relative paths to redirector
RDR_SetInitParams provides two paths to the redirector, the AFSCache
file path and the path of the %TEMP% environment variable. If either
of these paths are relative paths and not absolute (or full) paths,
the redirector and the service will interpret them differently.
Ensure that the full paths are delivered to the redirector.
Change-Id: I48d9cd09d9292cc0e97c41da430026c20e097de1
Reviewed-on: http://gerrit.openafs.org/9074
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 351cefe9b60032fe77aa09c0803ef051fb5b4665
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Feb 10 20:05:49 2013 -0500
Windows: Move Authenticated field to CommResultCB
Add the Authenticated state of the request to the CommResultCB
so the redirector knows the state of all requests.
Change-Id: I854735c7fbda958a12fa79232b584b4d14dd8569
Reviewed-on: http://gerrit.openafs.org/9091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d8f47f05d4e5580801916ef4ead30560e42d0b77
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 11 16:40:36 2013 -0500
Windows: Do not double increment cm_data.currentCells
During cm_cell generation the cm_data.currentCells value was
incremented twice. As a result cm_currentCells did not equal the
number of cm_cell objects allocated. Upon restart the AFSCache
contents would be discarded.
Change-Id: I2b62cb8268789e46f5ada4aa039e41c7ea8b47a5
Reviewed-on: http://gerrit.openafs.org/9090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f9f9a7ab1791bfce1e2d442c683bb664dd2ab630
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 8 14:17:12 2013 -0500
Windows: Move Trace Stmts from FILE to CLEANUP
Relabel trace statements in AFSRemoveDirNodeFromParent,
AFSRemoveNameEntry, AFSDeleteDirEntry, and AFSRemoveFcb from the
FILE subsystem to the CLEANUP subsystem. This assists in reducing
the noise when attempting to watch the file system requests that
are received by the afs redirector.
Change-Id: I0aa8c090b176a7d2fa6feb9866e7c8e9f621c2df
Reviewed-on: http://gerrit.openafs.org/9089
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a1b6015cec049367c4832d7299bcdba19ea3b3fe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 8 23:46:44 2013 -0500
Windows: AFSLocateNameEntry tracking DirectoryCB IN/OUT
AFSLocateNameEntry previously accepted ParentDirectoryCB as an IN/OUT
parameter in which a reference count was passed in but a reference
count was not passed back out. The DirectoryCB parameter is an OUT
parameter for which a reference count should be returned on success.
This patchset simplifies the logic. ParentDirectoryCB is IN only
and OutParentDirectoryCB and DirectoryCB are out only. AFSLocateNameEntry
never releases a reference count provided by the caller and it always
returns OutParentDirectoryCB and DirectoryCB with a new reference count
unless they are NULL. It is the callers responsibility to determine if
ParentDirectoryCB has changed and to release all of the references.
Change-Id: I4843d1d685917fd3f41409d0b11f5b768c2c1dd6
Reviewed-on: http://gerrit.openafs.org/9087
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ef02d3845bedf5daf4628e52d4452ea58eb7909a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 8 17:28:09 2013 -0500
Windows: AFSLocateNameEntry separate VolumeCB In/Out
Tracking the VolumeCB references within AFSLocateNameEntry has
proven to be very error prone. When the VolumeCB parameter is
an in/out parameter the caller cannot reliably determine whether
or not AFSLocateNameEntry replaced the updated the pointer and
whether it properly released the references. This patchset
changes the interface so that VolumeCB and ParentDirectoryCB
have separate in and out parameters. The caller is now responsible
for tracking its own Volume reference counts and AFSLocateNameEntry
obtains its own which will either be returned to the caller as a
non-NULL OutVolumeCB or released.
This patchset turns ParentDirectoryCB into an IN only parameter
and adds OutParentDirectoryCB as a dedicated OUT parameter. However,
it does not alter any associated reference count logic. That will
be implemented in a subsequent patchset.
Change-Id: Ic271d13496b4af80339c5ccd505fa04ec57b4700
Reviewed-on: http://gerrit.openafs.org/9086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 76fb036f4e7d185ab725b6754652a764906c9e0b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Feb 10 11:54:44 2013 -0500
rx: remove rx_misc.h define trailing semicolons
PIN and UNPIN macro definitions should not have trailing
semicolons.
Change-Id: I242c0a7a40cbabe852ed975eb64df52dbb585624
Reviewed-on: http://gerrit.openafs.org/9088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 948cc20c8e56aa33eeb1f0af9def4db4d5a0d121
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Feb 6 18:44:35 2013 -0500
rx: Remove rx_atomic_add_and_read trailing semi-colon
Remove a stray trailing semi-colon from the definition of
rx_atomic_add_and_read.
Change-Id: Iae9c62c132bcbb3d2e609dde2d54e0435d36cc03
Reviewed-on: http://gerrit.openafs.org/9075
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a5865493a27cc8fbb849e683c7dffa187d2e3e71
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 6 22:44:44 2013 -0500
Windows: GetVolumeInfo cell name
The service was supposed to provide the redirector the cell name
as part of the AFSVolumeInfoCB response from RDR_GetVolumeInfo.
Add a new field to store it and populate it.
Change-Id: Idcafaee66ed1031dfdeee1804bbdff617e464d3f
Reviewed-on: http://gerrit.openafs.org/9079
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c0f465cc3ab1392c793c2bcbc912a55dc02ad46c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 6 22:43:16 2013 -0500
Windows: Return full volume name for RO and BK
RDR_GetVolumeInfo must return the full volume name (not the volume
group name) for RO and BK volume types.
Change-Id: Ic215b205c07faab53f8a899d0f662b64c902dde2
Reviewed-on: http://gerrit.openafs.org/9078
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aa5d0d708f6a758396b04779ceac271a039439fb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 6 19:35:00 2013 -0500
Windows: AFSFileOpenResultCB.Authenticated
Notify the redirector whether the the result of a file open
request is the result of a user authenticated action.
Change-Id: If1f7704b3ea31e40e88b3589fd604a7d50653ec1
Reviewed-on: http://gerrit.openafs.org/9077
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dbdee60a83d72d38a04a0eeb2a5324cf497e57e3
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Jan 27 20:52:39 2013 -0500
Linux: Detect undefined symbols in kernel modules
Undefined symbols in the kernel modules are not currently detected
at build time. As a result, buildbot may indicate success while
the resulting kernel modules are unusable.
In the kernel build process, modpost warns about missing symbols
but does not return an error in the case of external modules.
Detect these warnings and cause the libafs build to fail.
Change-Id: I2c428a5ce7e3a0d10178679f789b3d787719c397
Reviewed-on: http://gerrit.openafs.org/8981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 748e07d24367e80e353446bdb97f61ce420d303d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 6 19:32:28 2013 -0500
Windows: add cm_HaveToken
cm_HaveToken answers the question of whether a cm_user_t has a
token for a specified cell.
Change-Id: I4dff312a7e9000ccee6952c21fca174700364c4c
Reviewed-on: http://gerrit.openafs.org/9076
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aea9e64147bd4883764f2d85b98c37a79c5e135a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jan 8 14:38:34 2013 +0000
pam: Build using libtool
Build the pam_afs and pam_afs.krb modules using libtool, so they
fit in with the rest of the new build infrastructure.
This requires some additonal symbol exports from auth and kauth,
which are included
Change-Id: I97a130ba69216cd63ba388f2aaabe830a0c4543f
Reviewed-on: http://gerrit.openafs.org/8900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 028258e6393bd76df0944dc77266bfba176ada73
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 5 00:29:12 2013 -0500
Windows: AFSLocateNameEntry double free Volume RefCount
If AFSBuildMountPointTarget fails when called from AFSLocateNameEntry
the pCurrentVolume reference count will have been freed even though
the pointer has not been updated. If the failure is
STATUS_OBJECT_NAME_NOT_FOUND and AFSLocateNameEntry was called
by AFSCreateCommon, the Volume reference count will be freed twice.
Change-Id: I0b5ccb512ea0ec2e24099dff38bbbeddebf0bee3
Reviewed-on: http://gerrit.openafs.org/9069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e7df2fcedcd05b5f73f5398433289b52b769c0ea
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 4 16:22:56 2013 -0500
Windows: AFSObjectInfoDecrement correct return value
The return value must be the new ObjectReferenceCount value not
the value of the Reason counter. This was broken by patchset
e267774f1a4f9cc5bfc32c545df36a4bf7947607.
Change-Id: I9dd3cd56f6c7d43f061bdda8e24666b5f9a4ed9b
Reviewed-on: http://gerrit.openafs.org/9068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d0e7d8c76e038c5bd76b49fd8ca7b588e848a4f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 4 15:14:16 2013 -0500
Windows: AFSVolumeCB track RefCount reasons
Introduct AFSVolumeIncrement and AFSVolumeDecrement functions
which are used to increment not only the AFSVolumeCB.VolumeReferenceCount
but also a new VolumeReferences[Reason] counter. In the future when
a VolumeReferenceCount error occurs it may be possible to isolate the
cause to a subset of the code.
In the process, the VolumeReferenceCount necessary to free the
AFSVolumeCB object is changed from 1 to 0 and AFSInitVolume no longer
initializes the AFSVolumeCB count to 2.
The signature for AFSInitVolume and AFSLocateNameEntry are modified
to permit a volume reference reason to be provided. This permits
the reference to be allocated in one function and released in another
without resulting in count imbalances.
Change-Id: I021a6efe061817ff044c18a699ee63a7ffbfc7bf
Reviewed-on: http://gerrit.openafs.org/9067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 20a54b02521b40b07e4ec87df55a1e9a2549c881
Author: Antoine Verheijen <antoine@ualberta.ca>
Date: Tue Jan 22 19:24:25 2013 -0700
OpenBSD: Add config headers for new(er) OS versions.
The OS-specific config header files have not kept up with the
newer releases of OpenBSD. This patch corrects that by adding
header files for OpenBSD versions from 4.9 to 5.3 (the newest
version currently under development).
Change-Id: I5e233cc7b96be2c1c52824653c42d3c6d77d6f50
Reviewed-on: http://gerrit.openafs.org/8927
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit dfd9d79524210654d1d635ed58a08c900b479585
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jan 8 15:26:45 2013 +0000
Build system: Add LT_LDRULE_shlib_missing
Add a new LT_LDRULE which can be used to build shared libraries which
may not contain all of the symbols listed in their .sym files. This
allows us to build a library like roken, where different symbols
will be present on different operating systems.
Change-Id: I82e0df49131aa7184360130547c82052a6dd704b
Reviewed-on: http://gerrit.openafs.org/8901
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3b733db8bf2bc3a1366554ae97814cc722437149
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Thu Jan 24 21:38:28 2013 -0500
Linux: crset should use passed credentials
When copying credentials in crset, take the passed credentials as
the source instead of the current process credentials.
This doesn't cause any problems currently since crset always gets
called with the current credentials.
Change-Id: Ia6a341e96d00071587443f8eef4a99992b368abc
Reviewed-on: http://gerrit.openafs.org/8980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7d8b636d9493f3c470c1bbffb4a566060b21d98b
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Tue Jan 29 22:54:00 2013 -0500
LINUX: ifconfig's output has changed
net-tools in Fedora 18 has changed 'inet addr' to just 'inet' (possibly
to more closely match the ip command).
Change-Id: I9224d0eb4dd77e248c8f8eed966fa26ec7dda08c
Reviewed-on: http://gerrit.openafs.org/8987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ee7b4467dba211c25875797227e18643d8ea7ac3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jan 8 15:28:17 2013 +0000
Build system: ADd LT_LDRULE_static_NOQ
Add a NOQ variant of the LT_LDRULE_static build macro, so that it
can be used as part of compound rules.
Change-Id: I45b3d4ff09465d2d472e27c2fd290e0311791403
Reviewed-on: http://gerrit.openafs.org/8902
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1f891b622e9b32a068082087eae9d787057f7f00
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Dec 21 17:56:14 2012 -0500
dafs: preattach should wait for exclusive states
In rare circumstances an FSYNC_VOL_ON operation may fail silently,
leaving the volume in its previous state. The only clue is a FileLog
message "volume <nnnn> not in quiescent state".
This is caused by a race condition in the volume package: an
FSYNC_VOL_ON operation is attempting to preattach a volume
(in VPreAttachVolumeByVp_r()) at the same time a fileserver RPC
(e.g. FetchStatus) is detaching the volume (in VReleaseVolumeHandles_r())
at the conclusion of attach2() logic.
The fix calls VWaitExclusiveState_r() before calling
VPreAttachVolumeByVp_r().
Change-Id: Ib66859381d29311fda3e08984dcb740eadafb340
Reviewed-on: http://gerrit.openafs.org/8814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 804a0db1bbfbb4bcd14f3308ce6e77e2aa1323f6
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Feb 2 12:17:48 2013 -0500
Parallel libtool build fixes
Serialize the use of libtool in a few places to avoid having
concurrent libtool instances in the same directory..
Change-Id: I5abaeae8f6a31cd84643b7df39c77493d198b600
Reviewed-on: http://gerrit.openafs.org/9024
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 52cc7988371ead9b2903d90453598b3d07ce1696
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 4 14:56:27 2013 -0500
Windows: Use AFS_OBJECT_REFERENCE_MAX in struct
Use AFS_OBJECT_REFERENCE_MAX to size the array in the struct.
This should have been a part of patchset
e267774f1a4f9cc5bfc32c545df36a4bf7947607.
Change-Id: I9323387a27a5bc2e708f8a8424cb38b491d542d7
Reviewed-on: http://gerrit.openafs.org/9066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dc32caae7768c486e610c4e56c6a78e9c918d975
Author: Thorsten Alteholz <openafs@alteholz.de>
Date: Sun Feb 3 11:58:25 2013 +0100
Beautify ubik_print()
After lots of intermediate steps a call to ubik_print(), ubik_vprint()
and ubik_dprint*() ends in vFSLog() which adds a timestamp to the output.
So any call to ubik_print(), that does not contain a \n at the end,
makes a mess of the logfile.
The least invasive change will simply add this newline at the end
of any ubik_print() call.
This also prevents long lines in the log, which might appear on
multi-homed hosts with lots of interfaces.
FIXES 1446
Change-Id: I2e44588fcc5b27704dd5fec5a83d99d3a86f86e4
Reviewed-on: http://gerrit.openafs.org/9059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4b3f499b20ba50cf92e6caeb747c56e53a5a55f3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Feb 3 14:03:36 2013 -0500
Windows: cm_SetupFetchBIOD reserving type
Change type of 'reserving' to afs_uint64 to match the return type
of buf_TryReserveBuffers().
Change-Id: I8aaac5a763ec55acada2702b898a9bcd50f82ed0
Reviewed-on: http://gerrit.openafs.org/9062
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e4d97fa3e4a0d02160e082547b84c437472bfaae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 27 15:43:58 2013 -0500
Windows: cm_user interlocked operations
Convert cm_user refcnts to use interlocked operations.
Change-Id: Ib40d2446792dcde3038ea601281406e013147595
Reviewed-on: http://gerrit.openafs.org/9061
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5f17b9f9295b4f1c86cc71a5253f93a9c56078a4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Feb 3 01:20:36 2013 -0500
Windows: Fix RDR_BkgFetch rock assigment
The wrong variables were assigned to the rock base and offset
in the final queuing of a RDR_BkgFetch request within
RDR_RequestFileExtentsAsync.
Introduced in 8b874aa205cd05b8109a296c8cb8ad0bb5114553.
Change-Id: I77af22caed9eceb4c90b8fa18b91945d059995e5
Reviewed-on: http://gerrit.openafs.org/9058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3ecdfadded7cb6de6a0204cb1cf70ae764e17769
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 29 12:28:57 2013 -0500
Windows: dirty threshold 64 * chunksize
must be large enough to keep the pipe full
Change-Id: I1bf8b5800ff286e74dbe57ced19943db891b715f
Reviewed-on: http://gerrit.openafs.org/8996
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2e7c203a6cc84b2d4e4c67bd47277c19315853ae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jan 28 21:12:10 2013 -0500
Windows: More RDR Garbage Collection
This patchset addresses the failure of AFSVolumeCB, AFSDirectoryCB,
and AFSObjectInformationCB objects to be garbage collected by the
AFSPrimaryVolumeWorker thread. The AFSPrimaryVolumeWorker thread
is broken up into smaller pieces.
Change-Id: I54749960be8f22313ba7ee5f9f96438be6321f25
Reviewed-on: http://gerrit.openafs.org/8995
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8099525c4a0251974c0a66c4b72fc26187691f29
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 27 15:06:09 2013 -0500
Windows: AFSEvaluateTargetByID Sanity Check Result
If the file server provides the service with bogus status info
and that status info is inconsistent with the allocated fields
in the associated ObjectInformationCB and FCB structures, it can
result in a BSOD. Perform some basic sanity checks and if an
inconsistency is discovered, fail the request. This may result
in the inability to access a file/directory but will prevent a
BSOD.
Change-Id: Iabf66adc5e953dc4ae27ed701148a9ffbf55abcc
Reviewed-on: http://gerrit.openafs.org/8994
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5649d84f1a96e3b2cc1dc42d67d3facb4e4b5d07
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 1 13:40:22 2013 -0500
Windows: Replace ParentObjectInformation pointer
Although rare there have been crashes which were the result of
the ObjectInformationCB being freed while another ObjectInformationCB
is pointing to it via the ParentObjectInformation pointer.
This patchset removes the pointer and replaces it with the ParentFileId
which is used to lookup the Parent ObjectInformationCB via the VolumeCB
BTree of all volume objects. The reference counting rules remain the
same.
Change-Id: Iaf66587be2619c8c2f06cd586ef8d423b76d1e79
Reviewed-on: http://gerrit.openafs.org/8993
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a5378b71ee9b4e2a0c25df95dced1026dbbf7a39
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 1 13:39:22 2013 -0500
Windows: Test for PRSFS_INSERT in redirector interface
If a test for PRSFS_WRITE fails and the cm_scache.creator is the
current user, then also test for PRSFS_INSERT privilege.
Change-Id: Ib3e34f7ce50216cd9ff82afe9a7184f79d46ce15
Reviewed-on: http://gerrit.openafs.org/8978
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7c3f5bfba68964dfda989adb59a2b9efdb37eb4d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 00:45:21 2013 -0500
Windows: Additional I/O subsystem trace messages for AFSWrite
When debugging be able to obtain additional details about the
I/O subsystem.
Change-Id: Ie875870cb874c6df0d8f94781656af8a34eeddf5
Reviewed-on: http://gerrit.openafs.org/8977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ed6354881d6f55ced842e3e78a02133fba8823ae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 00:18:37 2013 -0500
Windows: .readonly space reporting
.readonly volumes can be stored on multiple partitions which each
have a different size and free space available. To ensure consistency
regardless of which partition the .readonly is accessed from and
because .readonly volume sizes cannot change, report the allocation
size of the volume as the partition size. Continue to report that
volume has zero free sectors because the volume cannot be written to.
Change-Id: Ib57b1175da048344af615b9350d72d9eb3ffe97d
Reviewed-on: http://gerrit.openafs.org/8976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ddba1a1f06d140f5683e173db5a384ac5ac40977
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 00:17:25 2013 -0500
Windows: FILE_READ_ONLY_VOLUME not FILE_DEVICE_READ_ONLY
Instead of stating that the AFS device is read only; report
that the volume in question is read only using the FILE_READ_ONLY_VOLUME
file system characteristic.
Change-Id: I0b172f8a984802a3cefdea84436c9ed44f34d7f1
Reviewed-on: http://gerrit.openafs.org/8975
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5880a7326428b3d17049e92b1ccc590ad3fc7897
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 00:13:03 2013 -0500
Windows: AFSQueryFsAttributeInfo use service response
The File System attributes are set by the service in the volume
information request. Use the values the service provides instead
of returning an incomplete hard coded list.
Change-Id: If620cd520ab29780ef296c6f15dfaee3774c3d41
Reviewed-on: http://gerrit.openafs.org/8974
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e41d08c9a15a722d0974b763e41d84788f742b6a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 00:11:41 2013 -0500
Windows: FILE_FS_DEVICE_INFORMATION Device Type
Consistently report our device type as FILE_DEVICE_NETWORK_FILE_SYSTEM
instead of FILE_DEVICE_DISK or FILE_DEVICE_DISK_FILE_SYSTEM except
when returning FILE_FS_DEVICE_INFORMATION where we must lie and state
that the device type is FILE_DEVICE_DISK. Otherwise, the Win32 API
GetFileType() returns FILE_TYPE_UNKNOWN instead of FILE_TYPE_DISK.
Applications built from msys (but not current cygwin) treat files
of type FILE_TYPE_UNKNOWN as special character devices instead of
files. This breaks msysGit.
Change-Id: I7107ae84ede31abb01481b2e8c3915588d9fd529
Reviewed-on: http://gerrit.openafs.org/8973
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cac8dea092d62141da700c691b3609ed4dc08c04
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 22 12:46:20 2013 -0500
Windows: RDR_CleanupFile FSync only files
If the cm_scache type is something other than a file, there
is no point performing an FSync. Do not incur the overhead.
Take into account any outstanding AsyncStore operations that
might be in-flight.
Change-Id: I66cd59cbcd81f2a7639e478832f921ac393ea3ae
Reviewed-on: http://gerrit.openafs.org/8972
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8ae06c2ea48651ebd90635ffcc68bbccfeb908c8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 22 12:44:21 2013 -0500
Windows: AFSCleanupFile always flush on last handle
Do not rely on a count of dirty extents to determine if the
service should flush a file during a cleanup operation. Simply
because there are no dirty extents held by the redirector does
not imply that the service has no dirty buffers for the file.
Change-Id: Ifc7c139a587413626eae145f343c4295dd94f28a
Reviewed-on: http://gerrit.openafs.org/8971
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5bedc5e03a21409b7d2426387584267e33073457
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 20 13:27:51 2013 -0500
Windows: clear ASYNCSTORING flag in scache recycle
If the scache has been recycled the ASYNCSTORING flag cannot
be accurrate. Clear it.
Change-Id: Ie5a5a19bf1818e36f6274ba24ddeaf5f4b835ff4
Reviewed-on: http://gerrit.openafs.org/8970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e7e83d8c7e2aef13109eff53cede43a1904bbe91
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 20 13:26:24 2013 -0500
Windows: restructure daemon state tracking
Move all of the per thread state info into a struct and
allocate an array of structs instead of an array for each
data type.
Change-Id: I25b878192a8f919b21d96e981d7369a429b9171d
Reviewed-on: http://gerrit.openafs.org/8969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 294fce5ddf4abbe9675f759b2512bdc306659944
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 20 13:23:50 2013 -0500
Windows: osisleep cleanup
Change-Id: Id76989dfab53a166a4174569973fb0a5f5e5e972
Reviewed-on: http://gerrit.openafs.org/8968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b93ddf1a9c49988e84bfddff37bc55949d49768c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 17 21:02:36 2013 -0500
Windows: remove out of date cm_buf #define
Change-Id: Id60f509d7c8a1e9eb2f94d4c481d00e9b820b827
Reviewed-on: http://gerrit.openafs.org/8967
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8b874aa205cd05b8109a296c8cb8ad0bb5114553
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 17 01:44:27 2013 -0500
Windows: Convert BkgDaemon Procedures to use rock
The BkgDaemon functions accepted four 32-bit parameters into
which 64-bit offsets and lengths were fit. Convert the routines
to use a procedure specific rock type which is allocated by the
caller to cm_QueueBkgRequest and freed by cm_BkgDaemon.
The use of a rock will permit greater flexibility for future
background procedures to be implemented that require more complex
data to be passed around.
Change-Id: I4fc06e1d4a3a3ee25c699c95a90a9c9993199ddd
Reviewed-on: http://gerrit.openafs.org/8966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5be1779547d800e1a040fe1969336adab0c01afa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 17 01:42:54 2013 -0500
Windows: Set dirty page limit to 2 x ChunkSize / 4096
4096 is the size of a memory manager page. ChunkSize is in octets.
Windows doesn't wait until the limit is reached to begin flushing
and ChunkSize is not a hard limit.
Change-Id: Ic1d5dda18eefbf309696b8a19ef5623248f54faf
Reviewed-on: http://gerrit.openafs.org/8965
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8b62d08760b2cde9fb0b15b695d8467191c0669f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 19:42:41 2013 -0500
Windows: Add CM_MERGEFLAG_CACHE_BYPASS
If a store operation is performed direct to the file server
bypassing the AFSCache, call cm_MergeStatus() with
CM_MERGEFLAG_CACHE_BYPASS to ensure that the valid version
numbers for the cm_scache_t object are incremented appropriately.
After a cache bypass occurs, only buffers with the current
data version number are valid since the cached data will be
incomplete.
Change-Id: I9438f8c9759407de69ab894df4f6fe91027a4b94
Reviewed-on: http://gerrit.openafs.org/8964
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 65ff9935728e0142728e29295c7ef69bf73cecf4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 30 21:45:44 2013 -0500
Windows: AFSInitPIOCtlDirectoryCB fixes
Rename ObjectInfo parameter to ParentObjectInfo since
it does represent the parent of the PIOCtlDirectoryCB
that is being allocated.
If the AFS_DIR_ENTRY_TAG allocation fails, do not call
AFSDeleteObjectInfo( pObjectInfoCB) prior to the try_return
because AFSDeleteObjectInfo() will be executed in the try_exit
block.
Finally, do not increment the pDirNode->ObjectInformationCB
reference count when returning STATUS_REPARSE. The reference
count is tracked by the pDirNode pointer and has already been
allocated.
Change-Id: Iac3d2b1b58d3bf12eb08c92b96beca43e794aef5
Reviewed-on: http://gerrit.openafs.org/8963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3847ec9531b7bde9a2af9edded5b19d797789752
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 19:28:44 2013 -0500
Windows: Additional trace %p and %d changes
Use %p when logging pointers.
Use %d for counts.
Change-Id: Ib3a3b1226945eccb15d912d7ff1c83f0257e7acd
Reviewed-on: http://gerrit.openafs.org/8962
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 391bdbf9ace271ef41d6c73031d172cdad802f79
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 19:25:37 2013 -0500
Windows: AFSProcessCreate drop DirOpenRefCount on exit
AFSProcessCreate() must not maintain its DirOpenReferenceCount
when bFileCreated is true because the AFSCcb maintains its own
count and the one obtained by AFSProcessCreate() will only be
leaked.
Change-Id: I6591eb1c10d3dffe7449894b29c9999f5db91d64
Reviewed-on: http://gerrit.openafs.org/8961
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4811fd8844d1294ee37c14bac7cfae776d09c9b4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 19:14:42 2013 -0500
Windows: Trace DirectoryCB allocations
Add a trace subsystem for tracking Directory Entry allocations
and deallocations to assist with debugging.
Change-Id: Ic5f0361bf10752f50d433d3e9f4792b32bec8de1
Reviewed-on: http://gerrit.openafs.org/8960
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c753d398f2005c886932f20b49af15efc489a829
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 18:55:24 2013 -0500
Windows: Introduce NameArray Reference Counts
Split the DirOpenReferenceCounts into those related to DirectoryCB
reference counting unrelated to the NameArrays and those that are
related to the NameArrays. This helps track down the source of
overcounts and undercounts.
Change-Id: Ie3c6f15394fe116761e32ed4d7756a4bf6a5549f
Reviewed-on: http://gerrit.openafs.org/8959
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e5e952f5fc1cb8a6d2789938e30fb00e5bb570d8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 18:52:51 2013 -0500
Windows: AFSSetRenameInfo Notify correct object of change
When AFSSetRenameInfo makes a change, it is the parent object
that must be notified not the parent of the parent.
Change-Id: I56b3f1c076cb4abb4b5e41aed261e867a2d2ebb7
Reviewed-on: http://gerrit.openafs.org/8958
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8d4757284a08d5e7123fab696c5da64faa4e6fb7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 18:51:01 2013 -0500
Windows: Allocated VolumeCB from PagedPool
Only the non-paged portion of the VolumeCB should be allocated
from the non-paged pool. Allocate the VolumeCB itself from the
paged pool.
Change-Id: If248faf78546bb34fd1ba1ddcc1acb5a6da20c6f
Reviewed-on: http://gerrit.openafs.org/8957
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 34f4427a978a485d83b1faa57fd786e47b8dddf5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jan 26 23:19:05 2013 -0500
Windows: Move VolumeWorkerContext to NonPaged pool
The VolumeWorkerContext contains a KEVENT which must be allocated
from the NonPaged pool. Move it to the AFSNonPagedVolumeCB struct.
Change-Id: If24ea5f22e6cc7e71328d0d2d8e0c8b9209ce5b2
Reviewed-on: http://gerrit.openafs.org/8992
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e267774f1a4f9cc5bfc32c545df36a4bf7947607
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 18:44:33 2013 -0500
Windows: Categorize ObjectInformationCB RefCnts
To assist in tracking down the source of ObjectInformationCB
overcounts and undercounts, add an advisory array which tracks
the reference counts by category. In the procress ensure that
all reference count changes are logged by tracing.
Change-Id: I813cd0af5e12e36ba9863577dbd35abef6339414
Reviewed-on: http://gerrit.openafs.org/8956
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fce3f679f1842a3c4b867a3152414566fc56fb81
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 18:24:55 2013 -0500
Windows: AFS_SUBSYSTEM_OBJECT_REF_COUNTING fixes
A large number of trace messages monitoring ObjectInformationCB
reference counting were categorized under AFS_SUBSYSTEM_FCB_REF_COUNTING
instead of AFS_SUBSYSTEM_OBJECT_REF_COUNTING. This patchset applies
the correct subsystem category.
Change-Id: I6c309b42b3d679f961d82c1a975d84122c9275f9
Reviewed-on: http://gerrit.openafs.org/8955
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3e38897012ab8075df96b9e1ecca2a2ebc23cc30
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 24 16:29:52 2013 -0500
Windows: Reduce RDR Object Lifetime
Adjust the redirector object lifetime from 10 minutes (600 seconds)
to 20 seconds. The object lifetime is how long an object can remain
idle before garbage collection is permitted.
Change-Id: I8db89bfb0ccd40e9295dcbb30fbc2c96813d9fc9
Reviewed-on: http://gerrit.openafs.org/8954
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 24b6365169e48d21bbb97fb456860f63389a5bcf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 13 10:15:02 2013 -0500
windows: Update raw fetch/store operations
rawops.c is a hold over from Eric Williams' original attempt
to implement an AFS redirector. When the rest of the his code
was purged from the tree and replaced with a more complete
implementation based upon the Kernel Drivers's File System
framework rawops.c was left behind.
Although the source file has been compiled as part of the build,
its functions ReadData and WriteData have never been called. This
patchset:
1. renames the functions to raw_ReadData and raw_WriteData
2. modifies the function signatures and provides a header
with prototypes
3. requires that cm_scache.rw be write-locked upon entry
4. renames variables
5. removes the #define CM_BUF_BUFSIZE and relies upon
cm_data.blockSize instead
6. Always write back the current range as an async store
instead of the previous chunk as random write patterns
will fail to store all of the dirty buffers.
Change-Id: I1594b2950ab14da0c0de2a382fd1ba8248a9d1c6
Reviewed-on: http://gerrit.openafs.org/8953
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bb733da134ce7d7742d5b7359edb36f67ec85632
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jan 16 12:10:02 2013 -0500
vlclient: add -probe option
Add a new option to the vlclient test program to call the
probe server RPC to ping the vlservers in a cell. Uses a multi
rx call to do the probes in parallel.
The existing -host option can be used to ping a single
vlserver.
Change-Id: I25666b7ff139ae43364ac04869b14997f3ed0d53
Reviewed-on: http://gerrit.openafs.org/8911
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 40b43a15b86d4159f7de478ed5e2ace543b7687a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Feb 2 07:22:50 2013 +0000
tests: Don't use libafsauthent
Use liboafs_auth.la directly, rather than using libafsauthent, to
build the auth tests
Change-Id: Idf0e7a32626802b6113d21833ded09d9e20e3659
Reviewed-on: http://gerrit.openafs.org/9023
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b3dd9c2f4e753c363ed5e75b50f73c70b4b675ad
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Feb 2 07:20:14 2013 +0000
auth: Permit NULL fallback in localauth case
Allow the caller of afsconf_PickClientSecObj to specify both
local authentication, and to request fallback to null authentication
if local auth isn't available.
Change-Id: Ib3b801bfde3f32b4cb9cdc7c08a3d8ab985c080f
Reviewed-on: http://gerrit.openafs.org/9022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9dc6dd9858a49aab5207cdc46b6820a18ef54bf4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Feb 2 07:17:53 2013 +0000
rx: Fix AIX test_and_set_bit
The AIX definition of rx_atomic_test_and_set_bit had its test the
wrong way round - so an already set bit would return false, and a clear
bit would return true. Fix this.
Change-Id: I7778c411016bca53b38257fca59ae0f7aaad64ae
Reviewed-on: http://gerrit.openafs.org/9021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 69f634503482f899e4d422b16100636905c72ea8
Author: Thorsten Alteholz <openafs@alteholz.de>
Date: Wed Jan 30 20:11:04 2013 +0100
fix some typos in bos_setrestricted
the real name of the command is: 'bos setrestricted'
it is sufficient to name 'bos install' only once
Change-Id: Ic68f7cb55466e1c92c34eeda37c0a64a11b7e4d8
Reviewed-on: http://gerrit.openafs.org/8990
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 17986a100e19992dc21b1b517d274857c1fc6984
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Jan 21 16:13:56 2013 -0500
rx: convert rxinit_status to atomic
we don't need to use a lock just for this; switch to atomic and use that
to trigger configuration.
Change-Id: Ia96ec308dda51d1f6d13f290a23251c66665e499
Reviewed-on: http://gerrit.openafs.org/8930
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ed8b4808860cda1f80403e372e540c63b3b4183c
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Jan 21 16:10:17 2013 -0500
darwin: stop processing upcalls once rx shutdown starts
we have a chicken and egg. can't stop upcall without
killing socket; can't kill socket while rx might try to transmit on it.
cheat, and if rx is shut down, don't process things upcall receives.
FIXES 131577
Change-Id: I6b72f6e7aefb7937b768dcb9c0a83d0ee3317bfa
Reviewed-on: http://gerrit.openafs.org/8931
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2f8de279e11ff954c0034eb1fd4695cb015d956f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 19 16:52:34 2012 -0500
Windows: Disable hard dead timeout for RDR File Server connections
The UNIX cache manager does not implement hard dead timeouts
on file server connections. The Windows cache manager had to
because of the SMB connection timeout requirements. For the
AFS redirector there is no timeout requirement. Therefore,
when the SMB stack is disabled the Windows cache manager can
disable the hard dead timeout.
The idle dead timeouts are in place to cancel connections when
file servers stop replying with real data.
Change-Id: I44f77b78a52e7cac3a88a53830748b77f3ff4000
Reviewed-on: http://gerrit.openafs.org/8828
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d1c6b7bc580e05f29f577bfdcdbd30c80cb1596b
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Fri Feb 1 08:42:49 2013 -0500
libafsrpc: avoid more concurrent libtool
libtool gets confused if it is running two instances in the same
directory, so make sure we build libafsrpc.a after the other things
we already single-stream.
Change-Id: I4c26b5707fdb73319563b063b45eb40b7ca1457e
Reviewed-on: http://gerrit.openafs.org/9017
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1839cdbe268f4b19ac8e81ae78548f5c78e0c641
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Jan 21 16:50:25 2013 -0500
rx: atomic bit ops
Add rx_atomic_test_bit, rx_atomic_set_bit, and rx_atomic_clear_bit
to provide bitwise operations over atomic types. These allow the
use of atomic flag variables.
Uses native platform atomic operations wherever these are available,
otherwise falls back to our 'standard' MUTEX based implementation.
LICENSE BSD
Change-Id: I161631b2408e85f757ff04bf831a631ccb1f930d
Reviewed-on: http://gerrit.openafs.org/8936
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bf4cda8a5551719a005e4f927dfd1fb25dc2c219
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 25 03:25:46 2013 -0500
Windows: rename 'rbytes' to 'rxbytes' for clarity
Throughout cm_dcache.c, the various 'rbytes' represents the number
of bytes to be read from the next rx_Read or rx_Readv call.
Rename the variable to 'rxbytes' to improve clarity.
Change-Id: Iffd8dd397c0e6ab4cc44019b7f937a80f5d492d2
Reviewed-on: http://gerrit.openafs.org/8952
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 23fa416581568c2c58c6f2739139b9486ba8fa10
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 3 14:11:31 2013 -0500
Windows: Update Bulk I/O Descriptor
Update the cm_bulkIO_t and associated functions such that
the 'reserved' field is no longer a boolean indicated whether
or not buffers have been reserved but instead becomes a count
of the number of buffers that have been reserved.
buf_TryReserveBuffers is modified to return an afs_uint64
count of the number of buffers reserved instead of a boolean.
cm_SetupStoreBIOD, cm_SetupFetchBIOD, and cm_ReleaseBIOD altered
to store the reserved buffer count and use it when freeing the
BIOD.
Prior to this change it was not possible to reserve a count other
than the number of buffers it takes to store one chunkSize of data.
Change-Id: I78d71c77ffddd7f34278314fcfe9ee568b835a8b
Reviewed-on: http://gerrit.openafs.org/8951
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8cb3e2eee81c3ec87f27fbfab18d6560490cb6d8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 16 02:02:06 2012 -0500
Windows: reformat
Change-Id: Ifba4f0d54032bd9580c97e7a94d2550e49b1a1ac
Reviewed-on: http://gerrit.openafs.org/8950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 87b7396e3106febd651ff60051550007716e8e49
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 6 06:41:47 2012 -0500
Windows: handle CM_ERROR_RETRY in cm_Analyze()
cm_Analyze() was not forcing a retry when it received CM_ERROR_RETRY.
Change-Id: I5c392623a3917bebdd5cb9bd86b030395d7a7d48
Reviewed-on: http://gerrit.openafs.org/8949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e297a00dfca21103672ab97145895cabf97112a8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 15:58:06 2012 -0500
Windows: Decrement Fcb OpenHandleCount while locked
AFSCleanup performs tests on the Fcb Open Handle Count to determine
when to perform final cleanup tasks on the last handle close. The
test is protected by holding the Fcb Resource. If the Open Handle
Count is decremented after dropping the Resource, it creates a
race with other threads that might be blocked entering AFSCleanup
to close their handle on the same object.
Change-Id: I0403d8aeafd736484728a25c5c48ab28e8b8a804
Reviewed-on: http://gerrit.openafs.org/8863
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit af3f627e676c5b849b721c75a84a88fc6e54ec52
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 16:12:21 2012 -0500
Windows: AFSOpenRoot obtain VolumeRoot OpenReferenceCount earlier
In AFSOpenRoot obtain the VolumeRoot reference count before performing
any operations that require use of the VolumeRoot. If the operations
fail, release the reference count.
Change-Id: I2e5a6574f87db858aa60d812c68f637266db529e
Reviewed-on: http://gerrit.openafs.org/8862
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e6ec171caced9b7b3dd78c4931d7047bad07e1f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 16:10:14 2012 -0500
Windows: RDR FILE Processing Tracing
Additional/improved trace messaging for name not found and
path not found errors.
Change-Id: Ieedbee072c0f2c7050a33734fe16b4dfc0504cea
Reviewed-on: http://gerrit.openafs.org/8861
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c0627f8620594191ce5901937175c5f1a93daec2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:57:31 2012 -0500
Windows: DirOpenReferenceCount reorganizing completed
This patchset completes the reorganizing of the DirOpenReferenceCount
handling. Now that every AFSCcb is given a refCount in AFSInitCcb()
which is released in AFSRemoveCcb() it is possible to simplify some
of the logic surrounding DirOpenReferenceCount handling across
the AFSCommonCreate -> XXX -> AFSLocateNameEntry -> {MountPoint, Symlink}
call sequences.
Wherever possible releasing of DirOpenReferenceCounts occur in a
functions try_exit block. AFSCommonCreate() uses the new variables
bReleaseDir and bReleaseParentDir to track whether these refcounts
need to be released. Additional comments document the decision
making.
There was at least one code path in AFSLocateNameEntry() where
the DirOpenReferenceCount could be dropped when it should not have
been. (pExistingDirNode == pDirNode).
Change-Id: I266a902ad4c44b4b8e49258c2da4acd2df1f4476
Reviewed-on: http://gerrit.openafs.org/8860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9f0f9d9ecea59b76c1794b405ab43eeb99edfe68
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:51:55 2012 -0500
Windows: NameArray DIRENTRY_REF_COUNT logging
Include the NameArray pointer in the AFS_SUBSYSTEM_DIRENTRY_REF_COUNTING
log messages generated from the NameArray management routines. This
permits correlation between the reference count changes and the
NameArray to which they were associated.
Change-Id: Ieb1b78dec35b91fe2b325ed9da760f56e98759c3
Reviewed-on: http://gerrit.openafs.org/8859
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0ea2174f018ffff363da03e21b4f6c9f59263ed1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:49:43 2012 -0500
Windows: AFSSetRenameInfo DIRENTRY_REF_COUNTING
When logging the result of the DirOpenReferenceCount increment,
use lCount instead of referencing the DirOpenReferenceCount field
which could have been changed.
Change-Id: I2227472bf903c347e505e4e1d8b60d35e176c0df
Reviewed-on: http://gerrit.openafs.org/8858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8bd8f371d73fafddb409cdcc98467632dc111125
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:44:27 2012 -0500
Windows: AFSSetFileLinkInfo() DirOpenReferenceCount handling
AFSSetFileLinkInfo() would leak a DirOpenReferenceCount when
pNewTargetDirEntry is not NULL upon exit. It also did not
properly handle a STATUS_REPARSE response from AFSNotifyHardLink().
The AFSInsertDirectoryNode() call should not be performed when
the result is STATUS_REPARSE since that means the entry already
exists.
Change-Id: Ibbf497cb4c3c412e4f95cdffc6025f03f0e2ed8b
Reviewed-on: http://gerrit.openafs.org/8857
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 479f35832515c3235865e0e286d0fd5e5e406d47
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:40:25 2012 -0500
Windows: AFSNotifyHardLink() DirOpenReferenceCount handling
This patchset consolidates the releasing of the DirOpenReferenceCount
within AFSNotifyHardLink() into the try_exit block. This clarifies
the logic and avoids duplicate code blocks.
Change-Id: I7bf7e5af55646ea570c76e36a673900521a3582c
Reviewed-on: http://gerrit.openafs.org/8856
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5ef1aeb60f14ca3807a2855c23cb011e0fc046fb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:36:44 2012 -0500
Windows: AFSNotifyFileCreate() DirOpenReferenceCount handling
This patchset consolidates the releasing of the DirOpenReferenceCount
within AFSNotifyFileCreate() into the try_exit block. This clarifies
the logic and avoids duplicate code blocks.
Change-Id: I82e964f579f9e8b6e095291ace0bbe2cdac5af60
Reviewed-on: http://gerrit.openafs.org/8855
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f849fb1f6be4d4f8c34d150c8cdce1435a7125bf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:29:45 2012 -0500
Windows: AFSClose() DirOpenReferenceCount handling
Unless the caller of AFSRemoveCcb() steals the DirectoryCB object
from the AFSCcb before calling AFSRemoveCcb(), AFSRemoveCcb() will
release the reference count.
In all but one case where the DirectoryCB must be accessed after
the AFSCcb is destroyed AFSClose() can now let AFSRemoveCcb() do the
work.
Change-Id: I8d631d79b2465cd6f2e31444fd052270b078915c
Reviewed-on: http://gerrit.openafs.org/8854
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit afdb0dac9201a235dc1fd35e52e43895979b4583
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:28:04 2012 -0500
Windows: Fix AFSLocateNameEntry prototype
The VolumeCB parameter is an IN/OUT parameter.
Change-Id: I3eb4231e0d095cc98cc5847905d61d924d12e6f3
Reviewed-on: http://gerrit.openafs.org/8853
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9b3c7b41926758ed9060664a3da93820054db550
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 29 00:17:59 2012 -0500
Windows: AFSInitCcb redefinition
The new AFSInitCcb() allocates its own DirOpenReferenceCount to
associate with the AFSCcb.DirectoryCB.
It also accepts the GrantedAccess mask and the FileAccess values
which are stored in the AFSCcb.
These changes simplify the callers and remove responsibility of
tracking whether or not the DirOpenReferenceCount was successfully
associated with the AFSCcb.
The allocated DirOpenReferenceCount is always released by
AFSRemoveCcb().
Change-Id: Ib475310d934830974c553e0eeff96b114a56541b
Reviewed-on: http://gerrit.openafs.org/8852
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 207890788079c82d81a1a7f2a0972ed165583798
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 27 14:41:29 2012 -0500
Windows: AFSRemoveCcb cannot fail
Since AFSRemoveCcb cannot fail, change the signature from returning
NTSTATUS to void.
Remove all error handling code.
Change-Id: Ifa893a714f97cefb9bd122ab84508e5d36987e88
Reviewed-on: http://gerrit.openafs.org/8851
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7f96084969d3082842a9575ee8ff7da8c52a0796
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Dec 22 07:54:54 2012 -0500
Rework set_header_word macros
Rework the set_header_word macros so that all compilers are
happy:
- the use of offsetof() is avoided, as it has an issue on IRIX
when the result is not constant
- the assignment within the macro is explicitely sequenced before
the function call to avoid a gcc sequence-point warning
Change-Id: I2355233e865b155f958379bfa2736fee19ef2680
Reviewed-on: http://gerrit.openafs.org/8816
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 265a4b542b717c14e810202078c3ce83e4d851f5
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Wed Dec 12 10:37:47 2012 -0700
NEWS updates for 1.6.2
Add an entry for 1.6.2 with "in progress" instead of a date to hold the
release notes for 1.6.2pre4 rather than creating separate entries for
each release candidate. Users who track the release candidates can refer
to the public announcements, and this will be cleaner when reading
history later on.
Change-Id: I625044e20836e072b62ffa738eca23f1d11813a5
Reviewed-on: http://gerrit.openafs.org/8750
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 35ee4abecd2ed77eaa49e9748e4034ad9ad37edc
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Mon Jan 28 15:53:36 2013 +0100
CellServDB update 28 Jan 2013
Change-Id: Icb622cc5480aeba108b9a11f55cfb44ab7f7c262
Reviewed-on: http://gerrit.openafs.org/8982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4197bbecd9d0b2ff0b8eaec75a0df9a64f713cf0
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 7 14:46:04 2012 -0400
libafs: fs flushall for unix cm
Implement the fs flushall command on the unix cache manager to flush
all volume data. Uses a new common pioctl code point VIOC_FLUSHALL (14),
registered with the grand.central.org assigned numbers.
Change-Id: I214d8c762573b308d79fa7122a91d48ddd403eb9
Reviewed-on: http://gerrit.openafs.org/7540
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9c07dd592a0b4c55266d63b26118ca23df6747a5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 23 22:50:26 2013 -0500
Windows: Use %p for ptrs in redirector trace messages
Pointers were being logged with %08lX which results in partial
pointer values being logged on 64-bit systems.
Change-Id: Ic11e5b607b3df41f145536dfcb02dfa22537ee77
Reviewed-on: http://gerrit.openafs.org/8943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1b63689b99b49d902dd5a3286b14dcccee88b4a2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 18 14:27:16 2013 -0600
SOLARIS: Use vn_renamepath as early as possible
Commit 6c509601 uses the vn_renamepath when we are building on Solaris
11. However, some recent patch level of Solaris 10 (more recent than
stock 10u10) has the same problem fixed by that commit, where
vn_setpath takes an additional argument. So instead, just test for the
existence of vn_renamepath itself, so we also use it on Solaris 10
when we can.
Thanks to Rich Sudlow for reporting this.
Change-Id: Ic1c0437d2438c6e19b8fff8278ecda9b96bd020b
Reviewed-on: http://gerrit.openafs.org/8920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f6f145c90fbc236c350ddaa4d18b359be581496f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jan 22 15:41:38 2013 -0600
aklog: Fix allow_weak_crypto warning
It's _crypto, not _enctypes. The user will just be more confused than
before if we tell them to do the wrong thing.
Change-Id: Ib94b14efbd3c89d9f58fb8985326ee8691fd993b
Reviewed-on: http://gerrit.openafs.org/8938
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit cb9f25c448ca89e84abdefb9ddbff6937e1e7a7f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Jan 18 22:54:03 2013 +0000
rx: Remove warning inhibition on rx.c
The CFLAGS_NOERROR rule for rx.c seems to have crept back in as
part of the libtool changes. The LWP build of rx.c has never had
warning inhibition on rx.c, and the inhibition in the pthread
builds was removed by 327762071be3806c5d08be0218982c7027754756
Change-Id: Icde3f0b6ee2f8ae0818a3dc722c6171284d6a9e6
Reviewed-on: http://gerrit.openafs.org/8921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c57542ac9003aca7300801043dbbad8fd4072c40
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 18 17:05:12 2013 -0600
FreeBSD 9.1: Warning fixes
Fix warnings caused by some changes in FreeBSD 9.1:
- afs_cmount takes a uint64_t for flags instead of an int
- vn_rdwr takes a ssize_t* for resid instead of an int*
[kaduk@mit.edu: rebase onto master and use fine-grained version checks]
Change-Id: I03ab805a625790004a910df96b96aeda1121e2a7
Reviewed-on: http://gerrit.openafs.org/8922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4da5f0b498782094b979737f6bee6e0bd2f5cb79
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Sun Dec 30 11:13:24 2012 +0000
Windows: Police Library IOCTLs
Ensure that the callers of the various library ioctls have
the correct identity or privs. All this policing is done in
the fs (non unloadable) layer, and to ensure that the library
layer cannot receive these calls directly we forbid non
create Opens of the library control device.
Change-Id: I2342fe10047642082adfbd1cc6aaee09cc91b520
Reviewed-on: http://gerrit.openafs.org/8893
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dd672fffe9bfef6bd872b008e7f3e3dd5f904a80
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Dec 28 15:00:15 2012 +0000
Windows: Police the DEBUG TRACE ioctls
When we get a IOCTL_AFS_GET_TRACE_BUFFER, a IOCTL_AFS_CONFIGURE_DEBUG_TRACE
or a IOCTL_AFS_FORCE_CRASH, we check to see whether the caller is in the
Administrators group and if it isn't we fail the request with ACCESS_DENIED.
NOTE that this does not check whether the user has done the "run as admin"
thing. We actually need to determine which priviledges are appropriate to
this action and use that rather than group membership to police these actions
and this will be added in a later patch. Meanwhile this represents a
significant increment in security from previously.
Change-Id: I0997e59a82735735674d8edee7a7a68d241e6ef8
Reviewed-on: http://gerrit.openafs.org/8843
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cda1c006a7907f374fbaac9f298722f491fad296
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Jan 21 11:57:54 2013 -0500
macos: update decode-panic
fix a couple brain-os from the last round of updates, so it can
actually decode panics.
Change-Id: If39f1fb273a834d0618264d944387bd8b6751284
Reviewed-on: http://gerrit.openafs.org/8929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit d72d0f4a81764d0cfc0f145185bbaa91b52873b2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 17 15:37:06 2013 -0600
Improve libroken configure check
It is not sufficient to just check if libroken is available; we need
to check if the specific functionality we want is there. So, try to
compile and link while referencing specific functions.
As mentioned in the comments, testing every single function we use may
not be practical, and we should perhaps just add functions to test as
we find breakage. This commit tests rk_rename, which is missing in at
least the Debian package heimdal-dev, version
1.4.0~git20100726.dfsg.1-2+squeeze1.
Change-Id: I0ac6c9aea1f8598bb1b1315544683b2403de5f69
Reviewed-on: http://gerrit.openafs.org/8916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 09c0484fd8878797957f7ff5936c542a0f6332c4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Dec 10 18:00:25 2012 -0500
xstat: length check cm call info
Define the cm xstat function call counters with an xmacro to avoid
duplicating the list of cm function names. This obviates the need
to update xstat_cm_test.c when new function names are added to the
cm xstat collection id 0.
Check the number of returned records when printing the function call
counts to avoid over-running when a newer xstat_cm_test client
receives data from an older cm.
Change-Id: I3c5470afb7b04167173b41bb576a4a6ec14753f7
Reviewed-on: http://gerrit.openafs.org/8741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dfe06c96c2c228a5cb7aeb0f123b73660a57543c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Dec 10 18:02:20 2012 -0500
xstat: remove unused call info function
Remove the dead function PrintCallInfo(), which was replaced
by print_cmCallStats() long, long ago.
Change-Id: Id67323d66cc498f77e55f173218547ad5d4223c7
Reviewed-on: http://gerrit.openafs.org/8740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e130b342eb9aab06f6581f7cc9d5e64741ee3146
Author: Antoine Verheijen <antoine@ualberta.ca>
Date: Mon Jan 21 01:48:01 2013 -0700
OpenBSD: Add support for missing routine memmove() in kernel.
OpenBSD does not have the memmove() routine available to dynamically
loaded modules in its kernel. It exists but is not exported so it
winds up "mia" on dynamic load of the kernel module. It's needed for
the Heimdal code that's been added into OpenAFS. This patch deals
with this issue by creating an inline version in the OS-specific
param.h file.
Note that this issue does not seem to exist in the amd64 version of
OpenBSD so (at least for now) tis fix is only applied to the i386
version of the header files.
Change-Id: Ide8a5ff49cb662e145fd93aefd8e3a12d7cbead5
Reviewed-on: http://gerrit.openafs.org/8926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9dc72855992e559a9d2e9fd7621ac5a19079bcf9
Author: Antoine Verheijen <antoine@ualberta.ca>
Date: Sun Jan 20 23:27:02 2013 -0700
OpenBSD 4.6/4.7: Define curproc for rx_atomic.h.
For OpenBSD 4.6 and 4.7, the rx_atomic.h header ultimately resorts
to the use of the default atomic routines that rely on MUTEX
macros. Those macros require that 'curproc' be defined, which in
turn requires the presence of the 'sys/proc.h' header. This patch
inserts that header into the param.h file for those systems.
Note that subsequent versions of OpenBSD have __sync_fetch_and_add
and don't require 'curproc' as a result.
Change-Id: I5131aed60631ef285eda92180ef65845165526b1
Reviewed-on: http://gerrit.openafs.org/8925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d0479bbaf43900d6733c3f7517926ee9813c9610
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 9 21:22:27 2013 -0500
Linux 3.8: vmtruncate removal
vmtruncate had been deprecated for a while and has now been
removed. Do things the new way based on truncate_setsize.
Change-Id: If584329f7330f44be3909e4c8b935e4fe5e2b536
Reviewed-on: http://gerrit.openafs.org/8906
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c6d27e322a8d3b352554650473a048235a9c763a
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 9 19:26:54 2013 -0500
Linux 3.8: session_keyring changes
The session_keyring is now attached directly to the cred structure
and the thread_group_cred structure (cred->tgcred) no longer exists.
Adapt code that makes use of tgcred, and use the standard rcu based
mechanism to update session_keyring.
Change-Id: If4b88cbc7f9af6343353648837b28541a5088429
Reviewed-on: http://gerrit.openafs.org/8905
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b61eac783e8c092cd4ba9f53a2b5ca7d43e08b1b
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Jan 18 22:40:03 2013 -0500
Linux: setpag() may replace credentials
For recent Linux. setpag() may replace the current process' cred
structure with a new one. This is not a problem for most callers,
but in the case of processing a SetTokens2 pioctl with the setpag
option, the new credentials should be used to determine the target
for the token.
Change-Id: I4441349b8a72eac7d56276abcdf243b2ffd21b98
Reviewed-on: http://gerrit.openafs.org/8924
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 07d83cd473146a0db9c2ed521b6fa6ba607b0d40
Author: Dan van der Ster <daniel.vanderster@cern.ch>
Date: Fri Dec 14 11:08:44 2012 +0100
rxperf: print achieved transfer rate
Prints the client transfer rate in appropriate units (kbit/s, Mbit/s, or Gbit/s).
Change-Id: I5632185953c5d2bfc962af71152734d842cfb021
Reviewed-on: http://gerrit.openafs.org/8758
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 13111d25408cf6765d1b67bc3767614c8963cfde
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jan 11 13:03:02 2013 -0500
Catch up to FreeBSD KPI for vfs_cmount
Almost a year ago, mckusick changed the VFS KPI/KBI for the cmount
VFS operation, making the flags argument a 64-bit quantity.
Introduce appropriate conditionals for our prototype of afs_cmount
for the change on the 10.x and 9.x branches.
Change-Id: Ia0b8759f027e64f98f087daabbf1a51030171f21
Reviewed-on: http://gerrit.openafs.org/8907
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 04ddecc1f2827463edf22857f9b19910ccc25e98
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Jan 16 21:16:31 2013 -0500
LINUX: fix array indexing issue in memory statistics
The comma is a sequence point and i gets incremented and then used.
This results in writing past the end of the array by one (and failing
to initialize the first element as well).
Potential fix for RT ticket 131566.
Change-Id: Iabe7e78961d1f5348bca75ca5b9e6e29d8554957
Reviewed-on: http://gerrit.openafs.org/8914
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a911185b314b111c13aaf5230669f69864582897
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 17 16:35:09 2013 -0600
ubik: Remove bare global ubik_epochTime
Commit e4ac552a moved ubik_epochTime into a global version_globals
struct. However, it missed a references to the existing
ubik_epochTime value it was moving, as well as its declaration. Remove
the declaration, and move the reference to use the version_globals
structure.
Change-Id: I2552ba850f286b2b93f3c1b696d993a7cfc074c8
Reviewed-on: http://gerrit.openafs.org/8918
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7858cfd4f5b8ca4d028043bde00b02849ffa2990
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jan 17 16:37:56 2013 -0600
ubik: Trivial formatting fix
Change-Id: Ie409dc5dc7fe63cc72c97666146e7019e5db086e
Reviewed-on: http://gerrit.openafs.org/8917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 684d1ec6ba4bb7e96404328d02be5d070ba63478
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 9 18:42:32 2013 -0500
gcc 4.8: fix warnings
Quiet new warnings introduced by gcc 4.8:
- Many unused typedefs under src/admin.
- A possibly uninitialzed variable under src/viced
Change-Id: I96858c2d12a9ee3270d89a64fcf772affe93e9eb
Reviewed-on: http://gerrit.openafs.org/8913
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7dbb35a89f42743ff0a29bc9822b94141a2a8323
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Dec 10 12:01:38 2012 -0500
doc: dynamic mount requires dynroot and fakestat
Document that dynamic mount (/afs/.:mount) requires
dynroot and fakestat on non-linux unix.
Change-Id: I947edd30d510c7cc6840bc2cc74d0ef07b692afb
Reviewed-on: http://gerrit.openafs.org/8739
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 08a4b05c27964dd06d7922c134dc2dccc062b379
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jan 8 17:50:57 2013 -0600
SOLARIS: Avoid open count cleanup for Solaris 11
The comments in here no longer apply to Solaris, as of OpenSolaris
commit 11736:63a134e1f09c by Donghai Qiao (4492533 Filesystems may
need VOP_CLOSE() for executables following a VOP_OPEN()). This means
that this workaround should no longer be necessary for any Solaris 11
release, any illumos release, and anything else based off of
OpenSolaris. So, stop doing it.
Thanks to Frank Batschulat for pointing this out, and providing all of
the details.
Change-Id: I54ed545e3b9d858fbffc762246ae805cd9c63a64
Reviewed-on: http://gerrit.openafs.org/8895
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6c50960174f35d75fd50956e248318a9c826fca1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jan 8 17:41:21 2013 -0600
SOLARIS: Use vn_renamepath when available
In Solaris 11.1, the signature of vn_setpath changes; it gains an
extra boolean_t argument called 'force'. Instead of trying to adapt to
it, call vn_renamepath() instead, which will do the correct thing and
call vn_setpath &co for us. vn_renamepath has existed since Solaris 10
Update 8, and is in all releases of Solaris 11. Only call it in
Solaris 11, since it makes the ifdefs easier, and there are no
problems with calling vn_setpath on Solaris 10.
Thanks to Frank Batschulat for all of the relevant information.
Change-Id: Iad4ada70abbb5ec2289c30149ab4c571fa8a68ff
Reviewed-on: http://gerrit.openafs.org/8894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c981ef17613e59d5b96dd4cd9f5ee023c2e5750b
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Jan 7 15:05:40 2013 -0500
Fix build for separate objdirs
In particular, setting UNTHREADED=${srcdir}/dir and then referring
to ${srcdir}/${UNTHREADED} is a recipe for sadness.
Fix the libtool invocation to correctly find .la.sym files in ${srcdir}.
Also add some missing header dependencies that are hidden when building
in the src tree.
Change-Id: I1b663141c549cc4b90e46327c3fb31dc80294eaa
Reviewed-on: http://gerrit.openafs.org/8891
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3ee5e20170b4c42f6fccabaf70e28d14e35fae53
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Dec 28 15:43:52 2012 +0000
Windows: Restrict the Service IOCTLS to the service process
When the service starts the system we save it's PID and when we see a
IOCTL_AFS_INITIALIZE_REDIRECTOR_DEVICE,
IOCTL_AFS_PROCESS_IRP_REQUEST, IOCTL_AFS_PROCESS_IRP_RESULT,
IOCTL_AFS_SYSNAME_NOTIFICATION or IOCTL_AFS_SYSNAME_NOTIFICATION
ioctl we check that the calling process has that PID.
Change-Id: Ie66676bba4b4e4d858979babe9c0af4c53ea0143
Reviewed-on: http://gerrit.openafs.org/8844
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8a17568fb4fd3f77a3b9d043bbe49e992bca8266
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jan 5 13:37:51 2013 -0500
correct whitespace errors in readme files
Fix the trailing whitespace and leading spaces
before tabs in the readme files.
Change-Id: If20e528ddb28f82e4d3d1b1f03dec8670f914afc
Reviewed-on: http://gerrit.openafs.org/8877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5138c07abd076e0fa90d70a175a3a822fb127ef5
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Dec 28 14:40:40 2012 +0000
Windows: Only allow the local system account to speak to the redirector
When we get the IOCTL_AFS_INITIALIZE_CONTROL_DEVICE IOCTL we check to
see whether the calling process is the LOCAL_SYSTEM_SID (the one that
services run at if they are not running as a specified SID). If we
are not then the initialize fails ACCESS_DENIED.
If the debug build ONLY, setting the AFS_DBG_DISABLE_SYSTEM_SID_CHECK
bit in OpenAFSDebugFlags circumvents this check, allowing interactive
debugging.
Existing code stops two processes (or even handles) from trying to
initialize the system.
Change-Id: I2ef8ca3a0df908acba38b435178d0509e96d6114
Reviewed-on: http://gerrit.openafs.org/8842
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8e8e3c26b87d78b92d96ba91d58ee59d774ebcb5
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:45:59 2013 -0500
libadmin/vos/vosutils.c: mask out sign-extension
Right-shifting a signed int by 24 bits can produce a value outside of
0..0xff due to sign-extension. As a result, in AddressMatch(), the
first bPattern!=255 check can never succeed. Fix by masking with 255
before comparison.
Change-Id: Idb0b4c176ff120c7cf0e03a935ebfdca51084bbd
Reviewed-on: http://gerrit.openafs.org/8884
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bd850e5b980d34236ee98d16b9717860b63af306
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:45:46 2013 -0500
lwp/iomgr.c: avoid off-by-one out-of-bounds access
Avoid accessing sigDelivered[NSIG] and sigEvents[NSIG], which are
out-of-bounds by one.
Change-Id: Id6a1798cba901987b8103f287e0869b31040b45b
Reviewed-on: http://gerrit.openafs.org/8883
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4d6967e0b0a0628deb1dd9d210de84779d41f856
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:45:33 2013 -0500
butm/file_tm.c: check for null pointer before dereferencing
Move the null pointer check to before the pointer is dereferenced.
Change-Id: I9983dae8802706c1efeff8a507a001b649572686
Reviewed-on: http://gerrit.openafs.org/8882
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1b3749335165a0d6ff7882cea4ee3e16f2055b4e
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:45:21 2013 -0500
auth/authcon.c: fix likely mistake
It seems likely the original developer intended to check
*scIndex==RX_SECIDX_NULL rather than scIndex==RX_SECIDX_NULL.
Change-Id: I8a33d3cb177a9212917613581957073392b08314
Reviewed-on: http://gerrit.openafs.org/8881
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
commit d9cc9c9dee9ad0213ddd39174e81d01b9707937b
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:45:11 2013 -0500
tools/dumpscan/pathname.c: properly check strdup() return value
Fix the check for strdup() running out of memory.
Change-Id: I4e2d83036095c7b292ee4c386d8ed7b16ec75067
Reviewed-on: http://gerrit.openafs.org/8880
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0e83cde60e6e91fbe20ffac0f0a77afe8497d950
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:44:55 2013 -0500
ubik/udebug.c, vol/vol-info.c: check array index before dereferencing
Avoid out-of-bounds array accesses by first checking that the index
is in-bounds, and then dereferencing; not the other way around.
Change-Id: Ib36a28ca6181a7a7fd602de45cb5a15fad099a44
Reviewed-on: http://gerrit.openafs.org/8879
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5c5515a5c3b34f9a115b29378e123c779c138f51
Author: Nickolai Zeldovich <nickolai@csail.mit.edu>
Date: Sat Jan 5 23:44:33 2013 -0500
volser/vol_split.c: do not dereference known-NULL pointer
Avoid dereferencing a pointer that we just checked is NULL when printing
an error message.
Change-Id: Ibc89883977e7044cab2a844d97b7f0f7d236f4ea
Reviewed-on: http://gerrit.openafs.org/8878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4042667388406e540c8a6546031d514793ffc8c4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jan 5 10:40:42 2013 -0500
spelling corrections in readme files
Fix spelling errors in readme files.
Change-Id: I62348372d5e226f2b2a3a7732b4a5f8c7331b2ff
Reviewed-on: http://gerrit.openafs.org/8876
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 81dd4878e7a71b5acfd7a6e6f9be26cd6ab28972
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 4 14:18:40 2013 -0500
SOLARIS: Look for ncurses in ncurses/ncurses.h
Solaris 11+ has ncurses.h in ncurses/ncurses.h. Look for it there.
Without this, on Solaris 11.1 we will detect libncurses automatically
(because it lives in /usr/lib), but not ncurses.h (since it is in
ncurses/ncurses.h, not ncurses.h). So, we will fall back to curses.h,
but will try to link to libncurses, which, as you might guess, fails
with various undefined symbols.
Change-Id: Ia174e2a3c97318d6db2a48a6098569aede93522c
Reviewed-on: http://gerrit.openafs.org/8874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 936c2b02bf6fbeb3844c539665392ae89eb652fe
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 4 13:47:35 2013 -0500
SOLARIS: Avoid areq and auid conflict
On new Solaris (11.1), nfs/auth.h #defines areq and auid to access
some elements inside the nfsauth_arg structure more easily. We have a
lot of functions that use those names as parameters, so the compiler
throws an error (since we have a decl like "struct vrequest
*areq_u.areq").
We cannot avoid including that header, since we need some NFS-related
headers for the NFS xlator, and they pull in nfs/auth.h
unconditionally. So, work around this by undefining areq and auid
afterwards.
Change-Id: Ifd139917dfe7a1221941351f7873fe183c617159
Reviewed-on: http://gerrit.openafs.org/8873
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 004e9f25634d76be58b5a60dfc3c9a058d8bcd26
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jan 2 14:09:06 2013 -0500
afs: Check dv against localhero aincr
For operations that modify directories, we call afs_LocalHero to
determine if we can perform the directory modification in our local
cache, and avoid fetching the dir blob from the fileserver. Currently,
afs_LocalHero assumes that the DV received from the fileserver is
correct, and will update the cache DV as long as we have a valid
callback on the file.
If for any reason the client cache falls out of sync with what's on
the fileserver, this can cause the client to incorrectly believe its
cache is up to date. Since, the cached data will be marked with the
newest DV, even if the DV on the server has jumped to be larger than
we expected.
While the client cache should never fall out of sync with the
fileserver, in the past this has been possible due to other bugs
(fileserver idle dead processing and client VNOSERVICE handling).
Assuming that the given DV is correct is also just unnecesarily
fragile, since we can always check if it is correct, so just check it,
and add some comments helping explain what's going on here. Note that
regular file writes effectively already check this.
Note that this change makes use of the 'aincr' argument to
afs_LocalHero, which was previously unused. aincr appears to have been
used for a purpose similar to this before OpenAFS 1.0, but was
removed, possibly accidentally.
It is possible this change negatively affects, or even breaks
(unlikely), functionality with the AFS<->DFS translator. Although
nothing of the sort has been seen, it is difficult to know one way or
the other, due to the lack of available DFS translators.
Change-Id: I0e5395bac695257f66ba0cd58695a59ebdf56431
Reviewed-on: http://gerrit.openafs.org/8864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 19f424ecc26b02b210a3ba54b93846dddba14ede
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Fri Dec 21 18:26:18 2012 -0500
vol: correct old conditional for IH_CONDSYNC
Two places in the vol package performed IH_CONDSYNC(vp->linkHandle)
only if AFS_NT40_ENV. This was correct when the namei implementation
was windows only; however, this ifdef was apparently overlooked
when namei was implemented for UNIX.
Change-Id: I0cbe2c5c0a65ece0485b8c2d5a5f92eeb53725fe
Reviewed-on: http://gerrit.openafs.org/8815
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0a98596cd34152c13e44ff81249d89d47b5baee4
Author: Russ Allbery <rra@stanford.edu>
Date: Thu Jan 3 14:09:02 2013 -0800
Make MIN/MAX code in rx/rx_packet.h more readable
Eventually all MIN/MAX code in the tree should be handled uniformly,
but until that day, make this chunk of it more readable and
document the odd exception case for Linux kernel builds.
Change-Id: I4afe5d99b63010df831943e6b82ff89733b08066
Reviewed-on: http://gerrit.openafs.org/8871
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fe2bae1c83a6d050e0afb88bad8fe02beae343e7
Author: Russ Allbery <rra@stanford.edu>
Date: Thu Jan 3 13:57:02 2013 -0800
Ensure MIN/MAX are defined in userspace builds of rx
The include of <sys/param.h> was removed from rx_packet.h on
Linux 2.6 and later to fix kernel builds with 3.7, which doesn't
have that header in kernel space. However, while kernel space
always provides MIN/MAX defines, userspace relied on the header.
On at least powerpc, no other include chain includes sys/param.h,
so MIN/MAX were left undefined.
Fix this by only skipping the include of <sys/param.h> on Linux
if building in kernel mode.
Change-Id: Icd2edd645ef4d18d626de8ce8b81ac07f37b1f21
Reviewed-on: http://gerrit.openafs.org/8870
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2e5ef04e24c89e846af7aae7da57a0b0f5e200c3
Author: Russ Allbery <rra@stanford.edu>
Date: Thu Jan 3 09:13:26 2013 -0800
Fix spelling error (retreive for retrieve) in strings
Caught by Lintian analysis of the compiled binaries.
Change-Id: I5d53d596d30ad8fea5d3f8f0116122a8c1aa808c
Reviewed-on: http://gerrit.openafs.org/8865
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f2f7ba50ed61a6187814d633327a8cacda0f656f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 28 13:16:49 2012 -0500
viced: initInterfaceAddr_r regardless of ICBS code
Currently we only call initInterfaceAddr_r for a host if a call to
RXAFS_InitCallBackState3 succeeds. However, this leaves the host
without a host->interface structure, which indicates that the host
does not support UUIDs, and is represented by just a single host,port
pair.
But this is not correct; the host probably does have the relevant UUID
associated with it, but it is just not responding. So, with the
current code, we create a uuid-less host structure for a host that
probably has a uuid; that host structure will probably never be used,
and will just get deleted later.
So instead, always call initInterfaceAdd_r. Do it before the ICBS
call, so the host will be findable via UUID as early as possible. If
the ICBS call fails, the host will be marked as 'down' later on.
Change-Id: I3a000af90773acbdd66fc22718e5e742619839a1
Reviewed-on: http://gerrit.openafs.org/8847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7b642173c7cd7b6b7130214c1a940501736abbf0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 28 12:58:33 2012 -0500
viced: Avoid dangling uuid hash table entry
Currently we add a given host to the uuid hash table, then call
RXAFS_InitCallBackState3, and then only initialize the host->interface
structure if the ICBS3 call succeeded.
If the ICBS3 call fails, we have added a host to the uuid hash table,
but the host structure does not contain that uuid. If the host is then
deleted, we will not remove the host from the uuid hash table (since
host->interface is NULL), and so the uuid hash table entry will still
point to the freed host. If that host is then later looked up via that
uuid, we can reference a freed host, which can cause all kinds of
undefined behavior.
So instead, add the host to the uuid hash table at the same time that
we initialize the host->interface structure, inside
initInterfaceAddr_r.
FIXES 131277
Change-Id: Ib2ca82cc498877ec896ab1806cf675f1271ec214
Reviewed-on: http://gerrit.openafs.org/8846
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 89d85da6044a82eee34ef5c424921dad12b2ae7a
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Fri Dec 28 00:46:12 2012 -0500
vol: fix everything to use volumeid type
use one type for volumeid, not 3. kill VolId, and stop
using afs_uint32 (and a few times, afs_int32)
Change-Id: Ibcbd09b5a24d8720b02a02f926e6f59dc0f529aa
Reviewed-on: http://gerrit.openafs.org/8845
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c67d29c676b02dc069d3c39f803b5ef6f7dbadca
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Fri Dec 21 06:44:18 2012 -0500
vol: use header access macros everywhere
a couple direct references to diskstuff have crept in. push them
back out
Change-Id: I66c7a157aeb326dee17012d551c0f499bae35bc7
Reviewed-on: http://gerrit.openafs.org/8807
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2f087dc434f62cfa7888434427eaac6803b563ab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 28 16:49:20 2012 -0500
afs: Add a little more info on SLVC loop panic
If we panic due to a perceived infinite loop, log a little more info
about our loop iterations.
Change-Id: Ifbb6d613aa482dbc33f7ba13dc959709e1688f15
Reviewed-on: http://gerrit.openafs.org/8850
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1cee097b5bf44b0d8273712f0074b541f0f3f96e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 28 16:39:15 2012 -0500
afs: Avoid unnecessary panic in ShakeLooseVCaches
afs_vcount can change as we traverse the loop. If we successfully
evict something from the cache, afs_vcount goes down, but our loop
variable 'i' stays incremented. For example, if afs_vcount was 100 at
the start of the loop and we kicked out 50 things, by the time we
traverse the entire VLRU, we could have iterated over the loop 100
times, but afs_vcount would still be just at 50.
So, remember what afs_vcount was at the start of the loop, and use
that for our loop limit. Note that vcaches cannot be added to the VLRU
during the execution of this loop, since we're just kicking stuff out.
And nobody else can modify the VLRU but us, since we're holding
afs_xvcache, and if we drop afs_xvcache, we restart the whole eviction
process.
The bug here was introduced by commit bc6dd950, but usually did not
affect Linux until commit 696db866.
FIXES 131553
Change-Id: If30026b5b2101559e704d0e1961effe14beb915f
Reviewed-on: http://gerrit.openafs.org/8849
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 36959b50e513d4e9d4d2be93965eec2537943de5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 28 16:36:42 2012 -0500
afs: Consolidate ShakeLooseVCaches retry init
Don't duplicate the initialization code in effectively three separate
places. Just goto the top of the loop again.
This should incur no functional change; it's just reorganization.
Change-Id: I40548919a5fa9c4e472a4de0eada8d213d034097
Reviewed-on: http://gerrit.openafs.org/8848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 370aaaeafa43f804b0a5286d92b4ec5f1ccb62be
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 12 16:14:55 2012 -0600
LINUX: Avoid infinite d_invalidate loop
In afs_linux_lookup, we try to invalidate as many dentry aliases as we
can. However, a successful d_invalidate() against a dentry does not
necessarily mean that the dentry will not show up in a later
d_find_alias() call. This is because d_invalidate() does not remove
the dentry from the d_alias list, but just removes it from the hash
chain. dput() is what removes it from the d_alias list when all of the
references go away. If a reference is grabbed between our
d_invalidate() and dput() calls, the dentry will stay on the d_alias
list.
We will then retry the loop, and we will get the same dentry back from
d_find_alias(). Running d_invalidate() on an unhashed dentry is a
no-op, so we don't change anything in the loop. We will retry again
and again, looping forever and spinning the CPU.
To avoid this, just call d_prune_aliases instead, instead of
repeatedly looping through the alias list ourselves. Note that this
does remove our check for DCACHE_DISCONNECTED in each alias' d_flags.
This should not be a problem, since we will still use any remaining
DCACHE_DISCONNECTED dentry via d_splice_alias if one still exists.
Change-Id: I8a09a922d07f2c4971269f3c681c748c33bf8e3d
Reviewed-on: http://gerrit.openafs.org/8751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8bfce8f2787a512cfb24e3360435600abe5904d0
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Dec 20 15:54:57 2012 -0500
vol: use defines for header name length
instead of randomly hardcoding numbers in several places,
use macros
Change-Id: I153cbe74d0d297496fb39449c4a71ec81d5637c5
Reviewed-on: http://gerrit.openafs.org/8806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5afe7a882b0bb90a515e505d9ffce4f644633f06
Author: Ben Kaduk <kaduk@mit.edu>
Date: Thu Nov 8 18:40:57 2012 -0500
Add configure option to not install kauth
Per http://www.openafs.org/pages/no-more-des.html the kaserver
suite of utilities is deprecated and is not supposed to be built
anymore in this post-1.6 world.
Not building them at all requires some effort, but not installing
them is pretty easy. Do the easy part for now, and leave the hard
parts for a follow-up commit.
Change-Id: I1c400a7398b8708e7c9dc6613cd183b9b67e7a7f
Reviewed-on: http://gerrit.openafs.org/8457
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 752514bd1c8eaae487d25116dc59853552f77d12
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 18 18:49:49 2012 -0600
viced: Sanity check file link count during CoW
A few ihandle bugs in the past have caused the CopyOnWrite code to
open cached file handles for files which have been deleted. When we
CoW, both of the files we're dealing with had better actually be on
disk, so bail out and flag an error if either of them appear unlinked.
FIXES 131530
Change-Id: I478871bb1b9b43fc0161bb4a255dd7b77d2a28ae
Reviewed-on: http://gerrit.openafs.org/8839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9cf9a0e978ece2b0afb8ba5947455f307a424cab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 21 12:30:24 2012 -0600
ihandle: Add FDH_ISUNLINKED
Add the FDH_ISUNLINKED functionality to ihandle. This lets the caller
know if the file for the underlying file descriptor has been deleted
out from under us. This is useful for sanity checks in some callers.
Change-Id: I59d4fffba853cfa1b900a08b7b43134c29bbf844
Reviewed-on: http://gerrit.openafs.org/8838
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a04071e7940b26dc2a29ac3f0952b10321e7b786
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 21 11:11:00 2012 +0000
ihandle: Indent ifdef maze
According to the mesoamerican long count calendar, ifdef ladders will
destroy the world in 2012.
Change-Id: Ie9b16d600e4743eba3d934f8c3cf4d299abbf7e3
Reviewed-on: http://gerrit.openafs.org/8837
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit eb938bd18d9806f3529b7a2cbccdce5340c0e39f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 14 15:05:53 2012 -0600
volser: Check vnode length on dump
Commit aadf69eabb1962496fa93745ab560a5b48cacd61 adds length checks on
vnodes during fileserver read/write operations. Do the same thing when
we dump volume data from the volserver, to ensure that we don't
transmit incorrect data e.g. to other RO sites when releasing.
FIXES 131530
Change-Id: I662489d0466d38af74a9604a2c97a4a5c72525c7
Reviewed-on: http://gerrit.openafs.org/8836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 75d9c88281b686822a71ffabe76cb4aebd35d0ee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 24 02:40:08 2012 -0500
Windows: GetResourceParent processing for \\afs
When the input name is \\afs the parent must be an empty
NETRESOURCE structure. The null lpRemoteName field represents
no parent.
Change-Id: I779f1c3357ac74aa76e6d1ed0b755841513ac260
Reviewed-on: http://gerrit.openafs.org/8831
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5f43eb2919e20eaa18f8252f47f1ae0eceb246f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 19 16:59:57 2012 -0500
Windows: Add SERVERHASINLINEBULK macros
Implement SERVERHASINLINEBULK and SET_SERVERHASINLINEBULK macros.
Apply them to cm_vnodeops.c.
Change-Id: Ib9e3ed7f745a7ad3acf03ae918d8d1ca406f19c0
Reviewed-on: http://gerrit.openafs.org/8830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9054392cdc750a17854103a87dfb12b445b8bba1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 19 16:58:25 2012 -0500
Windows: move SERVERHAS64BIT macros to cm_conn.h
Move the SERVERHAS64BIT and SETSERVERHASNO64BIT macros to
cm_conn.h from cm_dcache.c.
Change-Id: I1e1a332a3bd968645912b4e0caa0d793ef96358c
Reviewed-on: http://gerrit.openafs.org/8829
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b74c778bfd70c6db65e9c6d686b2482ae6a72bbe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 19 16:47:36 2012 -0500
Windows: Fix smb_GetCallerAccess prototype
to supress warnings.
Change-Id: I7d6597457dfe3c99fe7b62621dbad5ffd2f4f0bd
Reviewed-on: http://gerrit.openafs.org/8827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fc85e66d453c0f066f6cfa48222d20e18ea9b316
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 23 23:15:59 2012 -0500
Windows: SetRenameInfo do not reference deleted name
After the Target Dirctory CB has been deleted, it is not
safe to reference the FileName component. Use the uniTargetName
in the error log message.
Change-Id: I83e6db62ffa0cf59d666066cae8f32e93d63d815
Reviewed-on: http://gerrit.openafs.org/8825
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit df4d971ec1a014826929dfeac017fb24d37ac38a
Author: Michael Laß <lass@mail.uni-paderborn.de>
Date: Sat Dec 22 22:54:20 2012 +0100
Remove AFSLore from wiki URLs
The URL of the openafs wiki doesn't contain "AFSLore" anymore. Although
these old URLs still work, replace them to point users to the correct
address in the first place. Also be consistent and always use a
trailing /.
Change-Id: I9d22694249c47331b4a5cd4f02f8815742c4b86f
Reviewed-on: http://gerrit.openafs.org/8819
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 93d674d702ab1bd452b139f5ba628db2c082f536
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Sun Dec 23 14:48:14 2012 +0000
Windows: more warnings on kernel builds
This is the same sort of changes a per git commit 8a4094e9ffa5d0f96501817c8ffd3cc8dc7ec62b
but this time for the fs tree. Again most of the work is UNREFERENCED_PARAMETER, initialize
variables where the compiler lacks the smarts and remove unused locals.
Change-Id: Id67246e8aaee292cb6f02833e9960f9545c55101
Reviewed-on: http://gerrit.openafs.org/8823
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fef0776df4f358c58cc0a6b5f3396573dd1a2d2a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 19 11:45:56 2012 -0500
Windows: Remove unused AFSVolumeWorkerThread
The currently implmentation does all maintenance work in the
AFSPrimaryVolumeWorkerThread which is associated with the
AFSGlobalRoot volume object. Remove AFSVolumeWorkerThread as
it is unused.
Change-Id: I2174833093b436430fc46f056e23bb272df6388f
Reviewed-on: http://gerrit.openafs.org/8793
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1726aec2b2291c4b1e89e21fa0f5a27318671a6f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 19 09:31:06 2012 -0500
Windows: Wait for all worker threads to exit
The signalling mechanism for waking and shutting down worker threads
relies upon a per-queue event. Therefore it is not guaranteed that
the worker thread that AFSShutdown*Thread() is attempting to wait
for is in fact the thread that will be woken and exit. Modify the
code to loop waking threads until the one that is being waited for
does in fact exit.
Subsequent calls to AFSShutdown*Thread() will bypass the wait if
the thread has already exited.
Change-Id: I4555df062ac5a6161b5c55f4598d1bd34e144a2b
Reviewed-on: http://gerrit.openafs.org/8783
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8a4094e9ffa5d0f96501817c8ffd3cc8dc7ec62b
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Dec 21 16:17:34 2012 +0000
Windows: warnings on kernel builds
I turned some new warning (by virtue of a more modern compiler) and
threw up a few hundred. This checked supresses them:
- Mostly remove variables which are never used
- Make unused parameters UNREFERENCED_PARAMETER
- Initialize a couple of variables which were either forgotton or
the compiler wasn't smart enough to notice were initialized.
Also strip out some extraneous tabs which had crept in.
Change-Id: Iee261ad8a7338bb5d8fde2d7229bbbbbd5af39ae
Reviewed-on: http://gerrit.openafs.org/8812
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cf150252b688dff0224f32be66d88347d1d94b37
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Tue Dec 18 09:04:15 2012 -0500
macos: avoid leaking iocount on synthetic fsevents
in certain cases we could leak an iocount. clean up even if
our event couldn't be run
Change-Id: I3a69f637c38478ac5f20a42af7db7f8a0ba7539a
Reviewed-on: http://gerrit.openafs.org/8777
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 986a8541518fb03a69cf5ece2055cb9cd50bda60
Author: Michael Laß <lass@mail.uni-paderborn.de>
Date: Fri Dec 14 17:06:30 2012 +0100
Update configure help msg to match actual defaults
The defaults for LINUX_KERNEL_PATH and LINUX_KERNEL_BUILD in
acinclude.m4 were changed in 2cfd611, 94ff565 and 3f9d982 without updating
the output of ./configure --help. Change the description of
linux-kernel-headers and linux-kernel-build to show the correct defaults.
Change-Id: I41331f4d48a555e291a45ca56e788bc418c064d3
Reviewed-on: http://gerrit.openafs.org/8759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3f9d982ec25aa5f9cf32a1268d6883a9afa70b12
Author: Stephan Wiesand <stephan.wiesand@desy.de>
Date: Sat Dec 15 15:36:24 2012 +0100
Linux: Restructure kernel header detection
As of kernel 3.7, version.h has moved, and hence utsrelease.h was
no longer found. Loop over candidate directories and locations
within, and look for the files we're actually after.
FIXES 131525
Change-Id: I686212a283b9e0ce769b1351e3cb75e08f4b110c
Reviewed-on: http://gerrit.openafs.org/8761
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Laß <lass@mail.uni-paderborn.de>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 23092acce5d2d71a5ad6402119973c7c2c2f5e89
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 20 15:00:15 2012 -0600
ubik: Do not count votes from error'd connections
If the given connection has a connection-wide error on it, the vote we
got from that site is probably not valid, and we could easily be
interpreting an error code as a vote time. So instead, treat the host
as if we got a network error from it.
Change-Id: Ib9253bf6c24493be1c0d16b9252deecec4e43c2a
Reviewed-on: http://gerrit.openafs.org/8487
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fb4ae03f8d34af499d1c2960fa1345074b5a2f79
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 15 12:26:18 2012 -0500
Windows: AFSLocateNameEntry Evaluate Symlink Target
Instead of validating the symlink target if both the TargetFID
and the Target Name fields are undefined, perform the validating
if either of them are undefined.
Change-Id: I609bfbf5fe574350580bd54a0b03becb82a2b45e
Reviewed-on: http://gerrit.openafs.org/8765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1dea312bd4974bc3abcdf2aa527ef4c3ca1e283b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 15 12:23:58 2012 -0500
Windows: AFSLocateNameEntry Absolute Symlink Cell resolution
During AFSLocateNameEntry processing of an absolute symlink the
component being searched for in the AFSGlobalRoot volume may not
be found. In this case, use AFSCheckCell() to query the service
to resolve the name. If the AFSGlobalRoot happens to be the
Freelance Root Volume then the service can resolve it even though
it is not present in the directory listing.
Change-Id: Ib6cfce6de5e5e9f619808e6ddbfffac00c596a23
Reviewed-on: http://gerrit.openafs.org/8764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3bddf7905198dc8f99ae5ab6195b51e5a9bc2e7e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 15 12:19:31 2012 -0500
Windows: cm_NameI Freelance Eval of Absolute Symlinks
In cm_NameI() it is possible that a symlink to an absolute path
is reached for which the component after the 'mountRoot' is not
present in the mountRoot directory. If the mountRoot is the
Freelance root.volume then it is appropriate to attempt automatic
cell resolution.
Change-Id: I806c6d4332e5e7b76a9ce2d02977d0caef612e3c
Reviewed-on: http://gerrit.openafs.org/8763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0d9ffd712af25c1ca2bc92c428a599c495bc08dd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 15 12:18:52 2012 -0500
Windows: Set Symlink mpDV after reading target string
When a cm_scache object, symlink, has its mountPointString field
successfully populated by cm_GetData(), the mpDV field must be
assigned the current dataVersion value in order to prevent unnecessary
queries of the mountPointString from the file server.
Change-Id: I62b2341459c680d531fd9f4de64dfcc87801ec3e
Reviewed-on: http://gerrit.openafs.org/8762
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aaa217b079b426a405e1364bf39276b13cd5f353
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 13 23:33:54 2012 -0500
Windows: If no inlinebulkstat, set the flag correctly
If RXAFS_InlineBulkStatus fails with RXGEN_OPCODE,
cm_SetServerNoInlineBulk must be called with the 'no' parameter
set to True. Otherwise, thE cm_server object will not remember
that the RPc is not supported.
This is important for avoiding unnecessary timeouts on IBM AFS 3.6
servers.
Change-Id: Ia43b5fbd8e81d4c23ad5741e334831b5d6a4e9ce
Reviewed-on: http://gerrit.openafs.org/8756
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e03c535da1ace4e878ee1f6985d68259d518f12
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 13 13:27:21 2012 -0500
Windows: *ParseIoctlPath path has trailing slash
Make it explicit that a pioctl input path that ends in a trailing
slash is consistently interpretted as a directory.
\\afs\cell\mp\dir\ == \\afs\cell\mp\dir\.
Change-Id: Id55638157cd69297d1a072ae04f94b968ea03b30
Reviewed-on: http://gerrit.openafs.org/8755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 83ccb62012d7b3b696dd48e05feb8adeb203463a
Author: Arne Wiebalck <Arne.Wiebalck@cern.ch>
Date: Thu Dec 6 16:23:05 2012 +0100
Update 'vos shadow' man page
Change the 'vos shadow' man page to say that updating the
VLDB with shadow volumes does only work if the VLDB entries
for the corresponding source volumes are deleted first.
Change-Id: I2764776b7a03346b5b2809f796d1deed0c32933b
Reviewed-on: http://gerrit.openafs.org/8652
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Dan van der Ster <daniel.vanderster@cern.ch>
Tested-by: Dan van der Ster <daniel.vanderster@cern.ch>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit b11ac53fff26f35f3615b61e2e451a359eb9cdc1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 9 18:23:59 2012 -0500
Windows: Release Notes updates
document adobe reader protected mode issues
Explain Stats, Volumes, and Cells registry values
many other minor improvements.
Change-Id: I0305fdf12d7e3d2160bab4a10d9030df32afa1ad
Reviewed-on: http://gerrit.openafs.org/8733
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0fc14fde0f7c1b36df61a60c718485ec54f414f6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 9 18:13:01 2012 -0500
Windows: Correct RDR Subsystem value overlap
AFS_SUBSYSTEM_LOAD_LIBRARY and AFS_SUBSYSTEM_PROCESS_PROCESSING
were both assigned value 0x00010000. Ensure that all values are
unique and match the documentation.
Change-Id: I0e5e52cc84d8b6069ce6f0cd4f431f38fe8e09ac
Reviewed-on: http://gerrit.openafs.org/8732
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b454f2ef0ea4efae0d703947ba67d4fd00545685
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 9 01:18:03 2012 -0500
Windows: buf_usedCount can be 64-bit
If buf_usedCount is 64-bit, must use 64-bit Interlocked operations.
Define buf_IncrementUsedCount() and buf_DecrementUsedCount() macros
to wrap the 32-bit and 64-bit Interlocked operations as appropriate.
Change-Id: Icbcb4d20530cc33b43e3c58c3ce74251b12c1e93
Reviewed-on: http://gerrit.openafs.org/8729
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 107d7ace8b83af10c18c84b94851f5105261225f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 9 00:31:58 2012 -0500
Windows: RDR Dynamic root Freelance only
commit 6c708d1415b27bf8f2804f3407e4fbe2f7bf1009 does not restrict
the AFS redirector dynamic root detection only to the Freelance
volume root directory. This logic should not apply to arbitrary
mount point target paths.
Change-Id: Iedde41937f602895b1d5922453c93fae4a5bf5d8
Reviewed-on: http://gerrit.openafs.org/8728
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 34f51936859c57b8b23047ff352100005c4efa12
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 6 14:24:12 2012 -0500
Windows: AFSProcessOpen !MmFlush release SectionObjectResource
Restructure the code around the MmFlushImageSection() call in
AFSProcessOpen() to ensure that the SectionObjectResource is
released even when the flush fails.
Change-Id: Ifd6b25640df796f64fba46b920fdababa5224637
Reviewed-on: http://gerrit.openafs.org/8713
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 339723e78eafec71576f04ed83e2d4417f6919a4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 6 23:24:44 2012 -0500
Windows: AFSCachedWrite reset LastServerFlush when Forced
If the ForceFlush parameter to AFSCachedWrite is set to TRUE,
the Fcb->Specific.File.LastServerFlush value must be reset to
ensure that the AFSPrimaryVolumeWorkerThread will trigger an
extent flush on its next pass. The LastServerFlush value will
not be reset by AFSNonCachedWrite() when called as a result of
a CcFlushCache() call as it appears to be PagingIo.
Change-Id: I72c368e05f30f04b13b2c6d098bdb1da578ac82c
Reviewed-on: http://gerrit.openafs.org/8717
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dd0f4bcd06c2283bc4ebbd3b44ed0f0e47b73d03
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 6 23:20:57 2012 -0500
Windows: Periodic Worker CleanupFcb to Flush Dirty Extents
The AFSPrimaryVolumeWorkerThread must not check the ObjectInformationCB
reference count when determining whether or not to call AFSCleanupFcb().
One of the tasks of AFSCleanupFcb() is to flush dirty extents to the
service.
Change-Id: Id1821ec16393952d27520e73e290e520966b1d75
Reviewed-on: http://gerrit.openafs.org/8716
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b30c9dcfacb3785360c422c19ef2cc0eea151291
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 6 14:59:22 2012 -0500
Windows: SetDispositionInfo !MmFlush SectionObjectResource
In AFSSetDispositionInfo() if MmFlushImageSection() fails,
be sure to release the SectionObjectResource.
Change-Id: Ic0a31627369d0fa055f78e5949314398f58569e0
Reviewed-on: http://gerrit.openafs.org/8714
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 42c404ba5d46699865892fb424c9ed514ca66db3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 6 08:16:01 2012 -0500
Windows: SetVolumeState is not an invalidation
Volume state notifications (online, offline, unknown) from the
afsd_service.exe to the afs redirector are not invalidation
events. The verify flag should not be set, the extents should
not be purged, etc. Just set or clear the AFS_VOLUME_FLAGS_OFFLINE.
Change-Id: I046468e614c836981db228aa142d2c8bdb03a9ad
Reviewed-on: http://gerrit.openafs.org/8651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5b2cc290f8e991b152411168cabd1c9e7f31deb4
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Dec 5 18:23:34 2012 -0500
cache bypass: fix afs_bypass_copy_page memcpy oops
The two memory copy cases were inverted when the code was
refactored, causing an oops when cache bypass is enabled.
Change-Id: I30a9a51b7280883fb9b7bbeebbabe464c139b714
Reviewed-on: http://gerrit.openafs.org/8617
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a774fa8a6acf44b19e566c2da1bb416ef5d2983c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 5 13:07:08 2012 -0500
Windows: AFSSetRenameInfo Drop TreeLocks MmForceSectionClosed
If the Target directory TreeLock is held across the
MmForceSectionClosed() call in AFSSetRenameInfo() Trend Micro's
TmPreFlt!TmpQueryFullName call can deadlock in its worker thread
when AFSCommonCreate() attempts to AFSLocateNameEntry() which
requires shared access to the TreeLock for the search.
Reorganize the Target Entry Exists case to call MmForceSectionClosed()
after the directory entry has been deleted. That should throw
a monkey wrench into Trend Micro's attempt to scan it.
Change-Id: Ib8d4777fde257c0f2c93e2577caa6542c1b08c79
Reviewed-on: http://gerrit.openafs.org/8607
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b338928bd4663a50963b24d38d337cd1c9f4b87e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Dec 4 16:57:36 2012 -0500
Windows: Prevent lock inversion SetFileRenameInfo
SetFileRenameInfo calls MmForceSectionClosed() which can call
back to the afs redirector via the Cleanup processing. AFSCleanup()
requires an exclusive hold of Fcb->Resource so we must obtain the
lock first in AFSSetFileRenameInfo() prior to obtaining the
SectionObjectResource.
Change-Id: If679eeb107f04153a26659971b7f2455eef97c9a
Reviewed-on: http://gerrit.openafs.org/8603
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ec6c7c1ce46b9a63f5e79071a25f12c94aed798e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Dec 4 16:56:21 2012 -0500
Windows: addition debug for --validate-cache
Print the value of the header size, the magic value and the
dirty flag.
Fail check if header size and magic do not match current
version of afsd_service.exe
Change-Id: I19c9a374a5f83dd9fcb37990c4dfbb97cf7f74a0
Reviewed-on: http://gerrit.openafs.org/8602
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2c7e2007342a86006199039408b7acbb63267235
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Dec 4 13:27:59 2012 -0500
Windows: AFSProcessDFSLink to Dos Device
Support msdfs links to <drive>:\<path>
Map them to IOMgr as \??\<drive>:\<path>
Change-Id: I110dd7e857d4b7984e75611787d2135bc97aaa39
Reviewed-on: http://gerrit.openafs.org/8601
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5616b7e2f91c9cdac1f026b852b8db923de11a10
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 3 13:39:18 2012 -0500
Windows: fs getcalleraccess
Implement VIOC_GETCALLERACCESS and associated 'fs getcalleraccess'
for Windows. Varies from the Unix implementation in the following
ways:
* getcalleraccess supports the -literal switch to permit
querying rights of symlinks and mount points
* multiple files can be provided on a single command line
The VIOC_GETCALLERACCESS pioctl returns the user access rights
and the anyuser access rights.
Change-Id: I75f636956bbafcc91144b44bd2d7729b8643605c
Reviewed-on: http://gerrit.openafs.org/8598
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5adf1476b1c95ab61f7944f751928e5f47720478
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 24 11:44:16 2012 -0500
Windows: AFSDevControl print control if exception
Change-Id: If94ba4f265d943ec8e4852c3d8c88d59cef3ef9b
Reviewed-on: http://gerrit.openafs.org/8599
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 81212b18b3411b538c4a1bb94732948902005beb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 24 19:47:01 2012 -0500
rx: RX_INVALID_OPERATION abort unknown service only
Patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced the
sending of RX_INVALID_OPERATION aborts for connection attempts
requesting a service not offered by the rx peer. By sending aborts
for all failures of rxi_FindConnection() the set of incoming packets
that are responded to is broader than simply those with non-matching
serviceIds. This patchset restricts the transmission of
RX_INVALID_OPERATION aborts only to the explicit case in which
rxi_FindConnection() attempted to find a service and either failed
to find a match or couldn't apply the requested security class/level
to that service.
Change-Id: Ie18798531e542e54878209ccd2fbbcd24f31abb6
Reviewed-on: http://gerrit.openafs.org/8512
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 399abf159b1418dea38daf166f9d55072042909c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 13 14:54:10 2012 -0600
rx: Add rx_GetNetworkError
Add the function rx_GetNetworkError to rx, to allow callers to
retrieve some information about the last ICMP error received for a
connection's peer. This can be useful if a call on that connection was
recently ended due to ICMP errors.
Change-Id: I7c507185f6a4ab986c0119f67cdaa4e50e447175
Reviewed-on: http://gerrit.openafs.org/8451
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 696db8667d12b1c5639515840f69c9a46d2b866d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 28 15:12:12 2012 -0600
afs: Apply VLRU safety check for Linux too
This invariant should apply to all platforms, not just those with
dynamic vcaches. Since this prevents an infinite loop if the list os
corrupt or something, having this around everywhere seems useful. So,
drop the check for afsd_dynamic_vcaches.
Change-Id: I90e438eb33f40762346d1c5a7138ed127fdcdcc6
Reviewed-on: http://gerrit.openafs.org/8555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bc6dd95016c63d0742698d902aebf73c01162c24
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Nov 16 14:18:32 2012 -0600
afs: Fix VLRU traversal sanity check
On non-Linux, the number of vcaches in the VLRU can easily exceed
afs_maxvcount, since we allocate new vcaches when we run out. So,
assume we only have afs_vcount vcaches on the VLRU, instead of
assuming we have at most afs_maxvcount vcaches.
Change-Id: I3bec8f795b1f6e086ddb490400616c5b42d8b8be
Reviewed-on: http://gerrit.openafs.org/8471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4d4668b1618a2bd5b94ed4620464787f42d11cab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 20 14:18:47 2012 -0600
ubik: Try to detect VOTE_Beacon errors
Currently the way ubik dbsites vote for each other is via the "return
value" of the Beacon VOTE RPC. Since this is really an Rx abort, this
can easily collide with actual errors on the wire, such as rxkad
errors.
Try to detect these by detecting vote times that are very different
than the current timestamp (more than an hour in the future or past),
and treat it like a network error.
If we do not do this, a single site reporting an error can cause us to
never reach quorum, since we calculate our sync site expiration based
on the oldest 'yes' vote, which for most known Rx aborts will be far
in the past.
Change-Id: I28cf4c520bbbe9e98eb55947476c8785d3c8ec0b
Reviewed-on: http://gerrit.openafs.org/8486
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7c8373c8c27abdfa316c6526aa14654caed3e7f8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Nov 20 08:49:39 2012 -0500
tools: example sysvmq audit reader
A user contributed sysvmq audit log example reader. Shows
how to read the sysvmq audit log using core only perl modules.
Change-Id: I39adb62150df2bcb812ca4d06b193b08d7e95c21
Reviewed-on: http://gerrit.openafs.org/8485
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 595a614d76d84be602c07d519738556b7f9ebf2a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Nov 5 23:47:06 2012 -0600
afs_open: Deal with afs_GetDCache returning NULL
afs_open was assuming afs_GetDCache always returned non-NULL. Make it
deal with a NULL return.
Change-Id: Ib0593de27d65294726a4a40b3faa4687bb6fc5fe
Reviewed-on: http://gerrit.openafs.org/8408
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 274daabae35a5f2501469257be9592d0c2e49a02
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Nov 28 15:32:45 2012 -0500
config: provide inlines to make 64bit ints printable
same idea as the 32 bit versions. make it so you can print something
the compiler would otherwise stand in the way of.
Change-Id: Iec9d2efe7ecb74c13406dacf854d13fe61075092
Reviewed-on: http://gerrit.openafs.org/8552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dbd801d5853dcbc0d9754e64729cc2b4041dfd9c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 13 14:58:11 2012 -0600
afs: log ICMP errors for downed servers
When we notice a server is unreachable, log the ICMP error we got for
that server, if any.
Change-Id: I9dcd40bf45fefa6679eac92a5d03d44eceac0816
Reviewed-on: http://gerrit.openafs.org/8410
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2d4745244d970b1c26809ab87546d307492d088b
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Nov 19 15:54:35 2012 -0500
macos: decode mountain lion panics
security hardening in the mountain lion kernel
screws up our decoder. apple doesn't bother to document
what to do, but after some head smashing, here we are.
Change-Id: I1f8411e6fa81baab065acc5cdfe7ef3dea10a077
Reviewed-on: http://gerrit.openafs.org/8476
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cbce3193b0cac9073b0bf5369b3b4994feaa0b4e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 3 10:01:24 2012 -0500
Windows: shuffle trace messages for clarity
Some of the trace messages for VolumeReferenceLocks and
VolumeReferenceCounts were in odd places. Move them for consistency and
clarity.
Change-Id: I3cf95de0670af8855b622f8a83d2f0b69dc851df
Reviewed-on: http://gerrit.openafs.org/8581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e58eaae182dc877c0818b3cc5e8ea408606863f0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 3 09:11:14 2012 -0500
Windows: Handle AFSLocateNameEntry() STATUS_REPARSE
AFSLocateNameEntry() can return STATUS_REPARSE in addition to
NTSTATUS failure codes. As in the case of an NTSTATUS code other
than STATUS_OBJECT_NAME_NOT_FOUND, the reference counts are decremented in
AFSLocateNameEntry() if STATUS_REPARSE is returned.
Change-Id: I7cab5be2ae304be47cb14abb4f6952e4e0e65efe
Reviewed-on: http://gerrit.openafs.org/8580
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f25a061b7192531b54933088e4ac8adcde22961c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 1 07:54:59 2012 -0500
Windows: Decr. used buf count flush and deleted files
When flushing the cache (fs flush*) or when deleting files or
when a file server reported error indicates that the buffer is
bad, decrement the used cache count so "fs getcacheparms" now
indicates a floating value based upon the number of buffers
containing potentially valid data.
Change-Id: I1bfb7b64ff36832526a02e9374ab87baf679f100
Reviewed-on: http://gerrit.openafs.org/8579
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 66a5703463baad5739b6d47ed12d0a3a7b0c489a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 1 07:30:57 2012 -0500
Windows: Restore "fs getcacheparms" used space
buf_Init() adds all of the available buffers to the free queue
at startup and cm_data.buf_freeCount tracks the number of items
in the free queue. So it cannot be used as a method of reporting
how much of the cache space has been used. Add a new buf_usedCount
parameter to the cm_memmap data to track the number of cache blocks
that have been used up to the total number of allocated blocks.
buf_usedCount can then be used in cm_IoctlGetCacheParms to restore
the original behavior.
Change-Id: I3ecdfdbda1c423551b7e7691243696e0f1553edc
Reviewed-on: http://gerrit.openafs.org/8578
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit be27d61961cb490e3f1033d9e0943d2655b73b8a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 29 03:14:42 2012 -0500
Windows: QFileInfo only Verify Entry when necessary
During a QueryFileInformation request only call AFSVerifyEntry()
when the AFS_OBJECT_FLAGS_VERIFY flag is set on the ObjectInformationCB.
The AFS_OBJECT_FLAGS_VERIFY flag is set in response to an invalidation
event from the cache manager. Let the cache manager decide when our
data is no longer consistent with the file server.
Change-Id: I299597577f9fb13d008e20aff7a404ad6c2185b5
Reviewed-on: http://gerrit.openafs.org/8568
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f499babad036b9efc4c5f0aab252cfadcfb0c22f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 29 03:13:11 2012 -0500
Windows: Dir Enum only validate when necessary
During a directory enumeration, do not call AFSValidateEntry()
for every DirectoryCB. Instead only do so when the
AFS_OBJECT_FLAGS_VERIFY is set on the ObjectInformationCB.
Change-Id: I5653cbf8703da03aeaee24c0c7bf8817e66b8f9e
Reviewed-on: http://gerrit.openafs.org/8567
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 957601aeab7050413c4e0c9994e2c263a1b8374d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 29 03:02:48 2012 -0500
Windows: AFSTearDownFcbExtents count extents properly
Fcb->Specific.File.ExtentsCount cannot be used directly
in the for loop conditional because each call to AFSFreeExtent()
decrements the value. Instead, save the original value to
'lFcbExtentCount' and use that in the loop conditional.
Change-Id: I7b2dc0fbd1cbf0eec2f627f8caad8c973c3437c7
Reviewed-on: http://gerrit.openafs.org/8566
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit da6c8d57287392c0e7d0c512dab5bcf019421f81
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 29 03:00:48 2012 -0500
Windows: AFSCleanup calls AFSDeleteFcbExtents
When the hard link count of the file drops to zero, call
AFSDeleteFcbExtents() instead of AFSTearDownFcbExtents()
because the file has been deleted and the extents have been
implicitly released.
Change-Id: I4198ece075a23850699ae188943d06df7bf4c668
Reviewed-on: http://gerrit.openafs.org/8565
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 037d568de530603299b1dd3be6fd623ca81c25c5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 29 02:58:46 2012 -0500
Windows: AFSDeleteFcbExtents()
Similar to AFSTearDownFcbExtents() but does not release the
extents to afsd_service.exe. It is intended for use when the
FCB's extents are implicitly released as the result of file
deletion.
Change-Id: If9b09f3190db84eb194475161247fb375cd3dc66
Reviewed-on: http://gerrit.openafs.org/8564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dc87e01c704d4cb16c26368597b383dc738d4d25
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 28 02:48:48 2012 -0500
Windows: Fcb sectionObjectResource
Add a SectionObjectResource to the AFS_FCB structure. This lock
replaces the Fcb.Resource in protecting the SectionObjectPointers.
The new resource is being added to assist in avoiding deadlocks
caused by Trend Micro and perhaps other AV products when
CcPurgeCacheSection() is called while holding the Fcb.Resource
which is required in AFSProcessOpen().
Change-Id: I738c175512e97e1ec153be52ab874f16389d4c95
Reviewed-on: http://gerrit.openafs.org/8563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6c708d1415b27bf8f2804f3407e4fbe2f7bf1009
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 27 14:26:21 2012 -0500
Windows: Implement dynamic cell detection for RDR
RDR_EvaluateNodeByName knew how to parse \\afs\foo#bar\ notation
but couldn't perform a lookup for a cell that wasn't already
in the root directory. Add support for autorecognition.
Change-Id: I8c2bacd034afa507d551da83dfc1958bd849a3a1
Reviewed-on: http://gerrit.openafs.org/8562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a428033bfe78c00dad84af9c14645723344297cf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 27 00:35:20 2012 -0500
Windows: PrimaryVolumeWorkerThread Garbage Collect Fcb
Revert commit cecd99abd3837ef820d78fb15e450c8688b0f39b. Failing
to garbage collect the FCB from the ObjectInformationCB at the
earliest opportunity opens the door to a deadlock with Trend Micro's
anti-virus driver. Trend Micro attempts to make a copy of the
file data each time a CcPurgeCacheSection() is performed on the
FCB. If during AFSValidateEntry or AFSVerifyEntry a DirectoryCB->
ObjectInformationCB->FCB is discovered which has a non-NULL
SectionObjectPointers.DataSectionObject and the data version in
the DirEnumEntryCB differs from the ObjectInformationCB, a
CcPurgeCacheSection() call is performed while holding the
FCB->NPFcb->Resource exclusively. Trend Micro will deadlock the
thread making the CcPurgeCacheSection() call when it attempts
to open the file in one of its worker threads.
Change-Id: I912f22ab3695ad8faf1edcdbf2d50ff9a76277db
Reviewed-on: http://gerrit.openafs.org/8529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8e68e08901b0ad003ad1e5114a155bfac83bdd83
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 24 20:10:49 2012 -0500
rx: set abort client_initiated flag to match direction
In a recent incident involving packet reflection back to the
file server, aborts were being sent by the file server in response
to a server sent packet. The aborts sent in response also failed
to set the CLIENT_INITIATED flag in the header which permitted the
the actual client to confuse the Abort as applying to its client
initiated connection.
in rxi_SendRawAbort, set the CLIENT_INITIATED flag to the opposite
of the packet the abort is being sent in response to.
Thanks to Chaskiel Grundman for the suggestion.
Change-Id: Iea4189f022ac050e2e005e80c427f1c02c2251db
Reviewed-on: http://gerrit.openafs.org/8513
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f2fdd3040cf6fabcae3ff889d13349abdaaf9e0c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 4 17:06:41 2012 +0000
rx: Make rxevent_Put NULL the event ptr being put
Change rxevent_Put so that it takes a pointer to the event being
put, and NULLs that pointer. This removes a lot of duplicate code
in callers, as well as making it harder to reuse a discarded event.
Change-Id: Ib7a51f01687e08ea3dced5932ec9ec27797a784a
Reviewed-on: http://gerrit.openafs.org/8540
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f40199327a8753d8350b5fefedc2bb556b8b00a6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 22 08:41:51 2012 +0000
rx: Return success value when cancelling an event
When cancelling an event that holds reference counts, we need
to know whether the attempt to cancel the event was successful
or not, otherwise references can be double put when the
cancellation races with the event firing. Take the follwing
Thread A Event Thread
========= ============
... event fired ...
MUTEX_ENTER(&obj->lock);
if (obj->event) {
rxevent_Cancel(&obj->event);
obj_put(&obj->refcnt);
}
MUTEX_EXIT(&obj->lock)
MUTEX_ENTER(&obj->lock);
if (event == obj->event)
rxevent_Put(&obj->event);
...
MUTEX_EXIT(&obj->lock);
obj_put(&obj->refcnt);
Holding obj->lock doesn't control whether the event is fired or
not. Only putting the reference if the event being fired matches
that in obj doesn't help - it just leaks a reference in a different
race.
So, make rxevent_Cancel return true if it did actually cancel the
event, and false if the event has already been fired. This means
that Thread A can become
MUTEX_ENTER(&obj->lock);
if (rxevent_Cancel(&obj->event)
obj_put(&obj->refcnt);
MUTEX_EXIT(&obj->lock)
In the example above, rxevent_Cancel would return false.
Change-Id: I48e012774c97c9d9588b00687428a32795be2b37
Reviewed-on: http://gerrit.openafs.org/8539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 20034a815750beff262d49b37fba225c72dd0ab1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Nov 3 23:15:50 2012 +0000
rx: Don't treat calls specially in event package
Many different structures can be passed to the rxevent package as
data. Don't give calls special treatment by making rxevent aware of
how to release their reference counts when an event is cancelled.
Update all of the callers of rxevent_Cancel to use the new arguments,
and where they were cancelling functions with calls as parameters add
the appropriate CALL_RELE directives. In many cases, this has led to
new helper functions to cancel particular call-based events.
Change-Id: Ic02778e48fd950e8850b77bd3c076c235453274d
Reviewed-on: http://gerrit.openafs.org/8538
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4abcf4a7d1ae0719594d38add9c8ad80a0643f8d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 1 17:44:07 2012 +0000
rx: Remove unused origPeer parameter to FindPeer
rxi_FindPeer took an 'origPeer' parameter, which was originally
there as an optimisation to decrement a reference count when replacing
a peer on a connection structure. However, we don't do that any more,
and the origPeer parameter is never used.
Just remove it to simplify this bit of code.
Change-Id: I49127f25dd151082f4e508a28e8cab232e251ed1
Reviewed-on: http://gerrit.openafs.org/8537
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5245d15c2305bf4edf2758f01c97264323db6583
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 15 18:21:27 2012 +0000
rx: Remove unused timeoutEvent
The timeoutEvent pointer in the rx_call structure is unused. Remove
it to reduce confusion about which events can hold call reference
counts.
Change-Id: Ide625fe0af608cc434c33188e642750979a8db21
Reviewed-on: http://gerrit.openafs.org/8536
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e9c91feace886de4640f84aa35b592b03fb61809
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Nov 9 23:20:42 2012 +0000
rx: CheckBusy doesn't drop conn_call_lock
As rxi_CheckBusy doesn't drop the conn_call_lock when it checks for
busy call slots, it doesn't need to deal with someone replacing a
call behind its back.
Change-Id: I7cc64150e32e29b0a497cded55cd187b5bb78ad1
Reviewed-on: http://gerrit.openafs.org/8535
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit b5876a60f7406cdf67a4802b5b6fdf772a303eff
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 26 11:25:43 2012 -0500
Windows: RefCounts, Asserts, and Trace Logging
Rename DirectoryCB.OpenReferenceCount to DirOpenReferenceCount
to distinguish it from the FCB.OpenReferenceCount. This makes
it easier to search for instances within an editor or debugger.
Ensure that all InterlockedIncrement and InterlockedDecrement
calls on a reference count field assign their value to a local
'lCount' variable. Ensure that 'lCount' is used within any
trace log messages and conditionals.
Add ASSERT( lCount >= 0) after all reference count decrements
in order to catch underflows.
Change conditionals from (RefCount == 0) to (RefCount <= 0) so
that object destruction can occur when there has been an underflow.
This is important in release builds for which ASSERT() is a no-op.
Change-Id: I1d10076464c68745ede117eef2f728f70a0003c1
Reviewed-on: http://gerrit.openafs.org/8522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 438b0d8a239068c58065f7a552d45b8077f027dd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 26 11:16:56 2012 -0500
Windows: AFSClose File FCB/CCB cleanup before DirCB
Move the processing of FCB and CCB cleanup ahead of the
DirectoryCB cleanup. It is not safe to dereference the
Ccb->DirectoryCB until after the CCB has been destroyed.
Change-Id: I74ec824ea523fe1d575169472c65da6ffe87ce5e
Reviewed-on: http://gerrit.openafs.org/8521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 71ef2663da36f50a7eabe6b70971714a8f5f5dd5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 25 18:13:53 2012 -0500
Windows: AFSDeleteObjectInfo not on volume roots
The VolumeCB embeds an ObjectInformationCB structure which must
not be freed by calling AFSDeleteObjectInfo(). Add an assert
in the checked build and return without destroying the object
in the free build.
Change-Id: I77c92fbe0d10252785f4796153d9d824ff074d4c
Reviewed-on: http://gerrit.openafs.org/8520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 282e2bdd7f34f26073e003a84a85cb4f8b59f0cd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 26 07:10:05 2012 -0500
Windows: Missing DirEntry Ref incr AFSLocateName
In the STATUS_NAME_COLLISION error path the DirEntry refcnt must
be incremented because it will be decremented before exit from
AFSLocateName().
Change-Id: I7cf976afa8e62d0d9803549b64a5d0dae27cd9b1
Reviewed-on: http://gerrit.openafs.org/8518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fcfd1f99d8dd7a83bf09330dfd3b1fc6cc8b11c0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 26 01:18:19 2012 -0500
Windows: AFSLocateNameEntry move InsertNextEntry
In AFSLocateNameEntry, move the InsertNextEntry to name array
call from before the directory entry DirOpenReferenceCount is
incremented to afterwards. This permits InsertNextEntry() to
consistently assert based upon the DirOpenReferenceCount value.
Change-Id: I3c65f5360650739f6d75b7e657ae5cdea4c14aa4
Reviewed-on: http://gerrit.openafs.org/8517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5a09e6ab2b1913f438eae113f41a7ef9ea92387d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 25 18:06:17 2012 -0500
Windows: AFSInvalidateCache volume refcounts
AFSInvalidateCache failed to release the volume reference count
when FileId is the volume root. In the non-root case it released
it too early permitting a race with AFSPrimaryVolumeWorkerThread
calling AFSRemoveVolume().
Change-Id: I12b756e5a543a2ef791d716f660df1f4a7ae2327
Reviewed-on: http://gerrit.openafs.org/8516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ded88c8f8d1dc6758344b708d2aa55f3b29651c7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 24 14:36:46 2012 -0500
Windows: Fail RX_INVALID_OPERATION errors
RX_INVALID_OPERATION errors were not resulting in an eventual
failure and the RPC was being repeated indefinitely. There were
three subtle problems:
1. RX_INVALID_OPERATION was being processed by cm_Analyze()
resulting in a retry in all cases. Even those where no
connp was passed in as NULL. connp == NULL implies that
no server could be obtained so the RPC was not issued on
this pass. As a result there should be no retry.
2. RX_INVALID_OPERATION was mapped to CM_ERROR_UNKNOWN which
is not an error that is reported to the AFS redirector.
3. RDR_BkgFetch was setting CM_REQ_NORETRY and permitting
the retries to be handled by the cm_daemon threads. However,
CM_ERROR_UNKNOWN was not treated as a fatal error by cm_Daemon.
Address the failures in the following ways:
A. cm_Analyze no longer retries calls which did not take place.
B. Create a new CM_ERROR_INVAL_NET_RESP error for RX_INVALID_OPERATION
which is translated to the Win32 STATUS_INVALID_NETWORK_RESPONSE
error. This is now returned to the AFS redirector and treated
as a fatal error.
C. RDR_BkgFetch no longer queues tasks to cm_Daemon with the
CM_REQ_NORETRY flag set.
Change-Id: I1eba0e83fbbe5726f43f667ddb67ced8c011853d
Reviewed-on: http://gerrit.openafs.org/8510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 988f66c5c3bd4c4f23bfa53e69a52ed52c4e3ab9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 28 17:22:21 2012 -0600
vol: Let non-usable volumes attach for non-DAFS
Before DAFS, volumes that were not inService/blessed were not
accessible by normal clients, but were still allowed to attach. That
is, access to clients was prevented at VGetVolume-time, rather than at
attach-time. Commit 939382c5 tried to short-circuit this by detecting
this volume state at attach-time. However, volume utilities (e.g.
volserver) can give us back a volume over FSSYNC when they are done
with the volume, and for non-DAFS, we then try to attach the volume.
So, with 939382c5 that attachment will fail when volserver gives us
back a volume that is not inService/blessed (which can happen for some
normal volume operations).
This situation is not terrible, since either way the volume is not
usable by clients (since the volume didn't attach), and the volume is
still usable by volserver (since volserver is allowed to check out
nonexistent volumes). But it is a deviation from pre-DAFS behavior and
it can result in confusing error messages, so revert the 939382c5
behavior for non-DAFS.
For DAFS, this behavior is fine, since the fileserver does not attach
a volume unless it is trying to service a client request. So, leave it
for DAFS.
FIXES 131505
Change-Id: I8cf47640ceb068762eb42f1b70eb88aa9c4a060a
Reviewed-on: http://gerrit.openafs.org/8557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e4c9b448c9e62c7f66f9feb4831a15f7ee073c25
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Nov 9 23:11:16 2012 +0000
rx: Add a no-op afs_kcondvar_t for LWP
Remove the need to protect afs_kcondvar_t with RX_ENABLE_LOCKS, by
typedefing it as an int in rx_lwp.c. This is identical to what we
already do with afs_kmutex_t, and should let us get rid of some more
preprocessor spaghetti.
Change-Id: Ica6114585a68abde691ceee47d92d7f4e230a9bc
Reviewed-on: http://gerrit.openafs.org/8534
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 866c05825c9964aa92740bcb0f20f26b451e65ea
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 13 23:30:41 2012 -0600
rx: Lock call for KeepAliveOn/KeepAliveOff
rxi_KeepAliveOn/Off expect the call lock to be held after the call has
been initialized. So, hold it in the rx_KeepAliveOn/Off callers.
Change-Id: Ic2e96853bc9553e97f62e4502a5c92bbb28c63a2
Reviewed-on: http://gerrit.openafs.org/8463
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 22da9ec896f651f066317a85268620a7d3ac46fa
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 13 18:27:11 2012 -0600
afs: Handle VNOSERVICE as a timeout
For whatever reason, the fileserver uses VNOSERVICE to indicate that
an Rx call was killed due to an idledead timeout. It is not used for
any volume errors, so treat it like the idle dead error codes.
Change-Id: I432cbb8ae011d5269ac8df31261d11204687fcf6
Reviewed-on: http://gerrit.openafs.org/8462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9ed02a628afd700a0e3c47ac92fa9c89d0827301
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 27 00:16:58 2012 -0500
Windows: cm_LookupInternal obtain type of target
cm_LookupInternal needs to return the target of a mount point
if the matching directory entry is a mount point. Therefore, if
the target type is unknown the status information must be queried.
Change-Id: Ifc37897531766f59e2517650ed7050cba50d6819
Reviewed-on: http://gerrit.openafs.org/8528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 11c8a64ffc10addb5fe7b68b78666cd91edccfb9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 27 00:08:30 2012 -0500
Windows: cm_GetNewSCache init mpDV to BAD
when allocatiing a new cm_scache_t object the mpDataVersion
field must be initialized to CM_SCACHE_BAD_VERSION. Zero is
a valid data version for a mount point or symlink.
Change-Id: If455b35cf01454ddf4a5b0a8adcc6e39d71b33d0
Reviewed-on: http://gerrit.openafs.org/8527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit db57dfd3798f09e77b5c49bed304cacc0c448f91
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 13 18:15:21 2012 -0600
afs: Slight restructuring in afs_Analyze
We test for acode < 0 && acode != VRESTARTING, but then immediately
test for specific values for acode. Move this conditional down, and
remove a level of indentation for the next couple of acode checks.
This commit should introduce no functional change.
Change-Id: I2ca3a00d5f6d620fcb042d8007f18dd8b5cfaf24
Reviewed-on: http://gerrit.openafs.org/8461
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a84c6b0ece1fdee4f462c6ce27fa78c2e0d419f4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 13 22:46:34 2012 -0600
rx: Generate BUSY packets for error call channels
Currently, if a call is error'd out but still active, we won't
generate BUSY packets if another call comes in on the same channel.
This is because we bail out earlier, here, before we get to the BUSY
processing.
The comments suggest that this is for if we enter an error state while
waiting for TQ to clear. So, only do this if our error has changed.
Change-Id: I070f2af16bc79b1ebc7d19b7cb761fdbca78344b
Reviewed-on: http://gerrit.openafs.org/8460
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 45721d0d5603ac0d7dae477bf0ed33c54bba6dbc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 25 14:30:07 2012 -0500
Windows: AFSValidateEntry Symlink TargetName
During an AFSValidateEntry if the data version of the symlink
object has not changed, do not discard or rebuild the target
name if already assisgned.
Change-Id: If37af308ee48ec761283ff6e831ffa5e06dacf58
Reviewed-on: http://gerrit.openafs.org/8515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5ab61bbc5c5f50183e737184de03b1b9153e208a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 25 23:56:47 2012 -0500
Windows: Panic if RDR_Initialize SERVICE_DISABLED
If RDR_Initialize() fails with ERROR_SERVICE_DISABLED it means that
the AFSRedir.sys driver loaded but the AFSRedirLib.sys driver library
cannot be loaded. In this situation neither the RDR nor SMB interfaces
can successfully be used. Panic!
Change-Id: I09d30a86b9d72b9077d4c7578dab52314cce559a
Reviewed-on: http://gerrit.openafs.org/8514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e3373c5ad24bf2ff858d1f33fa0dd65236c928de
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 16 17:20:33 2012 -0500
Windows: GetResourceInformation print path earlier
In the network provider, GetResourceInformation was logging the
input resource path after the afs redirector chopped it up. Log
it before the DeviceIoControl call.
Change-Id: Icefcf65583b95fd46c8e28bd0e2c53258b5094fa
Reviewed-on: http://gerrit.openafs.org/8509
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bd57c7d64844ca26d80f2b29db470dacd134fc56
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 21 10:39:51 2012 -0600
LINUX: Dir follow_link should set LAST_BIND
For our faux-symlink directory follow_link operation, we leave the
given nameidata struct with an invalid 'last' component. That is,
nd->last is not changed or set to anything meaningful.
Usually the callers of our follow_link op do not care about the last
component of the nameidata. However, at least one caller does: the
caller near the do_link label in open_namei(). This is called during
processing for O_CREAT operations on symlinks, and since our
directories look like symlinks, it gets called. It tries to use
nd->last to look up the last component of the dereferenced path (so it
can try to create it, as necessary), but since our nd->last is not
set, this will not work.
Specifically, our nd->last.name is not pointing into the names cache,
so the subsequent putname/__putname on it will corrupt the names
cache. However, even if this were not a problem, the actual contents
of the last component do not seem meaningful so this would probably
result in incorrect behavior anyway.
To avoid all of this, set nd->last_type to LAST_BIND, so any callers
know that the last component of the given nd is not valid, and we are
pointing directly to the target component with a dentry.
Change-Id: I9cebc3b63ae7a2410295392a08aa8fc738549234
Reviewed-on: http://gerrit.openafs.org/8489
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 41f8d6b9239d8ee1ca786c0485bea4251c96b9e5
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Mon Nov 26 15:45:26 2012 +0059
Do not call afs_MarinerLog when afs_mariner is not set
When mariner log is not set up (afs_mariner=0), do not call afs_MarinerLog,
otherwise a osi_NetSend() to hostaddress=0 is tried, which will give you
ICMP messages in the socket error queue.
Do not call afs_AddMarinerName, when afs_mariner is not set.
Change-Id: I1ed6369fb0eea130348f4f6fd37bb0d021c4c791
Reviewed-on: http://gerrit.openafs.org/8519
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 873f8978fd13ae5a52d7401788d84237dace105f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 17 00:43:00 2012 -0500
Windows: Add Hard Link support to Service
Implement Hard Link support to the redirector interface in the
service. It is implemented to support hard links across directories
even though AFS does not currently support it. cm_Link() will
check before issuing an RPC to the file server. ReplaceIfExists
functionality is implemented by cm_Unlink() followed by cm_Link()
if required.
Change-Id: Icb4e7eeaed1ae57719c487fe3bf29efea1902246
Reviewed-on: http://gerrit.openafs.org/8482
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2b86ae33fead57696488e4b8c425cf8ae1bdd0f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 16 22:27:02 2012 -0500
Windows: Add Hard Link support to AFS Redirector
Both Windows and AFS support the notion of hard links to files.
Add an implementation to the AFS redirector. The body of the
functionality and the IOCTL to the service permits the specification
of hard links to files across directory boundaries. There is a
restriction within AFSSetFileLinkInfo() which prevents cross-directory
requests. However, this can be taken out if AFS ever permits them.
Decrement object information link counts on directory entry
deletions. Do not delete object information context blocks if the
link count is greater than 0. Increment link counts when hard
links are added.
A subsequent patchset will implement the afsd_service support.
Change-Id: Iffabf480c0b43ab76feb5bdf3464a0bf1324e642
Reviewed-on: http://gerrit.openafs.org/8481
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c3ed4794c1ed7db14b67eb0c3bb65c1aed18ff35
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 22 11:52:11 2012 -0500
Windows: Trend Micro QueryDirectory deadlock
Trend Micro will deadlock both itself and the AFS redirector by
calling a worker thread to generate a temporary file name during
an active FindFirst Directory Query. The Trend Micro worker will
also attempt to enumerate the directory. If the directory contains
an entry for which the data version as reported by the service is
different than the data version in the ObjectInformationCB a deadlock
will occur on the matching FileCB Resource.
To avoid this deadlock, prevent AFSValidateEntry from purging or
updating the ObjectInformationCB and FileObject information when
called from AFSQueryDirectory.
Change-Id: I8f2f7136796759eb91dadfea34a89513c1a1fff4
Reviewed-on: http://gerrit.openafs.org/8492
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d733f9daed95feef2eefb3d68dc16607b1321142
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 19 15:33:33 2012 -0500
Windows: Missing lock in AFSNotifyRename
If the ParentObjectInformation and TargetParentObjectInformation
are different, the TreeLock for each must be held.
Change-Id: Iac9910d838f8f35b286e4e40009cfd547ed8a438
Reviewed-on: http://gerrit.openafs.org/8479
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8245b2bc7aab4553f368470d97d0110f9daa4fe9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 19 15:30:09 2012 -0500
Windows: AFSSetRenameInfo always set pRenameInfo
Make it easier to debug AFSSetRenameInfo by setting pRenameInfo
so that the FILE_RENAME_INFORMATION structure is visible within
the debugger on all code paths.
Change-Id: I6e47c417e2468eeb4f56a680ddcbe75cb8753916
Reviewed-on: http://gerrit.openafs.org/8478
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dbc2589731ff5c6879745be8be5c5bf46844a4ef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 15 23:13:17 2012 -0500
Windows: SetFileRenameInfo Improve Error Handling
If a Target FileObject is not provided by the IOManager and
a Target RootDirectory Handle is provided something has gone
wrong. Return STATUS_INVALID_PARAMETER to indicate the
invalid state.
If the target directory is not specified by FileObject and a full
target path is provided return STATUS_NOT_SAME_DEVICE to force
an object Move instead of Rename.
Change-Id: I54c3c978c0b9fcc3d4b61fb9f7b7d0771e38f714
Reviewed-on: http://gerrit.openafs.org/8477
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 42e812c7abf5fafbbfeebd40828978e8b4639860
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 21 18:08:35 2012 -0500
Windows: smb_ReceiveTran2QFileInfo Pioctl support
Similar to the QueryPathInfo support for _._AFS_IOCTL_._ the
QueryFileInfo interface must respond to pioctl queries. When
GetFileAttributes() on XP is called from the afslogon.dll the
QFileInfo path is used instead of the QPathInfo path.
Change-Id: I119fbefbf933e868cac57eb508ef30a45277a50f
Reviewed-on: http://gerrit.openafs.org/8491
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 305133cde60fec7fb1050caf60a4319cdcf88a27
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 21 18:03:10 2012 -0500
Windows: afslogon do not specify smbName for tokens
The smbName was added to the Windows ktc_SetTokens() interface
to provide a mechanism for passing the Windows account name
that the tokens should be associated with via Integrated Logon.
This was only required when the Authentication Provider did not
impersonate the user context prior to calling ktc_SetTokens().
Now that impersonation is used, the ktc_SetTokens() call will
do the right thing without the smbName. In fact, when impersonation
is used setting the smbName does the wrong thing by specifying
the AFS_PIOCTL_LOGON flag which is only valid if the SYSTEM account
is issuing the ktc_SetToken() call.
Change-Id: I6d04b56b815571f6e9fe3557544bd93a5b9ca735
Reviewed-on: http://gerrit.openafs.org/8490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit eca3d56436c16e4634afe1954a2a15424b4ad5f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 21 01:13:49 2012 -0500
Windows: Fix smb_ReceiveTran2QPathInfo Pioctl support
The path check should needs to include the root directory slash
when comparing to the \_._AFS_IOCTL_._ path to detect a pioctl
request.
Change-Id: I1d2c620fdcff55a0c90d8be3f3de6a1bd1137b8f
Reviewed-on: http://gerrit.openafs.org/8488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5acf8b7f98ecd3daa721e60b49c7a582c7ce3b8d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 20 01:23:08 2012 -0500
Windows: QuerySecurity deny access to SACL
The SACL requires System Access Level. Requests for SACL by
end user applications must be denied. Permit access to Owner,
Group, DACL and Label but not SACL.
This change permits executables to be initiated from drive
letter mappings.
Change-Id: Ibf847261f0c36dc7b6175b0536657161158cd44f
Reviewed-on: http://gerrit.openafs.org/8483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6d37315a9c4fa4aae99715dd18827fcc0b543ba3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 19 15:06:47 2012 -0500
Windows: Fix Redir link counting
Each object in AFS has a link count which tracks the number of
directory entries that refer to the FileId. In the redirector
there is one ObjectInformationCB per FileId and one AFSDirectoryCB
for each directory entry. When a directory entry is deleted perhaps
by delete on close it is important to ensure that the matching
ObjectInformationCB is not deleted unless the Link count drops to 0.
Change-Id: I2c7906d5881f93ed60697d40a0ea462f4567d443
Reviewed-on: http://gerrit.openafs.org/8480
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f436fe03c80e21b6a58a6de962070841e00791ef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 17 21:44:52 2012 -0500
Windows: buf_CleanLocked protect against NULL bp->userp
The cm_buf_t.userp field should never be NULL if the CM_BUF_DIRTY
flag is set but apparently it sometimes is. cm_BufWrite() requires
that the userp parameter be non-NULL. Otherwise, an assertion fails
and afsd_service.exe panics. If bp->userp is NULL, use cm_rootUserp.
The worst that will happen is the write will fail due to an access
denied error.
Change-Id: I6cc650dcffe2b0fb50ac2ce91b74e8afbdfc40ca
Reviewed-on: http://gerrit.openafs.org/8475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 887cff5b0f84ad3b758bc4258b1f1302401c2c1d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 17 21:39:50 2012 -0500
Windows: do not adjust deleted scache LRU ordering
Instead of moving deleted scache objects so that they are next
in line to be recycled, do not move them at all. Making them
next to be recycled results in the CM_SCACHEFLAG_DELETED flag
value being lost.
Change-Id: I3839053066cca304454e445b2f4e4abea6e08dda
Reviewed-on: http://gerrit.openafs.org/8474
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c99797eadc80efa24972a85d1c37e03393c888ca
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 17 21:32:44 2012 -0500
Windows: buf_CleanLocked validate cm_scache_t
If the cm_scache_t object is not passed in by the caller ensure
that the cm_scache_t has a valid callback. If the cm_scache_t
has the CM_SCACHEFLAG_DELETED flag set, clear the dirty flag on
the cm_buf_t and do not bother contacting the file server.
Change-Id: If85be550b59765f64aadea4e1882af9430cebcb4
Reviewed-on: http://gerrit.openafs.org/8473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f03247ddd7f5b4a9cf8ef132757d794546c884ef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 17 17:11:42 2012 -0500
Windows: buf_SetDirty add assertion
the userp parameter must never be NULL.
Change-Id: Id785ac417bc869f708990f0bfe53809e3e5c71e5
Reviewed-on: http://gerrit.openafs.org/8472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b28c51d594ba3147bc1c30c34b974beb3f1fdfb3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Nov 21 16:46:29 2012 +0000
opr: Don't confuse isLast and isEnd
opr_queue_IsEnd's implementation was incorrect - it would return
true when the element was the last item in the list, not when it
was the end of the list (equal to the head record)
Correct the implementation of isEnd, and add an implementation for
isLast.
This fixes a bug in RX, wher we would never notice that the last
packet in the transmit queue was acknowledged, because the loop that
iterates over the queue uses isEnd to detect when its work is done.
Change-Id: I8966e05c479c18d025bb5cc4cf77514ce002be95
Reviewed-on: http://gerrit.openafs.org/8493
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ad4e634051e18fa5bd07016b6405e53e236c2f45
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 14 18:29:35 2012 -0600
afs: Do not skip flushing pages for dv-0 files
If the dv for a file is 0, we know the file is empty. Currently we
skip flushing pages for such files, presumably the idea being there is
no data in the file, so there should be no pages to flush.
However, Linux seems to keep empty pages around for empty files. So, a
future read can result in the application reading a page full of
zeroes, unless we flush the page here. While this has only been found
to happen on Linux 2.6.22 and later (and distribution-specific
backports, like RHEL 2.6.18-128), other platforms could in theory also
choose to do this. It would be difficult to find out when another
platform started to behave like this, so just remove this skip for
everyone so we never have to deal with this again.
Replace this code with a comment with a quick explanation, in case
anyone tries to add a similar optimization here in the future.
Thanks to Richard Brittain.
Change-Id: I68c51bb7612a98a5c75112bb8f4bb1edd949fda1
Reviewed-on: http://gerrit.openafs.org/8465
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit aeb2763b741a218ad6fd93adc6157a6a31f27e13
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Thu Nov 15 20:58:03 2012 -0500
Linux 3.7: key instantiate API change
Adapt to the new parameters for the instantiate key operation.
Change-Id: I25dea3489b68cad662e962a4973ee98ec7228cd3
Reviewed-on: http://gerrit.openafs.org/8470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 007ec3e25e6920d7036f70550bc44adefab0c170
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Thu Nov 15 17:49:53 2012 -0500
Linux 3.7: remove use of param.h and ioctl.h
Header files param.h and ioctl.h have moved as part of the userspace
API restructuring of header files. Nothing in those files is
currently needed by the source, so just drop the includes.
Change-Id: Icbbf7038ca1bf23edbde42aaf48f5108626d0040
Reviewed-on: http://gerrit.openafs.org/8469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 2bafb2f99d85804459acb8994d4057be809f8729
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Nov 14 22:12:13 2012 -0500
Linux: change test for new putname API
Replace the existing test with a more robust one that checks for
the existence of the new filename structure. Since older kernels
are expected to fail this test, we'll get the correct result even
if there is unrelated failure, for instance a missing/different
header file.
Change-Id: Ie50abce37580eab803e9b07e636a1538f4a91a81
Reviewed-on: http://gerrit.openafs.org/8466
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e1d149c925cfcc2656086bee2416fb319e1bd9ca
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 14 07:02:01 2012 -0500
Windows: Hold ProcessTreeLock across AFSValidateProcessEntry
AFSValidateProcessEntry() is called from AFSProcessCreate() which
holds the ProcessTree.TreeLock exclusive across the call and from
AFSCreate() and AFSRetrieveAuthGroup() where it is not held at all.
Add a parameter to AFSValidateProcessEntry() that indicates whether
or not the ProcessTree.TreeLock is held. If it is held, it must be
held exclusive. If it is not held, the lock must be acquired within
AFSValidateProcessEntry() and it must be held for the entire lifetime
of the pParentProcessCB reference. Failure to hold the TreeLock
for the lifetime of the reference permits a race with AFSProcessDestroy()
that can result in the parent ProcessCB being destroyed while its
Resource is held.
Change-Id: I7cf0dff6bd541b0588a060d677a8e3d724858b96
Reviewed-on: http://gerrit.openafs.org/8455
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f56c01d313140b625b4342feddfe464342d1ced4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 13 17:59:06 2012 -0500
Windows: Do not reset cm_buf.offset on error
When an error occurs the cm_buf_t is not removed from the
hash tables. Since the scacheHashTable hash is built from
the fid and the offset it is not safe to reset the offset field.
Resetting the offset field results in an assertion failure
during buffer recycling.
Change-Id: Id33ec048f8ecfd7f715feafadfa4ea618cdbac0d
Reviewed-on: http://gerrit.openafs.org/8452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 91f43fb6f798bdcae95e43a1fe5923742b307622
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 13 09:14:39 2012 -0500
include roken.h in yacc parsers
Change-Id: Ic6f2dba3ee5bbfdb2794fd9ecc8e1ab2eb3de828
Reviewed-on: http://gerrit.openafs.org/8450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3081a2cff2e4f9499268854504873fa801d50ce5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 1 16:46:13 2012 -0500
afs: Add some comments on GetValidDSlot panics
A couple of call sites for afs_GetValidDSlot currently panic if an
error is returned, but no explanation is given. Add a few comments
helping explain why there is a panic there, instead of graceful error
handling.
Change-Id: Ic1c9808c427fe7524ea7dc1b7dbab8e9ac665b91
Reviewed-on: http://gerrit.openafs.org/8407
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 866a9fbbdd89735ab76a70cb6d6523db2b98e4c9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 1 16:33:31 2012 -0500
afs_FreeDiscardedDCache: Avoid assert on error
Currently afs_FreeDiscardedDCache will assert if it cannot read in any
discarded dcache entry to free. Return an error instead of asserting,
so the caller can figure out what to do about the error.
Adjust the callers to handle the error, or panic.
afs_MaybeFreeDiscardedDCache still just panics anyway, as making it
handle the error gracefully is beyond the scope of this commit, and is
work for another day.
This changes afs_FreeDiscardedDCache to return an int.
Change-Id: Id1e77af18461c9804b655c6f91ac90038621a394
Reviewed-on: http://gerrit.openafs.org/8406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e02185547e316667989a100f77e68b918481b597
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 1 15:43:09 2012 -0500
afs: Handle afs_AllocDCache errors
Do not panic if afs_AllocDCache encounters an error and returns NULL.
Instead, go into the normal retry loop that occurs if we couldn't free
up any more free/discard dcache entries.
Change-Id: Ia165e0b5f5ef37e05942c795955d75f26e4ea7d3
Reviewed-on: http://gerrit.openafs.org/8405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 64ee7b32f134e6431eb2894ed4397f8b1fea25ad
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 1 15:32:31 2012 -0500
afs_AllocDCache: return NULL instead of panic
Currently afs_AllocDCache will panic if we cannot get a valid dcache
from the free/discard lists. Instead, return NULL, so the caller can
decide how to handle the error.
Currently the caller will just panic anyway, but that will be
addressed in a future commit.
Change-Id: Iafb539bbda9ef20907ef575699185f111ca39c2b
Reviewed-on: http://gerrit.openafs.org/8377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 336939179721d79a6798614ff747dd06701e3edc
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 1 13:41:06 2012 -0500
afs: Traverse discard/free dslot list if errors
Currently, when we pull a dslot off of the discard or free list, we
just try to get the first entry from the list, and panic if we cannot
get it. Instead, traverse through the whole list, trying to find an
entry we can successfully get. This introduces the helper function
afs_GetDSlotFromList to do this traversal.
This does not yet address the case where we cannot get any entry on
the relevant list.
Change-Id: Iedbcffcbeb5dda61fde8e1d526e793f68c3200b3
Reviewed-on: http://gerrit.openafs.org/8376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f74a0a7bbb37a8ab6050e833cf8d66abdff31854
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 1 11:51:42 2012 -0500
afs: Handle easy GetValidDSlot errors
Many callers of GetValidDSlot currently assume they will always get
back a valid dcache, and will panic on getting NULL. However, for many
of these callers, handling the NULL case is quite easy, since the
failure to get a dcache can just result in an error directly, or
obtaining the dcache is best-effort or just an optimization.
This commit just handles the "easy" cases; some other callers require
more complex handling.
Change-Id: I622908de7004ba4cb18ccb26bda0e75b879f65ca
Reviewed-on: http://gerrit.openafs.org/8375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 20b0c65a289e2b55fb6922c8f60e873f1f4c6f97
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 31 15:55:35 2012 -0500
afs: Never use GetNewDSlot after init
Currently there are two ways to get a dcache via a slot number:
afs_GetNewDSot and afs_GetValidDSlot. afs_GetValidDSlot assumes that
the given slot number refers to a dcache entry that is valid on disk;
with afs_GetNewDSlot, the given slot may not be valid, and if it is
not, an empty 'template' dcache is returned.
afs_GetNewDSlot is useful for initializing cache files, since if a
given dcache slot exists on disk and contains valid data, we use the
dcache like normal. If it does not already exist or does not contain
valid data, we fill in the missing data after afs_GetNewDSlot returns.
However, for all other uses, afs_GetNewDSlot is incorrect, and causes
various serious problems. After we have initialized our dcache
entries, any attempt to read a dcache by slot number should succeed,
since the number of dcache entries never changes after we are started,
and we initialized all of them during client startup.
Some code outside of afs_InitCacheFile was still using
afs_GetNewDSlot; code that reads in a dslot from the free or discard
list. In these cases, if there is any error reading the dcache slot
from disk, we will be given a dcache that has some of its fields not
filled in properly. Notably, we assume that the entry is not on the
global hash table (we set tdc->f.fid.Fid.Volume to 0), and the
tdc->f.inode field is not initialized at all, leaving it set to
whatever was in memory for that tdc before we tried to read the slot
from disk.
This can cause cache corruption, since tdc->f.inode can point to the
inoder for a different existing cache file, so writing to that dcache
modifies the data for another cached file.
To avoid this, modify the non-afs_InitCacheFile callers of
afs_GetNewDSlot to avoid afs_GetNewDSlot. Since these callers read
from the free/discard list, the contents of the dcache entries are not
valid (the cell, volume, dv, etc are not valid), though they must
exist on disk (we have a valid inode number for them). So, create a
new function, afs_GetUnusedDSlot, to get a dcache that must exist on
disk, but does not represent any valid data. Use this for callers that
must get a dslot from the free/discard list.
Add some comments to try and help explain what is going on.
Change-Id: I5b1b7ef4886102a9e145320932b2fd650b5c6f2f
Reviewed-on: http://gerrit.openafs.org/8370
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fb5eccb2fe30b04497e3e12efab6080ef03d896d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 12 18:54:54 2012 -0500
Windows: SYMSTORE the entire WINNT/afsrdr tree
The tools directories need to be imported into the symstore
one directory at a time.
The "build.exe" output files afsredir.sys, afsredirlib.sys and
afsrdfsprovider.dll must be imported from within the kernel
build environment script.
Change-Id: Ida7d84deecfb1ec4f508c5c40fc5576e2cb7b3e4
Reviewed-on: http://gerrit.openafs.org/8445
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 152e3c0423cc96e2ab4d4ee4a15c9c74f9dd0374
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 12 11:47:50 2012 -0500
Windows: Add AFSRedir binaries to Symbol Store
Change-Id: I1b4f2d5fcd4243e9a8a931a223bced33631206b0
Reviewed-on: http://gerrit.openafs.org/8441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e15a612252e881783638e297e33a88f499017614
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 12 07:13:07 2012 -0500
Windows: torture should not reference roken.h
Do not include roken.h in torture tests. The torture test
should not be linked to afsroken.dll.
Change-Id: I14d67c2e2f9980906854e0ab72c040eb9437a931
Reviewed-on: http://gerrit.openafs.org/8431
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0bef3159d3698a941154bd21352eb35bd94edb8c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 11 22:00:07 2012 -0500
afsio: process windows file paths consistently
Windows file paths can use either '\' or '/' as a path
separator. libafscp on the other hand requires '/' and argv[0]
will always use '\'.
Introduce a new function ConvertAFSPath() which converts the
input path to '/' and converts \\afs to /afs. A future commit
should access the registry and make use of the NetbiosName and
MountRoot values to perform the conversion correctly.
Change-Id: I14f5f45234ec4beab58751783a25206b3e7eff45
Reviewed-on: http://gerrit.openafs.org/8430
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit be50ea11feee47695c89906ea9b8a299342ff345
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 11 21:53:13 2012 -0500
libafscp: Windows TellMeAboutYourSelf response
The address list and uuid are computed in init_afs_cb(). There
is no need for special Windows processing within TellMeAboutYourSelf.
Change-Id: Ica4d2edb69ac9000713b016996a2c58e8b65ee9c
Reviewed-on: http://gerrit.openafs.org/8429
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cdad65170d717dfe7e7f53510e7e331fa746c20d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 11 21:52:27 2012 -0500
libafscp: build as pthreaded for windows
Change-Id: Iaa9515e572178f44deb670a83daba358c2d4dc74
Reviewed-on: http://gerrit.openafs.org/8428
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 81db8d9764e721386ca78af96daf2a7d26ae94bb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 10 23:41:21 2012 -0500
Windows: afsrpc.dll MAKEDEBUGCALL
Enable debug calls from the pthreaded RX library.
Change-Id: Ie5e98d4408a3eb259e7f5f298f0776931f0d488a
Reviewed-on: http://gerrit.openafs.org/8427
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 692c300e371797ae5eac063a4c1a8030d48bb1aa
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 30 13:30:27 2012 -0500
afs: Pass rx connection to print_internet_address
Make print_internet_address take an rx_connection, so it can print out
more information based on rx info. Currently it does not use the
connection; this commit is just for adding the connection to the
interface, and adjusting all of the callers to cope. There should be
no behavior change.
Change-Id: I410ffe43b7b6fc4d5c82666529c9263969820185
Reviewed-on: http://gerrit.openafs.org/8409
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bcb077a00fb575e7beb92739646054ea67ca0b79
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Oct 30 10:41:12 2012 -0400
fix stale volume info from vos examine (non-dafs)
A volume examine on a non-dafs volume server/fileserver can show old
information, including old volume update time, for up to about 20
minutes. The non-dafs volume server reads the volume information
from the volume headers, which are updated by the fileserver only
periodically to avoid excessive i/o.
Before dafs, when the volume server performed a volume examine, the
volume server would send a fssync command to the fileserver with the
request FSYNC_NEEDVOLUME and mode V_READONLY. The fileserver writes
the current memory contents to disk on this fssync command. The
volume server would then attach the volume, reading the current
volume data.
The dafs volume/fileserver avoids this extra i/o by using a new set
of fssync commands to retrieve the volume information from the
fileserver. However, the non-dafs volume server does not use the new
fssync commands and reads the volume headers from disk.
Revert the volume attachment processing for the non-dafs volume
server to request the volume with the V_READONLY mode. This causes
the fileserver to update the volume headers, allowing the volume
server to read the up to date volume header data.
Sadly, this adds another dafs ifdef to the already twisty maze of
passages that all look alike.
This changes the volserver to use the V_READONLY attachment mode
only for the case of getting a single volume, as that what was
done in 1.4.x.
Change-Id: Ibee25bfcfb087e73ccbc17e181a99da49a7751ae
Reviewed-on: http://gerrit.openafs.org/8327
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0eaa0d1baa8b8fe115301f188ce32176acc7b065
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Oct 30 10:22:40 2012 -0400
vol: allow non-dafs volume utils to attach with V_READONLY again
Allow non-fileserver, non-dafs, programs to attach volumes with the
V_READONLY mode again. This was lost during the code changes for
dafs.
The caller sends a fssync request to the fileserver, which updates the
on-disk contents of the volume headers, before the caller reads the
volume headers, allowing the caller to have the most recent info about
the volume. The fileserver still has the volume in use.
Later in the attachment process, the inUse check is skipped for the case
of a non-fileserver process which is attaching the volume using the
V_READONLY mode, otherwise the attachment would incorrectly mark the
volume as needing to be salvaged.
Note: The mode checks in VMustCheckOutVolume() are correct. We must
checkout the volume when attaching with the V_READONLY mode. This
fix updates the VShouldCheckInUse(), in which an additional
exception was added to cover the case for V_READONLY mode from a non-
fileserver process.
Note: A check is added in the dafs version of attach to avoid overwriting the
inUse field when a volume utility is attaching a volume in V_READONLY mode.
Currently, V_READONLY is not used by dafs, but this was done to avoid future
errors.
Change-Id: I09d3af1e74087d0627399392e662e5075d41cdeb
Reviewed-on: http://gerrit.openafs.org/8339
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d2d3c51a7d76c41b154105c5295eeee172c573ae
Author: Hans-Werner Paulsen <hans@MPA-Garching.MPG.DE>
Date: Fri Nov 9 13:48:45 2012 +0100
fileserver: check value of -cb argument
The value of the -cb argument for the fileserver was not checked correctly.
The fileserver refused to start for any number of callbacks.
Change-Id: I25fe9d81ba20d286f36999a554c94fda4ef7fb2f
Reviewed-on: http://gerrit.openafs.org/8420
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 15670c1ae95182d98c6e874672ef7138e1949dfe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 8 13:26:36 2012 -0500
Windows: use hKUserMap to read afslogon username
hkTemp is not the correct registry handle. Use hkUserMap
Change-Id: I44776b6dd46bb0ecac0c729bf80ed9261ddf7a67
Reviewed-on: http://gerrit.openafs.org/8412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6f79eb36593a2b20e712cf7e828e987e12f8e99f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 8 12:20:30 2012 -0500
Windows: Prevent SMB unitialized variable access
smb_ReceiveNTTranCreate would make use of 'fidp' before it was
allocated.
Change-Id: Ib4a7262ba09f15049f1855535250638c2e5d17a4
Reviewed-on: http://gerrit.openafs.org/8411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c01e552b857d0a472c79f60704906936cbb2eb19
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 8 11:29:20 2012 -0500
Windows: Treat invalid AFSFetchStatus as VBUSY
Modify cm_Analyze() to accept an AFSFetchStatus parameter which
when set is verified for validity. If the status info is invalid,
then consider the response equivalent to VBUSY and attempt to
query an alternate file server (if any.) Log the invalid status
info to the Windows Application Event Log as a Warning.
When cm_Analyze() is processing the response of an RPC that returns
multiple AFSFetchStatus structures, pass in the one that corresponds
with the source object.
Change-Id: I84be22f332ff6fd7bc9620347f958538a3412380
Reviewed-on: http://gerrit.openafs.org/8404
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d87a9adeb66f405441be35b12048012a527c122d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 8 10:39:43 2012 -0500
Windows: cm_IsStatusValid
Break out validity checking for AFSFetchStatus responses into
a new function.
Change-Id: I15d2ed12ed2d9ca9a24d6f717243d823db22d30c
Reviewed-on: http://gerrit.openafs.org/8403
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 45f0a9ba7f139749a969e73362194b380988116d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 8 00:24:14 2012 -0500
Windows: cm_MergeStatus now returns an error code
cm_MergeStatus() can fail if the AFSFetchStatus InterfaceVersion
field does not have the value 0x1 as that is the only version that
is defined by the protocol. The return code will be CM_ERROR_INVAL.
cm_MergeStatus() returns 0 on success.
Update all of the call sites.
Change-Id: Iddf56f68dfa26b0f11744b905a70d7d39ad853d1
Reviewed-on: http://gerrit.openafs.org/8402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 48b60478897e7cb22e9cc1adfa3b71c188572093
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 31 15:04:55 2012 -0500
afs: Make last_error always useful
Currently we record last_error as the last getuerror() we got when
failing to read in a slot in UFSGetDSlot. For kernels that do not have
getuerror(), this variable is currently useless, and we do not record
anywhere what the last error received was (besides logging it via
afs_warn).
So, for non-uerror, just record what 'code' we got, so we at least
have something.
Change-Id: Iede39bbeee48ea48f380b788f2968886a831a918
Reviewed-on: http://gerrit.openafs.org/8369
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b5d9e29e89c2a63c857c47f1fb9accae90b0a3aa
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 31 15:02:09 2012 -0500
afs: Log slot for GetDSlot read errors
When we log that a disk read error occurred during GetDSlot, log which
slot we were trying to read for convenience.
Change-Id: I35ffa94ff31cee735e85542ed9697b5f14180226
Reviewed-on: http://gerrit.openafs.org/8368
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bbea7b07f3f2120245026a632b4109d9d7b1359f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 7 18:46:24 2012 -0600
rx: Fix non-TSFPQ rxi_FreePackets
Actually count the number of packets we're given, so we don't bail out
early because num_pkts is 0. Without this, we effectively do not free
most packets for non-pthreads Rx, so e.g. the unix kernel module will
leak memory quite quickly and be very slow.
This was introduced by 170dbb3c.
Change-Id: Id781e37170683c422b40079fdda018be1caddaf3
Reviewed-on: http://gerrit.openafs.org/8401
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 30ee8b645ea28b8f4f4794b2620fef723d03de9d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 7 16:34:23 2012 -0500
Windows: RDR_CleanupFileEntry protect lock release
Prevent lock release of scp->rw when not held.
Change-Id: I9ed3ca464a7881cd365ebe3560d5a6da22e21c86
Reviewed-on: http://gerrit.openafs.org/8372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8c7846f4e1dd89db4ff3b03c558d97cd13cbb205
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 6 06:39:39 2012 -0500
Windows: call MIDL_user_allocate instead of calloc
In the RPC service routines do not call calloc() directly.
All memory will be deallocated by a call to MIDL_user_free()
so use MIDL_user_allocate() to perform the allocation.
Modify MIDL_user_allocate() to call calloc() instead of malloc()
to ensure that the memory is initialized to NUL bytes.
Change-Id: I4d458bb5d8888c63040f213550d04f481e98175b
Reviewed-on: http://gerrit.openafs.org/8365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 40964dd39decf8b64d82090b5bb9ecac05901c07
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 6 06:38:14 2012 -0500
Windows: no more _wcsdup; use wcsdup
_wcsdup is not mapped by roken.h. Use wcsdup which is.
Change-Id: I0f6bb3f5465c74ad52f992892fcbc9837c276c0c
Reviewed-on: http://gerrit.openafs.org/8364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f749f17fe1a2bc56a8129f5579e5cf5009f12d95
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Nov 7 10:08:33 2012 -0500
Catch up to FreeBSD non-MPSAFE deorbit
All filesystems must have their own locking now.
We have been MPSAFE for quite some time, but the preprocessor macro
"MPSAFE" has been removed and we must catch up in order to compile.
The MNTK_MPSAFE macro has not yet been removed, but it is toothless
now, so we can preemptively stop using it.
Change-Id: I9d9090fd1afc020670a0cf874baacf483fd34915
Reviewed-on: http://gerrit.openafs.org/8366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 586e9cd24ede7799ea795221df856b65ea158e31
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 1 20:42:58 2012 +0000
opr: Add Windows stuff for dict.c/h
The NTMakefile changes were omitted from the patch which added
opr/dict.h for Unix. Add them here.
Change-Id: I240b40116aed83dcf232a1d741d0ef7b442bf6f7
Reviewed-on: http://gerrit.openafs.org/8358
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ba718cba9285fc9f663b0fd15524bc5474cca893
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 31 20:59:30 2012 -0400
Windows: Use MountRoot for Absolute Symlinks
Replace the absolute symlink processing in AFSLocateName().
Implement AFSIsAbsoluteAFSName() to test whether or not the
path is in fact an absolute /afs path by comparing the input
string to the registry MountRoot value which specifies the
case sensitive root path for all absolute symlinks stored
in the AFS cell.
If a symlink target path begins with a directory separator
and is not an absolute afs path name, return an error.
Construct the substitution string using the target path
without the MountRoot prefix.
Add functionality to AFSRedir.sys to read the MountRoot
from the registry and pass it on to AFSRedirLib.sys.
Change-Id: Ie1df24da1e6de257c73dc34c80a75288bad47d29
Reviewed-on: http://gerrit.openafs.org/8353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7fe30bd28e62ad0ed717c24e8eccf5e563b9cd68
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Nov 1 14:15:27 2012 -0400
configure: check for poll()
if we have code which uses HAVE_POLL, check for poll().
Change-Id: I1baf61541b243f82b3acca112db2cbbca813182b
Reviewed-on: http://gerrit.openafs.org/8357
Reviewed-by: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5be3cdc3f3a3b1d78a9c9f7acb9e5ee81d5a5191
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Oct 30 11:25:02 2012 +0000
opr: Add dictionary implementation
Add a simple implementation of a dictionary/hash structure based around
opr queues and the jhash hashing function.
Change-Id: I4ae5cafcef377b05c8caa7c455737a992b1d36cd
Reviewed-on: http://gerrit.openafs.org/8355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 07372cf7e76acf62eb26908977e2682338c85ac1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Oct 29 19:02:03 2012 +0000
opr: Add opr_jhash_int2 function
Add a function to jhash that can be used to hash a pair of unsigned
integers (or other stuff that can cast to them) without having to build
up an array.
Provide a couple of tests for the new function
Change-Id: I594848f64316fb459eff565933691f560512ca79
Reviewed-on: http://gerrit.openafs.org/8354
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit dce5e012fedb3efc9e7acd9c443b7ec2caaf47ae
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 1 17:38:45 2012 +0000
tests: Fix fallout from cleanup change
The change to cleanup temporary files after tests
(0c3670914a05c7aa33f0b1239ba9cc25f430ed04) broke all attempts
to run the tests using libwrap, as it would cause libwrap to run
the binary named "MAKECHECK=1"
Move the variable defintion before the libwrap invocation to fix this.
Change-Id: I330267c9b53483abccf43d60a7dc8f8d973c3959
Reviewed-on: http://gerrit.openafs.org/8356
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 6580d64b5d8ef0ccce71b72783b33c9e6f75b9e8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 31 12:04:50 2012 -0400
Windows: cm_ConnByServer increment under lock
Incrementing the cm_conn.refCount must be performed while holding
the cm_connLock in order to prevent cm_GCConnections() from
seeing an in-use object as having a zero count.
Change-Id: Ifaa755ef0f04f3bf64223434dfc518bc73d01d4d
Reviewed-on: http://gerrit.openafs.org/8347
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b0283d5f17aafecf258479d6691682af3baaa0fd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 31 09:53:57 2012 -0400
Windows: cm_FindVolumeByName refactoring
The cm_volume allocation within cm_FindVolumeByName() was racy.
Given how locks were obtained and dropped it was possible for two
threads to both determine that a cm_volume_t object needed to be
allocated. It might even have been possible for two threads to
attempt to allocate the same object.
This refactoring ensures that if a volume cannot be found under
a read lock that a second search is performed under the write lock
in case the object had in fact been allocated during the transition.
Once it is determined that an allocation is required, the cm_volumeLock
is not dropped until the object has been built and inserted into the
name hash table. This ensures that two threads cannot attempt to
allocate a cm_volume object for the same volume group.
InterlockedIncrement is used to manage the cm_data volume count.
Change-Id: I64c07cbc0f7968c5580478ff33214f67088072f8
Reviewed-on: http://gerrit.openafs.org/8346
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d914034d4c5fd48fb89b1380da24984a520bae33
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 31 09:52:23 2012 -0400
Windows: use cm_GetVolume / cm_PutVolume
Instead of locally incrementing and decrementing the cm_volume
refCount field use cm_GetVolume and cm_PutVolume. Doing so makes
it easier to see if there is an imbalance.
Change-Id: Id62e42a74a9b1d9865a00dae177550a93e6e0f08
Reviewed-on: http://gerrit.openafs.org/8345
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2b798792fb56c5feda8e68dd433c82f43b1698aa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 31 09:50:34 2012 -0400
Windows: Interlocked ops for cell and scache allocation
Replace foo++ with InterlockedIncrement for cm_data cell and scache
counters which are used for allocating objects.
Change-Id: I09d2a536ef559d6d5873a3fdead4c8580bc93a0c
Reviewed-on: http://gerrit.openafs.org/8344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit aa3579b26503f42de50e7c58c56937a7fbf4d45f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 30 21:54:20 2012 -0400
Windows: Do not flush dirty bufs to deleted FID
If the FID is known to have been deleted, drop all dirty data
returned from the redirector on the floor.
Change-Id: I8b9a1a69d632d7243bdbcfedb5329558e0004d2e
Reviewed-on: http://gerrit.openafs.org/8343
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4a8e1385844eb3a1c6c70758baa7522cf35130df
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Thu Oct 18 09:38:50 2012 -0400
linux: bypass readpages should update nocache read parms
the nocache read parms need to have the offset updated during a bypass
readpages request
Change-Id: Iced321e6eeab7fd784c5ccb871fcda7ff9c7493d
Reviewed-on: http://gerrit.openafs.org/8254
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
commit 527f2ba00c1247ae7e8d6f355572c8635331bc0c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 23 15:47:06 2012 -0500
ptserver: Avoid inet_ntoa
The ptserver uses inet_ntoa in a few places, such as for calculating
host CPS. This isn't safe in pthreaded environments, so use
afs_inet_ntoa_r instead.
Change-Id: I84cdf606ffd44d2d87c0db509af0950a6547364e
Reviewed-on: http://gerrit.openafs.org/8287
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3898f4d20500fbdbe60e36ecaf6b80f96913b84c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 21 20:07:44 2012 +0100
Fix mutex assertion
RX mutexes have two mechanisms for asserting ownership of a mutex:
MUTEX_ISMINE, which returns true if the caller is the owner of the
mutex in question, and osirx_AssertMutex which fires an assertion if
the calling thread doesn't own a specified mutex.
Neither of these work with pthread mutexes on all platforms, and the
kernel support for MUTEX_ISMINE is dubious in places. Because in some
implementations, MUTEX_ISMINE tries to lock the mutex in question, a
failing call to MUTEX_ISMINE can lead to the process holding an
additional, unexpected, lock.
This patch reworks all of this, and uses the new opr mutex framework
so that we can do mutex assertions in userspace, too. We remove the
unsafe MUTEX_ISMINE macro, and replace it with MUTEX_ASSERT which
simply asserts if the specified mutex is not held by the current
thread. osirx_AssertMutex is removed as it is now redundant.
MUTEX_ASSERT will always work in kernel code.
For userspace, we provide opr_mutex_assert, which is implemented using
POSIX error checking mutexes. As error checking mutexes have a runtime
overhead, this is only available when configured with
--enable-debug-locks, the rest of the time calls to opr_mutex_assert are
no-ops.
Change-Id: I285ee2b558389fa3d63b786e4bc4420fa2126c80
Reviewed-on: http://gerrit.openafs.org/8282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d287e816988a98654ba6e0fd3aa053b20fd14663
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 21 21:19:40 2012 +0100
rx: Move kernel assertion macros
Move the kernel assertion macros out of rx_prototypes.h and into
rx_kernel.h. This solves an ordering problem if these macros are to
be used from src/rx/<arch>/*.h
Change-Id: I5f11e0802b3d25c1c32a2c646a35c0b59422ab3d
Reviewed-on: http://gerrit.openafs.org/8283
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0c3670914a05c7aa33f0b1239ba9cc25f430ed04
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 19 19:14:31 2012 -0400
tests: cleanup temporary files
Call the configuration directory cleanup function before exiting
so there are no files left behind, even in case of error.
Add KeyFileExt to the list of files that are removed.
Change-Id: Ie795bef0d44609b36950970244c02a6c6da1a843
Reviewed-on: http://gerrit.openafs.org/8142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d82a3d7e2c126950382e3db24e8494de5a1db2a0
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Thu Oct 18 07:00:18 2012 -0400
linux: fix cache bypass applicability function
don't allow cache bypass if execsOrWriters is true
don't trigger cache bypass based on being larger than the
"disabled" value of -1.
Change-Id: Ic174b133e5da3e9215465c9c2705c25e81a8beca
Reviewed-on: http://gerrit.openafs.org/8248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8927d5f3055a730c86dc2b1149d73ee3cd16af18
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Oct 29 19:11:23 2012 -0400
Linux: remove unused afs_set_name inline functions
These were used in an earlier version of the patch that got merged.
Change-Id: Ifc5ba94392a394d0fb55c31051b4b74211cfc1f0
Reviewed-on: http://gerrit.openafs.org/8332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f5a643ad6dbcbf1785eac274f9dec79ef65928f3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 20 23:14:41 2012 +0100
Add opr/lock.h and tidy locking macros
The MUTEX_* and CV_* macros leaked from RX a while ago - they mean
that most of the pthreaded tree has a dependency on RX, as well as
further confusing the difference between userspace and kernel.
Tidy all of this up so that we have opr_mutex_* and opr_cv_* macros
to handle portable locking, and use these throughout the userspace
tree. Only kernel code should now use MUTEX_* and CV_*.
Provide opr/lockstub.h as a header that can be used by non-pthreaded
code to easily stub out these functions.
Change-Id: I24be525c7667641134d50561ce7f1e2d752cdf1f
Reviewed-on: http://gerrit.openafs.org/8280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9607d0e7993f3dee7f70ae747ea9d0b8ba1404af
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 26 15:37:52 2012 +0100
rx: Move transmit queue clearing
When the client receives a data packet from the server, it means that
the server has completed processing the client's request. This, in turn,
implies that the transmit queue can be cleared. However, we were doing
this with every incoming data packet.
Move the transmit queue clearing to the code which handles the rest of
the data packet, and make the function only run if the transmit queue
is non-empty.
Now that there's no client specific logic in the ReceiveCall section,
clean up this code to reduce duplication.
Change-Id: Ia4f9024720c676cbcc6d8426d4b94a0acded20bc
Reviewed-on: http://gerrit.openafs.org/8301
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 96d50fc0e1d8b709a86d76318c8a1801cbff12d7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 26 15:23:48 2012 +0100
rx: Refactor code to acknowledge a whole TX queue
We acknowledge a whole transmit queue whenever an ACKALL packet is
received, or whenever the call changes direction. As the same logic
is used in both locations, pull it out into a common helper function.
Change-Id: Ia91b037c73cc0dd612ebbd0bd38ec171ec7c96a5
Reviewed-on: http://gerrit.openafs.org/8300
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8d359e6dff5317698597e77f0a1dd5ba2bfb569a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 26 14:55:02 2012 +0100
rx: Remove duplicate out of order ACK check
Once we've moved the congestion window, there's no going back. So
any ACK packets that attempt to move the window backwards by including
a 'firstPacket' value earlier than the current window position must
be ignored.
However, we check (and ignore) these packets twice. Once in
rxi_ReceivePacket, which only checks in the client side case, and again
in rxi_ReceiveAckPacket, which has a more complete check that runs for
both client and server connections.
Remove the identical check from rxi_ReceivePacket in a continuing effort
to clean up this bit of code.
Change-Id: I090bc289848d0797860f46aec5877ad07fcc9b82
Reviewed-on: http://gerrit.openafs.org/8299
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit daeb917110f6b358d505eef50088bbb4573a6130
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 26 14:52:46 2012 +0100
rx: Remove duplicate security layer check
rxi_FindConnection checks that the connection it returns has a
security layer matching that of the incoming packet. Don't duplicate
this check within the rxi_ReceivePacket code.
Change-Id: I03e7d50ecf84f638d8e222d77defc25b8a58627a
Reviewed-on: http://gerrit.openafs.org/8298
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3c6570413c94afe4107634e9ca3f923f3cd30c21
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 26 14:50:51 2012 +0100
rx: Refactor rxi_ReceivePacket call selection
Refactor the call selection logic in rxi_ReceivePacket so that it is
a little bit easier to follow, and better optimised to the common case.
Split the current logic into a function for packets being received by
a server, and a function for packets being received by a client.
Change-Id: Ie27de7952cc13fa3b92619cfe68e671e6d5e170c
Reviewed-on: http://gerrit.openafs.org/8297
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a0ae8f514519b73ba7f7653bb78b9fc5b6e228f8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 26 12:21:41 2012 +0100
rx: Don't build a call to immediately abort it
If the server is over the busy threshold, then don't create a new
call structure just to be able to send an abort on that call. Instead,
use rx_SendRawAbort to send an abort packet on the appropriate channel.
Change-Id: I02782fc25fe8ed7608b39e3f8355e2793f7526e3
Reviewed-on: http://gerrit.openafs.org/8296
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0c9e55639cc02d90e9fd108572bb5ee64db3ddcc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 25 13:34:33 2012 +0100
rx: Remove unreachable debug statement
ReceivePacket has a dpf which is conditional on the packet having a
zero callnumber. However, just before we reach this debug statement,
we always return if the header doesn't have a call number included.
So, the debug statement can never run. Just remove it, as it's
potentially confusing.
Change-Id: I5fad9f39c9a0c4aac50853aaf4f853b9f7715e61
Reviewed-on: http://gerrit.openafs.org/8295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8e118de45cdf9987845d8d127c3c45cf1b77f01f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 25 12:01:04 2012 +0100
rx: Always provide rxi_WaitForTQBusy
Move the prototype for rxi_WaitForTQBusy to rx_internal.h, and always
provide it (as a prototype for RX_ENABLE_LOCKS, and as a no-op for lwp).
Remove all of the #ifdef RX_ENABLE_LOCKS around rxi_WaitForTQBusy calls.
Change-Id: I6c2b943d6d06bf19d3cb4495201d278e3900b6ef
Reviewed-on: http://gerrit.openafs.org/8294
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7e8278e1447328bc57396803a1651cbb497198d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 29 12:59:14 2012 -0400
Windows: Set Server Prefs recalc immediately
When processing the set server preferences pioctl call cm_RankServer()
to update the server preference value reported by "getserverprefs"
in addition to cm_ChangeRankVolume() or cm_ChangeRankCellVLServer().
Change-Id: Iacd8d30865286c39a7cc02e2f659b8c684f8f4a4
Reviewed-on: http://gerrit.openafs.org/8328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e59cf940ce1cb2ed72ccf05ce39f73019547d9b1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 29 10:33:18 2012 -0400
Windows: mark server reference offline for VOFFLINE
cm_Analyze() was not marking the cm_ServerRef_t reference to
a volume instance as srv_offline in response to a VOFFLINE error.
As a result the same volume instance is tried again and again.
Change-Id: Ic467f41e96408281e6251a796d2dfba3245bb023
Reviewed-on: http://gerrit.openafs.org/8326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c7061310b7865c635c382490703ff951c2f9af3f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 29 09:19:13 2012 -0400
Revert "Windows: Media Protected if create on RO volume"
This reverts commit f3f282265a3d9e3c968fd06793e6d1a91337f443.
Returning STATUS_MEDIA_WRITE_PROTECTED in preference to
STATUS_OBJECT_NAME_COLLISION when the file results in silent
failures by some applications (ie, Firefox.exe) when the
first directory in the path below the share name is the
root of a .readonly volume.
FIXES 131416
Change-Id: I342d9ff09ef68615371cf9d372f38fac854ed6c0
Reviewed-on: http://gerrit.openafs.org/8325
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4bc8d82d9a204b76fcf5208ded3a9a6ea917b734
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 25 11:57:22 2012 +0100
rx: MUTEX_* are no-ops when !RX_ENABLE_LOCKS
Remove any occurences of
# ifdef RX_ENABLE_LOCKS
MUTEX_ENTER(&mutex)
# endif
and similar for MUTEX_INIT, MUTEX_DESTROY and MUTEX_EXIT, as all of
these operations are no-ops when RX_ENABLE_LOCKS isn't defined.
Change-Id: Ic0f27b42d56ae4362ff095f1f08a06575c4ca2c1
Reviewed-on: http://gerrit.openafs.org/8293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f224849f29343cf634c732b1672b4e81373de872
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 25 11:49:55 2012 +0100
rx: Get rid of AFS_GLOBAL_RXLOCK_KERNEL
Get rid of the AFS_GLOBAL_RXLOCK_KERNEL #define. RX used to have a
single global lock locking mode, but none of our kernel modules use
it any more. In fact, AFS_GLOBAL_RXLOCK_KERNEL is now only defined
when RX_ENABLE_LOCKS is also defined. Simplify the code by renaming
all of the occurrences of AFS_GLOBAL_RXLOCK_KERNEL as RX_ENABLE_LOCKS,
and remove any cases where we're now doing unecessary tests
Change-Id: I061d8d364c61168370b223cdac48ad161f0c9d74
Reviewed-on: http://gerrit.openafs.org/8292
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9358e452a90c3d87f025a54e503da2b2d062dbef
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 25 11:32:03 2012 +0100
rx: Don't have 2 different protos for rxi_CheckCall
Use a single prototype for rxi_CheckCall in both the pthread and
lwp cases. Remove the #ifdef maze at the call sites, and take advantage
of the fact that MUTEX_EXIT reduces to an empty string in the lwp
case.
Change-Id: Iaa8c1b983f1c8372e9c2e1b90aaef25a2bc5f81f
Reviewed-on: http://gerrit.openafs.org/8291
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e93b6dca2f593e479499122eedef1e65452aaaac
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 25 11:27:33 2012 +0100
rx: Don't double check conn->call
We currently have
call = conn->call[channel]
if (call) {
...
} else {
call = conn->call[channel]
if (call) {
...
}
}
As we don't drop (or acquire) any locks between the first and the
second check of call, there's no way that the result can be different
from the first time we checked. So just get rid of the uneccessary
code, and reindent the following block to match.
Change-Id: If21a1d0af461fe0c0651e713dfb99a7c5f01cba4
Reviewed-on: http://gerrit.openafs.org/8290
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c00c0effd18dd508051ebc4c7c8983b800f8a973
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Oct 23 19:21:09 2012 +0100
rx: Move bytesSent + bytesRcvd into app only data
The call->bytesSent and call->bytesRcvd counters are only manipulated
by the application thread in running calls. Move them into the app-only
section of the call structure so this is clear.
Change-Id: Ib7929a8e34bcb70c8cb9c1f89544adce0d627299
Reviewed-on: http://gerrit.openafs.org/8288
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 6f8da199e5c694e0e9a90f4737a9a1618470389e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Oct 23 13:35:43 2012 +0100
rx: Don't use app-thread variable in SendXmitList
The value of call->app.mode is changed by the application thread
without taking the call lock. Instead of using this variable in
SendXmitList to determine whether the queue should be flushed, add
a new flag (RX_CALL_FLUSH) to control flushing behaviour.
As call->flags is manipulated under the call lock, its value can
be safely used by SendXmitList.
Change-Id: I8416697f457e5003af08a35ac08809512b03a9be
Reviewed-on: http://gerrit.openafs.org/8286
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ada1fc25679db5abc887fb52d30e32bb2713cae3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Oct 23 12:41:07 2012 +0100
rx: Make lock-free call data explicit
For speed, the application thread accesses a number of elements of
the call structure without holding the call lock. This is safe, as
long as the application thread is the only place in which these
items of data are accessed.
Make this distinction explicit by creating a new structure to hold
all of these fields, and include this structure within the rx_call.
This turns up one place in the code (SendXmitList) which accesses an
application private piece of data in the listener and event threads.
A forthcoming patch will fix this.
Change-Id: I7b5ffb8b5ce68a2186e37ae64461fe356a40603e
Reviewed-on: http://gerrit.openafs.org/8285
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit c584b68213aef29f9df7fc104b584e8559b7d4fe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Oct 6 17:34:52 2012 -0400
Windows: Makefile dependencies
Permit "afsrdr" and "extra" to be built without the rest of
the tree by making them depend on "config".
Change-Id: I52e484f64d02e7f9b136164e10accdc981835ec0
Reviewed-on: http://gerrit.openafs.org/8321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e9e5978a4dc3738708f23d15a3e91cee1f34a5f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 6 12:19:26 2012 -0400
Windows: Send all \\AFS\PIPE to afsd_service
Anytime there is a pipe service request, forward it to the
afsd_service.exe and permit the service to manage the request.
The prior implementation resulted in STATUS_FILE_NOT_FOUND errors
being delivered when an unexpected service was requested.
Change-Id: I2ae9c45db787c0cb422fa3fecdfb235631927415
Reviewed-on: http://gerrit.openafs.org/8320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f7148418961e3083b895c0875b15060213921e4d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 26 01:51:37 2012 -0400
Windows: Treat EIO from file server as fatal error
Return STATUS_DISK_OPERATION_FAILURE to caller when a file
server fails an RPC with EIO. Previous behavior was to retry
the request indefinitely.
Change-Id: I8fa3dbc92dda4e50e1331ad350dd697092f26985
Reviewed-on: http://gerrit.openafs.org/8319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5857dd36b2b129fd2cf187650723b896c24f5177
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 19 11:26:21 2012 -0400
Windows: ObjectInfo RefCount 0 <-> 1 transitions
When the reference count transitions from 0 <-> 1 ensure that the
ObjectInfoLock is held exclusive to prevent the current thread from
altering the state while another thread is holding the ObjectInfoLock
shared in order to conditionally perform an action based upon
the the reference count being zero.
Change-Id: I5bcf384a0ea90e4896e55b537e92112ac3791a4c
Reviewed-on: http://gerrit.openafs.org/8257
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fd7a16d5b09d963ded1fb4314632e9fb5d513b29
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 25 18:42:11 2012 -0400
Windows: PrimaryVolumeWorker ObjectInfoLock deadlock
Patchset eaad522651a81f20eac4966a55a731e0e59e39dd inadvertently
introduced a deadlock with invalidation requests from the service.
It is not safe to hold the ObjectInfoLock resource across calls
to AFSCleanupFcb(). Instead of holding the lock obtain a reference
to the ObjectInformationCB.
Change-Id: I048401ec3e432c05c8a72251ef1e32442974256d
Reviewed-on: http://gerrit.openafs.org/8308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 08d446424873c2d46b00b6d4604766051e5ba837
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 25 14:33:29 2012 -0400
Windows: AFSCleanup re-organization
Reorganize the activities of the AFSCleanup() for File FCBs
so that the Fcb Resource can be dropped prior to issuing the
cleanup request to the cache manager. The cache manager can
block for a long period of time while flushing data and holding
the Fcb resource blocks all subsequent CreateFile requests.
Change-Id: Ieaf3653ebf487670bce1043e73be093eb77a8736
Reviewed-on: http://gerrit.openafs.org/8307
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3a996b58dea74be4748446c63b7d3c4c631b1881
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 25 14:31:14 2012 -0400
Windows: AFSCleanup Flush Data decision
AFSCleanup() should instruct the cache manager to flush dirty
data when the Context Control Block indicates that the handle
being closed was opened for writing and was granted appropriate
permissions. The decision to flush should not be dependent on
the open handle count because the last handle might belong to
an authentication group that does not have write permission.
Change-Id: I4e181616f1c8eba9e4c6184e2035d9f6cbaba1d0
Reviewed-on: http://gerrit.openafs.org/8306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ea2f25372cc09c958780990f6cb8d064c7e7a0e3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 25 14:12:42 2012 -0400
Windows: buf_DirtyBuffersExist return value
buf_DirtyBuffersExist() should return 'found' not '0'.
Change-Id: I037ce37d5fc8a63f563ded196925af930434fb16
Reviewed-on: http://gerrit.openafs.org/8305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c33c678760e254e67037d62e38f6eedc139eaf6f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 22 20:40:21 2012 -0400
Windows: AFSMarkDirty() require ExtentsResource held
Instead of dynamically testing if the ExtentsResource is held
and if not acquire it within AFSMarkDirty(), simply require that
it be held. AFSMarkDirty() is only called from one location.
Change-Id: If30fc05fead4c9e0604555239e9b862659de3e8b
Reviewed-on: http://gerrit.openafs.org/8304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3c57bab34ee74b4951cf637537ff73d86986fd3e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 22 20:34:59 2012 -0400
Windows: AFSFlushExtents QueuedFlushCount leak
The FCB QueuedFlushCount was decremented in all code paths
but only incremented if the AuthGroup acquisition succeeded.
Increment the counter before the AuthGroup checks.
Change-Id: I3f58075124412cc4a7ac63dc6a7f90a91af369cf
Reviewed-on: http://gerrit.openafs.org/8303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 651cceabc3e5f939554e50437b9ed3181b6f7b1f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 22 20:29:47 2012 -0400
Windows: RDRFunction remove DebugBreak
DebugBreak hard coded into the source tree makes debugging
other unrelated issues difficult if the code path being executed
includes them. Remove them.
Change-Id: I0f55b1fbccdbac13abecb4f4e9774b23fa57678d
Reviewed-on: http://gerrit.openafs.org/8302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f869b6f8c11f859fad6e3649faf7e724e0bd1d6d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 19 09:33:18 2012 -0400
Windows: Promote DELETED from DirEntry to ObjInfo
On deletion of the DirEntry in AFSDeleteDirEntry() set the
AFS_OBJECT_FLAGS_DELETED flag on the ObjectInformation object
if and only if the AFS_DIR_ENTRY_DELETED flag was set in the
DirEntry. Setting the AFS_OBJECT_FLAGS_DELETED should not
be conditional on the ObjectInformatION ReferenceCount being
zero.
Remove the test and set of AFS_OBJECT_FLAGS_DELETED from
AFSClose() because that operation will already have been
performed in the call to AFSDeleteDirEntry() if necessary.
Change-Id: Ib52f89633e6a343b08d408ef24b067c8fae73e0f
Reviewed-on: http://gerrit.openafs.org/8256
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 89c200c5658b2605f446c393f904874d4c65a28c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 19 14:06:57 2012 +0100
opr: Clarify opr_time copyright
opr_time.h made it in to the tree without a copyright statement.
Clarify that it is BSD licensed.
Change-Id: Ifd6e3dff547337885e5e0bdc0d04e218b733ce44
Reviewed-on: http://gerrit.openafs.org/8279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit dc0441d0a2140e0d8138939cb84fc232d9e54650
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Sat Oct 20 18:24:53 2012 -0400
volser: comment with a list of all dump tags
this is a list of all the dump tags currently defined
Change-Id: Ie040f48b35ac5ec377e5d4184bcb8e47020d1d46
Reviewed-on: http://gerrit.openafs.org/8281
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit eca04c7e52d1e777cde423cdf673d7bf579c342b
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Oct 20 17:59:01 2012 +0100
Linux: Rework handling of names in the lookup functions
Rework the name lookup functions in the kernel to deal more cleanly
with the change of API for kernel 3.7
Change-Id: I1de9e02cfedbbeee31e2793c443722d4eed57705
Reviewed-on: http://gerrit.openafs.org/8278
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a550d64f8e0003e1cce538a83270b35be54f9957
Author: Magnus Ahltorp <map@kth.se>
Date: Fri Oct 19 18:12:13 2012 -0400
lwp: zero reused request blocks
new blocks are calloc()d as zeroed. reused ones are not.
zero them
FIXES 131369
Change-Id: I646c04d3d14ffc121d54e740a92803bb18f32091
Reviewed-on: http://gerrit.openafs.org/8277
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 115850076c09625e37d75da6dc29a68b0a2d638e
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Oct 19 18:31:53 2012 +0100
Linux: fix afs_putname wrapper for pre-3.7 kernels
Make the compatibility function use the right type for pre-3.7
kernels.
Change-Id: I9222a3dc5a923c97dc36f69485d9cd3ecc6810fb
Reviewed-on: http://gerrit.openafs.org/8276
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0b538f21bea758a92f2bd9f8d529e8889c4a9e63
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 16 09:36:56 2012 -0400
Windows: Remove 'bAllocatedFcb' from AFSCreate.cpp
All functions now call AFSInitFcb() and the ObjectInfo->Fcb == NULL
test is performed internally. Therefore, it is not possible for
the caller to track whether or not an Fcb was allocated. It is
irrelevant. The Fcb will be cleaned up when the ObjectInfo is
destroyed by the PrimaryVolumeWorker thread.
Change-Id: I3255563e1b0c44082e4f390002d294ad333d534f
Reviewed-on: http://gerrit.openafs.org/8242
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2bfe3653e3eec99a1199392912a4136668406212
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Oct 7 23:41:32 2012 -0400
Windows: PrimaryvolumeWorker do not pause if busy fcb
The AFSPrimaryVolumeWorkerThread should not unnecessarily block
on the FCB Resource because such blockage could be the result of
of waiiting for extents to be delivered from the service. The
AFSPrimaryVolumeWorkerThread is the primary method by which
extents are released back to the service.
AFSCleanupFcb() is modified to return STATUS_RETRY if the Fcb
resource cannot be obtained without blocking.
The AFSPrimaryVolumeWorkerThread() does not call
AFSCleanupFcb() with 'ForceFlush' parameter set to TRUE and
remembers if STATUS_RETRY is returned. If any Fcb was busy,
then the worker does not wait for the 5 second timer to fire.
Change-Id: If3eab06b902202483eb354362a4db6bc8167d0df
Reviewed-on: http://gerrit.openafs.org/8227
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dfcb68cdc82260f614b2efed2529dc7c559d1933
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 19 08:37:25 2012 -0400
Windows: avoid race set/clear ExtentsRequestComplete
The FCB ExtentsRequestComplete KEVENT setting, clearing
and testing was racy. Clear the event before issuing the
request to the service and if the request fails, set it in
case two threads issued requests for the same FCB in parallel
and one fails and the other succeeds.
We must ensure that a clear does not mask the event being set
prior to the request thread returning.
Change-Id: I6d496214a2621aeca2b9f6d2f50095ffd19b6c59
Reviewed-on: http://gerrit.openafs.org/8255
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 555412a03f18aff0d30401082ad2946a68bd7694
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 18 09:56:12 2012 -0400
Windows: clear pending delete upon deletion
During cleanup processing if the DELETE_PENDING flag is set
the service will be told to delete the file when the handle
count reaches 1. At that point the file will be deleted
and the DELETED flag will be set on the object info object.
The DELETE_PENDING flag was not being cleared which could
lead to confusion. This patchset clears the flag after deletion.
Change-Id: Ib30bb3a5c3a06b8971ac4523e6eacefaaed068ce
Reviewed-on: http://gerrit.openafs.org/8253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 05fa1202fb63e32aff3c60d47286c8af232322fe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Oct 7 10:23:19 2012 -0400
Windows: AFSInitFcb Check ObjectInfo->Fcb for NULL
Now that AFSInitFcb is called under the ObjectInfoLock, it is
once again safe to perform a test for ObjectInfo->Fcb != NULL
and return immediately if an Fcb is already assigned.
Change-Id: Id926b9ccf24c7761dbeacf42c53d7cc7d1375482
Reviewed-on: http://gerrit.openafs.org/8226
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9eb4bcfced06554d08c0f95de54f2285f48de890
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Oct 7 10:20:11 2012 -0400
Windows: Fix DV Raced Trace Message Parameters
Data Versions are logged as HighPart:LowPart not QuadPart.
Change-Id: I7cfb712060fd602a1d20ca1d4f20b892820edf89
Reviewed-on: http://gerrit.openafs.org/8225
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit eaad522651a81f20eac4966a55a731e0e59e39dd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 5 11:36:45 2012 -0400
Windows: Protect ObjectRefCnts with ObjectInfoLock
The ObjectInfoCB.ObjectReferenceCount is tested to determined
when it is safe to remove an FCB from the ObjectInfoCB. The
value must not be permitted to change while a removal is performed.
Protect AFSRemoveFcb() calls with exclusive holds of the
ObjectInfoCB.NonPagedInfo->ObjectInfoLock. New functions:
AFSObjectInfoIncrement()
AFSObjectInfoDecrement()
perform all increments and decrements while holding the
ObjectInfoLock in a Shared state.
Change-Id: If89b7668ef0a891d55b039d9516620b581c79e10
Reviewed-on: http://gerrit.openafs.org/8224
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cecd99abd3837ef820d78fb15e450c8688b0f39b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 2 21:11:01 2012 -0400
Windows: AFSPrimaryVolumeWorkerThread AFSRemoveFcb
Do not call AFSRemoveFcb() on a directory entry whose Fcb
has a non-zero use count.
Change-Id: I0d733327c094f15a7b681eb1806a4fa9a4a6c151
Reviewed-on: http://gerrit.openafs.org/8223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8827be708460eb1cbd58001d3247ed7bb160ebc8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 2 21:07:21 2012 -0400
Windows: Always AFSInitFcb and AFSRemoveFcb
Instead of comparing ObjectInfo->Fcb to NULL and conditionally
calling AFSInitFcb() or AFSRemoveFcb(), always call them and use
InterlockedExchangePointer() as the test.
Change-Id: I81915dfdfdf180c04ad2b4ff7506784a83ee8c2a
Reviewed-on: http://gerrit.openafs.org/8221
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 23c920066976ac5ede41dd799c84d97ff5174c4c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Oct 6 17:36:25 2012 -0400
Windows: AFSRequestExtentsAsync and AFSDoExtentsMapRegion
When calling AFSDoExtentsMapRegion() the FCB ExtentsResource
must be held. AFSRequestExtentsAsync() failed to hold the
ExtentsResource across the call.
Change-Id: I607cfb45725410c7f079b3be03002b002fccbea4
Reviewed-on: http://gerrit.openafs.org/8220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit edef37033cf08f7a383ef973f248d950eecd7624
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Thu Oct 18 07:32:50 2012 -0400
lwp: add shared-locked macro
we have a macro to check for write locked, add one for shared locked
Change-Id: I2cd7754fd0e725df19b37f2a2234997cb4c34d3f
Reviewed-on: http://gerrit.openafs.org/8252
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f821c7e5c82f32ad6435c56994f40e544ef69abb
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Thu Oct 18 07:28:33 2012 -0400
memcache: add extend-entry function
export directly and rewrite writevblk in terms of it
Change-Id: I181f84428158e93e9bc6008ac9226958653a9409
Reviewed-on: http://gerrit.openafs.org/8251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit df8709012b50eb0039463eeaa40b48727a4dbd7f
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Thu Oct 18 07:14:26 2012 -0400
bypasscache: update threshold variable type
if we're doing things based on size, we should allow storing
a size
Change-Id: Ibfb15c45b8b8c7a7c17154165da98c7a8518032a
Reviewed-on: http://gerrit.openafs.org/8250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5bd05894dd14bdbf845aa3f384f9d8dcac1286aa
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Thu Oct 18 07:07:21 2012 -0400
libafs: add partial background store
add a bop that does a partial store
Change-Id: I5971d2cda705a11c7fba7c0cfa54a3fa2d90f392
Reviewed-on: http://gerrit.openafs.org/8249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f6ab5cc8bd216383b8584aa05a5516862b59ab70
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 16 09:08:37 2012 -0400
Windows: Remove Fcb.Specific.File.LazyWriterThread
The LazyWriterThread should not be recorded in the FCB. It is
possible for multiple lazy writes to occur on a file in parallel
in separate threads. The value is not used for anything in any
case. AFSCommonWrite() tests the LazyWriterThread value but only
if 'bMapped' is FALSE. Since 'bMapped' is always TRUE, the
comparison is never performed. Remove the test and the value.
Change-Id: Iddbb65d2125f39f0362aba72ae20ab2666944367
Reviewed-on: http://gerrit.openafs.org/8241
Tested-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fe28a0c5966ac50fa3bccf5d98db4a3532f1e4a4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Oct 14 15:46:06 2012 -0400
Windows: Add cm_SyncOp to cm_ReadMountPoint()
Add a cm_SyncOp(CM_SCACHESYNC_FETCHDATA) call to cm_ReadMountPoint()
to prevent multiple FetchData RPCs being issued for the same
mount point at the same time.
Change-Id: I7651f4505727289d800af060cc3ff5a5f449f447
Reviewed-on: http://gerrit.openafs.org/8235
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7b1115d47019a9948c574ebad7b1323a30b16ab6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 2 21:09:35 2012 -0400
Windows: AFSInitFcb assign pFcb->ObjectInformation
In AFSInitFcb() assign pFcb->ObjectInformation before the
InterlockedExchangePointer call and not afterwards. Assigning
it afterwards leaves a small race where the ObjectInformation
value will be invalid.
Change-Id: Ie79587e0b2f161b7ff612fc4fb283135bafd1085
Reviewed-on: http://gerrit.openafs.org/8222
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7fd98901620cfb2f44f53b1d717834e39959c538
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 16 20:26:43 2012 -0400
Windows: OpenTargetDirectory AFSInitFcb Reparse Test
In AFSOpenTargetDirectory the test to determine if AFSInitFcb
allocated a FCB or returned an existing one (STATUS_REPARSE)
was reversed. If AFSInitFcb was called and AFSOpenTargetDirectory
eventually failed, an in use FCB would be freed.
Change-Id: Ie5974fee5202685575f286fe4fef43dfdc0698cb
Reviewed-on: http://gerrit.openafs.org/8244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ae10a40c5c18a7e52fb11d95b28333e312ffffce
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 5 11:40:44 2012 -0400
Windows: ObjectInformationCB indentation
Fix indentation within ObjectInformationCB structure
Change-Id: I004ca5a16fceb63522e3f244177e60e4459e507b
Reviewed-on: http://gerrit.openafs.org/8219
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1335eefeffb70b0759015d39e6732ee075537982
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Oct 6 01:40:47 2012 -0400
Windows: Do not call buf_ClearRDRFlag unlink/rmdir
When processing unlink and remdir operations initiated by the
SMB stack do not call buf_ClearRDRFlag. The redirector upon
receiving the AFS_INVALIDATE_DELETE call will cancel outstanding
extent operations, mark the FCB deleted, and tear down any held
extents.
Change-Id: I5203dbe5489fcfd0a1c871c3e7aa6aa1a7d65e9a
Reviewed-on: http://gerrit.openafs.org/8218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 816776215de17d5cf4e1f992ae27c7c1f5b5f43d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 5 20:16:35 2012 -0400
Windows: Correct alloc size SetFileExtents result
AFSFileExtentCB objects not AFSSetFileExtentsCB objects.
The latter are too large. Just wastes memory.
Change-Id: I2ffd1bfd639acc37e2d06bc61749d4ac93376668
Reviewed-on: http://gerrit.openafs.org/8217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c53220c179b06fdeb03879e8dc5e10f69bbe0a5f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 4 22:07:40 2012 -0400
Windows: AFS_INVALIDATE_DELETE must cancel IO
When processing an AFS_INVALIDATE_DELETE the redirector
must cancel any outstanding extent requests on the file
prior to tearing down the extents.
This code path is triggered either when VNOVNODE is received
from a file server or when an alternate cache manager interface
(SMB) unlinks the file.
Change-Id: I16c08c2469228b33ae4ece0e45a9890a057ab257
Reviewed-on: http://gerrit.openafs.org/8206
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 611e80ee125214be038c6d9735dca0bd0b3a7cdf
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Oct 15 12:22:03 2012 -0400
salvager: fix formatting in the rest of the Log messages
right now some not-commonly-defined code fails to compile with warnings.
fix it so it uses a format string like everything else.
Change-Id: Ib35445db9800444f3ee74a43f17aeb6f2959645a
Reviewed-on: http://gerrit.openafs.org/8236
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 170dbb3ce301329ff127bb23fb588db31439ae8d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Oct 12 10:07:22 2012 +0100
rx: Use opr queues
Modify RX so that it uses opr queues throughout, rather than the older,
non-type-safe rx_queue structure and macros. Attempt to clarify which
items in a structure are queue headers, and which are linkage pointers.
This has the knock on effect that including an RX header doesn't
automatically give you rx_queue.h in your application's namespace.
Change-Id: I1b3fbcd8c03f8153a557bd4532710bcebfe45818
Reviewed-on: http://gerrit.openafs.org/8232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit eca07c108cc61fc9a6da720848e1beb78833f670
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Oct 11 12:34:46 2012 +0100
rx: Move server queue entry structure out of rx.h
Hide the server queue management structure in its own header file,
rather than exposing it globally in rx.h. This structure has always
been private - applications have no business knowing about it!
Change-Id: I97ac31e0e77dbe1c10b2804f33901d933a8f0627
Reviewed-on: http://gerrit.openafs.org/8231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a7828d50a82384e6d0fb0ad5b5a702f768029581
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Oct 12 16:31:24 2012 -0400
libafs: Fix second pass in ShakeLooseVCaches
Commit 3105c7ff introduced a two phase process for reclaiming
vcache entries. First go through the list and do what's possible
without sleeping (skipping aliased dentries on Linux), then do
a second pass only if necessary, allowing sleeping.
Unfortunately the test for the end of the VLRU scan is incorrect
and can never trigger, so this second pass was effectively disabled
and any code that is conditional on defersleep=1 was never
exercised. The code to start the second scan also has issues.
Fix the end of VLRU test, and also correctly set the variables
needed to restart the scan.
Change-Id: I8034cd3b79aab4f2976ab2559c13c102126480d7
Reviewed-on: http://gerrit.openafs.org/8234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fa3116567e2998af73eb116751032713850c9459
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Oct 15 12:26:09 2012 -0400
Linux 3.7: putname is no longer exported
putname is unexported in kernel 3.7. Add a compatibility inline
afs_putname function and open code it if necessary.
Change-Id: I5416067566f6332d77e5d91ce2b9cf7bc0c96dce
Reviewed-on: http://gerrit.openafs.org/8237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1571e9b9f6749511534ee47b62e97674bb10c3fb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Oct 16 15:07:38 2012 +0100
rxperf: Use libtool RX library
Use the libtool built liboafs_rx.la, rather than using libafsrpc
for OpenAFS
Change-Id: Iffc32e512b6f8dd2a89bbc9774b0477236087b0c
Reviewed-on: http://gerrit.openafs.org/8243
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit df3b4ff8420b38cdc7a45757b94e9613d7a7bdfa
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 17 12:13:39 2012 +0100
rx: Export some more functions
Export some symbols that are required by rxperf
Change-Id: I12d99a9ed1c025c838a4f80ecd61aadd19d20c4c
Reviewed-on: http://gerrit.openafs.org/8245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a2877368045947ca28c29283ef03f1510d764d4d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 11 14:23:02 2012 -0500
rx: Skip rxi_CheckPeerDead if we are DALLY
DALLY connections don't need to be marked dead, so just skip the whole
function if we are DALLY.
Change-Id: I8a70c93edb54be28cfda499bc8ce3b7b5b7db600
Reviewed-on: http://gerrit.openafs.org/8120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4532e96bb96ab6424c7c00327c094f9b5b307f91
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 11 13:59:21 2012 -0500
LINUX: Ignore 'offender' in error queue processing
The 'offender' is who generated the error, possibly who sent us an
icmp packet (the given 'port' will be 0). What we want is the peer
that is actually unavailable, which is already in the 'addr' variable
we received from the recvmsg itself.
Change-Id: I930293ca14f0e13ba09ee94b5a5d9cdc0f321743
Reviewed-on: http://gerrit.openafs.org/8119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 083ec556af66c755c93f821146e06423e27cfba9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 11 12:48:14 2012 -0500
rx: Check for peer deadness in rxi_Resend
If we need to resend something, the peer we're sending to may be dead.
Check if the peer is dead in rxi_Resend, so we don't have to wait
(possibly several seconds) for the next rxi_CheckCall.
Change-Id: I0ecc0b1fc23bb4194ebadcea97dd58c938af8154
Reviewed-on: http://gerrit.openafs.org/8118
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0ac9fe184a323fef212c421b844a45838f4d6e57
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 10 16:31:01 2012 -0500
rx: Process all errors received
When we receive a buffer of errors from the error queue, loop through
all of them, and do not stop at the first applicable one we find.
Change-Id: Iad928e0489041b360fe705ac397836650b30091e
Reviewed-on: http://gerrit.openafs.org/8116
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c172d469dde64b5dfaf762c5ad52dfe842dffb02
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Tue Oct 16 09:25:03 2012 -0400
linux: always define do_handlesocketerror
even if we are not handling socket errors, have a stub function
Change-Id: I1f3c1631c5ddcf10e74612e13aafbae833bd5eaa
Reviewed-on: http://gerrit.openafs.org/8240
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 37ef85d44a3275c1f367eaa6d241cd6d602a472b
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Oct 17 18:52:41 2012 -0400
rx: pthread sendmsg should return success, not a bytecount
thanks to Marc Dionne for noticing the error
Change-Id: I6e5d8b6e3aa30cb0722aff1a9e538f23f40de441
Reviewed-on: http://gerrit.openafs.org/8246
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7c0484413d9928512b934ee92b2634444dd8ae58
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Sep 7 17:04:18 2012 -0500
LINUX: Allocate error queue buffer once
We call osi_HandleSocketError in a loop, so make sure we process all
of the errors. We were allocating a buffer to process the errors in
osi_HandleSocketError itself, but we can reuse the same buffer on
subsequent invocations, to reduce allocation/free pressure if we need
to call osi_HandleSocketError more than once. So, do that.
Change-Id: Idca2b9d21a48a868574ce6cfc5efe2efba3570a1
Reviewed-on: http://gerrit.openafs.org/8115
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cddd859d2a6a05a01c971c23dba0b43eceb6b93b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Sep 7 16:58:05 2012 -0500
rx: Process error queue after noticing errors
If errors exist in the socket error queue, we will notice by a sendmsg
or recvmsg returning an error. If we never get an error, we don't need
to check the error queue. So, only call osi_HandleSocketError after
such an error has been returned, so we can avoid unnecessarily
checking the error queue when there are no errors.
Change-Id: I7c8aaaac42728dac7fb0634538b8cc317f0e7212
Reviewed-on: http://gerrit.openafs.org/8114
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
commit 9c2612bd33e15e77dc2cdf3051fcf43bdef22496
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 15:30:11 2012 -0400
Turn on Linux rx error queue and PMTU handling
Change-Id: I17822e9463b5e34bd43e96926a168a19773b2b21
Reviewed-on: http://gerrit.openafs.org/7928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit a812d28bbf5c847812423977be1ee679cc209893
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 10 16:49:34 2012 +0100
Revert "Add some basic tests to check out fuse"
This reverts commit 94bf003a720c9a883ba7ebf43ab3053d3072d3dd.
The fuse tests are fundamentally broken as they stand:
*) They rely on files that have not been committed to the tree. To
function correctly the file fuse/conf/CellServDB must be present
*) They always run, regardless of whether the fuse helper binaries are
installed on the developers system, or even on whether the tree was
built with fuse support enabled.
*) They pass, even if fuse fails to start up
*) The file fuse.sh is committed, despite being unused. This is
particularly confusing, as it looks like this is where the tests
are performed from (its not, testing is done in dynroot-t)
*) fuse-log should be either cleaned up, or flagged as ignored in
.gitignore
Revert the commit until such time as all these issues can be fixed
Change-Id: I5ff9a95f33c0a5d0614bb47c521a8770d92fe2eb
Reviewed-on: http://gerrit.openafs.org/8230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f0a57e9de6f361ea8ab357252dbd86d516a7cb83
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 10 14:45:03 2012 +0100
tests: Reformat loopback tests
Reformat the loopback tests to match our house style - 4 spaces for
first indent, a tab for the second, and so on, opening brace of a
function on a newline, spaces around assignments, and so on.
Change-Id: I54f168ca143e7ff46c9d82289331b8314849f848
Reviewed-on: http://gerrit.openafs.org/8229
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 072828a1f5447ef64f92b2c57b8681a4e254b0f8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 10 14:42:21 2012 +0100
tests: Tidy up loopback adapter tests
Remove the unused h_errno extern, which in turn removes the need
for disabling strict prototype warnings in the Makefile
Use roken.h, instead of hardcoding system libraries
Change-Id: Ie654c77ff60ed14fc3b659fa3eb527535be71164
Reviewed-on: http://gerrit.openafs.org/8228
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 78ae01fb9837d79e7bbdb2918872ab106d4c7e98
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Oct 12 16:25:43 2012 -0400
Linux: osi_vcache: Fix loop for the hlist case
An hlist is not circular, and the end is marked by a NULL next
pointer.
Change-Id: Iec7ad7e3e7ee989d548233b045aa8def1ebfb1dc
Reviewed-on: http://gerrit.openafs.org/8233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3237543afafae7191635fd8e8cada1f95e8abcff
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 4 15:49:56 2012 -0500
DAFS: VRS_r with VOL_SALVAGE_NO_OFFLINE in attach2
One caller of VRequestSalvage_r in attach2 was not passing the
VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every
place that manually sets vp->nUsers = 0, since then the VPutVolume_r
handlers will never fire.
Change-Id: I088d93a6c598a4d636224f4cf4c0d89454efcca8
Reviewed-on: http://gerrit.openafs.org/8203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 720ff46271766ac88c704a03a5c2dfa30bcb843b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Oct 3 14:44:46 2012 -0500
sys: Split up syscall.lo 'echo's
Currently we echo a string to syscall.lo to generate it. However,
'echo' is often a shell builtin, and some shells (such as bash) do not
interpret escape codes like \n unless the -e option is given. So, this
results in syscall.lo containing a single commented line, which
results in .libs/libafsrpc_sys.a not getting created, which later on
causes errors.
Instead, just split the syscall.lo generation into separate echo
invocations, to make sure we work everywhere.
Change-Id: I8a6ed42a0837086de604be0936d830f0f4558ebf
Reviewed-on: http://gerrit.openafs.org/8202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8a9f4244dced5cacbf0daca4060fb9e0625f4a2e
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Oct 3 10:32:34 2012 -0400
afsd: consolidate macos event handling code
in order that this can potentially be extracted entirely
to a platform-specific file, (and possibly dbus-equivalents
inserted also) consolidate the macos system events handling code
Change-Id: I8fc4a96dc2590778a13f27610b383ee35626871e
Reviewed-on: http://gerrit.openafs.org/8201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0fc27471e7da0c5de4addcdec1bfbca5208072cc
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 2 14:38:20 2012 -0500
afs: Avoid tracking file locks for RO volumes
Advisory file locks for RO volumes don't make a lot of sense, since
there are no possible writes to worry about. The fileserver already
does not track these, so don't even bother processing them in the
client.
Change-Id: Ie2a20d2f7af67799cfb8d30e72aa3e52a1ecc2d5
Reviewed-on: http://gerrit.openafs.org/8197
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit be7fca06530829373149487b411611f579eae266
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Oct 3 10:27:37 2012 -0400
comerr: no need to libl on macos
libl is obsolete on macos; stop linking it
Change-Id: If6e184b6a13ccd3f6b175e9dfbfae9a595322159
Reviewed-on: http://gerrit.openafs.org/8200
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit a28b5e645a9699e30b21615bb0d3aa4876376ee0
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Oct 3 07:47:06 2012 -0400
configure: make use of native build assist tools possible
provide a way to run native rxgen, config and compile_et
Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b
Reviewed-on: http://gerrit.openafs.org/8199
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 94bf003a720c9a883ba7ebf43ab3053d3072d3dd
Author: Troy Benjegerdes <hozer@hozed.org>
Date: Sun Feb 26 22:56:06 2012 -0600
Add some basic tests to check out fuse
Update makefiles to have 'make test' and 'make check' use the
_nolibafs build version, since there are no tests that (currently)
require the AFS kernel module to be built.
Clean up fuse test copyright notice, Alphabetize configure.ac
Change-Id: Icc95dd3393cd66f0d04fa5f6e8f806db60ca031e
Reviewed-on: http://gerrit.openafs.org/8135
Reviewed-by: Troy Benjegerdes <hozer-gerrit@hozed.org>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit bb84ed0f5609ea64f75cb4188fe76d15c160f3be
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Tue Oct 2 23:42:35 2012 -0400
config: make makefile builder be a config tool also
all of our helper tools should be configured in one place,
so a cross compile can override them
Change-Id: I35044832257fa3389504f79207aa423e39d1ad4a
Reviewed-on: http://gerrit.openafs.org/8198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit eae608d99a5ae94624200f91af6ed818c9f6612b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 2 15:04:47 2012 -0500
afs: Use common cleanup code for lockctl EINVAL
afs_lockctl has common cleanup code in the 'done' label. Use it here,
instead of trying to duplicate it.
Currently this code path appears to not be dropping the discon lock,
which this rectifies.
Change-Id: I136a78bc3235454db7e3d69bb79b0061cfcab265
Reviewed-on: http://gerrit.openafs.org/8196
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5289b5bb81a90bfacbb9841ee6357c6f72358a6e
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Oct 1 10:11:22 2012 -0400
bos: convert struct bnode to use opr
Convert struct bnode to use the common linked list code from opr.
bnode_Deactivate() was converted but is unused by the code and isn't
tested.
Change-Id: I0edec453f15cf19e82088e3d361483cc5833f897
Reviewed-on: http://gerrit.openafs.org/8168
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 549a5c04ee5ac78dbfde9ec96488e2ae3d5c822d
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Oct 1 10:10:22 2012 -0400
bos: convert struct bnode_proc to use opr
Convert struct bnode_proc to use the common linked list code from opr.
Change-Id: I30753ad10387b23509be0831d378772049f4be9d
Reviewed-on: http://gerrit.openafs.org/8167
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fe32aec9d8a99db5d70440226ca4b61a78aac224
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Oct 1 10:08:36 2012 -0400
bos: convert struct bnode_type to use opr
Convert struct bnode_type to use the common linked list code from opr.
Change-Id: I21329aff81a91a79a1fcf525f4fdd3a22b33ec92
Reviewed-on: http://gerrit.openafs.org/8166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d3ed12ef497f2a98d07bbd442b866b9cdc7ceeb8
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Oct 1 09:59:09 2012 -0400
bos: split part of bnode.p.h into bnode_internal.h
Move the bosserver specific parts of bnode.p.h into bnode_internal.h
so that inclusion of bnode.h doesn't expose bosserver's internals.
Change-Id: Id58714507211331a57c36eb71c1c3937fff0dd2a
Reviewed-on: http://gerrit.openafs.org/8169
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 909639448ec803ee68f41dbacdd87eb516e0354a
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Oct 1 16:09:09 2012 -0400
generated target updates
tweak what's needed to build helper binaries for cross-compile
Change-Id: Ib476716e1e32444f0b2aeb8cb8a1e91ab49471de
Reviewed-on: http://gerrit.openafs.org/8173
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 338014a231235fe25116b09c1e8978db2db1dbb3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 1 12:03:49 2012 -0400
Windows: File Info Query Symlinks
For Symlinks, always set the Reparse Point attribute and
set the Directory attribute if the target is a directory.
Do not return the file attributes of the target.
Change-Id: I72dcde912c998e1ab3eea45426d019314e10e740
Reviewed-on: http://gerrit.openafs.org/8171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dd59f6f6114a436ae86b70cd0837e97eea18dde8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 1 11:04:23 2012 -0400
Windows: Dir Enum behavior for Symlinks / MPs
Comparisons of the behavior of cmd.exe, powershell.exe, and tcc.exe
with regards to directory enumeration show that when Symlink file
information is returned that the "reparse point" data should be
reported along with whether or not the target is a directory.
For mount points, the reparse point file information should always
be returned and the type should always be directory.
The target timestamps, file sizes, etc. should never be returned.
Change-Id: I0f899229061a282d0d218155407ffc4ab62ad377
Reviewed-on: http://gerrit.openafs.org/8170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 22d68eec6de654bdc6a8d5b005b86320a46ac8f0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 26 22:03:03 2012 -0400
Windows: Move afsredir process type check
The process type check in afsredir.sys was performed during the
Process Creation callback which is processed in the context of the
parent process which might not be the same type (32-bit or 64-bit)
as the process being created.
Change-Id: I6ae79a6dacf434a986c7bb0135b2238fcfeeb0cd
Reviewed-on: http://gerrit.openafs.org/8165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 137ea396dbbcf302bce8200e3da7d4693b464ca7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 25 13:01:53 2012 -0400
Windows: Fix memory leak SRXAFSCB_GetCellServ
In commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb strdup()
was replaced by xdr_alloc() and memcpy(). Unfortunately,
the patch was wrong and the pointer to which the result of
xdr_alloc() was assigned was overwritten with zero.
Change-Id: I0a9e6c03d67e2a1c811e84808fbbdd39f782ba87
Reviewed-on: http://gerrit.openafs.org/8162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ae8527269ca091d47a1232a0469921ba7c54f65b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 25 12:59:04 2012 -0400
Windows: duplicate ExtentsResource hold
All callers to AFSDoExtentsMapRegion() hold the ExtentsResource
so there is no need to obtain it again within the function. Instead
add an ASSERT to confirm that the resource is held.
Change-Id: Id34a3d650062d6e519a66732d248c136a92e4be3
Reviewed-on: http://gerrit.openafs.org/8161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5c348e5a9f276b45e2351e4c1adf2bafd4659484
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 25 14:32:06 2012 -0400
Windows: make static RDR_ParseIoctlPath[Parent]
The RDR_ParseIoctlPath and RDR_ParseIoctlPathParent functions
are helper functions within RDRIoctl.cpp. Make them static
and remove them from the header.
Change-Id: I5f3b68f87701e2d8423a01c236c7cb598c3ff743
Reviewed-on: http://gerrit.openafs.org/8160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1df112db3c06b6d16a027acbfe8739410630c66e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 25 14:31:11 2012 -0400
Windows: remove reqp param RDR_IoctlWrite/Read
The RDR_IoctlWrite and RDR_IoctlRead functions no longer
use the cm_req_t parameter so remove it.
Change-Id: I1c6f09da9e4a386f79dae1c15b0b2ccdce944d51
Reviewed-on: http://gerrit.openafs.org/8159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 63ded5bc452bf6cdd10db4d9e1befb9a71fad539
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 25 14:18:39 2012 -0400
Windows: add cm_req_t to RDR_ioctl_t
The cm_req_t structure flags store information related to
the source of the request and whether the process is WOW64 or not.
This information is required for proper pioctl processing. Add
a cm_req_t structure to the RDR_ioctl_t structure and initialize
it in RDR_SetupIoctl() which is called from RDR_PioctlOpen().
Change-Id: I351101f036f63bbb1f0d7b19e9b092b18a3e070e
Reviewed-on: http://gerrit.openafs.org/8158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ac97f8f5a6937398db7d1902ff6bab7adbc24f4a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 25 14:16:10 2012 -0400
Windows: Add bWow64 param to RDR_InitReq
Instead of using the pattern
RDR_InitReq(&req);
if (bWow64)
req.flags |= CM_REQ_WOW64;
add bWow64 as a parameter to RDR_InitReq().
Change-Id: I2c02683ab857c6743b46e83dc3f9defa660263d0
Reviewed-on: http://gerrit.openafs.org/8157
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c2e4112ffe44bc5c638a79f88eab0377ec992784
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Sep 23 14:03:19 2012 -0400
Windows: cm_ExpandSysName for 64-bit processes
on 64-bit Windows, only 32-bit processes have the WOW64 request
type flag set. Reverse the conditional to permit proper evaluation
of the 64-bit sysname list.
Change-Id: I0bbad7b275b836ecaff73c69afdde08e17f310a7
Reviewed-on: http://gerrit.openafs.org/8147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 72f1f345ece09b1fbd113af17c9e8e25ec9dffa5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 25 11:16:35 2012 -0500
RedHat: Avoid the DKMS escaping silliness
Depending on the version of DKMS, the current MAKE[0] variable in the
dkms.conf needs different numbers of backslashes. Commit 81a9a33e
tried to address this by changing the contents of dkms.conf depending
on whether or not we were on Fedora. However, the change occurred in
DKMS 2.2, so if someone running RHEL tries to use a newer DKMS, this
will fail.
So instead of trying to guess at the level of escaping we need, just
avoid needing to escape anything with backslashes. We can quote the
heredoc marker to avoid variable expansion inside the heredoc, we can
use a case statement instead of using backticks and local variables
and such, and we can use single quotes for the outer MAKE assignment.
With this, we should not need any backslashes when writing dkms.conf,
so we should work with any DKMS version.
Change-Id: I5484826c37da13ee383e08bbfeb473aa993e245e
Reviewed-on: http://gerrit.openafs.org/8156
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 33ca19acbd0526014da6ac7beeb91f8aa9937676
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Sep 24 15:06:10 2012 -0400
afs: casting NULL is generally unnecessary
Casting NULL shouldn't be necessary in most cases. Eliminate this
in favor of shorter lines and consistency. Function pointers, variadic
arguments should still be cast.
Change-Id: Ibcd67378556e45c2b24f7aa85a4d73c72cd88e02
Reviewed-on: http://gerrit.openafs.org/8151
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit cee87bde7c1099b526c6c14367f9351e028494c8
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 26 21:37:33 2012 -0400
viced: Remove unused gettimeofday calls
StartTime and EndTime are set with gettimeofday(), but are not
used for any calcualtions or statistics, and appear to never have
been used. There are platforms where gettimeofday is expensive,
so remove the variables and the calls.
Change-Id: I9ff8035377227cb07383ffea15b7e04f155e307f
Reviewed-on: http://gerrit.openafs.org/8164
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 100cec69fbbb911762a3424a37c8a53b299136ea
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Sat Sep 22 21:07:51 2012 -0400
TESTS: Skip the volser tests if current hostname maps to the loopback network
Change-Id: I35d16ba418d0ecd67ffbd54d564a515bf551fe8d
Reviewed-on: http://gerrit.openafs.org/8146
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a060159b95c0d29afaee1e8eac5827c7f8b40e47
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Sep 26 07:37:11 2012 -0400
auth: token jar handling should realloc correctly
instead of reallocing n+1 tokens, we would realloc 1 token
plus N bytes
Change-Id: Idb5a20b5b9becc9d48cb645bbc0bd26459220ccd
Reviewed-on: http://gerrit.openafs.org/8163
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5538633c9fc5677f2b9e0974b54153c9ccabab55
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Wed Mar 21 20:59:19 2012 -0400
afsio: add -clear and -crypt option
Allow the user to optionally not use encryption (and also allow
user to ensure that encryption is being used).
Change-Id: I3ad590e21f5139654b22c8284ea2634ce902a1b5
Reviewed-on: http://gerrit.openafs.org/8138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 54e413387391f643008b70b05dadb9545e3bc900
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Sun Sep 16 21:01:04 2012 -0400
DOXYGEN: Move the protocol and architecture docs into their own modules
Change-Id: I1021d99c2479f9157e5c5b1fef10e5d975b35f86
Reviewed-on: http://gerrit.openafs.org/8130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 10dbf19378b3d3f38b1be9387c7e9943ef219d19
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Sun Sep 16 21:00:40 2012 -0400
DOXYGEN: Add a simple index page
Change-Id: I26dde9ae732841f04799f7b6ff79a994c450400b
Reviewed-on: http://gerrit.openafs.org/8129
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d52398940d58ccdba4114a9975762f48cc24ad15
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Sep 24 20:47:00 2012 -0400
Windows: Export a few more functions to afsauthent and afsrpc
The following exports are added:
libafsauthent:
afsconf_SetExtendedCellInfo
afsconf_PickClientSecObj
afsconf_SawCell
ka_PrintBytes
ka_KeyIsZero
libafsrpc:
initialize_RXK_error_table
Those functions are referenced by the bos code.
Change-Id: I26898070c8e9dc7cac53f13c49dadf28d58457f4
Reviewed-on: http://gerrit.openafs.org/8154
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 70c4369e893d6770f0f7b243c3e840c32b5a2a2b
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Fri Sep 21 23:14:37 2012 -0400
TESTS: Add a library to check for the default loopback network
Change-Id: Id7bb92345e97309363fa5ddbff9147edf30ccd96
Reviewed-on: http://gerrit.openafs.org/8145
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 58c089e642198a210462b3bf508056b56667f879
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Sep 21 20:08:58 2012 -0400
bozo: fix typo in help text
Fix a typo for "interface" in the help text for bosserver.
Change-Id: I042fc52e46f50dd00be9fc9bf62525a0f2755dda
Reviewed-on: http://gerrit.openafs.org/8144
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
commit 94115df4352b872ae096977d9a77fad935864688
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 24 11:31:29 2012 -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.
Change-Id: I462903099426b4d2e940e749dd958e03a04f7eb1
Reviewed-on: http://gerrit.openafs.org/8149
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 179096d9b2c461f02236bbf670b46597ff2d4c3c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 24 13:03:34 2012 -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.
Change-Id: I2b8ed67f25e93f559535e40680ecab6fe7579e9c
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>
commit 1046bf7904dd323e1cd1c1788870052c315ec2a3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 30 17:10:36 2012 -0500
rx: More afspag-specific objects
For Linux, each object in the kernel module needs to be in only one
module for KBUILD_MODNAME. For AFS_RXERRQ_ENV, we pull in some
additional headers that require KBUILD_MODNAME in rx. So, just add a
few more afspag-specific rx objects.
Change-Id: I80b4a8648141856dffce6e26d5c034dffd8dd5cf
Reviewed-on: http://gerrit.openafs.org/8113
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
commit 0e68488ec1a8420511095b389a7d820b9e115f11
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 30 16:36:48 2012 -0500
rx: Do not include linux/module.h
This isn't available in userspace; we don't need it, so just don't
include it at all.
This was introduced in 9cd98379. I had thought it fixed a build
failure, but I believe now I just made a mistake during build.
Change-Id: If97d8e3204b27acd053ec021ddd8cd1527dad3c5
Reviewed-on: http://gerrit.openafs.org/8112
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 347908cd0031c558c266ec412aa49200ae2b3204
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 11 18:46:42 2012 -0500
rx: Save errno in LWP rxi_Sendmsg
Much of this code examines errno or WSAGetLastError to determine what
to do. However, some other operations between the actual sendmsg call
and code that examines errno may modify errno. So, save the value of
errno to ensure errno reflects the actual error we got from sendmsg;
this also slightly simplifies some of the logic.
Change-Id: I5a8643fce5d2e29131069743b14805bbc2428805
Reviewed-on: http://gerrit.openafs.org/8110
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 27ee85123284b77004c757fec7cd6c9af3078e05
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Sep 11 12:56:22 2012 -0500
rx: Split out rxi_NetSendError
This logic is duplicated in a couple of places. Just extract it into
its own little function for easier modification.
Change-Id: Iebcc460698beaee6f1cee4b4fb633b9a10e37213
Reviewed-on: http://gerrit.openafs.org/8109
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit a7278eb5620507cd70086582cf539b4024b46194
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 24 14:20:07 2012 -0500
doc: Fix Solaris 11 kernel module path
For Solaris 11, the module goes in drv, not fs.
Change-Id: Ib297239b845977eaf7e4cdb3edaba32db6733e12
Reviewed-on: http://gerrit.openafs.org/8152
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 5ef5cf48f3d2ba52cf5ed428728215b5b5f8d0b2
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 21 15:58:29 2012 -0400
doc: solaris x86 kernel module path
Add instructions for solaris x86 kernel module installation.
Change-Id: Ib6756f609c21867f964a4ab03af322ee4eb1526d
Reviewed-on: http://gerrit.openafs.org/8143
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit fe72b581d7c0a5285f109109ae7ed703f1d62b6f
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Sun Sep 23 19:02:19 2012 -0400
doc: fix kindle builds of documentation
Use kindlegen located by the configure stage and test for
kindlegen and dbtoepub before building in all cases.
Change-Id: Ieb46023ddf0725a2c93f96e29f942b71343d53dd
Reviewed-on: http://gerrit.openafs.org/8148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit 4f42ff3c31a16c8aea8bb76227856615e0b3ccfb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Aug 31 14:51:45 2012 -0500
Pretty make output for tsalvaged, lib[u]afs
Change-Id: I852f862c029cad60dc7871ab22367fb266314244
Reviewed-on: http://gerrit.openafs.org/8108
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 112348b4a5721a2c0585669160b7ec7d1689eb30
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 2 15:02:09 2012 -0400
doc: Add quotes to bos create in DAFS QSG section
In appendix C in the QSG, we give an example 'bos create'. The given
-cmd arguments should have quotes, or they will be interpreted as
individual arguments to 'bos create'.
Change-Id: Ie8b0a69908b3419af303716acce51e8d1e97837b
Reviewed-on: http://gerrit.openafs.org/7930
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
commit aea3c71e59ec30e84ca4e7383fd3b566ce94bbb6
Author: Rainer Toebbicke <rtb@pclella.cern.ch>
Date: Wed Sep 19 12:13:15 2012 -0400
butc: clean xbsa shutdown on control C
when we catch a control-c, do a clean shutdown
Change-Id: I8da28c28d0a238d3642f65c381c399a883d6d4b1
Reviewed-on: http://gerrit.openafs.org/8141
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ba9cc212d782678cb32167b498efa82718b60b7f
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Sep 18 20:29:06 2012 -0400
quiet build: Define NOQ version of LT_LDLIB_lwp
When the command is invoked within a case statement, we need the
"NOQ" version of RUN_LD. Add the LT_LDLIB_lwp_NOQ variant and use
it under src/sys where LT_LDLIB_lwp causes a build error.
Change-Id: I5af9c6cbbe9c3cf284d8e9aabb63d53bf5b056ea
Reviewed-on: http://gerrit.openafs.org/8140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 71a5f2965d6a6ff3113e7d2f9cab7d687b502793
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Tue Sep 18 14:46:37 2012 -0400
libuafs: enable 64 bit mode on linux
already safe and being used on other platforms; might as well
here too.
Change-Id: I1fe4c2459caaea873e5618d0b097a142dd935791
Reviewed-on: http://gerrit.openafs.org/8139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 16bd729a06f6f30b0d1a3eba925a0371569c5508
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Tue Sep 18 11:41:55 2012 -0400
libuafs: honor debug vs optimize setting from configure
OPTF should not be forced on if the user specified debugging.
side effect: use the OPTMZ setting for the platform instead
of hardcoding here.
Change-Id: Ib1cd4afebbd037938e2ee18e3bfc347b3690277b
Reviewed-on: http://gerrit.openafs.org/8136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 43db9a73a2b34217b35c9d499bf685895a9e1390
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Sep 17 23:26:12 2012 -0400
afsd: roken.h includes dirent.h; get valid dirent defines on osx
our workaround for #define KERNEL didn't work on OSX because
roken.h included dirent.h before we got the chance. cope with
it.
Change-Id: I5e580aa934cec4e99d62ba105873f71b11326e2f
Reviewed-on: http://gerrit.openafs.org/8132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 7b4d0cde3fcfb0a098b3108843dfbdefd555aa17
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Sep 17 15:00:06 2012 -0400
libuafs: use the pic version of opr for perluafs
perluafs is a shared library, therefore we need to use the PIC version
of the opr library (just like any of the other libraries that have two
flavors and get linked with perluafs).
Change-Id: I597f4f40010524d94341d343d3f54648a139f760
Reviewed-on: http://gerrit.openafs.org/8131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b52d0b50ff4a8026eb4043898d8f070f960e511d
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Sep 15 16:02:26 2012 -0400
make install fixes for libraries
Don't install several libraries that have dependencies that are
not currently installed, but install static libraries.
Fix rule for libafsauthent_pic.a to get the library from .libs
Change-Id: I746b111edf8a6d94ad98fcf235e34b4dac1eb050
Reviewed-on: http://gerrit.openafs.org/8123
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d2674bf1fd3b2bcd0111f3b60029ca3529e7d8a5
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Sep 15 13:53:06 2012 -0400
rxkad: silence unused variable warnings in v5gen.c
Sprinkle AFS_UNUSED attributes where the compiler complains
about unused variables.
Note that this file is assembled from code generated by the heimdal
source. A similar fix exists in the generator code upstream, so
when the file is re-generated in the future it should not be
necessary to re-apply this.
Change-Id: I2ef407428d90157050481d5630f6f22510d65ca3
Reviewed-on: http://gerrit.openafs.org/8122
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dca06bd10493eaea7565c42417bd0dbd0dc03b82
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Sep 16 19:54:48 2012 +0100
tests: Convert opr tests to use libtool
Avoid the problems with libopr's dependencies by just converting
the tests to use the libtool version of the opr library. While we're
at it, make the tests pthreaded too.
Change-Id: I4e570b288ea57c758c848be1d545e5ee59771ab9
Reviewed-on: http://gerrit.openafs.org/8127
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 88fc3c6f4257561d30234651fc5ec46ea62b020f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Sep 16 15:39:25 2012 +0100
Split up libtool support into LWP and pthread
Currently, the type of library you build is determined by whether
the library is build in a pthread, or an lwp build directory. However,
this prevents building an LWP library in a directory that builds
pthreaded clients and servers.
As we want to continue to provide LWP libraries for backwards
compatibility, but move over to pthreaded binaries, this causes
some issues.
So, split up the libtool logic, so we have Makefile.libtool, which
you include if you want to build a pthreaded libtool library, and
Makefile.lwptool, for building a library which supports LWP and
pthreaded use. These only affect how .lo files are built - so the
.o files used for non-library objects are managed with the
Makefile.pthread and Makefile.lwp includes as before.
Change-Id: Ib1af48342253230abab9056eb15a3f79bd77a6de
Reviewed-on: http://gerrit.openafs.org/8126
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 519f2b96c7ea84e7d78c558c6602960035e4c508
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Sep 16 17:48:08 2012 +0100
tests: Fix volser Makefile
The volser Makefile had a bad path for liboafs_util, and was still
directly pulling in some objects from the fileserver build. Fix it
so that it uses proper libraries.
Change-Id: Ic36c6a0f93c299bd04d48fa4238c4da5cbc571d4
Reviewed-on: http://gerrit.openafs.org/8125
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jason Edgecombe <jason@rampaginggeek.com>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f1b88f0713e49ed89a230364be9f12b62f2fe46b
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Sep 14 19:23:55 2012 -0400
libafsauthent: fix parallel build
Same logic as ee18ccbe - we have to avoid building libafsauthent.la
and libafsauthent_pic.la at the same time. Add a dependency to
force make to build them in sequence.
Change-Id: I4b341d7688a249e0067c3917909259c813f26717
Reviewed-on: http://gerrit.openafs.org/8121
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c4c51444ebd35fe0ceccde23512707ae693210ee
Author: Ben Kaduk <kaduk@mit.edu>
Date: Thu Sep 13 17:28:17 2012 -0400
FreeBSD major version numbers are multi-character
Do not assume that there is only a single character before the dot.
Change-Id: I45169a6faa5dbeafc4f9c57deaaad96bef8de613
Reviewed-on: http://gerrit.openafs.org/8106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 23c23592f422ec7696f92a1c7a056c408b23692b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Sep 14 11:42:56 2012 +0100
opr: Libtool archive should depend on symbol file
There should be a dependency between the libtool archive
liboafs_opr.la and the symbol map for the archive
(liboafs_opr.la.sym) so the archive is rebuilt if symbols are added
to, or removed from, the map file.
Change-Id: Ifb0cd0a8abaa4c9b476c53cf186458ec0b8f8778
Reviewed-on: http://gerrit.openafs.org/8107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f11cd3725a6a50d6e4f7b899a1fd7b7e0cc160ab
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Sep 12 10:59:16 2012 +0100
afsd: Add missing variable for Solaris
The Solaris 11 syscall code was missing a definition for the
'error' variable
Change-Id: Ia9a678435203994e1791824954d8c28c3cdefe17
Reviewed-on: http://gerrit.openafs.org/8103
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit ba043e11022e87fae3fd04fd55c223aae788463b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Sep 12 10:20:43 2012 +0100
libafs*: Don't re-export opr/util functions
On Solaris, a library can't re-export functions which come from one
of its dependencies - so libafsrpc can't easily republish the 5 opr
functions that are currently in the libafsrpc map file.
Including the bits of the opr library that define these functions
causes problems with then linking libafsrpc against libopr, which
we do in a number of places.
libafsauthent has exactly the same problem, with a few symbols that
it pulls in from util.
The affected symbols were all added relatively recently, and have
limited uses outside of the OpenAFS tree, so just remove them from
the export list so we are one step closer to building on Solaris
again.
Change-Id: If0a1105320e416ebc013ff670dddd5d247b06f6b
Reviewed-on: http://gerrit.openafs.org/8102
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit b22b1ed356d885db04c0233bc82279ef6c8f40de
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Aug 31 12:18:21 2012 +0100
Stop using libafsauthent
Change-Id: Ieead3704e3210a1d88500ad1efa15bd2cad93bf6
Reviewed-on: http://gerrit.openafs.org/8098
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 3c3d209a4f2a3efbd9fa1d3cd59e735a45a2d690
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Aug 31 11:13:06 2012 +0100
libafsauthent: Build with libtool
Construct the libafsauthent library with libtool. All libraries
contributing to libafsauthent provide a libauthent_<library>.la
convenience library, which we use libtool to combine into shared
and static versions of libafsauthent.
Change-Id: I76fa61eb027862eab730c4c86ab74a7b7e03c13b
Reviewed-on: http://gerrit.openafs.org/8097
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit acfa4865d9fbeb43dc36a84784d5efa8d05007c7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Sep 12 06:53:24 2012 +0100
opr: Add hcrypto to the library list
uuid needs hc_RAND_bytes, which means that liboafs_opr has a dependency
on hcrypto (and, until hcrypto is libtooled, on libroken as well). Make
this dependency explicit.
Change-Id: I748a43f7a2125c12b566502580e149ad1d9c1164
Reviewed-on: http://gerrit.openafs.org/8101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 630072828230bbe5bcf5ce608b5d25f2c4ba6f77
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Sep 12 06:51:08 2012 +0100
ptserver: Fix parallel builds
It's not safe to have libtool building a blah.lo at the same time as
gcc is building blah.o. A Makefile must exclusively use either the .lo
or the .o form.
Fix ptserver so that ptint.xdr.lo is the only one referenced, and just
explicitly pull in the LWP object for the ptserver.
Change-Id: I2e868d2d318c84e20bcccc0ffc462c87e4b7a2f2
Reviewed-on: http://gerrit.openafs.org/8100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit e52183033fdc83f927383ff432c9bd7e024051ba
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Aug 30 12:41:04 2012 +0100
kauth: Use libtool
Modify the kauth directory so that we use libtool to build its library.
Unlike most of our other directories, kauth has few pthreaded consumers
within the tree, so the libtool library itself is currently unused. The
libtool conversion is done as a stepping point for libafsauthent, which
does include kauth objects.
At the same time, we take the opportunity to modify kaserver so that it
uses libkauth, rather than referencing the library objects directly
Change-Id: I9d261686753b30c415f767603d44c7ce6e10eed1
Reviewed-on: http://gerrit.openafs.org/8095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1e53d5dae07635c4ceb425b394a648363c41c229
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Aug 28 20:10:04 2012 +0100
volser: Use libtool
Change-Id: Ic70476aa7258d12aafa7b06ae380012f040c65b6
Reviewed-on: http://gerrit.openafs.org/8094
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9ed998275cae289be7403717d9c6181c42196164
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Aug 28 08:18:45 2012 +0100
vlserver: Use libtool
Change-Id: I030ec62db64b6dab856d520e68d5d727cd7b8bb3
Reviewed-on: http://gerrit.openafs.org/8093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 47e7ecf8578422644186a07976dda40e45f27287
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Aug 23 22:58:20 2012 +0100
acl: Use libtool
Change-Id: I589fc4d9b12bb23a34ef9145cd699e9ea2c4f496
Reviewed-on: http://gerrit.openafs.org/8092
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 1e7de65899e3ae30b21b804606f2876fe748d8b8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Aug 23 22:18:49 2012 +0100
ptserver: Use libtool to build a pthreaded libprot
Use libtool to build a pthreaded version of libprot in src/ptserver.
Make the tptserver directory just build pthreaded versions of the
client and server, and link these against libprot
Change-Id: Idc43de8c548f38584e78b35f9f1ecba3eb4b74d2
Reviewed-on: http://gerrit.openafs.org/8091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 035a2ea4a1a26141508cf3fa5918d40b7be6fc90
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Aug 23 21:35:35 2012 +0100
ubik: Use libtool
Use libtool to build LWP and pthreaded versions of the ubik library.
Both versions are built in the src/ubik directory. src/tubik is modified
to only build pthreaded versions of the ubik test commands.
Replace use of libubik_pthread.a with the libtool generated library.
Change-Id: Id441fe00dbe801e38a108600bfbe06c292383872
Reviewed-on: http://gerrit.openafs.org/8090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit ee18ccbeeb54b76fcc3fc5952da58d1a505eef23
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Sep 10 20:49:19 2012 -0400
libafsrpc: avoid concurrent libtool
libtool gets confused if it is running two instances in the same
directory, so make sure we build libafsrpc.la and libafsrpc_pic.la
one after the other.
Change-Id: Idfd16b1f4e1efe07822a300df798bf05e2df6bcd
Reviewed-on: http://gerrit.openafs.org/8086
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit d72df5a18e0bb8bbcbf23df3e8591072f0cdb770
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Sep 11 08:59:13 2012 -0400
cmd: exit status zero from -help
Return of an exit status of zero when running commands with -help,
instead of returning an error. By general convention, and in
previous versions, tools do not not treat -help as an error.
The AFS::Command perl modules, use -help as an introspection
technique, and fail when commands run with the -help option returns
non-zero.
Change-Id: I6ecd95f6ccd07218a2657dbb4dbf1c13599159f4
Reviewed-on: http://gerrit.openafs.org/8087
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1015a097bffef8b2d56050210d47a31ad32f5858
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Aug 23 20:48:21 2012 +0100
auth: Use libtool
Use libtool to build a pthreaded version of the auth library
Change-Id: I452773e7fa159c278f5a7a7d21e77b6dd44c14bd
Reviewed-on: http://gerrit.openafs.org/8089
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9c66a1a8f38736063fbf30e55ad46acfba36d540
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Aug 22 12:59:30 2012 +0100
audit: Use libtool
Convert audit into a libtool library
Change-Id: Ie95539596deb2cda2959f5c5ab822d291c08acc0
Reviewed-on: http://gerrit.openafs.org/8088
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 95f2b8f92814bf66a1dfea9bd449f030e2300f3e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Aug 22 13:13:15 2012 +0100
Stop using libafsrpc
Instead of using libafsrpc.a in the pthreaded server directories,
use the libtool library variants instead.
Change-Id: I4cdbaf5a060b3e5aa82fb0d79535cb4fdc850bcf
Reviewed-on: http://gerrit.openafs.org/8074
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 8662592caedbcf8e065312fe142731faabe1eb77
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Mon Sep 10 11:20:26 2012 -0600
add a simple backport policy to README.GIT
This will clarify where patches should go, and who can do backports.
Change-Id: Ie3efa6522382ea0cabc5847dbc1d75d59b04a403
Reviewed-on: http://gerrit.openafs.org/8075
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4505af800206c0857245c8192710a00bdf08e51c
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Mon Sep 10 14:43:08 2012 -0400
aix: add atomic support
aix has an atomic facility. add support for it.
Change-Id: Iaf1305fbafe1c0d7f0d22f14babfbea382c0b32d
Reviewed-on: http://gerrit.openafs.org/8076
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 320f74653c24f334a28463f971fdf2064cc701ae
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Aug 22 09:46:24 2012 +0100
libafsrpc: Assemble with libtool
Use libtool to assemble the libafsrpc shared and static libraries
from objects built with libtool in each of the directories that
contribute to the library (fsint, rx, rxkad, comerr, util, rxstat,
sys and lwp).
Each source directory controls which objects are built into the shared
library by making a libafsrpc_<dir> libtool convenience directory. These
convenience directories are then merged together to produce the
libafsrpc library.
Change-Id: I330aeb8df4c237b408a298826363eea7357339ce
Reviewed-on: http://gerrit.openafs.org/8072
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 123c2ac285fb5a4968fbf4ab3a2565022d72d02a
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Sun Sep 9 21:42:09 2012 -0400
opr: build and install pic library correctly
previously we installed the same library as both the normal and pic variants.
tweak to build a pic version also.
Change-Id: I6b197d43184a9aa23aa65de663f8f5f08d486912
Reviewed-on: http://gerrit.openafs.org/8073
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9220bd4adc6cf58b29fcdae053edd3b6f0165891
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Aug 22 12:45:43 2012 +0100
Don't explicitly build and link rx_pthread.o
A number of pthreaded directories explicitly build, and link, with
rx_pthread.o, in order to be able to send RX 'dpf' debugging messages
to the server log, rather than to stderr.
However, this direct linking causes build failures on some platforms,
because we end up linking in a version of rx_pthread.o, twice and both
versions contain identical linker symbols.
As this functionality is only used for debugging, just get rid of the
additional object.
Change-Id: I6126891db2dcbc289f6a9f7b99c01d6af7a19089
Reviewed-on: http://gerrit.openafs.org/8071
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c9e89088afc5989031e54cbd15e050bc92518433
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Aug 22 09:39:59 2012 +0100
fsint: Move to using libtool
Move the fsint directory over to building a libtool library
(liboafs_fsint). Because libtool requires that libraries have no
unresolved dependencies, we cannot include the server side stubs in
the libtool library.
Change-Id: Ia3f009680ac510f522b806366985e557cd6e4219
Reviewed-on: http://gerrit.openafs.org/8070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 3f63d48dab4c46389fde6920189960c1f44494a2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 22:08:45 2012 +0100
lwp: Build a pthreaded compat library with libtool
The majority of the LWP directory isn't used by pthreaded applications.
However, there are three files - fasttime.c, lock.c and waitkey.c which
are used within pthreaded code.
Eventually, these should live somewhere other than the LWP directory.
For now, just build a small pthreaded library to hold them, so we
can finish up with the libtool work before considering how to move
this code elsewhere.
Change-Id: I66281f7cd838c048fd982bbd0f756a16a10862d1
Reviewed-on: http://gerrit.openafs.org/8069
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f29887631da6567b952c89c7cf0379f910863559
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 21:57:55 2012 +0100
rxstat: Use libtool
Change-Id: I4fd533691cf191b37c1f80038651b45efd142133
Reviewed-on: http://gerrit.openafs.org/8068
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 972c45c0833171bb401ffe6d10719f050cc0cf4b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 11:55:26 2012 +0100
rxkad: Add a libtool library
Add liboafs_rkxad.la, a libtool version of librxkad.a
Change-Id: I414dada02d202d8bdba4234f92d445b560dbb297
Reviewed-on: http://gerrit.openafs.org/8065
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 9953a23699044e9e8e5b70e83058578ba862a7cb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Sep 9 10:19:53 2012 +0100
rxkad: Use rxi_Alloc not osi_Alloc
rx exposes the rxi_Alloc function to be used for memory allocation
in security classes, not osi_Alloc which is private. Using rxi_Alloc
means that allocations are counted in the general rx statistics.
Modify rxkad so that it uses rxi_Alloc. This also restores symmetry
in the allocator - the memory that's allocated by rxkad_server is
already freed using rxi_Free in rxkad_DestroyConnection
Change-Id: I3321355f2470974d3570dd911f06ea91c21d1c9d
Reviewed-on: http://gerrit.openafs.org/8067
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 4fc7850a0c618443e3eb636ac5fe2f0e3202451b
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Sep 8 15:43:17 2012 -0400
comerr, cmd, opr: fix library install targets
Fix a couple of issues in the install targets following the libtool
changes:
- don't install liboafs_comerr or liboafs_opr, they're not ready to
be exposed to the outside world
- fix the libcmd.a install target to use INSTALL_DATA and the correct
library name
Change-Id: I2bf241cfff419d51bf170fdc871248e9b0c7ab33
Reviewed-on: http://gerrit.openafs.org/8063
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 22ee485b5d3f7d70e8326967be9b705352338c3a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 11:26:51 2012 +0100
Sys doesn't depend on auth
Nothing in sys depends on auth headers, so remove the dependency
Change-Id: Ic7d9b8e66c03f87d2de95166865d39feab8717af
Reviewed-on: http://gerrit.openafs.org/8064
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 5563ff6674ddac87265d800878774532f6fa0dae
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 11:24:47 2012 +0100
sys: Use libtool for pthreaded library
Create a pthreaded version of libsys.a, called liboafs_sys.a
On AIX, the sys library is special because it includes references to
two syscall stubs - lpioctl and lsetpag. This means that we can't link
the library with -no-undefined, as the references to these stubs are
only resolved at run time.
Change-Id: Iaae5923fe4eec7bc3f006e29df4e26e4ba8e5418
Reviewed-on: http://gerrit.openafs.org/8061
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 564fe1e32989211312ccec56c8a8407e2cceea51
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 11:08:48 2012 +0100
rx: Build libtool library
Build a pthreaded, libtool, version of librx.a called liboafs_rx.la.
librx.a remains for LWP applications to use. With this change, all RX
objects are built in both the LWP and pthread cases, so some #ifdef
guards are required to protect code that isn't relevant in a given
build.
Currently, all of our pthreaded objects use libafsrpc to get RX
functionality, so this change is fairly minimal outside of the RX
directory.
Change-Id: I8e629e2319fb1964058e70c3c0c3ed548b09b22d
Reviewed-on: http://gerrit.openafs.org/8058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit bdfe025b646036788095e39159e0566bb32007fa
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 10:26:21 2012 +0100
usd: Convert to using libtool
Turn the libusd library into a libtool object (it has no pthread/LWP
differences, and so can just become a pthreaded library), and include
it as such in butc and the volser. liboafs_usd.la is the libtool
object, libusd.a is preserved as a static object for backwards
compatibility.
Change-Id: I25c3d0f429415527fe529c3d3e5afbad9490ea45
Reviewed-on: http://gerrit.openafs.org/8057
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 012b878576a1e7632622041d656e3aada51550d9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 09:14:18 2012 +0100
util: Convert to using libtool
Create a pthreaded version of libafsutil, named liboafs_util.la,
and use this library in all of the pthreaded binaries that we build,
replacing both inclusion of libafsutil.a, and direct compliation of
pthreaded versions of the util source files.
libafsutil.a is provided for legacy LWP applications, and the
convenience library libafsutil_pic.a remains until we address the way
in which the user space cache manager is built and linked.
Change-Id: Ibdc3d6e2fe56ca6f5b882cf03991d1a2e32c62b2
Reviewed-on: http://gerrit.openafs.org/8056
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 772e957b7196a214bcb39f06e9c864c6e5a02ac5
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Fri Sep 7 16:47:43 2012 -0400
uuid: hashes are positive ints
switch to unsigned
Change-Id: I2a2dbde211d1de2c73bcf5fd0c9ef1704d0e0000
Reviewed-on: http://gerrit.openafs.org/8060
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d36be5b8be5ac248b88224606c09257efab0718e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed May 23 21:43:57 2012 +0100
cmd: Convert to using libtool
Convert the libcmd and libcmd_pic libaries to being built using
libtool. Historically, these have been built as LWP code, but they
have no LWP dependencies, and no LWP-specific code within them. So,
make cmd a pthread-only library.
In addition to the libtool library liboafs_cmd.la, we build the
legacy libcmd.a and libcmd_pic.a as convenience libraries. libcmd64.a
(a 64bit variant, used solely by kdump), remains built through
"normal" means.
Update pthreaded users of libcmd to use the new liboafs_cmd.la. For
now, non-pthreaded users are left alone.
Change-Id: Id8445949754d1942f6e8752ae182b4e6f86fe94f
Reviewed-on: http://gerrit.openafs.org/8055
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 11e0ce535d094579c58247bd6274e058fb7cd71c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Sep 7 13:51:29 2012 +0100
comerr: Fix a couple of libtool problems
The comerr libtool patch was submitted before buildbot had a chance
to verify it. Fix a couple of problems that buildbot identified:
*) On AIX liboafs_comerr needs to link against roken
*) On OpenSuSe the LWP CC command has a space in it, so needs to
be quoted before being passed in to lwptool
Change-Id: I885099f57ef670ed58d532162b1cb70316744b28
Reviewed-on: http://gerrit.openafs.org/8059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit d6d2f2845072e75cdf1e21bd5d28aba70610bce7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue May 22 08:37:08 2012 +0100
comerr: Convert to using libtool
Convert the libafs_comerr library so that it uses libtool.
comerr uses a pthread lock to protect the error tables, so it needs
to be built as both an LWP, and a pthread library (previously, we've
just built it as LWP, which is probably broken on some platforms, as
it won't define -D_REENTRANT)
libafscom_err.a remains as the LWP variant, and all pthreaded code is
modified to use the libtool liboafs_comerr.la library.
Change-Id: Id421cc97ad8681b42af7a5eb3cb512e1e1ce9a90
Reviewed-on: http://gerrit.openafs.org/8054
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 61d417c1a3770f2a53ef883f9ec2ed077184ab1d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Sep 7 11:43:21 2012 +0100
lwp: Fix stupid mistake in lock.h
My earlier change to lock.h got the sense of the opr_Verify test wrong,
so we would assert() whenever the lock call succeeded. Fix this, so
things work again.
Change-Id: I7e2fda473343c7b541d6ca120ef0977adcf35f62
Reviewed-on: http://gerrit.openafs.org/8053
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit fe2641e35b9cf540132fdba828bdc097392a899e
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Sep 6 14:27:13 2012 -0400
tests: deal with one more unsigned warning
C90 wants this unsigned hint before it will dtrt
Change-Id: Ic60b0336df7e8c4373582ffa352f4042ebc021c1
Reviewed-on: http://gerrit.openafs.org/8050
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit f230eda87f33c31a3f69fc6c83cf2e77bbecaed2
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Sep 6 14:28:04 2012 -0400
rx: initialize mutexes from globals
in order to work around stupidity from macos linker.
same fix as was needed in 0559a23d38f98280e2eb1c1e2fc91ae7a1798537
Change-Id: Idb78abd74eef45cb3c9b212647dd6722c98e0cd5
Reviewed-on: http://gerrit.openafs.org/8051
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit ef7cc7e3f50c7d443a84fbab6bf21a85e9796c5c
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Thu Sep 6 14:26:32 2012 -0400
regen: look for glibtoolize also
macos uses the g prefix to avoid conflicting with a system
tool called libtool.
Change-Id: I867f5c4aa7e7c21bf47087b05a58299e11a5b70a
Reviewed-on: http://gerrit.openafs.org/8049
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit ed0624c32e671f8ae391a61ff8b870ecde740216
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Thu Sep 6 12:24:25 2012 -0600
doc: fix examples of direct volume access
Fix the Unix examples to use ":volume" instead of "#volume", and add
a couple more examples.
Change-Id: I2e7907b128248343d99136552ab791b9bf0246ca
Reviewed-on: http://gerrit.openafs.org/8052
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit d77a99106de3ee758f532497c05a7994f96422b8
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 5 20:45:01 2012 -0400
tests/opr: fixes for the uuid-t.c tests
It's always good to have a plan.
Also, use correct mask when checking for DCE bit.
Change-Id: I4ab72aeb89efbd63d2d15fdc57aea8d2c1eb13d9
Reviewed-on: http://gerrit.openafs.org/8047
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 1f55bc7f08a2e0442e556542fece375746275d34
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 5 20:18:09 2012 -0400
tests/auth: fixes for the opr libtool changes
Add a missing line continuation backslash, and use the correct
location for libafs_opr.la
Change-Id: I52e44d36d9e1a9a0b3cd81c463f952072d4cbb48
Reviewed-on: http://gerrit.openafs.org/8045
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 0dac4de8eee84a43ef06c56dfc867c2a1b9a9f0c
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 5 20:25:55 2012 -0400
Linux: drop GLOCK before calling dput
Holding the GLOCK when calling dput can result in a deadlock when
the kernel calls back into afs_dentry_iput. It should be safe
to drop the lock here.
Change-Id: I8966aea7336b39b4c3ec265a53d820fc6135eeaf
Reviewed-on: http://gerrit.openafs.org/8046
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
commit 777e03103f5eb05012ea1f7f23624515e4ed6bb4
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 7 11:15:24 2012 -0500
tests depends on viced
Some of the tests code (specifically, that in tests/volser) depends on
objects in src/viced being build (specifically, vldbint stuff). So,
make 'tests' depend on 'viced', so they are built before we get there.
Change-Id: I572c490cf7bd6c84beb8966783c38869b371a85e
Reviewed-on: http://gerrit.openafs.org/7367
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 97dfe2b73c753bafedf8961ff4219ee4efdb350c
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Apr 17 00:39:37 2012 -0400
tests: modernize tests to compile in warning-as-errorland
the tests haven't been loved as we've been killing warnings. clean up.
Change-Id: I9c36114d3172c4a6347f5e890df6edb5caf796b4
Reviewed-on: http://gerrit.openafs.org/7232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit 35d5be2adf2456e26aa6b10935352dc19eb6b3f2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri May 18 17:55:09 2012 -0400
afs: Do not avoid DNLC if fakestat is set
Currently in afs_lookup we avoid putting an entry in the DNLC if
'force_eval' is unset, in order to avoid populating the DNLC with
mountpoint symlinks (we want the target of the mountpoint to be in
there instead, the root dir). However, if -fakestat or -fakestat-all
are enabled, 'force_eval' is always false, since we only set it to
true under certain circumstances when evaluating mountpoints.
To fix this, populate the dnlc for non-mountpoints, even if force_eval
is unset.
Change-Id: Ia2fef1bea9a08182715d587517f81074147aa4e7
Reviewed-on: http://gerrit.openafs.org/7431
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 238b88624a8fef39557d397cc336c88bd8efc5b1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Aug 21 17:03:30 2012 -0500
LINUX: Avoid symlink-y resolution limits
Implementing the d_automount or follow_link function pointers for our
directories means that we can hit symlink resolution limits during
lookup, since we look like a "symlink". We can hit these limits pretty
easily if there are just too many directories in the lookup path.
Our pseudo-symlink directories cannot contribute to an infinite
resolution loop, since our destination is always an actual directory,
not a symlink that will result in more redirection. So, decrement the
total_link_count counter when our d_automount or follow_link code is
reached, so we do not contribute to hitting the max resolution limit.
Note that this is not related to recursive symlink lookup (link_count)
but only to the iterative symlink limit (total_link_count). Our
lookups are not recursive here, and we are not causing more recursive
lookups like a normal text-based symlink would do.
Change-Id: Id6d2edd614388ac0890eb7591caec25d375964ce
Reviewed-on: http://gerrit.openafs.org/8009
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b9a10641dd75fed9bbcd27f6ddbb2b9246f25fe7
Author: Derrick Brashear <shadow@your-file-system.com>
Date: Wed Sep 5 13:41:48 2012 -0400
opr: export uuid packing routines in the kernel
these are actually kernel-safe. allow their use
Change-Id: Id0b9e21701dcdf7e43f75a5a9b240cb7579a8d7b
Reviewed-on: http://gerrit.openafs.org/8044
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d01ef1ccfb75bdb649abf5586b786bae0f3eeb1a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Aug 17 14:52:16 2012 +0100
Tidy up library includes
Tidy up the way that library inclusion is performed in the tptserver,
tvlserver and tvolserver Makefiles by splitting the library list into
common, client and server, using the appropriate list for each binary,
and removing duplicate library or object includes.
Change-Id: I5bde3f8b4105372c22984ccd486b145b434ae82e
Reviewed-on: http://gerrit.openafs.org/8042
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
commit f258e7dddeb4331d2cf4649541c1a3adfa7a416a
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Aug 27 15:11:32 2012 -0400
vos: convertROtoRW - prevent VLDB corruption
vos convertROtoRW incorrectly marks the first VLDB entry as the
new RW if the converted RO is not in the VLDB. Correct this
by creating a new valid RW site in the VLDB entry.
Change-Id: I683ac10db90c2c41717c11c0d86eadc81a935e52
Reviewed-on: http://gerrit.openafs.org/8037
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8c785b74c001e2cbfd1bafb35d2c18c55f287985
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Sep 5 09:58:12 2012 -0400
opr: add time initializer macro
add a macro that can be used to initialize an opr_time
Change-Id: Ib73fc03d8ba333a054fa073153edafb130b2292b
Reviewed-on: http://gerrit.openafs.org/8043
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 03b87dffee1383c3cd5b1fed0ac3116fd8564187
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 30 11:48:34 2012 -0400
bozo: dont lie when binding to any address
Do not log the bosserver listening to just the loopback when it is
actaully listening on any address. The loopback address is still
written to the bosserver.rxbind file in this case to give local
scripts an simple way to contact the bosserver.
Fixes the log message introduces in
commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726
Change-Id: I48f3ff5a1f9a20881df11a41baf3da29e1d02576
Reviewed-on: http://gerrit.openafs.org/8022
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dd48cd3c67cd0a6d71f6f9bea5fd34dcddeefeeb
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Sep 4 19:48:12 2012 -0400
crypto: Fix assert macro
Commit ab977738b inadvertently changed osi_Assert to opr_Assert for
kernel code, causing the kernel build to produce an unloadable
module with undefined symbols.
Change-Id: I792359974ef21db97267847dfdf6c4b17c84328a
Reviewed-on: http://gerrit.openafs.org/8039
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 50a6b047093092a72e925d143fe0d4c7587c2386
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Sep 4 17:09:00 2012 -0400
viced: Make use of unused variable
Commit c2d724dc introduced the now variable that was set but never
used. Use it in the remainder of the function where time(NULL)
appears, which was probably the intention.
Change-Id: I9cc25caf20dcfa466865c7fbf67893b022fdcc3e
Reviewed-on: http://gerrit.openafs.org/8038
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8b84d9538c83261f65cb9b6fc51c0225798571e6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon May 21 18:04:32 2012 +0100
opr: Convert to using libtool
Convert opr so that it uses libtool. For backwards compatibility we
still build libopr.a, but we do so as a static convenience library.
As libopr.a may, in the future, be converted to an LWP library, change
all of the pthreaded binaries so that they link against the libtool
library liboafs_opr.la
Change-Id: Icee04ff4745334f06ffba16df5bb07fc9dcc0b54
Reviewed-on: http://gerrit.openafs.org/8034
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit b650106e301ecefe2f5c8f4a34081af1f5f74901
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue Sep 4 09:06:44 2012 -0400
vos: convertROtoRW incorrect warning when RO not in VLDB
vos convertROtoRW will issue an incorrect warning about a partition
mismatch if the RO to convert is not in the VLDB. Only check the
partition if the RO is in the VLDB.
Change-Id: Ib2726bc5bf6697898ad26dc1d817143da3286ba3
Reviewed-on: http://gerrit.openafs.org/8036
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 69f26ece3c4545ecc9099641f7a507796fe9dc77
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon May 21 08:57:05 2012 +0100
Add libtool support
Add support for using libtool to the Unix build system to build
both pthreaded and lwp libraries. For purely pthread libraries,
this just provides convenience macros to invoke the standard GNU
libtool from the OpenAFS build system. For libraries that have
lwp variants, we provide an initial wrapper script - lwptool,
which handles building a non-PIC LWP object before asking libtool
to build the pthread variants.
For a given source example.c, example.o is the non-PIC pthread
object, .libs/example.o is the PIC pthread object, and
.lwp/example.o is the LWP object.
To use libtool for a particular library directory, add the line
include @TOP_OBJDIR@/src/config/Makefile.libtool
to the file's preamble. Makefile.pthread, or Makefile.lwp should be
included as normal to indicate whether the libraries in this Makefile
are pthread only, or should be built for both pthread and LWP objects.
The variables LT_current, LT_revision and LT_age may be used to control
the version of the shared objects produced. They have the same meaning
as that documented in the Versioning section of the libtool manual.
The LT_objs variable should be set to a space separated list of the .lo
objects included in the library. Note that there should _never_ be a
dependency on the .o form of these objects in the Makefile, as this
breaks parallel builds.
LT_deps is a list of the libtool dependencies of the library, and
LT_libs is a list of the external (non-OpenAFS) library dependencies.
A file called <libraryname>.sym should be created which contains a
newline seperated list of all of the symbols exported from this
library.
LWP library names remain the same as always. To distinguish the
pthreaded static and shared libraries these
LWP libraries should be linked using
libexample.a: $(LT_objs)
$(LTLWP_LDLIB) $(LT_objs)
Shared libraries should be linked using
libexample.la: $(LT_objs) $(LT_deps)
(note that the pattern rules in the included Makefile take care of the
build rule here)
If necessary, static convenience libraries can be produced using:
libconvenience.a: $(LT_objs)
$(LTLWP_LDLIB_static) $(LT_objs)
PIC convenience libaries can be linked using:
libconvenience_pic.a: $(LT_objs)
$(LTLWP_LDLIB_pic) $(LT_objs)
Libtool libraries should be installed using the $(LT_INSTALL_DATA) macro
Binaries linking agains libtool libraries should be linked using the
$(LT_LDRULE) or $(LT_LRDULE_static) options, with library paths in the
built locations relative to the top of the tree. For example
example_test: example_test.o $(top_builddir)/src/example/libexample.la
$(LT_LDRULE) example_test.o \
$(top_builddir)/src/example/libexample.la
Change-Id: I32b162e8443119e8115febc532c5b5a0ec8fed32
Reviewed-on: http://gerrit.openafs.org/8033
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0b31aba6a6aa9440bfa4e957d6e90cd6ae3c8b16
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Aug 22 09:31:03 2012 +0100
util: Don't use rx-internal locking macros
The MUTEX_INIT, MUTEX_ENTER, MUTEX_EXIT and MUTEX_DESTROY macros
are intended for RX internal use only (they're an abstraction
interface so that the same locking code can be used in userspace and
in the kernel). They aren't appropriate for general purpose use.
Just use pthread calls directly for the serverLog locks.
Change-Id: I8373eaa097c36f7d3a4c9b0501fc5e897372582e
Reviewed-on: http://gerrit.openafs.org/8031
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7b1af325f12acc61cffd78b1b5ba580940c9b610
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jul 10 13:50:03 2011 +0100
lwp: Don't depend on RX locking macros
The lwp library should be independent of RX (in fact, bits of it are
a dependency for RX). So, LWP cannot use the MUTEX_ENTER, CV_WAIT, and
so on macros that RX defines.
Just implement these natively within the pthreaded bits of lock.c to
remove the dependency.
Change-Id: I4cdb8313e791f253e84bbc4e256087e46a4c59bd
Reviewed-on: http://gerrit.openafs.org/5396
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ab977738b1542bee2dd780285ec90ebeebdc32c1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Sep 7 14:59:17 2011 +0100
Further rationalise our usage of assert()
This patch futher improves our usage of assert() and friends. The
intention is to bring clarity to which forms of assert are used in
which situations, and to solve the problem of assert(X), or
osi_Assert(X) being used in a situation where X has side-effects.
It introduces two new assertion macros opr_Assert() and opr_Verify(),
and clarifies the usage of osi_Assert() and assert().
*) opr_Assert is a direct equivalent of assert(), with the exception
that its output can be redirected to a log file when used in server
code. It is the preferred version of assert for libraries, and server
side code. Note that whilst opr_Assert doesn't currently become a
no-op when NDEBUG is defined, the intention is that it will do so at
some point in the future.
*) opr_Verify(X) asserts if the value of X is false. Unlike assert()
it will always run X, regardless of whether the value is checked or
not. The eventual intention is that when NDEBUG is defined,
opr_Verify(X) => X
*) osi_Assert is an assertion macro intended for use in kernel code,
or in mixed kernel/userland code. When code is built for userspace,
osi_Assert(X) => opr_Assert(X)
*) assert is the system's own assert macro. It should only be used
in client code. Whilst a header (opr_assert.h) is provided to map
assert() to opr_Assert(), its use is discouraged
Change-Id: Ie6d61305686bdc7193cc8690e6f4fbe363211faf
Reviewed-on: http://gerrit.openafs.org/5395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 04c750b2fe3879126054f92804b37ad3b1b6340c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 09:12:13 2012 +0100
lwp: Fast time doesn't need util
With the rise of roken, the fasttime file no longer depends on util
Change-Id: I2a1391d13bb39321666889dcfc2fbf43b181c749
Reviewed-on: http://gerrit.openafs.org/8030
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c2d724dc5b849340f37bb2af9d3f139c72903621
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 24 10:55:07 2012 +0100
viced: Don't use fasttime
For pthreaded builds, the FT_ routines are just wrappers around
gettimeofday() and time(). As viced is now an entirely pthreaded
directory, improve readibility, and reduce our dependencies, by
just calling the operating system routines directly.
Change-Id: I3812ac31bc5eb7d2fcbe47d037d4af3d489d3b81
Reviewed-on: http://gerrit.openafs.org/8029
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 14141123da0c098fc168772277b14f114bf4af5d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Sep 4 12:33:02 2012 +0100
Fix aliasing problems in tptserver
Commit f2db78a346112f5320efc6f0b6b9fe4ae0d893d3 disabled strict
aliasing for ptutils.c and ptprocs.c when built in the ptserver
directory. Similarly disable aliasing checks for these files when
built in the tptserver directory.
This doesn't actually fix the significant problems with these files,
but doing so is going to require completely reworking the way that
supergroups is implemented, so just disable these optimisations in
the compiler for now.
Change-Id: I6857ba83238a2c98a6540c795426f1a4038b70b3
Reviewed-on: http://gerrit.openafs.org/8035
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e9e9719bba91ebc6a1362c6613552a70353aec29
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun May 20 17:43:10 2012 +0100
log: Relocate pagsh
Move the pagsh utility out of sys, and into log. This moves it closer
to other token and PAG related utilities, and resolves a circular
dependency between sys and auth.
Change-Id: Ibbbfc0e3bebc9ecb70f05b137e10e65ff9e4aff6
Reviewed-on: http://gerrit.openafs.org/8028
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1e76c59ea52b35f4d478fdbe85456160b1e9f8ec
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun May 20 12:57:00 2012 +0100
auth: Relocate NetRestrict support functions
Pull the NetRestrict and NetInfo support functions out of libutil,
and into libauth. This starts to concentrate all of our configuration
file parsing functions into the same place.
It also gets rid of a circular dependency. NetRestrict parsing relies
on functions from rx, so with this in libutil, we had the dependency
chain util->rx->util
Change-Id: I250d4d8264da8db61f603a06d1b7fdab44384cd3
Reviewed-on: http://gerrit.openafs.org/8027
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6705646e8d6d12c165a159ca7b1318e2fd92a085
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat May 19 20:36:12 2012 +0100
Use rk_rename from roken
Rather than using our own renamefile() implementation on Windows,
pull in rk_rename() from libroken wherever a rename which unlinks
the destination file is required.
Change-Id: Ied8ac26b90a0983283b02704328da123bdd4f4b2
Reviewed-on: http://gerrit.openafs.org/8026
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8ab7e73fe2933aa3910b94fe28f6adf3e5c214fd
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Fri Aug 31 13:14:51 2012 +0100
Import of code from heimdal
This commit updates the code imported from heimdal to
4a438db29d361b7e5f47b86ced1482a96cde86ea (switch-from-svn-to-git-3008-g4a438db)
New files are:
roken/rename.c
Change-Id: Ib32975e9ec7f3d6abf5557cfd37fb40f248d00f0
Reviewed-on: http://gerrit.openafs.org/8025
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7c26b43413d08c732c017c28503b5635f0e45be2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat May 19 20:29:00 2012 +0100
roken: Add rename.c to list of imported files
Change-Id: I835bf47625b7f0b3e025df4388416d88f3c52506
Reviewed-on: http://gerrit.openafs.org/8024
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 81c172343c17644a496dbe0d2ab48b7925c11cb4
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Aug 31 08:09:31 2012 -0400
update libafsdep to include external without being in 3rd party dirs
everything below src/external is managed out of other trees,
put our libafsdep at the top
Change-Id: I5f8e37afca30934f2f7befb17d1b19f4e3d12601
Reviewed-on: http://gerrit.openafs.org/8023
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e5ba359f64b5d8d874a31a50694398c17f27cfa1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 29 14:14:39 2012 -0500
LINUX: Detect non-vectorized aio functions
In kernels before 027445c3, the functions generic_file_aio_read and
generic_file_aio_write, as well as the fs operations aio_read and
aio_write, do not deal with iovecs but rather just use a single
buffer. Detect this, so our aio_read and aio_write implementations
have the correct signatures.
This removes several warnings on such kernels.
Change-Id: I70aa0d43bac5545d83710806b58f36d13d7f6cc8
Reviewed-on: http://gerrit.openafs.org/8020
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5daa08ea263b2a82b4a85abd61d72d4d1f48bbb6
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Aug 17 13:25:17 2012 -0400
LINUX: make d_automount work properly on rhel5 kernels
Recent centos/rhel 5 kernels (2.6.18-308.*) started providing the
d_automount operation, but renamed the DCACHE_NEED_AUTOMOUNT flag to
DMANAGED_AUTOMOUNT.
Change-Id: I74811f8967d52ce482316b110e9dd616a4869a7f
Reviewed-on: http://gerrit.openafs.org/8006
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 74c1881dff1593f4a8920ba8d8a2400760899fa5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 29 11:39:01 2012 -0500
LINUX: Use struct vfs_path on RHEL5
Some revisions of the kernel from RHEL5 (2.6.18-308.* and possibly
others) renamed 'struct path' to 'struct vfs_path'. So, use
'struct vfs_path' when it exists.
This introduces the afs_linux_path_t typedef, which is defined as
either a struct path, or struct vfs_path.
Change-Id: I88c31125dbc1ab2998a521e3c57ed532bf2d5bb7
Reviewed-on: http://gerrit.openafs.org/8019
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f87d49cd17fbf6aa9465faadac823ed8d0510a16
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 30 08:06:33 2012 -0400
autoconf: add AC_CHECK_LINUX_TYPE macro
add a macro which looks for a given type in a given linux kernel
header file
Change-Id: Id3b0bcf65241c635f0109ed370b3079da8cd5656
Reviewed-on: http://gerrit.openafs.org/8021
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 911f751d1edfb18ddd5f6a699746ba14730d553d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Aug 15 17:19:07 2012 -0400
vldb_check: fix cross-linked mh entries
When run with -fix, consolidate server numbers in vl entries which
point to the same multi-homed entry. Use the lowest server number
from the set of server numbers which point to the same multi-homed
entry.
Remove unreferenced address entries which are duplicate multi-homed
indexes.
Two passes of vldb_check -fix may be required; first to fix the
vl entry server numbers; then to remove the duplicate address
entries.
Change-Id: I794cec4c176e8aab98a236a9700f58b1269a99bb
Reviewed-on: http://gerrit.openafs.org/7999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 579048cb1ec24b09a869928ceb521c8db4201a43
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 29 11:34:06 2012 -0500
LINUX: Indent osi_machdep.h maze
This one isn't so bad, actually, but it still benefits from some
indentation.
Change-Id: I08de26df7da79dfa506f033e0b8bc1d33cad441b
Reviewed-on: http://gerrit.openafs.org/8018
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 87df877ae26405206c9157197d1f65974b4b4587
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Aug 24 15:04:40 2012 -0400
libafs: actually set hasno64bit flag
if we're starting a 64 bit data op, we should also end it,
and vice versa.
Change-Id: I1edef140f0c96d73f87759a80318a004196f22d5
Reviewed-on: http://gerrit.openafs.org/8013
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c2b13458498e8c27aa6eb1f2a777cf9bfe4488df
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Fri Aug 24 05:18:31 2012 +0200
out-of-tree-build: extend configuration,
namely libafsdep-files and configure-libafs.ac
so that building the kernel-module on linux in a separate
obj-directory works.
Change-Id: Ie1664aa161fade012df7d23367eb7876912448e3
Reviewed-on: http://gerrit.openafs.org/8012
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3c489db55811dfe3fdf5e555bf229989e5b58aa6
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Mon Aug 20 17:39:06 2012 -0400
vos: convertROtoRW susceptible to VLDB changes during override prompt
vos convertROtoRW obtains a VLDB entry, then peforms some setup logic
(including a possible user prompt) before obtaining a volume lock.
This exposes the code to possible time-of-check/time-of-use issues.
After obtaining the volume lock, get a second copy of the VLDB entry
and compare it to the first copy; if it has changed, fail the conversion
with an error message asking the user to re-issue the vos convertROtoRW
command.
Change-Id: I9c1a634cea2e22188869d54b00b7831aed12b1cd
Reviewed-on: http://gerrit.openafs.org/8008
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 185699e631ec3548bb6d1e68302d4a652632d3e6
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Wed Aug 22 16:39:13 2012 +0200
fileserver: add volume number to error-messages
in physio. If things go wrong in ReallyRead() or
ReallyWrite(), the admin would like to know which
volume to salvage.
Change-Id: Ic822412fec56ac5bb68f04d80713d94cbf977e71
Reviewed-on: http://gerrit.openafs.org/8010
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8b6926e43f31a30a95e5883fd4b9e72924b3371d
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Aug 14 19:37:00 2012 -0400
Linux: include kthread.h before afs includes
We need to include kthread.h before the afs standard includes
to avoid clashing with the printf -> printk mapping.
Change-Id: I965916515bd14a5a08b0f280cf8e7f9935d8aa50
Reviewed-on: http://gerrit.openafs.org/7988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ec48dca871ef98adb69792a34047c6be5818f1b2
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Aug 14 18:26:24 2012 -0400
Linux 3.6: lookup inode operation API change
The nameidata argument is replaced with an unsigned int flags
argument.
Change-Id: Ife07bb50ae7d747bd6256ea8238c4e19dbb5ee3f
Reviewed-on: http://gerrit.openafs.org/7987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7413cd09a53f89882a46fd100bf6c501348f2188
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Aug 14 18:08:51 2012 -0400
Linux 3.6: revalidate dentry op API change
The nameidata argument is dropped, replaced by an unsigned flags
value. The configure test is very specific; kernels with the
older API with a signed int flags value should fall through.
Change-Id: I5939b089b023fe81e3824ac3f920c4b6a261d39a
Reviewed-on: http://gerrit.openafs.org/7986
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 020e32779c103817ca89caa51259fb53bc3dde79
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Aug 14 17:28:50 2012 -0400
Linux 3.6: create inode operation API change
The nameidata argument is dropped and a flag is added.
Change-Id: I33692fc506e7eb9b8935a27ff3d10b713dfa6e5e
Reviewed-on: http://gerrit.openafs.org/7985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c633a92a1bc7881f18ee641082ff2efe7da1a8cb
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Aug 14 17:11:08 2012 -0400
Linux: fix variable used to test for the iop create API
Use correct variable when testing for the create API to use.
This is just for looks - there is no effect since mkdir and create
were changed in the same kernel release.
Change-Id: I9e43cc80d3817ee8a6c339c4ae98a1a2ab0851a1
Reviewed-on: http://gerrit.openafs.org/7984
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6bea047fb404bde828c6358ae06f7941aa2bc959
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Aug 13 21:55:25 2012 -0400
Linux 3.6: d_alias and i_dentry are now hlists
The d_alias pointer is now the head of an hlist. This means the
iterator is a different macro and has no "reverse" version since
hlists have no direct pointer to the list tail.
inode->i_dentry gets the same treatment. Adjust where we use it.
Change-Id: Ibcdd8ab6f8a571a8f94c646949ebe0503f075574
Reviewed-on: http://gerrit.openafs.org/7983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8766a65e97eb90cb6c97ccd35181c441ece14f8a
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Aug 13 21:36:15 2012 -0400
Linux 3.6: dentry_open API change
dentry_open now takes a path argument that combines the dentry and
the vfsmount pointers.
Add a configure test and a new compat inline function to keep things
cleaner in the main source file.
Change-Id: Ia29422d60d438cf4c795840566d4610649aa1f10
Reviewed-on: http://gerrit.openafs.org/7982
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 049c485b4a39ba510035788b4959d839ef668c55
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Aug 14 16:34:42 2012 -0400
Linux 3.6: kmap_atomic API change
kmap_atomic no longer requires a KM_TYPE argument. Test for this
and adjust the affected code.
Change-Id: I3a9e0018124d40be51cc509ac00d9250a5e8e76d
Reviewed-on: http://gerrit.openafs.org/7981
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0a8256a26fafb490b454f2a857b0c15d859572c5
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Aug 13 20:32:08 2012 -0400
Linux: bypass: consolidate copy_page macros into a single function
The copy_page(s) macros are very similar; combine them into a
single function that can be used for all cases.
This will make it easier to add some pre-processor logic around
the kmap_atomic calls to adapt to Linux API changes.
Change-Id: I6daf7cb8ce49b743cc1b4532da91d9625a90d0ca
Reviewed-on: http://gerrit.openafs.org/7980
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bf1131fd33e71a18a0aef1cb21038144286fd28a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 16 18:04:22 2012 -0400
vos: use the roken max macro
Use the max macro provided by roken. Fixes builds on
solaris.
Change-Id: Id429fe816284a1017082054e02a830a2a952c26b
Reviewed-on: http://gerrit.openafs.org/8004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 99238baed75205fd7a1885ed6b8fc8505d4faf95
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Thu Aug 16 17:26:07 2012 -0400
Import of code from heimdal
This commit updates the code imported from heimdal to
4a438db29d361b7e5f47b86ced1482a96cde86ea (switch-from-svn-to-git-3008-g4a438db)
Upstream changes are:
Michael Meffie (1):
drop __restrict some more, to please old compilers
Change-Id: Ibe62c9abd661793d11f379c13cc3b93f198a1e8d
Reviewed-on: http://gerrit.openafs.org/8003
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6e2dd6e65cae4157538c29fb4362da4d15406b0e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Aug 15 00:53:21 2012 -0400
Windows: disable short names on Win7 and 2008 R2
After listening to a presentation from Microsoft's file system
team and speaking with anti-virus vendors, it is not only safe
to disable ShortNames on non-boot volumes in Win7 and 2008 R2
but it is a definite win for performance, stability and security
of the system.
Change-Id: I706a8a17b0ae76189aeebaf254c8c70739d12f09
Reviewed-on: http://gerrit.openafs.org/7989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a72c9bc861cb47d956b80fd81dde59b6f4c13ea0
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Mon Jul 30 22:16:40 2012 -0400
afs_server: afs_SetServerPrefs() can never be called with null
The one and only call site never calls afs_SetServerPrefs() with a
null pointer, and some but not all of the paths through the #ifdefs
assume this. Remove code that checks for this; it confuses both
humans and the static analyzer.
Change-Id: Ie3f7319cebde9ec3078af2defcebb80692aa95f2
Reviewed-on: http://gerrit.openafs.org/7912
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3bb8e4c396d8894c7c0f71f121f5844f940516bf
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jul 17 17:20:13 2012 +0100
opr: Add opr_jhash_opaque
Add a function which can be used to obtain a hash of an arbitrary
opaque string of arbitrary length
Change-Id: I9e6aa29fa06a54976b81eda399c8838b73007962
Reviewed-on: http://gerrit.openafs.org/7978
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit beb8f07496f59a19621bb0db14b401107888de35
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jul 28 13:17:55 2012 -0400
vlserver: use the logging function to log
Use the logging function to log instead of printf.
Change-Id: I377474881830152c93122bd3112e355ab5fd56ad
Reviewed-on: http://gerrit.openafs.org/7895
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6f6bfb31acb0cfbe166d4df9f06a12bbdec0f496
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jul 17 16:50:59 2012 +0100
opr: Add UUID handling functions
Add a set of functions to the opr library to handle creating and
manipulating UUIDs.
The opr_uuid_t type is held as a 16 octet character string, which
comprises the UUID encoded into network byte order. This is the
primary form for manipulating UUIDs with this library, as it avoids
any nbo/hbo problems.
For applications which require raw access to the UUID components,
the opr_uuid_unpacked structure is provided, and
opr_uuid_pack/opr_uuid_unpack can be used to convert to and from
this format.
Finally, functions to print the UUID as a string, and parse a UUID
from a string, are provided. When printing, we use the standard UUID
format of 000000-0000-0000-0000-00000000. However, the afsUUID library
used to print UUIDs as 000000-0000-0000-00-00-00000000, so we also
accept this format.
Change-Id: I78ef79b7ab8ae15fb955c6495118722875c94f8d
Reviewed-on: http://gerrit.openafs.org/7977
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b251b4057252163f3fad640cb5574c8dea9babc3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jul 17 17:15:15 2012 +0100
opr: Convert jhash to use AFS types
Convert the jhash.h header so that it uses afs types (afs_uint32)
rather than stdint types (uint32_t), so that we can use it in kernel
Change-Id: I65138c7d1ab8d22c71b3f1722b334dcb20c9b204
Reviewed-on: http://gerrit.openafs.org/7976
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 575d92b96cdd13b6935e7b5183f90a6d357d5b15
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jul 17 17:12:51 2012 +0100
hcrypto: Export hc_RAND_bytes
Export the RAND_bytes function from hcrypto, so that we can have
access to hcrypto's random number generator from generic code.
Change-Id: Ie46bdf0b7818b10f0311ae3029c27a15382ffd7a
Reviewed-on: http://gerrit.openafs.org/7975
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2758aa7171063ac9a3c9943ad04115d21dfd8cb4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Jul 9 10:27:17 2012 +0100
rx: Add the add_and_read function to our atomics
Add rx_atomic_add_and_read, which lets us get the new value out
of an atomic addition operation.
Change-Id: If74b1357390329b8c59042d3154491a103fe0d6c
Reviewed-on: http://gerrit.openafs.org/7974
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b440d8ffcbb0ac58ecaa34a9c60fe27a0fc91026
Author: Tom Keiser <tkeiser@sinenomine.net>
Date: Tue Apr 10 16:26:42 2012 -0400
libafs: use kthread_run when available
Use the kthread_run interface on linux to create kernel
threads. This interface allows all the cpus to schedule
afsd threads, instead of just inheriting the cpu affinity of
the main afsd thread.
Written by Tom Keiser.
Change-Id: I69eb852d168bd85e9aa7ec075013c0346207dbcf
Reviewed-on: http://gerrit.openafs.org/7915
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 355b8c73ed5adc5c182cf29561cc360ef4674f9e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jul 28 11:37:59 2012 -0400
vlserver: fix vldb header initialization
Avoid creating new vldb files with zeroed header data.
The code path is as follows; The call to Init_VLdbase makes several
passes. On the first pass, the header is found to be empty, and so a
write lock is obtained on the second pass. On this second pass,
UpdateCache creates a newly initialized header and writes it to the
db. The rd_cheader is set to the newly created header data, and the
wr_cheader is still cleared at this point.
When the transaction on the second pass ended in Init_VLdbase, the
data is committed and vlsynccache() is called. In this call to
vlsynccache(), the cleared write header buffer (wr_cheader) is
copied over the newly initialized rd_cheader buffer. Init_VLdbase
then returns to the caller, and if the caller writes to the db, the
header on disk is then cleared.
Instead of initializing the read header buffer when rebuilding the
db header, initialize the write header buffer. When the ubik
transaction is ended, the call to vlsynccache() updates the contents
of the read header buffer with contents of the new/rebuilt header.
This error was introduced with commits:
a0f416e3504929b304fefb5ca65e2d6a254ade2e
1f532d099b8b084d43dd0140890448464325b602
Change-Id: If9c178bf28c55c50311554b12ffff9404785d052
Reviewed-on: http://gerrit.openafs.org/7894
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit fdd3b0fb1f8e6948c651d7f1822d17a78668e5ff
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 28 17:12:24 2012 -0400
vldb_check: remove unreferenced mh entries with -fix
When running vldb_check with -fix, clear any mh extent entries which
are set but are not referenced by an address entry in the
IpMappedAddr table. These unreferenced entries already generated a
warning. This commit adds the feature to clear the unreferenced mh
entries using vldb_check -fix option.
Change-Id: I941d714c825d7990083ecd15fd7bd9cd3b5917b3
Reviewed-on: http://gerrit.openafs.org/7616
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 08e803bce3375bb69a01715b026d844b7a8e0ab3
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Jun 29 18:10:31 2012 -0400
vldb_check: warn about cross-linked mh entries
Warn if an mh extent entry is referenced by more than one server
number in the IpMappedAddr table.
The serveraddr table is used to determine which server numbers have
IP addresses. If, for some reason, multiple server numbers
reference the same mh entry, currently, the correct serveraddr value
is calculated only for the lowest server number in the set of server
numbers which reference the same mh entry. Handle this case, and
warn about the duplicated values in the IpMappedAddr table.
Warn about IpMappedAddr entries which reference non-existent mh
blocks.
Change-Id: Ife5bb44747fff922ae6536edbfd95d0fb98c303b
Reviewed-on: http://gerrit.openafs.org/7615
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit aaa1844b8f806513661d16c6429d4d1b890471f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Aug 13 17:56:02 2012 -0400
Windows: AFSProcessUserFsRequest NULL dereference
Protect against an Irp with a NULL FsContext2 field.
These represent Irps that are not intended for our device
since they do not have an AFSCcb associated with it.
Change-Id: I2cf6b60e022df5074482544ef3142374149e38d6
Reviewed-on: http://gerrit.openafs.org/7971
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 165c9e7465378f26db546c5f78fc4eeca0ba094a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Aug 12 22:51:54 2012 -0400
Windows: reset volume NOEXIST flag
In response to fs checkvolumes the NOEXIST flag should be reset.
It should also be reset if the volume location update fails
because of a commumicaton (or other) error with the VLDB server.
The volume's lastUpdateTime is refreshed on error.
Change-Id: I0bb5e61b9eb8a9613d47a32acda35b79aa71c293
Reviewed-on: http://gerrit.openafs.org/7969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 69fd66abe7465e605c4b1460298514c3638c7864
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Aug 2 21:13:45 2012 -0700
Windows: sdk install missing headers
Change-Id: Ifda4df6b736ca70e2cbe56e9d789436066c12bdb
Reviewed-on: http://gerrit.openafs.org/7933
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5a707645b7d14f37f3d7fd8d06685f3940631a44
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Aug 2 21:12:25 2012 -0700
Windows: remove sdk sample token.c
The sdk sample is no longer applicable.
Change-Id: I9ab240429c73fece70f62f6ebc8ed284aa0071ac
Reviewed-on: http://gerrit.openafs.org/7932
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b10a0af8b3a88c4170403679b9c179258a225abe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Aug 10 18:04:49 2012 -0400
Windows: document command prompt lnk limitation
Command Prompt shortcuts cannot be used when stored in AFS.
Change-Id: I5e26d92bbcaac8708eb8deb8d06164ef65308230
Reviewed-on: http://gerrit.openafs.org/7955
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ecb3568210777fab98c51811aecaa1d2a085bc0b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Aug 8 16:42:47 2012 -0400
Windows: Freelance Discovery configuration
Add new "FreelanceDiscovery" configuration option to permit
Freelance dynroot mode to be used without the automatic discovery
of cells and generation of mount points.
Change-Id: I5520c3b3e2388b984c7120212d4f0167dc2f2bc3
Reviewed-on: http://gerrit.openafs.org/7950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit b48d45006cdfe1734935f54277c0bc27459a404e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Aug 8 13:54:48 2012 -0400
Windows: disable short names on Windows 8
Add "ShortNames" option to control whether 8.3 compatible short
names are generated for objects stored in AFS. Set the default
to on for all operating systems prior to Windows 8 and Server 2012.
Change-Id: I27b4631334e2739da5c6485b49efa3ae12d880a9
Reviewed-on: http://gerrit.openafs.org/7949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 1d2a050e99e1feb9a5cee9956b48eb56bd9ad95d
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Tue Aug 7 09:07:41 2012 -0400
Windows: FileNormalizedNameInformation take one
Add a response to FileNormalizedNameInformation requests.
Respond with the long file name. As yet there is no translation
from short name to long name for full paths.
Change-Id: I9a88985cb72ebf4ce648cada62522f769f50044b
Reviewed-on: http://gerrit.openafs.org/7948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0af079f2d03d1b76bd4221cb56b27091b5635fd0
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Aug 6 15:15:57 2012 -0400
Windows: FSCTL_SET_PURGE_FAILURE_MODE
Windows 8 adds FSCTL_SET_PURGE_FAILURE_MODE. Failure to respond
with success prevents anti-virus filters from scanning the file
system. For now just return success.
Change-Id: Ibb4822e1a9db13912980f4100519b69f9bff9a75
Reviewed-on: http://gerrit.openafs.org/7947
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 831763ce6633d5377f5476651a8685f0673751de
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Aug 6 15:12:12 2012 -0400
Windows: disable short names in redirector option
If requested during redirector initialization, disable short
name processing. Future versions of Windows (8, Server 2012,
and beyond) will no longer require short names.
Change-Id: I14b20afd919ed9dd8dc48dd7997089b5748a8896
Reviewed-on: http://gerrit.openafs.org/7946
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d8e9d2f2bc0f95642836bca2d66bb09379884142
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Aug 6 12:59:35 2012 -0400
Windows: Consolidate Device Flags
Move Device Flags to common/AFSRedirCommonDefines.h
Change-Id: I1f54b1bcf6f9057cc56260c61c86dc3203891924
Reviewed-on: http://gerrit.openafs.org/7945
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2332ee3aa8e21738ed4aa42b53edd4e2ae0a2984
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Nov 21 12:06:59 2011 -0500
ihandle: don't keep reallyclosing future fds
given that we can mark something invalid for future use, ever,
once we have done so for all fds, we ih_reallyclose is done.
don't persist the setting to the detriment of new fds
Change-Id: If82368dad79841a5d68f45a608b2645b32f951e7
Reviewed-on: http://gerrit.openafs.org/6101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1a1e87dcdf972519cd21970f7c78709e40f8e1e9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 2 17:24:02 2012 -0400
libafs: revert init req to use the real uid
The commit to use wrappers for creditial structure access
inadvertently changed the user id to be the effective uid instead of
the real uid, when no PAG is present, on linux. Revert this so
setuid programs continue to work.
See commit eb8e55bba7740a87e07ef07bb4b789e6d4e36f0d
Change-Id: I5d42b8caf90a042192ed39f26e55d70c9531f2e9
Reviewed-on: http://gerrit.openafs.org/7931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0c77c0acabe0a0588ab0a9efab0124ee1e15ef6a
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Thu Aug 2 18:37:05 2012 -0400
vos: convertROtoRW may create 2nd RW on a fileserver
If an RW is already present on disk on the target server (any partition),
'vos convertROtoRW' will still convert the RO, creating a second RW on the server.
Detect this and refuse to convert the RO by returning EXDEV (invalid cross-device link).
Change-Id: Ide15a7c39f2a975fd8597e497094b6a67b448e4f
Reviewed-on: http://gerrit.openafs.org/7934
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9cd983799e622c9acf5dd6e0b9ae3a3a75eaa8ce
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Aug 2 11:58:12 2012 -0400
rx: Process ICMP unreachable errors
When a machine receives ICMP errors, we can detect them in
AFS_RXERRQ_ENV environments. Many of these errors indicate that a
machine is not reachable, so we are guaranteed to not get a response
from them. When we get such an error for a particular peer, mark all
relevant calls with an RX_CALL_DEAD error, since we know we won't get
a response from them. This allows some calls to dead/unreachable hosts
to fail much more quickly.
Do not immediately kill new calls, since obviously the host may have
come back up since then (or the routing/firewall/etc was fixed), but
only calls that were started before the current error was received.
Note that a call doesn't actually notice until the next rxi_CheckCall,
since directly killing each of the relevant calls would be rather
slow. So, we don't notice a dead peer immediately, though we notice
much more quickly than we used to.
Reorganize the error queue processing a little bit to make this easier
to do.
Change-Id: I403540e0677fe2d432901e4ecc19f7f385610b7f
Reviewed-on: http://gerrit.openafs.org/7929
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 407cfd281eab375512881945999b7e13ba93936e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 16:31:09 2012 -0400
LINUX: Fix error queue processing
Receiving error queues in the Linux kernel is a little different from
userspace. When we encounter a cmsg that is not CMSG_OK, we need to
break out of the loop, and not just continue, since we can keep trying
to process the same cmsg over and over. In addition, on successful
return, the msg_control buffer has been modified to point to the next
available buffer space, and msg_controllen contains how many bytes are
remaining. So, we need to adjust the msg_control and msg_controllen
values to get something more familiar.
Change-Id: I7cc768ea31379915974431d2a3c1fec5e0ac71bb
Reviewed-on: http://gerrit.openafs.org/7927
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d55df0ac8351b1518d2c3cde6e3938b98b3f21f7
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 15:56:27 2012 -0400
LINUX: Avoid SO_ERROR for RXERRQ_ENV
SO_ERROR is for receiving errors from some nonblocking operations; it
has little relevance to our network operations. For Linux, use a
similar structure as userspace error detection, instead of SO_ERROR.
Change-Id: I2188b1a023592d44bec62f6d07666dc19732222c
Reviewed-on: http://gerrit.openafs.org/7926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 403f72ec7620c8c5d39d860edd7d8e775e2776e6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 15:19:02 2012 -0400
rx: Create AFS_ADAPT_PMTU and AFS_RXERRQ_ENV
Currently we have the ADAPT_PMTU define, which turns on functionality
in Linux to detect PMTU-related ICMP errors for Rx. However, this is
really turning on two separate pieces of functionality: the PMTU
processing, and the processing for ICMP errors in general.
So split this out into two defines: AFS_ADAPT_PMTU, and
AFS_RXERRQ_ENV. The former is for processing PMTU discovery, and the
latter is for processing ICMP errors. Both of these are left disabled
due to issues in the error processing. Although PMTU discovery is the
only functionality which makes use of ICMP errors, this will change in
the future.
Change-Id: Ia334c68ce5eb3fa01c01a8a1c52a0e0a2e41b2c0
Reviewed-on: http://gerrit.openafs.org/7925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d51694dfdb85503cd4fce39b5d2f15a82a37a427
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 15:14:23 2012 -0400
LINUX24: Remove ADAPT_PMTU code
ADAPT_PMTU on Linux 2.4 doesn't really seem worth it. Remove it so we
don't have to duplicate code.
Change-Id: Id430e4caa7ee601bd6103541888e2a0029e0ab58
Reviewed-on: http://gerrit.openafs.org/7924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3cf4c1fbad712984074a916897b77841c3e24752
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 15:11:48 2012 -0400
rx: Formatting fixes
Some minor fixes to preprocessor indentation and other minor
formatting things in rx.c and rx_user.c.
Change-Id: Ia7bfda68b40893191a91ac9161cfe513a83c1989
Reviewed-on: http://gerrit.openafs.org/7923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a3759e0af8717f478a32420b8c8d125fae15cd25
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Aug 1 14:57:06 2012 -0400
rx: Remove ADAPT_MTU and MISCMTU
Ever since 5bcf626ddaf92e199c4b46c11ad276013a47db52, ADAPT_MTU has
been unconditionally defined. MISCMTU has always been unconditionally
defined, and not used anywhere. Remove both of these, assuming they
are always defined.
Note that ADAPT_MTU != ADAPT_PMTU.
Change-Id: Ie870bde8f84e59e1fe2a09806d8b68936d15f65e
Reviewed-on: http://gerrit.openafs.org/7922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 09f5a1e6053e6db3df581543875512d8cff259ae
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Aug 1 11:42:34 2012 -0400
bozo: avoid canceling the sigkill timer for hung processes
A sigkill signal is sent to fileserver processes when a timeout is
exceeded for shutting down processes for the fs/dafs bnode.
(Currently 30 minutes for the fileserver, 1 minute for the other
server processes.)
If the bnode goal is set to run before this timeout expires, the
timer is incorrectly stopped, and a wedged process is never killed.
Fix this by not canceling the timer when a fs/dafs process has been
signaled to shutdown, regardless of the current goal.
Change-Id: I2eca8bcb4bac690f3ef671ca4cf375164ff34d5e
Reviewed-on: http://gerrit.openafs.org/7920
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1d8f3742661f07ab1923182883e2a2ea376151cd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 30 14:56:52 2012 -0500
libafscp: Add afscp_LocalAuthAs
Add the function afscp_LocalAuthAs to libafscp. This allows the caller
to generate credentials based on the KeyFile on local disk, in order
to appear as an arbitrary user.
Based on code written by YFS.
Change-Id: I9c2da8b3460a000be8e6073eb0925dc82fcc1de3
Reviewed-on: http://gerrit.openafs.org/7917
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 351d3b8a19314027b30cdc499ef48c95ba7903b6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jul 31 14:40:41 2012 -0400
LINUX: Always hold afs_xuser for unixuser read
We were failing to hold the afs_xuser lock when we entered our
unixuser traversal for the first time (when the given position is 0).
This means we can release the lock without acquiring it, causing all
kinds of weird behavior.
Just always grab afs_xuser on entry. We could possibly do some tricks
to avoid grabbing this lock until after we've printed the column
headers, but it does not seem worth it.
Change-Id: I68782098b5af2feb56887bc577511da2983d4f21
Reviewed-on: http://gerrit.openafs.org/7916
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e3cf97b5b5ae06cbd7862dbfcc09f3d1f45c24c1
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jul 30 09:52:24 2012 -0400
krb5 profile config support
create openafs-client.conf and openafs-server.conf in respective ETC
dirs. enable afsd, ptserver, vlserver and fileserver option parsing from it
[afsd]
dynroot = true
dcache = 800
cachedir = /var/db/openafs/cache
Change-Id: I4bae437d7c8f54daa5dadfaeb875cdd185809d61
Reviewed-on: http://gerrit.openafs.org/7903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d785abd5ec9302bdc1b3c33368246e573e0cd65d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Apr 6 14:56:07 2012 -0500
LINUX: Do not lookup immediately recursive mtpts
On Linux, having a mountpoint in a volume root that points to the same
volume can cause serious problems. By 'immediately recursive', I mean
a situation like the following:
fs mkm mtpt vol
fs mkm mtpt/mtpt vol
If there are multiple dentry aliases for the directory (which is
possible if the directory is a mountpoint), an 'rmdir' on the
recursive mountpoint can cause the client to deadlock. Since the
'rmdir' code path in Linux locks the parent directory inode to perform
the rmdir, and locks the child directory inode after performing a
couple of sanity checks. For an immediately recursive mountpoint,
these two inodes are the same, and so we will deadlock.
Change-Id: Icb9bf8a3dd77a2ef6b88856b0d41556541bb1d00
Reviewed-on: http://gerrit.openafs.org/7742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit de381aa0d39e88a1ca0c8ccbb2471c5cad5a964c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jul 6 16:37:39 2012 -0500
Linux: Make dir dentry aliases act like symlinks
Currently, we try to invalidate other dentries that exist for a
particular dir inode when we look up a dentry. This is so we try to
avoid duplicate dentries for a directory, which Linux does not like
(you cannot have hardlinks to a dir).
If we cannot invalidate the other aliases (because they are being
used), right now we just return the alias. This can make it very easy
to panic the client, due to the sanity checks Linux performs when dong
things like 'rmdir'. If we do something like this:
mkdir dir1
fs mkm dir1/mtpt vol
mkdir dir1/mtpt/dir2
fs mkm dir1/mtpt/dir2/mtpt2 vol
cd dir1/mtpt
rmdir dir2/mtpt2
For the 'rmdir', we will lookup 'mtpt2'. Since 'mtpt' and 'mtpt2'
are mountpoints for the same volume, their dentries point to the same
directory inode. So when we lookup 'mtpt2', we will try to invalidate
the other dentry, but we cannot do that since it is the cwd. So we
return the alias dentry (for 'mtpt'). The Linux VFS layer then does a
sanity check for the rmdir operation, checking that the child dentry's
parent inode is the same as the inode we're performing the rmdir for.
Since the dentry we returned was for 'mtpt', whose parent is 'dir1',
and the actual dir we're performing the rmdir for is 'dir2', this
sanity check fails and we BUG.
To avoid this, make the dentry alias act like a symlink when we
encounter an uninvalidateable dentry alias. That is, we allow multiple
dentry aliases for a directory, however, when the dentry aliases are
actually used, we redirect to a common dentry (via d_automount where
possible, and follow_link elsewhere).
This means that such mountpoints will behave similarly to symlinks, in
that we 'point' to a specific mountpoint dentry. This means that if we
have multiple different ways to get to the same volume, and all are
accessed at the same time, all but one of those mountpoints will
behave like symlinks, pointing to the same mountpoint. So, the '..'
entries for each path will all point to the parent dir of one
mountpoint, meaning that the '..' entry will be "wrong", but for most
cases it will still be correct.
In order to try to make the 'target', pointed-to directory consistent,
we add a new field to struct vcache: target_link. This points to the
dentry we should redirect to, whenever that vcache is referenced. To
avoid (possibly not-feasibly-solvable) problems with refcounting, this
pointer is not actually a reference to the target dentry, but just
serves as a pointer to compare to.
FIXES 130273
Change-Id: I990131ce95cefe8336e83c7ebfb48aed1d685109
Reviewed-on: http://gerrit.openafs.org/7741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9b0a7f5d13115fe5760db16587fe81dd35a5a0ef
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jul 31 11:47:58 2012 -0400
dirpath: fix macos alternate client etc dir support
we set a proper client etc dirpath but did not apply
it to children. do so.
Change-Id: I56da943838a13859a239e5edf4219c6400abfe35
Reviewed-on: http://gerrit.openafs.org/7904
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit bf45586c9a3aac23a131e096d581e1149540f602
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Mon Jul 30 22:05:04 2012 -0400
afs_server: delete code that has been ifdef'ed out for years
The comments in afs_SetServerPrefs() said "clean up, delete this".
The oldest one is a decade old. Removing these #ifdefs will make
following the rest of the spaghetti #ifdefs a bit easier.
Change-Id: I187ccf2889a5244457218b109404be8b1cf1990e
Reviewed-on: http://gerrit.openafs.org/7911
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 77f258a71dde5bc8f82b5d6f24836cfee4e9bcce
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Tue Aug 9 00:28:27 2011 -0400
libafs: afs_CacheFetchProc can't be called without a dcache pointer
An inspection of the only call site suggests that afs_CacheFetchProc()
can't be called with a null dcache pointer, and code further down
in this function dereferences adc unconditionally (assuming
rxfs_fetchInit() doesn't crash first) so remove the conditional
here.
Probably more of these parameters can and should be included in the
AFS_NONNULL.
Change-Id: Ic87517376085b0d5bc7631b5558411259ae986f4
Reviewed-on: http://gerrit.openafs.org/5180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 070e90a92175eb91b3709598859fabb0c843d0a9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 30 15:19:57 2012 -0400
doc: Windows Release Notes Integrated Logon
Expand on support for integrated logon details. Explain the
new capabilities for per-user configuration and name mapping.
Change-Id: I6aef3f99cb54aa964f9a6dbc3992031d6199e97d
Reviewed-on: http://gerrit.openafs.org/7905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit da9f42d044725ae128feffcfbeaab67b31aaab44
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 30 00:43:01 2012 -0400
doc: Remove USA vs International from AdminGuide
OpenAFS does not have separate distributions for the United States
and the rest of the world. Nor are there any restrictions on the
capabilities of the Update Server.
Change-Id: I834d86764bb3d8df4cce62b9cbaa33bff455bc30
Reviewed-on: http://gerrit.openafs.org/7902
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 227cff3dd657967fa895317ad53e5c772c17aaec
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sun Jul 29 22:15:14 2012 -0400
vlserver: remove an unused global
Remove the unused global variable extentaddr.
Change-Id: I3a7aec78dddcdf4e56a9ed432d650a1693e7c16e
Reviewed-on: http://gerrit.openafs.org/7900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 71dc077831d339fc5822f2c2c79b65afe14b12f8
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Jul 29 19:09:22 2012 -0400
opr: tweak nonnull macro to use nested parens
throws an error on windows in some cases otherwise
Change-Id: I977b63908fb64a9711f9ba9ca22aeb04882fadf4
Reviewed-on: http://gerrit.openafs.org/7899
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8c01141ccaa538b182ee79ec2d8ed5ec12b58f11
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jul 29 15:14:11 2012 -0400
Windows: Rename cm_btree struct data
Rename the "struct data" in cm_btree.h to something less generic in
order to avoid conflicts with other code.
Change-Id: I0580be084d508c195d767152af4f9a461cf0407e
Reviewed-on: http://gerrit.openafs.org/7898
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b725a28eac2d9a94344b2524f995a98e60ecc2ea
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 28 01:10:09 2012 -0400
volser: restructure GetNextVol and clients to remove duplicate code
There are several odd-looking but stylized loops involving GetNextVol()
which can be radically simplified if only GetNextVol() would return
a meaningful value. Move all of the code that skips non-volume-header
files in the directory into GetNextVol and have it return a truth value
(instead of always returning zero) that indicates whether it saw
something that looks like a volume header. Then all the odd while
loops and strcmps just collapse into while(GetNextVol(...)).
GetNextVol() had external scope, but there are no callers in the
tree that use it outside of volprocs.c, and it's not part of a
public library interface, so make it static.
While here, don't strcmp() past the end of a filename that begins with
'V' but is too short to be a valid volume name.
Change-Id: I214b33c46714959d700608b3d3718c79d3792878
Reviewed-on: http://gerrit.openafs.org/7893
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cac7bcda084879a876d93eb0480c2f7c76c25a4a
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 28 00:18:00 2012 -0400
afscp: avoid null dereference in _GetSecurityObject error case
Handle the possible error return from krb5_get_host_realm in the
same way as the other error cases (using an anonymous security
object); otherwise "realm" would be left null.
Change-Id: I5ce7a614a3e272b3a9903a8e95545a8116d1af3c
Reviewed-on: http://gerrit.openafs.org/7891
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2460396391a17b6dc44c493d21fe921604a16cda
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 28 00:26:44 2012 -0400
pam: Use the right password variable in pam_sm_chauthtok()
"password" is known to be null at this point. Use "prompt_password"
which is obviously the one intended.
Change-Id: I4ab566f93c4978438df2c2875d619177ad8f5bdd
Reviewed-on: http://gerrit.openafs.org/7892
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fdb4ec2e2767359eb6b5309a0342492c70d206e4
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Fri Jul 27 19:50:42 2012 -0400
butc: don't pass NULL to strcpy in RcreateDump
volumesetNamePtr can return a null pointer in certain error
conditions. Check for this and return BUDB_BADARGUMENT rather
than dumping core.
Change-Id: If0ce509c964211ffa591d8e095b7c32c51ae7bc3
Reviewed-on: http://gerrit.openafs.org/7890
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5237d3d232f22aaf4f67f3a8727a293f4058a7ae
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jul 26 16:40:03 2012 -0500
LINUX: Hold GLOCK for proc traversal
The functions that traverse unixuser structures for display via /proc
(uu_start et al) call various libafs functions hold and release locks,
etc. To do any of that, we need GLOCK. Amongst other issues, we can
panic if we try to acquire a contested lock without GLOCK, since we
assert glock is held when we sleep for the lock or try to wake other
waiters. The same goes for the legacy CellServDB proc file.
So, hold and release GLOCK as appropriate.
Change-Id: I9ec2051bc5d914521d12a9d20d28da1076c090fc
Reviewed-on: http://gerrit.openafs.org/7885
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 23f2f1232b03ed02f87582c12b4c4e8474bc9b5d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jul 26 15:58:45 2012 -0500
LINUX: Fix osi_proc.c formatting
osi_proc.c had a few formatting issues:
- Several function definitions did not have the function name at the
beginning of the line
- A few preprocessor directives were not indented
- A few areas used a tab character for each indentation level, as
opposed to 4 spaces, then 1 tab, as the rest of the tree has
- Struct definitions were aligned using tabs, not spaces, causing
misalignments when the indentation was fixed
Fix these.
Change-Id: I8d6b511473b89c42abd759553ec77332407daff0
Reviewed-on: http://gerrit.openafs.org/7884
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e02fd4d358f20bcf001f0486afe1750d4013dea3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 16 17:29:54 2012 -0400
rx: protect against ACKs with serial as prevPacket
patchset 4e71409fe1305cde4b9b341247ba658d8d24f4d0 introduced a
check in rxi_ReceiveAckPacket for out of order ack packets which
relied upon the value of the previousPacket field. Unfortunately,
some versions of RX store the previous packet's serial number in
the field instead of previous packet's sequence number. Modify
the check to only discard out of order ACKs if the previousPacket
sequence number is within the valid window.
Change-Id: I72885a8c1aaa69eb263335be1827545f2b4c3e09
Reviewed-on: http://gerrit.openafs.org/7785
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 300dd717fa57df77175807cf7cf6be36cb1f9fef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 26 18:35:48 2012 -0400
rx: better rxi_FindRpcStat check for end of queue
patchset 1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec tested for
an empty queue but what is really required is a test for end of
queue after the queue_Scan(). If the queue_Scan() completes
at the end of the queue, in other words, pointing at the list
head, then return NULL because no match was found.
Change-Id: I444531d3cfa85b4691eaa8960da0266de82a03a3
Reviewed-on: http://gerrit.openafs.org/7886
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ee2b9c2d3ee22dfbc8fd2eb2cc470ae853d4e19a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jul 25 01:55:27 2012 -0400
rx: protect against invalid params in rx_Copy*RPCStats
Protect against:
. rxi_Alloc() failure
Change-Id: I3334855e261bb40d5720fd376e62028760f0cee5
Reviewed-on: http://gerrit.openafs.org/7873
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3fc800be9c702c1a40869908831a9895602909cb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed May 9 18:45:51 2012 -0500
vos: Minimize release impact for new RO sites
Currently, if a new RO site is added with 'vos addsite', the only way
to populate the new site with data is a 'vos release' (excepting hacks
using 'vos restore' and 'vos addsite -live', etc). Due to safeguards
in 'vos' ensuring that RO sites always all contain the same data when
marked as up-to-date in the VLDB, such a release always incurs some
amount of data to be transmitted to all sites, as well as remote sites
being brought offline briefly, even when the RW data has not changed
in very long time.
To alleviate this situation, make 'vos release' detect if new,
unpopulated RO sites have been added, and if the RW volume has not
changed since the release of any existing RO sites. If both of these
conditions are true, do not update any of the existing sites, but only
transmit volume data to the sites that did not already contain RO
volumes.
Change-Id: If343d241a18e788c3619876f5d494d2ebf425cb8
Reviewed-on: http://gerrit.openafs.org/7393
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 93aa733909e72da4a67ef8422070f417cd12b1d8
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Wed Jul 25 00:41:05 2012 -0400
tabular_output: don't leak table struct on error exit
The caller is almost certainly going to exit when we return, but
all the same, don't leak the table description structure in the
error exit. Makes the static analyzer happier.
Change-Id: I55e986a3601968751921ee38badf5bb86cd3174f
Reviewed-on: http://gerrit.openafs.org/7870
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ff217dec93c9b46a2f161bea5439d5a41337bf51
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Wed Jul 25 00:22:10 2012 -0400
afsdump_extract: clarify logic to avoid freeing local buffer
Sometimes vnodepath is set to a local buffer. Sometimes it is set
to malloc'ed storage. Simplify the logic for freeing vnodepath
by checking explicitly for this condition rather than the state
of other variables. As a bonus, avoids a false (?) positive from
the static analyzer.
Change-Id: I3772cb97698acc5a6ac1f438977c673e6fea7722
Reviewed-on: http://gerrit.openafs.org/7869
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 24d2d3ea83bdadee3d8a8b477be10e9ced178b6d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 21 23:44:31 2012 -0400
vlserver: always use the hostaddress table in GetAddrsU
Use the hostaddress (IpMappedAddr) table when looking up hosts by IP
address and when listing addresses by index, instead of accessing
the multi-homed extensions directly.
The existing vos client calls the old GetAddrs rpc to first retrieve
a count of the number of addresses expected. This count is the
number of addresses in the hostaddress table. If there are
unreferenced entries in the mh extension blocks, then vos can return
an incorrect or incomplete list of addresses.
To be consistent with the rest of the host address processing, use
the hostaddress table in GetAddrsU to lookup hosts by index or by IP
address.
The hostaddress table is already used when looking up addresses by
UUID.
Change-Id: I01aa29ae7d24d48bcd245f0320e329435f61548e
Reviewed-on: http://gerrit.openafs.org/7878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7649a66a6193e2fd8a709bf701fcbb07774d2d33
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 22 23:20:01 2012 -0400
afs_conn: make release_conns_vector() actually work
release_conns_vector must never have been called before with
a non-null parameter, because it could not possibly work.
The first line of the loop is a null pointer dereference, and
if that were fixed, there's also a modify-after-free bug as well.
It's not clear how what the old version was trying to do; this
version makes a stab at doing something sensible but might be
less than required. (Note that this would be much simpler if
converted to queue(3) macros or a similar standard linked-list
data structure.)
Change-Id: I4c0fb7ed1ee977dcc0b4dfb32557882679069731
Reviewed-on: http://gerrit.openafs.org/7838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d0db811939df4eda268ae2ae54a1dc0194653ed9
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Tue Jul 24 22:29:00 2012 -0400
pruser: AFS_NONNULL annotations for functions that deserve it
Change-Id: I68e74affcb3235d93e684a04a56ef44798a42406
Reviewed-on: http://gerrit.openafs.org/7861
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3f691e663cc55ffb89386e53535030c659cb2fc2
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Wed Jul 25 00:06:05 2012 -0400
kauth: ka_CellToRealm's "realm" parameter cannot be null
Annotate ka_CellToRealm with AFS_NONNULL to indicate that its
"realm" parameter cannot be null; it does not make sense to call
this routine without this parameter. (The static analyzer inlines
the call to ka_ExpandCell and concludes that "realm" might be null;
the annotation will prevent that and avoid a false positive.)
Change-Id: Id7fac19cf4eb4bdb1decde81d951b8bcd96fce71
Reviewed-on: http://gerrit.openafs.org/7865
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f6d7a4b426f55db366113bbdda4da71570310410
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 25 16:08:41 2012 -0500
afsd: More pthreads damage
We need MT_LIBS for -lpthread and such. HP-UX needs this, and probably
other platforms; otherwise we complain about missing pthreads symbols.
Change-Id: If7486cabfc20ef4238087f0285c25d9f8602703a
Reviewed-on: http://gerrit.openafs.org/7880
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cf03e0a4748e122fd1bf2ec9d00e539b70f3eb3f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 25 15:48:34 2012 -0500
crypto: Use our strcasecmp in kernel
A few pieces of heimdal we use in the kernel call strcasecmp
(hcrypto/evp.c, krb5/crypto.c). The strcasecmp function does not exist
in all kernels (specifically, it does not exist in at least Linux 2.4,
2.6.9, and probably not on Solaris pre-10). Since we have our own copy
of strcasecmp (called afs_strcasecmp), just use that for now.
Ideally we would have some kind of configure test for detecting the
presence of the function in the kernel, and use the roken
implementation when we don't. We currently have the framework for
neither of those in place at the moment, though, so just get by with
this for now.
Change-Id: Ia96b17596da6cb168c80c92486fa049c05205da4
Reviewed-on: http://gerrit.openafs.org/7881
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 97e241fdc68e0759d4b2762ee050f8bdde57a2e0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jul 26 09:47:35 2012 -0500
afs: afs_strcasecmp args are const
We do not modify our args, so declare them const so we are usable with
const strings.
Change-Id: I2d60044014e51e2a52638b76ca50a5c2fc6980c0
Reviewed-on: http://gerrit.openafs.org/7882
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 97146a8ed8497e8bfe3ea24eb0fe4685430fdcf3
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Tue Jul 24 23:41:02 2012 -0400
ptuser: avoid implementation-defined behavior in CreateIdList()
CreateIdList() is an internal subroutine of pr_IDListExpandedMembers(),
used to flatten a hash table of protection IDs into an array that can
be passed to pr_IdToName(). If for some reason the hash table had no
entries, it would call malloc(0) and, depending on how the
the implementation defines this, either return a PRNOMEM error (wrong!)
or else allocate a minimum-sized buffer which pr_IdListExpandedMembers
would then promptly leak. Compromise between the two behaviors by
not allocating any memory in this case but returning success, and in
the caller check for an empty list and avoid the pointless RPC to
translate no IDs into no names. pr_IDListExpandedMembers() will return
success, as it previously did in the non-PRNOMEM case.
Change-Id: I8a042bde3e98f5cf248358f37f2e875d6b5b298d
Reviewed-on: http://gerrit.openafs.org/7863
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2e7939ea4653ba3634445b1710aed1206f44f7ca
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Tue Jul 24 23:54:56 2012 -0400
kauth: don't call lcstring with a null source argument
This code was probably never executed, but now that lcstring() has
an AFS_NONNULL annotation, the static analyzer indicates the
potential null-pointer-dereference.
Change-Id: Idb41c2af1cb38bc5c084d4912614e0a553d4aa5a
Reviewed-on: http://gerrit.openafs.org/7864
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a573697da3fed9509f98e087b65b1fb7a60bc9a0
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Wed Jul 25 00:49:25 2012 -0400
rxgen: avoid an unimportant memory leak in docppline()
If cpp emitted
# 1234 ""
docppline() would leak a small buffer. Just free it.
The static analyzer will thank you.
Change-Id: I34ae6e228469a900139375f2a4758855922cf0ef
Reviewed-on: http://gerrit.openafs.org/7871
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3c9a9b49602c4e624662d25f4573ec0e78ed2b7d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 25 11:59:44 2012 -0500
rx: Initialize kernel rx_atomic_mutex
Change-Id: I9a63fbee0e5a0f9df31b8e2440e91a03af54151f
Reviewed-on: http://gerrit.openafs.org/7876
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 410a55addfcd055ac666f9bc5450b238648d07bf
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jul 25 10:45:16 2012 -0500
rx: Raise minimum Linux atomics version to 2.6
Linux 2.4 does not have atomic_dec_return. If we switch to a
dec_and_test-like API, then we could use the Linux 2.4 atomics. But
for now, just raise the minimum to 2.6, and for 2.4 and below just use
the generic atomics implementation so we can build.
Change-Id: Ie584bd420839dbcbe3158fe7b50df633cb7eba6d
Reviewed-on: http://gerrit.openafs.org/7875
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6dd0bc6bed79013fe1737f3e9016066ee74958fd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jul 24 18:18:13 2012 -0500
LINUX24: explicit dir buffers fallout
Fix fallout from 0284e65f97861e888d95576f22a93cd681813c39
Change-Id: I40a16fee3bb3835690f7ff7328f70d3454fd1198
Reviewed-on: http://gerrit.openafs.org/7874
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3638ef30d0de7d82d919b046ec87986ad09442d3
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Jul 25 00:17:46 2012 -0400
macos: next version header
add header for next macos
Change-Id: I9078b77587197b38ff705663c73a7f930efeec7a
Reviewed-on: http://gerrit.openafs.org/7868
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 5f60992bfe17b74526bf7d26c5e0df2a2d1c4833
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 24 13:56:02 2012 -0400
Windows: NPAddConnection3 debugging
Define Add3FlagsToString() and use it when generating debug
output from NPAddConnection3().
Change-Id: I73251890659ea5a833b5f67d26129053c625b58a
Reviewed-on: http://gerrit.openafs.org/7860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 16b671cf3bddfc1c8cd9f760f99320ac21e583ac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 24 13:53:49 2012 -0400
Windows: Correct exceptions in AFSRDFSProvider
Correct two errors in the generation of debug strings that
were triggering invalid memory access exceptions.
Change-Id: Ie5ee3289e2fa74809067f05931c3aa568c2be9d0
Reviewed-on: http://gerrit.openafs.org/7859
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 78f1e230ce2b7167981e2f327bfdb5d50c94a95f
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 22 22:57:41 2012 -0400
afs_bypasscache: parameters of afs_ReadNoCache can't be null
The first two parameters of afs_ReadNoCache() are unconditionally
indirected through, and all existing callers appear to guarantee
that these parameters are in fact non-null, so annotate the function
declaration to so indicate, and remove the one test that checks
whether avc (the first parameter) is null. I suspect that acred
cannot be null either, but this code does not appear to depend on
that, so it's not included in the non-null annotation.
Change-Id: I496c868ffcbc9b894f91578019bc30bf7b14fefd
Reviewed-on: http://gerrit.openafs.org/7837
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 21878c61ddef84af50fc5c8aacd87cadc3e2dade
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Tue Jul 24 01:17:47 2012 -0400
ptuser: use the "prname" typedef rather than "char[PR_MAXNAMELEN]"
There's a typedef for this type, so use it in function prototypes
rather than the more complicated declarator.
Change-Id: I75a9b4e72201e6b2072dba14185579f9c4aa61be
Reviewed-on: http://gerrit.openafs.org/7858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5e0c59284ac3307fd47b5d6a1fa5589362085ced
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jul 24 00:26:56 2012 -0400
afsd: fix pthreads damage
ah linker fun. clean up from 98f86cfc53fc987fdaed2f5bb733b5b5d21bfda9
Change-Id: Id78debe0c9ddec0ce5f3fd2b95e16802a132845f
Reviewed-on: http://gerrit.openafs.org/7855
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8ff703fcbb93399f12fb3210b729f82fb43f0ed1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jul 1 22:31:04 2012 -0400
Windows: No VLDB server blocking probes
Now that we have background probes, use them for VLDB server probes.
Change-Id: Ib160ec5ae702065f410e85ae949ae13a02c425e8
Reviewed-on: http://gerrit.openafs.org/7854
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ceeb0474578914a64cc938e52533e6c7911396b2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jul 1 22:27:13 2012 -0400
Windows: NOPROBE means probe in background thread
It is important that down servers be detected as soon as possible.
When it is not possible to perform a blocking probe, perform a
probe in a backgrond thread.
Change-Id: If73856359ba894c5c302c11fd50aaa76cd2fcf28
Reviewed-on: http://gerrit.openafs.org/7853
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a738c8dcff8410d82b631a0e71c23b8447db9a0d
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Mon Jul 23 22:07:38 2012 -0400
ptuser: pr_SNameToId/SIdToName: if RPC response empty, force error
If the prserver returns an empty response to ubik_PR_NameToID
or ubik_PR_IDToName, but doesn't otherwise give an error,
force a PRINTERNAL error return so that the client knows that the
the return parameter was not updated. Existing callers seem to
expect this, as pr_SNameToId is often called without initializing
the variable which receives the result and checking only for the
error code.
PRINTERNAL is a new error code.
Change-Id: I3e598a22deb39792a0f208ac09b3c1991d6f1e58
Reviewed-on: http://gerrit.openafs.org/7836
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 98f86cfc53fc987fdaed2f5bb733b5b5d21bfda9
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Jul 22 09:18:28 2012 -0400
afsd: switch to pthreads
kill one more lwp dependency.
Change-Id: I9a878d7b0e1ab50770c6162f6bd380119b7a4292
Reviewed-on: http://gerrit.openafs.org/7828
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit a3b6a940f84a35aa3ae0d3ee6963ef4086f3a3a4
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jul 23 22:25:19 2012 -0400
afsd: cleanup syscall cleanup
sadly ead743db5d57afa175f5dc0828b76881bcbcbf54 missed a few bugs. fix
them here.
Change-Id: I03d52543fb096f75ccf6dbde4f7526a7c0c576bb
Reviewed-on: http://gerrit.openafs.org/7852
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 736e0dbeec54e19801e96ba93d471bd5a995f4f3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jul 22 01:19:57 2012 -0400
Windows: get rid of _strdup and use rk_strdup
Do not use the _strdup() C RTL function. Use strdup() so that
rk_strdup() roken replacement can be used.
Change-Id: Ifd2808a078b514468aee52ef76a9b51e606a2c88
Reviewed-on: http://gerrit.openafs.org/7848
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 907dbac89cfde3d3663c14fa17ca5ac9ced5a846
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 10:19:07 2012 -0400
roken: rk_strdup rk_wcsdup exports
Change-Id: Iee3670ddf86599dd81f1247a9f8cfafcbc6e1e8f
Reviewed-on: http://gerrit.openafs.org/7847
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit cabfe32c335002d2cfc77481c33d091cc7fd0dda
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Mon Jul 23 17:27:56 2012 +0100
Import of code from heimdal
This commit updates the code imported from heimdal to
b8a53329fc8bf2fe8c4f4058512f828d7654e3f8 (switch-from-svn-to-git-3003-gb8a5332)
Upstream changes are:
Jeffrey Altman (2):
Windows: rk_strdup allocator
Windows: rk_wcsdup allocator
Nicolas Williams (1):
Fix bug in _krb5_expand_path_tokensv()
Change-Id: I08abb25b4f4136bccb3eaf8d8c44851ce748f395
Reviewed-on: http://gerrit.openafs.org/7842
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5dce817d40bc69684451e88fe8a0f1078f1f3880
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Jul 18 10:22:07 2012 +0100
ptserver: Make ptclient build again
Make the ptclient utility build again, and add it to the ptserver
Makefile so that it is built by default and, hopefully, won't
bitrot again.
Change-Id: I888a9d4392b62ecb2d7556694400a2853658052a
Reviewed-on: http://gerrit.openafs.org/7841
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 0eca3c1822683ccf1b559eb8e455688c5bdc1fc9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Jul 16 20:09:04 2012 +0100
auth: Fix GetTokenEx with NULL cellName
If GetTokenEx is called with a NULL cellName, it means use the
local cell. To do this with the legacy interface, a 0 length string
must be used for the cell instance of the ktc_principal passed to
GetToken. Fix this so that we do so, rather than attempting to
strcpy(..., NULL) which never ends well.
Caught by clang-analyzer
Change-Id: I53d9bdf0fc280ee073a2fb7693659269df29c2eb
Reviewed-on: http://gerrit.openafs.org/7840
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 1f0cf8b2b4bb6e36d8d82323a15ced72d91db0ec
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jul 22 20:40:41 2012 -0400
rx: rxi_FindRpcStat must test for empty queue
When queue_Scan is executed on an empty queue the queue element
variable, in this case 'rpc_stat' is the queue head, _RXQ(q),
and not NULL. Callers of rxi_FindRpcStat() expect NULL on failure
to find or create an rx_interface_stat object. Correct the behavior
by testing for an empty queue and return NULL immediately if the
queue is empty and the caller is not requesting creation.
Change-Id: I9952d7aaf357e039e87f6b8b17cb1a00208d6465
Reviewed-on: http://gerrit.openafs.org/7835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ead743db5d57afa175f5dc0828b76881bcbcbf54
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Sep 7 18:31:32 2011 +0100
afsd: Tidy up system calls
Tidy up the way that we do system calls from afsd, by making
afsd_syscall a va_arg function, using a structure to pass system call
information around, and simplifying the #ifdef ladder that converts our
platform independent system calls into something platform specific.
This fixes all of the warnings in afsd which required the -Wno-error
option, the only warnings remaining are related to daemon being
deprecated on Darwin.
Change-Id: I357c7d175b5327007d50d213c6181881c842050e
Reviewed-on: http://gerrit.openafs.org/7188
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 748a3e29b624d10e90af43cb0dc65a4f96c0310e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 23 01:38:03 2012 -0400
Windows: cm_UpdateVolumeLocation volp locked
When calling cm_UpdateVolumeLocation the volp->mx must be held.
cm_Analyze() did not obtain the mutex as required.
Change-Id: Ida69105879a78692a367cd4439bee8e4bea751ff
Reviewed-on: http://gerrit.openafs.org/7839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 82865811e49aae8b7b8ff9f5d995dc32518b9eb8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 7 13:54:20 2012 -0400
libafs: avoid flushing already freed dcaches in flush volumes
When flushing volume data, skip flushing dcache entries which
are already freed.
Change-Id: I74d7e055e833dc91214dd9d544af3781f74db59b
Reviewed-on: http://gerrit.openafs.org/7539
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fd707e3014945b99539db9ea5198859713e33251
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Thu Jul 19 22:23:20 2012 -0400
vol: set correct bit in bitmap after VGrowBitmap
Set the correct bit after the bitmap is expanded with VGrowBitmap
so we don't allocate it twice and trigger a salvage.
Change-Id: Iee307a0913d4402c2d5a32d493ff489b35778811
Reviewed-on: http://gerrit.openafs.org/7793
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 91d7cd931a0362b5055c37fc7adc3f5d6015b573
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Fri Jul 20 18:35:56 2012 -0400
uafs: avoid type-punning in get_user_struct()
There's no need for type-punning here; usr_getspecific() is a macro
that just assigns to the variable whose address we provide, so the
cast was just unnecessary (and erroneous) obfuscation. This is the
only caller of usr_getspecific(), so if it needs to be more complex
in the future, it should probably just be open-coded here.
Change-Id: I81286cbce9a00908aa87073b728b07d8bcc8d1d1
Reviewed-on: http://gerrit.openafs.org/7799
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d3761b9e6265df47e38e166983711a591ef48b31
Author: Derrick Brashear <shadow@dementix.org>
Date: Sat Jul 21 00:27:49 2012 -0400
ubik: don't force an error just because calliter is early returning
in this case, racing another ClientInit caller is not fatal.
clean up from 56b5b9a1c51c2197923aa373c180a834edabe4f6 which was
my fault.
Change-Id: I81d3298a775ed46972779b4121498560883fee01
Reviewed-on: http://gerrit.openafs.org/7803
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e39d6ca55af79b917e459a09893606e79ba50375
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 21 01:35:15 2012 -0400
strcompose: NULL must always be cast when passed to a variadic function
The C standard allows NULL to be defined as a bare "0", which will
be passed to variadic functions as an int. If the function expects
a pointer type, demons fly out of your nose. strcompose() is such
a function, so make sure that all of its callers cast NULL appropriately.
(None of them did.) This may be an opportune time to change all of
the callers to spell it opr_strcompose() as well, and avoid using a
reserved identifier, but this change does not do so.
Change-Id: Ia9007a48102da4d0a85a48b41a44e83102304b49
Reviewed-on: http://gerrit.openafs.org/7805
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 466ba9cb60816a455c15e7c3dba5f325f005f2fe
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 21 01:22:02 2012 -0400
opr: constify various string functions and mark them AFS_NONNULL()
All of these string functions require at least one non-null argument.
Mark them as AFS_NONNULL() so that the compiler and static checker can
find erroneous uses. The "source" arguments of lcstring and ucstring
can be const, so do so. (This doesn't affect anything in the tree
right now.) While here, note a few unfixed issues with these interfaces.)
Change-Id: If2a8dd4d617795560e92c09ee604780f90edce6a
Reviewed-on: http://gerrit.openafs.org/7804
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cb807db4505a8d4a4c904d32a59ad168d4650e4c
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Jul 18 00:02:16 2012 -0400
libafs: getattr should include S_IFDIR on fake dirs
on macos, VDIR is not useful as part of a directory mode. it's just not.
on aix, solaris, we presumably want to pass S_ISDIR, so do so
Change-Id: I04ee49857febf1cf96d30bd6a8271f99192630c8
Reviewed-on: http://gerrit.openafs.org/7789
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 30e26c07d42d8e8208c51719bc823e387d5919ee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 10:26:05 2012 -0400
Windows: Recompute server rank periodically
After VL_ProbeServer and RXAFS_Getcapabilities RPCs call
cm_RankServer() to recompute the server ranks based upon the
updated peer statistics.
Change-Id: I84687e12f1c1bd323a95c5ffcc73b95d400bd1f5
Reviewed-on: http://gerrit.openafs.org/7827
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a3e2bd0d0183fab913264b04c6772f000367cb73
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 02:57:35 2012 -0400
Windows: Clear peer RPC stats on IP addr change
When an IP address change has been detected, clear the peer
RPC statistics used for server ranking.
Change-Id: Ie9e3f4553f9d0b22d4876b729ce0028e762efb33
Reviewed-on: http://gerrit.openafs.org/7826
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c0d652dcdead56c53c622ade5df0f50e8aefd0f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 02:55:20 2012 -0400
Windows: server rankings by RPC statistics
Use VL_ProbeServer for VLDB servers and either
opcode_RXAFS_GetCapabilities or opcode_RXAFS_GetTime for
File servers.
Change-Id: I67c3ad88ac3dd07ac1c0e44d462853d068bf50c8
Reviewed-on: http://gerrit.openafs.org/7825
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c1081a3ab5dc7e5c83ad84dd0b5c795969745d7d
Author: Derrick Brashear <shadow@dementix.org>
Date: Sat Jul 21 00:17:14 2012 -0400
rxgen: per-opcode stats
allow access to per-opcode stats
Change-Id: I17639cf23acac23acfb9cb7dc07a7c5c81d4ff89
Reviewed-on: http://gerrit.openafs.org/7802
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c3767f1e90b7ba61efcb25e022d27f35d1accc2b
Author: Derrick Brashear <shadow@dementix.org>
Date: Sat Jul 21 00:07:41 2012 -0400
rxgen: emit opcode defines in header
define an opcode-name-specific define with the numeric value
of the opcode
Change-Id: I34e6eb57ac2c57319a83b0279cc9115050a39c4f
Reviewed-on: http://gerrit.openafs.org/7801
Reviewed-by: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 417df0d495a8636aec6959b074a35885e20022c9
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sat Jul 21 00:04:58 2012 -0400
xdr: fix two old FIXMEs related to signed/unsigned arithmetic
It's implementation-defined whether the C '>>' operator, when
applied to a signed integer, is sign-extending or zero-filling.
If you want unsigned arithmetic, you have to ask for it explicitly.
One assumes the reason for the shift is to avoid overflow if the
returned size/count is later converted to a signed int, in which
case maybe it would be better to use INT_MAX here. This is the
minimal change necessary for correctness.
Change-Id: I6e848110963b5e1832a11d052d84884f10903e2e
Reviewed-on: http://gerrit.openafs.org/7800
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 860812931f3adf07c85ac2a56deb149b9c0d33bb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 21 12:17:46 2012 -0400
Windows: AFSTearDownFcbExtents loop conditional
If there are extents in the list with a non-zero ActiveCount,
those extents will be skipped and the list 'le' will never
become empty. Add an additional condition to ensure that the
loop is only executed once for each extent in the list.
Change-Id: I48adf7c49282181d0a34135ac50f7fa1a165c735
Reviewed-on: http://gerrit.openafs.org/7810
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6b0bc2f6ff6ffecb4dd158ba5d2021d46bad7da0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 21 12:02:20 2012 -0400
Windows: memory leak AFSInitPIOCtlDirectoryCB
In an error occurs during AFSInitPIOCtlDirectoryCB processing
the nonpaged pool allocation would be leaked.
Change-Id: I092538202d84bd65476ba21a68e210d5f626ead2
Reviewed-on: http://gerrit.openafs.org/7809
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit af1bdc2b7758615ac22505128415a4f10a1f8f10
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 21 12:00:21 2012 -0400
Windows: memory leak AFSRemoveVolume
Do not leak the
VolumeCB->ObjectInformation.Specific.Directory.PIOCtlDirectoryCB->NonPaged
allocation and the associated lock object.
Change-Id: Ie6455c49fdcee578ab31355df1b2237f27a92e1d
Reviewed-on: http://gerrit.openafs.org/7808
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fe61f35d35003121c94b717a1dd79119c9073adc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 21 11:52:22 2012 -0400
Windows: AFSExFreePool -> AFSExFreePoolWithTag
Replace AFSExFreePool() with AFSExFreePoolWithTag() which is
a wrapper around both ExFreePool() and ExFreePoolWithTag().
If a 'Tag' value, is provided, ExFreePoolWithTag() is used.
Otherwise, ExFreePool().
Specify allocation tag values wherever possible. Path name buffer
tags are not specified because they are allocated using multiple
tags. The same is true for network provider string buffers.
This is being done in order to debug a memory corruption issue.
Warning: this is a change to the AFSRedir->AFSRedirLib interface
and therefore both drivers must be updated with a reboot and
not simply restarting the service.
Change-Id: Id5c0503141d1077d6c2beae5d28602160105a312
Reviewed-on: http://gerrit.openafs.org/7807
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8a11435eed2d3d1d1aef0ebb92822b34299b2e4d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 21 11:57:40 2012 -0400
Windows: Freeing SeQueryInformationToken allocations
Memory allocated by SeQueryInformationToken() must be freed with
ExFreePool() and not AFSExFreePool().
Change-Id: Iece2c37d5dc524204cbf3d8d6869148e1a0ce88e
Reviewed-on: http://gerrit.openafs.org/7806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3ec1bdf9c74bd250d49065fa84475a5123461744
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 10:20:02 2012 -0400
rx: fix abort on missing service
patchset 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1 introduced
the possibility that a NULL connection pointer could be dereferenced.
Prevent it.
Change-Id: Ic813642c8073cedc3e4df578c1b06fecd22cfbdf
Reviewed-on: http://gerrit.openafs.org/7794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit bbf92017b084a8ba8df81effe06d11421cdf4bb0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 16 16:53:32 2012 -0400
rx: rxi_ReceiveDataPacket do not set rprev on drop
In KERNEL builds if there are no available packet buffers the
new packet is dropped on the floor. In that case, the call's
rprev field should not be updated because the packet was never
"received" for delivery to the application.
Remove a dead comment from the same block of code.
Change-Id: I12a2b1618a430880d18efee48e6348e6f9ba8119
Reviewed-on: http://gerrit.openafs.org/7784
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 91f17adf01e54302b0c8d86df5627214f0bdf5d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 01:00:38 2012 -0400
Windows: avoid memory overrun during extent release
While tearing down extents, if an extent is found to be in use
it will be skipped. Must use 'ulReleaseCount' as the index
into the released extent array.
Change-Id: Iaf8a82c77ac8f4ddb30b35f43a4ce7a70f4a32a8
Reviewed-on: http://gerrit.openafs.org/7796
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7ec46ced616f7af72fa3ce1d60304ae475977a28
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 00:59:33 2012 -0400
Windows: more roken.h include corrections
Change-Id: I02d4347b870ff1e06b4f144bedb37d50c697c5ba
Reviewed-on: http://gerrit.openafs.org/7795
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 14c98f9df9fd7686f6fc453edaf70168e19e6da9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 20 02:54:18 2012 -0400
windows: add afsroken to afssvrcpa NTMakefile
Change-Id: Iae17ad514bc9ce9a6786e820105a413b31a419ff
Reviewed-on: http://gerrit.openafs.org/7797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 281b5385855e98c9aa989bfba91451c56a1b73f1
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Fri Jul 20 18:11:38 2012 -0400
uafs: avoid unnecessary type-punning
There's no need to declare a separate buffer and initialize a structure
inside it when we can just instantiate the structure directly.
Change-Id: Idbcad31343ce7f074015f5921a4997d3f6c9799a
Reviewed-on: http://gerrit.openafs.org/7798
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6060374216bb899280d619b1b5834ffcb6dad2d7
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Jul 19 11:30:02 2012 -0400
macos: no bulkstat
i have a bulkstat refactor in mind, but this *still* isn't safe
on osx. disable as is on 1.6
Change-Id: I9446a6307e4890e4f7a78ab7fc054d84c39c992b
Reviewed-on: http://gerrit.openafs.org/7792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 56b5b9a1c51c2197923aa373c180a834edabe4f6
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 22:07:05 2012 -0400
ubik: refactor error exits in internal CallIter()
Originally, the first store to "code" was dead here. Refactor the
error exits to follow the non-error exit path, which has the effect
of making the store to "code" live again (and also makes it less
likely that any new cleanup code will be unintentionally omitted).
In the ubik_ClientInit recovery case, handle the possibility that
aproc() returned zero and return UINTERNAL rather than letting the
caller think that this operation succeeded.
Change-Id: Idc198aa7a6e21975faaca9f159e822c9e3f66d98
Reviewed-on: http://gerrit.openafs.org/7776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 33a761ebd11e33b5e111e67204218e8f67bef431
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jul 17 15:34:07 2012 -0400
macos: get more packets if requested
analogous to eead07418f13cd87a90770f03ea5118c546d8f1a for ukernel,
this is for macos' upcall procedure
Change-Id: Ia9d6108d8bb45b9bd33fe9a3af761dfe15248c6e
Reviewed-on: http://gerrit.openafs.org/7788
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 50009267bb6deaa431042dc99ac6e5d913b1412a
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jul 17 00:15:56 2012 -0400
macos: native apps need 64 bit support
the installer bundle, prefs pane and backgrounder all need to be 64 bit
mode since the system uses them as plugins
Change-Id: Ic2242ed8c993b7ed0a7c15ada78b625799bb446a
Reviewed-on: http://gerrit.openafs.org/7787
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3dd230e8595e2b9635d6ec412a145ae3be229b7a
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jul 16 22:32:55 2012 -0400
macos: fix growlagent icon handling
the whole of the api used for icon handling when you steal it
from a resource fork is deprecated in new macos. fine. we'll just make
an app bundle by cheating, move andy into a standalone icns file,
install him into the "bundle" and open it the macos way.
Change-Id: I94b3fdb5fdb08b28400bd0f6f6a18a07840124df
Reviewed-on: http://gerrit.openafs.org/7786
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit e359aa5c617e668535bc28eb88a139f1ae85851f
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jul 16 15:55:54 2012 -0400
libafs: pointopoint not supported in ukernel
afs_server.c:1054: error: 'struct usr_in_ifaddr' has no member named 'ia_dstaddr'
well, for now, bye bye!
Change-Id: I3246a52e0bbdcfb92045de7e21febe0e65255db2
Reviewed-on: http://gerrit.openafs.org/7783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e6aa586a996e32b3def4b8108815730fcfbf1463
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jul 16 15:16:53 2012 -0400
macos: future-proof MakefileProto.DARWIN.in
if new cases show up which match the current ones, they just work.
darwin60 and older were already killed from the tree, kill here also
Change-Id: Id246e13985c4752e99f606efd009bc5ce2871691
Reviewed-on: http://gerrit.openafs.org/7782
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 25556cf0015c9930adcd8a36d06f3008625db993
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jul 16 15:09:11 2012 -0400
macos: actually link in shlibs
we need shlibs in /usr/lib, actually install the links
Change-Id: I172da1d043f70f7335c5d0aaaa9a301eef542243
Reviewed-on: http://gerrit.openafs.org/7781
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit f25734e9226232e03a397e0eded9a873ea0dfaa8
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 22:47:51 2012 -0400
afs_vcache: remove redundant assignment in afs_FlushAllVCaches()
Don't do in the body of the loop that which the loop itself
already does.
Change-Id: I41b5cbee86ab783d59024d8961c933525a5128d7
Reviewed-on: http://gerrit.openafs.org/7780
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4a6a95fdb4ffb8f2681beb5e4e62ddd378baf75d
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 22:16:27 2012 -0400
afs_server: remove 3 dead assignments in LoopServers, move live one
The assignments to conns, rxconns, and conntimer are all dead, so
remove them. The assignment to nconns is live, but rather far from
the for loop that actually uses it; move it to just before the loop.
Change-Id: I8daf642630cc2d468ba7db42de46b69cd88fac28
Reviewed-on: http://gerrit.openafs.org/7777
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 73ff09513013ae3c6b29b1b7b0a6e76b4fd260f7
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Jul 15 03:03:00 2012 -0400
macos: next version support
support things beyond 10.7
Change-Id: I7a50f569fd43e0e1ed3c74f0480a8e2521df1bc5
Reviewed-on: http://gerrit.openafs.org/7763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a27a8a66c2c27a62afa566679ef9cf424e758d9f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jun 26 15:09:07 2012 -0400
vldb_check: off by one host address table error
Fix several off-by-one errors when traversing the IpMappedAddr
table in vldb_check. The last index (254) was not checked
in several places.
Change-Id: Ida5039fefa1fa55f6f647dee4ed3a26dd84a85d0
Reviewed-on: http://gerrit.openafs.org/7614
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 36c6c46bd081e0278611c3bb6ae25dd765f10648
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 7 12:58:54 2012 -0400
libafs: use afs_ResetVCache in flush volume data
Remove some code duplication by using afs_ResetVCache
in the flush volume data pioctl. Adds a flag to
ResetVCache to avoid unneeded calls to purge dnlc
when reseting all the vcaches in a volume.
Adds freeing of vcache link data in the flush volume
data pioctl.
Change-Id: Ib94e6b4d28078a03d2ffd217998bbc345c4968e4
Reviewed-on: http://gerrit.openafs.org/7538
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit cc4552c9a1ca4a12d3d7f64d98185f8d2025834d
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 21:53:17 2012 -0400
util: eliminate dead store in hostutil_GetHostByName
Change-Id: Ibf6712ec239a5f4d163c145f5444c086277e4445
Reviewed-on: http://gerrit.openafs.org/7774
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0b69ca34eb55f9d0a53e5f6b2e6155c7824b2fde
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 15:41:25 2012 -0400
rx: dead initialization in rxi_RestoreDataBufs
Don't initialize iov only to overwrite it immediately below.
Change-Id: I5b5660f31e02094a8871a0726dbd5be7ae6f9ea6
Reviewed-on: http://gerrit.openafs.org/7770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e319f0ed8bf110d3b614f8e1feca73e6601b4a2d
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 15:44:42 2012 -0400
vol: dead initialization in VWalkVolumeHeaders()
Actually, all of the initializers in this small function are dead.
Change-Id: If89fe3222ec39b34233f92f3aafd458f5723b0c5
Reviewed-on: http://gerrit.openafs.org/7771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6422be38fc8084a58b70412e3cfe087a4e1e57b8
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 22:00:04 2012 -0400
rx: eliminate dead variable sdl in rx_getAllAddr_internal()
Near as I can tell, sdl is only assigned once, and is never read.
Change-Id: I145be12aef902db3ad149be39c1db360775d4456
Reviewed-on: http://gerrit.openafs.org/7775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e194a8b7f811a995e8f7147a12ac4be6e96f873f
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 14:09:11 2012 -0400
util: LogCommandLine: argc is an int, so assert that it's positive
In practice, argc should never be negative, but by convention it's
a signed int, so change the assertion to require it to be positive
rather than merely nonzero to get some help to the static analyzer.
Change-Id: I2d6c00b8ad2f8d573d717f1e2b88a4bb902f125c
Reviewed-on: http://gerrit.openafs.org/7765
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f4b2ad4dc974b441819d0113efbb81c537b8ed97
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 14:18:12 2012 -0400
budb: don't malloc(0) on error condition in GetText()
malloc(0) is non-portable (may return a pointer to no space, or it
may return NULL. Just set the result to NULL without bothering to
call malloc(), as is done earlier in this function.
Change-Id: Ic3562e722113a1409ec7c30bd571e9470b3e092b
Reviewed-on: http://gerrit.openafs.org/7766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0527cc793054e582ea8be8c0dc76df9e2ca0ab1b
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 14:54:47 2012 -0400
util: in util_newTable, don't leak Table on error
It is unlikely that this memory leak actually matters as the caller
will normally just exit.
This whole source file could stand to be reformatted.
Change-Id: Ic5cb52a73ac09ae492c6e6ab606dfaf92a1ab8bf
Reviewed-on: http://gerrit.openafs.org/7767
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 53c432d1feba6454af4526b4d797b45a6f205eac
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 15:01:29 2012 -0400
rx: don't leak a connection hash table in unlikely error condition
If getsockname() returns an error (which shouldn't be possible),
rx_InitHost would leak a connection hash table (which probably
doesn't matter because the caller will just exit anyway). Make
the analyzer happy by freeing the memory anyway.
Change-Id: If8e78ebfb787d2dc1c0b9f95f91b6e7510c9e307
Reviewed-on: http://gerrit.openafs.org/7768
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3af6beea4b03bd4dd62b23a6a0df149037b456c0
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 15:13:55 2012 -0400
volser: don't derefernce null pointer in copyVnodes()
split_volume() can call copyVnodes() with parVnode == NULL, so guard
the one reference to parVnode (a memcpy()) to avoid a fault.
Change-Id: I631a78bcfa6a7a465e997a6714849ca0d2d86f86
Reviewed-on: http://gerrit.openafs.org/7769
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d2d591caf2c9b4cf2ebae708cc9b4c8b78ca5a5a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 3 15:58:01 2012 -0400
viced: RXAFS_GetVolumeStatus remove access check
The AFS file server had always performed a PRSFS_READ permission
check on the volume's root directory (1.1) vnode before responding
succesfully to the client. A successful response contains the
following volume state information:
Message of the day (if any)
Offline message (if any)
Online flag
InService flag
Blessed flag
NeedsSalvage flag
Type
MinQuota
MaxQuota
BlocksInUse
PartBlocksAvail
PartMaxBlocks
All of this information is publicly available to anonymous users
via other services so it is odd that it is hidden from anonymous
cache managers.
As sites begin to tighten the ACLs on volumes due to privacy
and security concerns this READ permission check is begin to
cause problems for Windows clients that rely upon the quota and
block counts to determine whether or not it is likely to be safe
to perform an extending write. In many environments volumes are
being configured such that the root directory is 'l' for all and
only the subdirectories provide for 'ridw'. Under these situations
the user is able to read/write the data but cannot determine how
much free space is available. Since all of the data returned by
RXAFS_GetVolumeStatus is publicly available, the patchset removes
the access check entirely.
Change-Id: Ic8a8d755b0ed61789a49243827083ae97c137560
Reviewed-on: http://gerrit.openafs.org/7705
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d2ef4a6e1f685564ed51e8c1bc82642b406e936a
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 22:34:42 2012 -0400
bozo: small-notifier: don't ignore return from system()
Nobody can possibly be using this program, but even so, don't ignore
return values. Unfortunately, the return value of system() is a bit
complicated to interpret.
Change-Id: I6edbbb7c010b4e534de9033b91849e2d54bf4b25
Reviewed-on: http://gerrit.openafs.org/7778
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b9b575c8807e00aa5c1b5c1f26f57982a860d8c3
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 22:42:10 2012 -0400
budb: remove dead assignment in verifyFreeLists()
Change-Id: I1c4b6e9f4961395815ca379dd031a309b53d5364
Reviewed-on: http://gerrit.openafs.org/7779
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c29c302347ba93bd3dc5f88f9c235cb89a0413b8
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 21:35:21 2012 -0400
afs_server: spell IFF_POINTOPOINT consistently
The interface flag has one fewer T than normal English usage would
suggest, so this code was never compiled on systems that don't have
the normally-spelled version as an alias.
Change-Id: I7ae4ab45eda937d122894828ec8fdc104f43392f
Reviewed-on: http://gerrit.openafs.org/7772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ce1917c801b8338629723b4ccf38b336e873aef1
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 21:47:35 2012 -0400
volser: dead store in UV_MoveVolume2
Change-Id: Iee66b99388c7deb0109aaf676ad28ec9c27e6409
Reviewed-on: http://gerrit.openafs.org/7773
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 59e0efd22e9a36102a7aa6a544f89f6f2cd3edea
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Sun Jul 15 11:56:15 2012 -0400
FBSD: don't reference libc_r; no release OpenAFS works on still uses it
libc_r is the old user-mode threading library. Modern versions of
FreeBSD don't include it, and the conditionals here that (nearly
always) override it with the correct library, libpthread, are true
on every version of FreeBSD for which OpenAFS might plausibly be
compiled. So just use the correct library all the time.
Change-Id: I8f813814973cec3173f44636523c3bf0bee27b3e
Reviewed-on: http://gerrit.openafs.org/7764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6b8c43559073caa7f0b9db25bab4812606740e7d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 6 16:04:28 2012 -0400
Windows: add cm_ServerListSize()
cm_ServerListSize returns the length of a cm_serverRef_t list.
Change-Id: I6dc1e5e2c23efffe9d6c210ba1c8702d00aabe8f
Reviewed-on: http://gerrit.openafs.org/7759
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2dbe1316a17716e57013cf41e7b19ec898b94cbf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 6 16:02:38 2012 -0400
Windows: add cm_IsVolumeReplicated()
Given a file id indicates whether the volume it is located on
is replicated or not.
Change-Id: Icae0a387fc26e2a76b4b6f87fdb5c330da31a96b
Reviewed-on: http://gerrit.openafs.org/7758
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a9be0735b5e23adefc5fd57083ca206e61820bab
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 9 09:34:22 2012 -0400
Windows: Redesign of server preferences
Server rankings should be composed from three values:
1. administrative preferences
2. network address locality
3. peer performance (rtt and congestion window)
This ensures that local subnet servers are always
preferred.
Add a new rank for down servers so they are always
sorted las in cm_serverRef lists.
Change-Id: Id00e151fc1acd65db558571e6a3a0e7cfbf3c6ca
Reviewed-on: http://gerrit.openafs.org/7757
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 65a5e3ce92c47a87c3dca54cec456ae0337c78ef
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Jul 4 17:54:02 2012 -0400
vlserver: fix logging of ip addresses
Remove the spurious dates surrounding IP addresess in the VLLog.
Instead of multiple calls to the logging function for a given log
line, format a string containing the addresses and call the log
function once.
Changes the log output from,
... The following fileserver is being registered in the VLDB:
... [Tue Jul 4 14:11:43 2012 192.168.10.128Tue Jul 4 14:11:43 2012 ]
... It will create a new entry in the VLDB.
to,
... The following fileserver is being registered in the VLDB:
... [192.168.10.128]
... It will create a new entry in the VLDB.
Change-Id: I6c4ac2dcc60fe4c5ced79017b91049f0c327e935
Reviewed-on: http://gerrit.openafs.org/7750
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f70952a347dff39bd445f8361224e1c622a5b1cf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 10 00:13:04 2012 -0400
Windows: cm_SyncOp waiting logic
Use interlocked increment and decrement to track the waiters
and use the wait queue itself to determine if there are waiters
instead of the CM_SCACHEFLAG_WAITING flag.
Change-Id: I9c570cb228d73253989932149346ecfc45804267
Reviewed-on: http://gerrit.openafs.org/7752
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 80732b94ef8a8fd239d8f77d8e10f0d770f0ec24
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 10 00:09:14 2012 -0400
Windows: remove unused CM_SCACHEFLAGs
CM_SCACHEFLAG_CALLBACK and CM_SCACHEFLAG_STATD were cleared at
various points and tested at various points but never set.
Remove them.
Change-Id: I018c51febf01e1311dc38e3779e8c8880890f20a
Reviewed-on: http://gerrit.openafs.org/7751
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6fb3b7aa317a6429daf86b140785875a70686bac
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jul 7 14:11:23 2012 -0400
Windows: not all short rx_Read[v] reads are fatal
When performing a RXAFS_FetchData[64] RPC, a short read from
rx_Read[v] is not a reason to stop processing the call unless
it is the first read and the file server FetchData offset bug
has been detected. If not, only stop processing if the
rx_Read[v] return value is <= 0.
Change-Id: I5b10ce7903686fa3d9c251e6c92c4bcec376ed40
Reviewed-on: http://gerrit.openafs.org/7749
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 606d9554e2880c2978675b7eae3fa5f53bd07c3d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 9 00:49:13 2012 -0400
Windows: record mount point string data version
The Windows cache manager stores the mount point or symlink target
string in the cm_scache_t object. If the string is the empty string
then the target needs to be resolved. Otherwise it is considered
up to date. With this approach, care must be taken to ensure that
the string is erased whenever the data version changes.
This patchset records the data version of the mount point target
string in the cm_scache_t object. Being up to date is determined
by comparing the current data version of the object to the mount
point string version. A match and the string is up to date.
Change-Id: I4dfdc1af5894548afb35e84e77f7f607674bd7af
Reviewed-on: http://gerrit.openafs.org/7745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit df46bb407a9073374337f4b8e4291e18c74e548c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jul 8 02:00:17 2012 -0400
Windows: initialize afsStatus and callback structs
In cm_GetBuffer, cm_GetData, cm_VerifyStoreData
Change-Id: I4bb965ead41f99c6c677cce35a784b53b1f6b310
Reviewed-on: http://gerrit.openafs.org/7744
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 8115841e2fc9d827a7207ddc18e5c84e466ed7e7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 6 15:07:13 2012 -0400
Windows: cm_MergeStatus unknown interface numbers
Ignore status information if the interface number is unknown.
Currently only version 1 is recognized.
Change-Id: I02618ef81e42ad5b6ef903e2f25598dfb7053ca4
Reviewed-on: http://gerrit.openafs.org/7743
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 234bedae6ef506ec1ff53854a22548e892db3f11
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jun 20 16:28:51 2012 -0500
vos: Avoid creating volume with the same RO/BK ids
If we specified an RW id of 5, an RO id of 6, and no BK id, this code
would assign the BK id to RW+1, or 6. This gives the RO and BK volumes
the same volume id, which is a mistake. Choose a different id instead.
Change-Id: I7910008dd6147a95d482337f91926e9e0d924b9e
Reviewed-on: http://gerrit.openafs.org/7603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5800b7f23cf04525a6d570f4d97a9842d73a4cb8
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 28 23:16:33 2012 -0500
viced: fsprobe needs MT_LIBS
fsprobe is built pthreaded, so it needs MT_LIBS; otherwise HP-UX and
possibly other platforms complain about missing pthread symbols. Just
copy the libs from the fileserver link line.
Change-Id: I78e69c9ea45e983e997b1bc1bb59f97ee07c3e2f
Reviewed-on: http://gerrit.openafs.org/7609
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9be78ab820476e27b31440dc2f6ba425d21d5436
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jul 6 00:29:59 2012 -0400
ptserver: unused by set variable 'eid_s'
Third declaration of 'eid_s' in WalkNextChain() set but unused.
[-Werror=unused-but-set-variable]
Change-Id: I7a4e2ea3dea3d58379e31d3c6cb4b3169a882bce
Reviewed-on: http://gerrit.openafs.org/7737
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9bc068edc890991b5d384108ce972c12d3c18975
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 16:55:03 2012 -0400
Windows: interlocked ops for osi lock flags
Use interlocked operations to set and clear the flags in the osi
mutex and readwrite lock objects.
Change-Id: I92089650d3474efb76c45293b5209b3e2350d983
Reviewed-on: http://gerrit.openafs.org/7720
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d5f067aa735968d4da6685f0883ca978d5e6795c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 16:52:51 2012 -0400
Windows: use spin counts for osi base locks
On multiprocessor systems, spin counts are faster than entering
a processor wait state when there is critical section contention.
Microsoft recommends a count of 4000. This feature is only available
on XP and above which is fine since OpenAFS master and 1.7 no longer
support Windows 2000.
Change-Id: I1b40d00b2a91e60e1676a53e1c38eb5f9bfadc69
Reviewed-on: http://gerrit.openafs.org/7719
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f4baf7cf99ef52f3ce9d6a7ee577cd9140a8bdc5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 21:13:21 2012 -0400
Windows: X86 DEBUG Interlocked Or and And
X86 DEBUG builds do not have a native InterlockedOr or
InterlockedAnd. Therefore, we must provide our own.
Change-Id: I48f86feb58c96e327500e802340a213c0f70d5e4
Reviewed-on: http://gerrit.openafs.org/7726
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7f646382f633fb83d2054298cd5ce12a7bfa250c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Jun 28 17:24:49 2012 -0400
vldb_check: remove unused functions
Remove the readSIT function, which has been unused
since the IBM days. Remove the commented out and
unimplemented writeUbikHeader stub.
Change-Id: Ic2cebba6ddf803a537a6b1e5f24db51560209436
Reviewed-on: http://gerrit.openafs.org/7613
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 828ef9c39a14af265796755718c10b63513f952c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 28 18:56:47 2012 -0500
doc: Add fs bypassthreshold man page
FIXES 130050
Change-Id: I0ffc7b93ed9dd93765a25efd60fe3430a86366cf
Reviewed-on: http://gerrit.openafs.org/7602
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 52f3878da4b8f5356e7799f2659d41cade0dbdee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 18:25:09 2012 -0400
Windows: remove used 'deltas' from cm_CheckServersMulti()
Change-Id: I9dd5e72a8fe748a06aa4d008888a41017d60570c
Reviewed-on: http://gerrit.openafs.org/7725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3b3b620a03b56dba7f0696f8175b9fb2c8fbd6ae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 18:22:24 2012 -0400
Windows: Apply cm_GetVolServerList() to cm_ConnFromVolume()
Use cm_GetVolServerList() in cm_ConnFromVolume() to ensure an
error is returned instead of dereferencing a NULL pointer if
the serverRef list for the requested volume cannot be obtained.
Change-Id: I265b7e8b64fcf6b4444c7d504e5109d67fa48089
Reviewed-on: http://gerrit.openafs.org/7724
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4e3400414f676b9a0033f041f81671534ffdab99
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 18:21:51 2012 -0400
Windows: Apply cm_GetVolServerList() to cm_Analyze()
Using cm_GetVolServerList() it is possible to simplify
the logic in cm_Analyze(). It is no longer necessary
for cm_Analyze() to call cm_GetServerList() which must
obtain its own reference the the cm_volume_t object via
a fileId lookup. This reduces lock contention and makes
the code a bit more readable.
Change-Id: I3a39458676af06fd473489d639bf9d2fe80c0b9d
Reviewed-on: http://gerrit.openafs.org/7723
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 2575d87824fbf5d0e1a5fcb3a1b49949d6fbe2ee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 18:16:09 2012 -0400
Windows: Add cm_GetVolServerList
cm_GetVolServerList() is a wrapper for cm_GetVolServers() that
returns CM_ERROR_NOSUCHVOLUME if the server list cannot be
obtained for the requested volume.
Change-Id: I1ab21b3f6ca71507cc382738cb50f87e92ee2ce2
Reviewed-on: http://gerrit.openafs.org/7722
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ef5686b1a11e1a6ba4590b09170306190d6c7393
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 18:06:13 2012 -0400
Windows: Modify cm_GetVolServers and cm_GetServerList
Move the determination of the 'replicated' state into
cm_GetVolServers() so that cm_GetServerList() and
cm_ConnFromVolume() can be implemented without duplicating
the resolution of the cm_vol_state_t object.
Change-Id: I355cb2cdf7e327742df7936171ad3dc604f135df
Reviewed-on: http://gerrit.openafs.org/7721
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5b9e9265a0df707e9fb79842ab5aa94b59b8e88e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 14:54:04 2012 -0400
Windows: cm_ConnByServer hold userp->mx only while necessary
The cm_userp_t does not need to be locked while the cm_conn_t
force new connection processing is taking place.
Change-Id: Ia3711d393d60382b18f7e45621561d2015b97af7
Reviewed-on: http://gerrit.openafs.org/7718
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c3ce54e6b7be8c2996a0fda2d7ad9780fca2f0ef
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 14:33:50 2012 -0400
Windows: cm_ConnByServer add conn to list after init
Do not add a newly created cm_conn_t to the cm_server_t connsp
list until after the object is fully initialized.
Change-Id: Ic5605abefb51d9342f0d249903e13e99b90452b7
Reviewed-on: http://gerrit.openafs.org/7717
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f73aebbe8772e62bf8930d70e9edab2f82ff8984
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jul 5 11:03:35 2012 -0400
Windows: cm_HaveCallback optimize .readonly
If the cm_scache_t has a registered callback, there is no reason
to obtain a volume reference for a .readonly. Just use the
callback.
Change-Id: I40a696b9c5fa2e8104837871236c41c338dfbdf9
Reviewed-on: http://gerrit.openafs.org/7716
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 561b9ce80938d316223f2b313f8224fe06af9d5a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 3 15:38:33 2012 -0400
Windows: RDR RXAFS_GetVolumeStatus vs 1.1 'l' only
The Windows redirector relies upon the ability to obtain volume
status information to decide whether a file system volume object
can be created and whether or not an extending write can be
permitted. As of this writing, the file server always performs
a PRFS_READ access check on the volume's root directory (1.1)
vnode as a condition for releasing the volume state information
which includes:
Message of the day (if any)
Offline message (if any)
Online flag
InService flag
Blessed flag
NeedsSalvage flag
Type
MinQuota
MaxQuota
BlocksInUse
PartBlocksAvail
PartMaxBlocks
All of this information is publicly available to anonymous users
via "vos examine" so it is odd that it is hidden from anonymous
cache managers. When RXAFS_GetVolumeStatus fails, the AFS redirector
was failing to create a file system object for the AFS volume. That
in turn prevented the volume from being accessed even if the user
had 'l' in the root directory and full access everywhere else.
This patchset will make up fake data for the AFS volume if the
RPC fails. However, doing so does have consequences. The client
will be unable to make an accurate determination regarding free space
on the file server. As a result, an extending write may be permitted
which writes data into the system page cache which in turn cannot
be written to the file server. Such data will be lost and unrecoverable.
Change-Id: Ic818ce9d51893181941f41d6628394b5917dc811
Reviewed-on: http://gerrit.openafs.org/7704
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 261ec65f20df46ed043d16a869d042cf61c6eda7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 3 12:51:27 2012 -0400
Windows: HaveCallback vs readonlyVolumeVersioning
If the cm_scache_t volumeCreationDate is 0, the field is not
valid for comparison. Add a check during the have callback test.
Change-Id: I95bbf229d9ee1c7acfd4b7fe30242faaa4c22cf6
Reviewed-on: http://gerrit.openafs.org/7680
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c3485a35b7a548d850d55dde4634ba78e5330aa9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 3 12:49:53 2012 -0400
Windows: HaveCallback vs OfflineRO Is Valid
commit f716962ab41847af4450d0a361f5de9195b32ed0
inadvertently broke the offline .readonly is valid functionality
when readonly volume versioning is disabled. Restore it.
Change-Id: Iae282f394d49ca5f558a62819bc2bbd8dd7f152e
Reviewed-on: http://gerrit.openafs.org/7679
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 64a37fa9f916cd1e8f0ec9bb252fda13aa8b4cd4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jul 3 12:42:52 2012 -0400
Windows: cm_DiscardSCache volumeCreationDate
commit f716962ab41847af4450d0a361f5de9195b32ed0
clears the cm_scache_t volumeCreationDate field.
It shouldn't because the volumeCreationDate is not a property of
the callback. It is a property of the status information which
does not change simply because the callback expires.
Change-Id: I3f73cf89588de6c1c87434cd04b86939d45cfa43
Reviewed-on: http://gerrit.openafs.org/7678
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 673127f6928c9c2fb5a3b0400fa36d4afcf1e5df
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jun 29 00:35:49 2012 -0400
Windows: add missing items to 'clean' rules
Change-Id: Ibf7ce081d789a5940033ecdcfd62515824176368
Reviewed-on: http://gerrit.openafs.org/7653
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 17584782a4d76facf5a89a3eeeebfcc23582b3e8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 25 23:06:30 2012 -0400
Windows: afslogon expand short domain names
Depending on how the user specifies the domain name during login,
NPLogonNotify may be given a short or a full domain or kerberos
realm name. If the name is the short name, attempt to expand it
automatically if there is no 'realm' configured for the short
domain name.
This patchset relies upon data in the local registry instead of
using an API such as NameTranslate in order to avoid network
queries to the domain controller that might not be reachable.
Change-Id: Ib2cd08bca5223fa847a462520074bb758191539d
Reviewed-on: http://gerrit.openafs.org/7650
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 712c0c1d0e506a9010d7a5cc93dfd49bee006d41
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 25 01:38:41 2012 -0400
Windows: afscreds import lsa before renew expiring
Change-Id: I53d3d000a0970089417d7855fda7a97ba4e61000
Reviewed-on: http://gerrit.openafs.org/7649
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0834e40bd7444ba1f1770c60b387cf513b279a4b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 25 01:33:02 2012 -0400
Windows: Remove HELP from afscreds
The old .hlp format is no longer supported and the text of the
help files is long out of date. Remove the HELP buttons from
the dialogs and all references to WM_HELP message processing
from the application.
Change-Id: I4c735993c7a79d46cbbc49440aa6d77b6861ff85
Reviewed-on: http://gerrit.openafs.org/7648
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 91795c659087371f941231e51fe284de010e60b1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 22:03:21 2012 -0400
Windows: afslogon major refactoring NPLogonNotify()
This is a major refactoring of NPLogonNotify() that is meant
to reduce redundancy and add functionality. Key highlights
include:
* New Domain\user hierarchy that permits configuration
settings to be applied on a per user basis instead of a
domain basis. As part of the extension the username itself
can be mapped.
* Attempt to import the MSLSA credentials prior to performing
KFW_AFS_get_cred().
* Do not perform redundant KFW_AFS_get_cred() calls.
* Add a flag to indicate if the authentication name is the
LSA principal name.
* Add more debugging messages.
Change-Id: Iacd6c6b4d3fe25f07a9c6982d0859eee22d09fe8
Reviewed-on: http://gerrit.openafs.org/7635
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 76ae0f01b32d3e87273ff6d2c9c20eec59e22e16
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:58:26 2012 -0400
Windows: afslogon cast away warnings
cast away size_t to int warnings in 64-bit builds.
Change-Id: I1200fe6235d75f87c5d8e78496baae29b3c5242c
Reviewed-on: http://gerrit.openafs.org/7634
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 79f68de80e56179cfc5158fdcb51c34cfa864802
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 29 12:36:36 2012 -0500
Remove empty Makefile continuation lines
HP-UX make gets confused by constructs like:
FOO = bar \
BAZ = quux
Where a line continuation is followed by an empty line. So, get rid of
all of these in the tree. Not all of them matter, but removing all of
them makes it easier to find these, and catch them in the future.
Change-Id: I7d5ef000b5b55de4b71c183589fbfe36e3880ba1
Reviewed-on: http://gerrit.openafs.org/7611
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4707174938b92df189697a2b7e463438c37c1ed0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jul 1 22:19:08 2012 -0400
Windows: cm_UpdateVolumeLocation misplaced lock
The volume->mx was obtained in the wrong place which resulted
in the potential of a panic caused by obtaining the mutex when
it was already held.
Change-Id: I812ed57bef93c60358591a2a1e19009fc6bb1a2d
Reviewed-on: http://gerrit.openafs.org/7654
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4929b0cb0b57a803a84673fe0faf619d088ed910
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jun 28 22:29:19 2012 -0400
Windows: WiX backup additional registry keys
Move backup storage to HKLM\Software\OpenAFS\BackupSettings
Backup HKLM\SYSTEM\...\Services\AFSRedirector
Add ..\TransarcAFSDaemon\NetworkProvider "Debug" value
Change-Id: Iecf0c99ec941fee2bf8ed7f1e8224a50d751bdef
Reviewed-on: http://gerrit.openafs.org/7652
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 03dfcce05aabf2ceecdb84528fc837176c52af77
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 27 01:00:20 2012 -0400
Windows: ensure TreeLock obtain and release same pointer
The indirection ObjectInformation->ParentObjectInformation does
not appear to be stable. When acquiring and releasing a parent
TreeLock, use a local variable to store the ParentObjectInformation
pointer and use that to access the TreeLock. This will ensure that
the resource obtained is the one that is released.
Change-Id: If359de0f7572cfa4e401baa47affa6872b79e932
Reviewed-on: http://gerrit.openafs.org/7651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit f3f282265a3d9e3c968fd06793e6d1a91337f443
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 24 10:16:42 2012 -0400
Windows: Media Protected if create on RO volume
If there is an attempt to create a file/directory on a readonly
volume as indicated by the Volume Characteristics, return
STATUS_MEDIA_WRITE_PROTECTED immediately. Do not bother contacting
the afsd_service.
Change-Id: I809adacbbc429166d9a0e308752e484400799cb8
Reviewed-on: http://gerrit.openafs.org/7647
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 53413685ce56c5adba7b095265a62a5088977de2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jun 24 10:12:51 2012 -0400
Windows: Remove incorrect assert AFSVolumeInfo
When querying the volume information, the input FileId does not
have to be a volume root. Remove this extraneous assertion.
Change-Id: Iee4c64c395ad409dfcc3d3be31df63ceaf70fc07
Reviewed-on: http://gerrit.openafs.org/7646
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit dddd393198bc066e0fea478baf719c97cd51ec53
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jun 23 15:04:29 2012 -0400
Windows: NPGetConnectionPerformance
Restore the implementation of NPGetConnectionPerformance
in AFSRDFSProvider.dll. This time just return 0 for all fields
except for the preferred read/write size which is set to 64K.
When this function is not implemented at all, a query for
performance of a \\AFS path will be processed by the SMB
redirector. This can result in a 20 second timeout while waiting
for the SMB Browser query for "AFS <20>" to complete.
Change-Id: I67f7a3f0bb20a4be791bc153109e4e91144e00af
Reviewed-on: http://gerrit.openafs.org/7645
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5a6cf1494613b83332e4fad01980bb636c510a88
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jun 23 11:11:47 2012 -0400
Windows: ShellExt Add Prop Page only if AFS
If the file is not in AFS, do not add any of the AFS specific
property sheets.
Change-Id: Ie6a794d4b93821287a8d41c6f2e4931edaf45917
Reviewed-on: http://gerrit.openafs.org/7644
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d95d4fcca997ea3f8bfbf4a2c1f22c402446aad8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jun 22 16:51:00 2012 -0400
Windows: ShellExt display error if symlink not AFS
If the path in which a Symlink is to be created is not located
within AFS, display an error dialog.
Change-Id: I8e4cc6840d56184da7d842cc552d11624cdef89d
Reviewed-on: http://gerrit.openafs.org/7643
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 349c1f53383ee26eb13729d703b0b9e89865ec0c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jun 22 16:46:23 2012 -0400
Windows: Dir Invalidation Notify Current Object
When an invalidation is processed for a directory object,
send the notification on the directory object that was invalidated
not its parent.
Change-Id: I2f5e698e451576891a82364058baee3dc6717362
Reviewed-on: http://gerrit.openafs.org/7642
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 05ac74528b30d36c195ff8f4df343fa72082a213
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jun 22 00:25:26 2012 -0400
Windows: check perms before RXAFS_GetVolumeStatus
Instead of calling RXAFS_GetVolumeStatus naked, perform a read
permission check using RXAFS_FetchStatus first. This permits EACCES
caching to prevent unnecessary requests.
Regardless of which FileId is queried, always use the root vnode
FileId for the permission check. The file server performs its
permission check using the root vnode.
Change-Id: I3260bf0061beed5d95aae1d40e25d17be1811271
Reviewed-on: http://gerrit.openafs.org/7641
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 4785361388d21c46dd30332d89bb201522ee1a6c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jun 21 19:37:25 2012 -0400
Windows: cm_GetROVolumeID empty server list check
Instead of testing for a non-NULL server list, check to see
that the list itself is non-empty.
Change-Id: I1d8be33cd5f0713677d6013f5d7344400f6b1ae6
Reviewed-on: http://gerrit.openafs.org/7640
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 056399bb0d2186bae96223c7f7665e1bc0aed82f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jun 21 19:34:58 2012 -0400
Windows: Replicated requires more than one site
The VLDB response may include a list of servers some of which
are not valid replicas because the DONOTUSE flag is set or
because the replica site may be out of date. Instead of setting
the replication state based upon the server count in the VLDB
response, use the number of RO sites that were deemed valid
at the end of processing.
Change-Id: I47780e1633f3148f1f7c76af89224cbe37dde6c6
Reviewed-on: http://gerrit.openafs.org/7639
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 877053a8cd419c6a6470972f18c4adc7ddb0f163
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jun 21 19:29:26 2012 -0400
Windows: [Inline]BulkStat VolSync not accurate?
Instead of only recording the volume creation date when
cm_readonlyVolumeVersioning is true, record the date whenever
the RPC in use is not a RXAFS_[Inline]BulkStatus. This is
tracked by the addition of flags for cm_MergeStatus and
cm_EndCallBackGrantingCall which identify when the RPC was
in fact a BulkStat variant.
As a reminder, pre- 1.4.11 and 1.6.0 file servers do not
properly set the VolSync structure when responding to BulkStat
RPCs. At present, there is no method of identifying when it
is safe to use them. When cm_readonlyVolumeVersioning is TRUE,
it is assumed that the file servers are new enough to do the
right thing.
Change-Id: Ida9a30b07ea646a094e9753af9d79f36ab095a98
Reviewed-on: http://gerrit.openafs.org/7638
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ae25cf277c8d70da0e6666316baf98d5c117a03b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jun 20 00:05:44 2012 -0400
Windows: force vldb lookup if server list is empty
The Windows cache manager can mark server references as "deleted"
which can give the impression that a server reference list is not
empty when it is. If the volume list is empty any attempt to
issue an RPC would fail with a CM_ERROR_ALLDOWN error. Since the
VLDB data is current, this condition will remain for two hours.
This patchset adds a new error, CM_ERROR_EMPTY, which is returned
when the server reference list is empty. cm_Analyze() is modified
to process the CM_ERROR_EMPTY error by attempting to update the
server reference list. If the update succeeds and the list is no
longer empty, the RPC is retried. Otherwise, the RPC fails as
before.
Change-Id: I13891c28ec9916bdd03c1b02e1c9049ed0581ed3
Reviewed-on: http://gerrit.openafs.org/7637
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e0b9b89dd98d0bf449556e3f28b479dd61e7eb95
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jun 19 18:48:31 2012 -0400
Windows: Freelance Short circuit all vol updates
As long as the cell is the Freelance Cell ID the volume updates
should be short circuited. There is no benefit to performing
the extra work.
Change-Id: I3449d8a11607406a616918f9a60796552a6cf6d4
Reviewed-on: http://gerrit.openafs.org/7636
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7fd1dc6c887c3bf786632901bc72b8250298a98f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:55:49 2012 -0400
Windows: AFS_Startup_Event must query Debug value
For proper debugging to be performed within the AFS_Startup_Event
processing, the "Debug" value must be queried from the registry.
Change-Id: I3b9fa48029f45022c9c5c00cadd64d0822878046
Reviewed-on: http://gerrit.openafs.org/7633
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 187af8d11350c2ff509244f216c72bdd4b88451a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:49:18 2012 -0400
Windows: NPLogonNotify secure erase password
The user's password is copied during the NPLogonNotify
processing, be sure to erase it from the stack before the
function completes.
Change-Id: Ib600f5656f7b32628e7105336ff0ffef8f15272f
Reviewed-on: http://gerrit.openafs.org/7632
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c8b1f007b530c072ee1f5654833f68e45a2eafd5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:48:05 2012 -0400
Windows: afslogon impersonate when deleting tickets
When tickets are obtained via the KFW_AFS interface the user
context is being impersonated. Do the same when cleaning up.
Change-Id: Iba43db2e66d8f02e9fbf4e076f6429a53838edea
Reviewed-on: http://gerrit.openafs.org/7631
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit ae5aba17cc5d45805f7d263fd645fba0d3bb5116
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:45:39 2012 -0400
Windows: afslogon make error dialog system modal
Prevent error dialogs from getting lost behind the desktop
during logon. Make them system modal. Add a warning icon
as well.
Change-Id: I63aa89d130af18846c86abe4a3327bf7b87e3058
Reviewed-on: http://gerrit.openafs.org/7630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7adb93cf51d56936d51b70758a959342728fea56
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:39:51 2012 -0400
Windows: afslogon MapAuthError
return WN_NET_ERROR (ERROR_UNEXP_NET_ERR) to indicate a problem
with this network provider when an error occurs instead of
returning WN_NET_SUCCESS.
Change-Id: Ideaab8b5043e9033adc19efa158c95415f561d0e
Reviewed-on: http://gerrit.openafs.org/7629
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 43d53bed6f591257fee55c343699ee1d3b223ff6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 21:37:49 2012 -0400
Windows: afslogon OutputDebugString
If the NetworkProvider "Debug" value has the 1th bit set (2),
generate all debug values to the debugger via OutputDebugString().
Change-Id: Ie7552fc5d154c178c38962672598a3b71321294d
Reviewed-on: http://gerrit.openafs.org/7628
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e513799232f72ce9deabe5097f06f42d4ce09bf2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 18 10:10:32 2012 -0400
Windows: Do not permit RDR worker threads to quit
If the DeviceIoControl from the service's redirector worker threads
fails the thread will terminate. This is a problem because if all
of the threads quit the afs redirector will end up deadlocking
all requests since there will be no method of delivering them to
the service. If there is an error log it (if possible), and retry.
Hopefully it will be transient.
Change-Id: I3ce5e338e41fd71c5289fe778789f0300c0b5ecd
Reviewed-on: http://gerrit.openafs.org/7627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d7690835aca12b3d38722a8dafa6efbfb1f549ee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jun 7 09:23:26 2012 -0400
Windows: misplaced brace in KFW_AFS_get_cred
A misplaced brace in KFW_AFS_get_cred() results in KFW_AFS_klog()
being executed twice in a row if successful. The second attempt
could fail due to a KRB5KRB_AP_ERR_REPEAT error issued by the KDC.
Change-Id: I6364c1e378eeeeec9f66449674c8cd240f029a8a
Reviewed-on: http://gerrit.openafs.org/7626
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit c639b08ebc1b202b571b245bb5eee075300b2ec0
Author: Steve Simmons <scs@umich.edu>
Date: Wed Jun 27 17:28:36 2012 -0400
Added build of cscope index to Makefile
Add ability to do 'make cscope' at the top of
the distribution tree and get 'cscope.out' built
in ./src. Index file is removed in 'make clean'.
cscope.out is now ignored in src/.gitignore
Change-Id: I2ae4eea0fce46a87a6b9d5a992fcb7288f6b5655
Reviewed-on: http://gerrit.openafs.org/7594
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 300cbb28b08c2fd3709942cc6c48e7d9369a3394
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 28 15:43:27 2012 -0500
doc: Correct volume size CAUTIONS notes
2 terabytes is 2^41 bytes, not 2^31 bytes. Also clarify that volumes
can be much larger than this.
FIXES 130188
Change-Id: Id667b2827900dbe447828d773c7b90e9611288a2
Reviewed-on: http://gerrit.openafs.org/7598
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit fcaa53a6d7289665b64037a0d96ae4c6cbf4f776
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 28 17:47:32 2012 -0500
doc: Fix whitespace errors
Change-Id: I3bbdf1075279d970bc011277b1f79291a5ba62a6
Reviewed-on: http://gerrit.openafs.org/7599
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3ff8ef499c56008f4d2ebf5b81e08e98eb0c0826
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jun 28 15:30:40 2012 -0500
doc: Consolidate CAUTIONS notes about volume size
Change-Id: I264906fb3f61db62c483982f613654a9a897f417
Reviewed-on: http://gerrit.openafs.org/7597
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 5e91c3b5d1a70f7af2e04ac74d98ae6b407f169c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 01:56:35 2012 -0400
Windows: export roken allocators
Use rk_alloc, rk_calloc, rk_free, rk_realloc instead of Windows
C RTL allocators. The OpenAFS source tree has a bad habit of
allocating memory in one module and freeing it in another. This
is not a problem for POSIX but is disaster on Windows. This change
ensures that all OpenAFS modules share the same allocator.
Change-Id: Ia57f1ba351e8dc24e7fbba87bbc9595bcf001ed6
Reviewed-on: http://gerrit.openafs.org/7625
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 9c0b7be87de83493ca1d5a01326982ce5c8c131b
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Mon Jul 2 15:00:30 2012 +0100
Import of code from heimdal
This commit updates the code imported from heimdal to
3fe55728404c602884f16126e9cc60fc5a3d8f20 (switch-from-svn-to-git-2993-g3fe5572)
Upstream changes are:
Andrew Bartlett (1):
Revert "make paranoia check less paranoid" - check that key types strictly match
Jeffrey Altman (3):
do not include stdint.h unprotected
Windows EAFNOSUPPORT defined by VS2010
roken: Use a common allocator for all windows
Love Hornquist Astrand (2):
add rk_getpwnam_r
move windows compat errno constants to after <errno.h> is included
Nicolas Williams (7):
Fixes to make Heimdal -Wall -Werror clean
Make krb5_kuserok() pluggable and add features (including MIT config compat)
Generalize token expansion to allow for context-specific tokens
Address code review comments (use krb5_enomem())
Make master build on Windows
Fix a compiler warning in lib/roken/snprintf.c on 32-bit Ubuntu
Move base into lib
Roland C. Dowdeswell (3):
Turn on -Wextra -Wno-sign-compare -Wno-unused-paramter and fix issues.
Provide support for enctype aliases for ease of use.
Additional changes to make -Wshadow build on Ubuntu 10.04.
Simon Wilkinson (1):
hcrypto: Use correct size for memset in md2
New files are:
roken/realloc.c
roken/win32_alloc.c
Change-Id: I8129ad5677fd7e3a3d3daa78eadf436bbc63adc2
Reviewed-on: http://gerrit.openafs.org/7612
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit e05a63045230e732d6abb1f4baf8ed5275e19e69
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Jul 2 14:50:10 2012 +0100
roken: Import Windows allocator changes
Roken now supports using a single allocator across all of the objects
which include that roken library. Two additional objects are required
to support this, so add them to the list of symbols that we import.
Change-Id: If43537f06a6cdc6ea4dea278cdc1db1e6970f955
Reviewed-on: http://gerrit.openafs.org/7618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0e327b4982d630508446aaa2cc0999d899cc8a31
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 11:52:34 2012 -0400
cmd: add krb5_enomem() definition
Heimdal's expand_path.c now makes use of a new function krb5_enomem()
which is a wrapper around krb5_set_error_message(). Add a dummy
implementation to src/cmd/krb5_locl.h so that expand_path.c can
build within the OpenAFS tree.
Change-Id: I9616604dfd7e0844b7e09576c76d844b1cb678dc
Reviewed-on: http://gerrit.openafs.org/7624
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit a41ab064962ef4865dfa5023c4b314c6f935ed64
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 11:49:54 2012 -0400
Windows: HAVE_UINTPTR_T
The Windows build has a definition of uintptr_t. Add
HAVE_UINTPTR_T to the Windows config.h file. The sources imported
from Heimdal make use of it.
Change-Id: I6d01dd9eb67c1e7f7ef257f0ac06d89d656f8bd8
Reviewed-on: http://gerrit.openafs.org/7623
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 7c2399115153609edc87a4c487d18e7f8b41dcba
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 01:42:35 2012 -0400
Add HAVE_INT64TOINT32 test in stds.h
Windows SDK v6.0 and above include a platform specific
definition of Int64ToInt32. Use the platform definition when
available.
Change-Id: I8081ed1c33d2ac11287ebaa1eaef1f77682575cf
Reviewed-on: http://gerrit.openafs.org/7622
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 6f779c18678d4d9549c2977c2c3c9d15a0f13524
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 10:36:22 2012 -0400
Windows: remove unused defines from param.h
Remove #if 0 disabled definitions and those for strtoll and
strtoull as they are not used anywhere in the tree. strtoll
and strtoull will conflict with the next roken.h update.
Change-Id: Ieea394abf6046be9b5974464890b7af945c00153
Reviewed-on: http://gerrit.openafs.org/7621
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 754180b61ee4cb84bd21046afd813b0dc03fad54
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 01:35:43 2012 -0400
Windows: link to afsroken.dll
All binaries must be linked against afsroken.dll.
Change-Id: I74f392a8aaadfe67f24d01a8d65df6a6228fd952
Reviewed-on: http://gerrit.openafs.org/7620
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 3078c4a59240540b085799495270872bc9393912
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jul 2 01:32:25 2012 -0400
Windows: roken.h ordering
The order of include files must be
afsconfig.h
afs/param.h
afs/stds.h
roken.h
Change-Id: Ie9f6476b9be143416105d1eec3a512a87cf66383
Reviewed-on: http://gerrit.openafs.org/7619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit d8397c7c320cd8557e4a24a9ff84b029c07b165e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Jun 11 14:45:15 2012 -0400
Windows: afslogon is only an authentication provider
afslogon.dll is just a Authentication Provider DLL. It does not
provide network file system browse and mapping functions. Therefore,
do not include the "ProviderPath" registry value when the
AuthentProviderPath variable is sufficient.
Change-Id: I92848e614906c3e35b882dd70570bddfaa44d36f
Reviewed-on: http://gerrit.openafs.org/7550
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
commit 0c6a2a7b359b7b0432c94287485ed1ed26d5f253
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Jun 29 10:04:10 2012 -0400
viced: null-terminate server list for ubik
when we set up the vlserver connection, we could potentially use
uninitialized memory as ubik connections. don't.
Change-Id: Idefa71874c7402c927fbf148f994f9422183208a
Reviewed-on: http://gerrit.openafs.org/7610
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 44ca4aa90ef101fb13b3b5327ca19381b5464fb3
Author: Ben Kaduk <kaduk@mit.edu>
Date: Wed Jun 27 22:04:24 2012 -0400
Patch up FreeBSD-10 support
The auto-guessing code for sysnames produces *_fbsd_100, so we can't
just claim that we'll be *_fbsd_1000 for kicks.
Revert back to the old behavior so as to be less disruptive.
Change-Id: Iddbff8f6e03a1bd0cf140b6eaad1de72ad3b76b4
Reviewed-on: http://gerrit.openafs.org/7595
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 6ea7a84bdcc533ad3420b651a7c3c001b8c1cc6c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jun 26 17:42:39 2012 +0100
viced: Remove localcellname
Commit 8a040cfd848410b75b4e5ac5498f00f073932598 removed all of the
code which relies on the localcellname variable being set, but didn't
remove the variable itself. So do so.
Change-Id: I34bb0d321712b6712633cf42a1d89140a0146501
Reviewed-on: http://gerrit.openafs.org/7588
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit eed293b295f9d29baa4add36a1c504f5bdeb8df0
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jun 26 17:43:29 2012 +0100
viced: Make private host stuff static
The function initInterfaceAddr_r is internal to the host.c file,
so make it static to make this clear.
Change-Id: I4dd2de5a7071e68f103bb56347551a3e535d2fd9
Reviewed-on: http://gerrit.openafs.org/7587
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3b45a13a74936ed5f0e19a2766072fbd25c27022
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Jun 27 10:51:37 2012 +0100
viced: Make the config directory path global
Store the location of the configuration directory in a global
variable, rather than hardcoding it in multiple locations in the file.
This makes it easier to write unit tests for portions of the fileserver,
and is a step towards producing a fileserver that can be run from
within the test suite.
Change-Id: I0ee1d9bed084472b1e29b9c559a8726f867f91e4
Reviewed-on: http://gerrit.openafs.org/7585
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 7034b980f7381fd99aa53f85a27a7260432c0c41
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jun 17 22:20:40 2012 +0100
vol: Make some functions static
Make all of the functions in partition.c that are only used in that
file static.
Change-Id: I12e0980578b79459f50b6f4a46d2c423847e18a9
Reviewed-on: http://gerrit.openafs.org/7586
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c7ff0d28bf68533a74664e4f6a7ac0d946ac2893
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jun 26 21:04:41 2012 +0100
tests: Abstract out code for a test RPC service
Lots of our tests want to start a test RPC server, and then run
commands against it. Start to abstract out the code to do this
by pulling the code to start a test RPC server into its own
function in the common test directory.
Change-Id: Ie7fa1fa1984113f3722def17a9fd4b98993bd6ff
Reviewed-on: http://gerrit.openafs.org/7584
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6f9443e702745d1e371eb72ad7fcba5cac47f3db
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jun 26 21:16:28 2012 +0100
Unix builds: Reference krb5 libs in standard way
Use $(LIB_krb5) and $(LDFLAGS_krb5) to reference the Kerberos
library and linker flags, rather than directly using an autoconf
substitution. This brings us in line with the way other libraries
are handled.
Change-Id: Icda16833abea32440a5c307c39eb06b32613b06a
Reviewed-on: http://gerrit.openafs.org/7583
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 387fe294f663abd9c92cd007869e2e9e8cc11d69
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Jun 19 14:42:23 2012 -0500
viced: Clear all client CPS on FlushCPS
Currently the fileserver only finds the first applicable 'client'
structure (via h_ID2Client) for a FlushCPS operation, and invalidates
the CPS for it. However, there may be many 'client' structures in
memory for the given viceid, since we may have many connections for
the same user (possibly from different hosts).
So, modify FlushCPS to find all relevant client structures, and
invalidate the CPS calculation on them.
Change-Id: I46532984cc470f41c83fb8c686766e4a4d49edd0
Reviewed-on: http://gerrit.openafs.org/7574
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cb64dea75a114f6ebcba174be4e71c7fb5f85658
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jun 18 17:01:24 2012 -0500
cacheout: Perform authenticated RXAFS_FlushCPS
Fileservers may now require RXAFS_FlushCPS calls to be made with
administrator tokens. So, try to make the call with admin tokens, and
provide the usual -noauth and -localauth options.
Change-Id: I8b3fc28b9151eb07eda858a0d7e6bd123a107d14
Reviewed-on: http://gerrit.openafs.org/7573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 568adf7d18eb17a42caa263aabc92a686f0ae121
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 15 16:58:42 2012 -0500
viced: Restrict RXAFS_FlushCPS to administrators
RXAFS_FlushCPS currently can be run by anyone, including
unauthenticated users. Forcing CPS calculation can be a relatively
resource-intensive operation, though, if done frequently enough, and
only should need to be done by administrators. Thus, only let
administrators use it.
Change-Id: Iaedd1e72e542b637070930bf1a0a9eba83a9ab64
Reviewed-on: http://gerrit.openafs.org/7572
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7a875f639f61966f2d327f929305091d2678e99a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jun 15 16:55:16 2012 -0500
viced: Rename fs_rxstat_userok
The fs_rxstat_userok function can be used for other purposes; give it
a more general name.
Change-Id: Ic94e8121ac8b856b288712d486e34556be8250d6
Reviewed-on: http://gerrit.openafs.org/7571
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d4bab02f023f53041c3ac58fd75cffd27ec92df0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jun 18 15:06:49 2012 -0500
doc: Consolidate NetRestrict format docmentation
We were specifying exactly the same format in two different places;
consolidate them into one place. In addition, explicitly say there are
is no way to specify a range of addresses, in case some people are
confused by the previous versions of this man page that erroneously
said you could use 255 as a wildcard.
Change-Id: I18d96ee9e6c43dfb62719323fa7eb8d9f254e273
Reviewed-on: http://gerrit.openafs.org/7565
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4ae005062e2c927b77ea23d95934d5af463878b3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Jun 18 15:02:09 2012 -0500
doc: Remove reference to NetRestrict wildcards
Commit 80fc888a9223050481de932233fe7121a48df194 got some of this, but
forgot the other reference. We don't support these anywhere, so remove
it here, too.
FIXES 125340
Change-Id: I536336634beb835c9e1c93e23f8d7329fa821c96
Reviewed-on: http://gerrit.openafs.org/7564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 58e7d52d0066a9f237971f39e7acdde02761172a
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Jun 22 21:33:50 2012 -0400
Catch up on fbsd releases
Pull in the changes needed to even have a chance at supporting
FreeBSD 8.3, 8.4, 9-stable, and 10-current.
Conditionals for changed interfaces in a follow-up commit.
Change-Id: I4765679f6cef0555ce6d02ad281e127869d8924c
Reviewed-on: http://gerrit.openafs.org/7581
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e1ff7148cce62f7c34614dc1ac1edc909dea1c55
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 24 14:53:59 2012 -0500
cmd: Avoid premature OptionAsString free
Only free the previously-set string value if we're actually going to
change it. This avoids the scenario where a caller does something
like:
char *str = strdup("defaultval");
/* ... */
cmd_OptionAsString(as, OPT_foo, &str);
resulting in 'str' pointing to freed memory when the relevant option
is not specified, or there is some other error.
Change-Id: If1f94d5eb39cc4dba9a4195ff20850ff81737eb9
Reviewed-on: http://gerrit.openafs.org/7475
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1fbe83f9aacfc36a9c426ba1fd18ad7c72869dc1
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Jun 1 13:16:31 2012 -0400
rx: abort on missing service
currently rx does not send an abort if a service does not
exist; it quietly ignores the packet. provide a hint we have
done so.
Change-Id: Id3533afd46ed21765d4d2aab630a896b21c945de
Reviewed-on: http://gerrit.openafs.org/7563
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a3ef19e1995a1d3d05c8f3b2decf4301359d8375
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun May 20 17:05:12 2012 -0500
FBSD: Add osi_fbsd_checkinuse
Add the osi_fbsd_checkinuse function, which contains code common to
the FreeBSD osi_TryEvictVCache and osi_VM_FlushVCache. Implement the
latter two in terms of osi_fbsd_checkinuse.
This commit should incur no behavior changes. This is just a
reorganization so future commits can change the implementations of
osi_TryEvictVCache and osi_VM_FlushVCache.
Change-Id: I42df9d6efb7b573bd933d0bf04924f668a3608da
Reviewed-on: http://gerrit.openafs.org/7432
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit dda5cc0c5f7172aa4edf58c0f876c8bf05590889
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jun 18 17:16:02 2012 -0400
vol: avoid attach retry loops on SYNC_FAILED
Avoid unnecessary volume attach retry loops if a volume
salvage is unable to be scheduled due to a hard error.
Change-Id: If1962b83e03f634044a55b03787661b8a7695008
Reviewed-on: http://gerrit.openafs.org/7566
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e2d094595fd76e76e4a5861114202f513d02c2b1
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jun 19 15:11:38 2012 -0400
libafs: put connection in analyze when conn srvr missing
we need to putconn in all cases we can in afs_Analyze, but at least
one case we didn't. fixed.
Change-Id: I4e3b8d9f8e7445e3641fad32ff54dde2d21bb06b
Reviewed-on: http://gerrit.openafs.org/7567
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c8e52c1f457a237ec83be0fbe535077d5bccdd51
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Jun 20 16:55:25 2012 -0400
tests: Fix cmd config file path
Fix the configuration file path for the cmd test so that it works
when invoked from runtests
Change-Id: Id7d717e163abf5cfab2d551aaf08fb9967a87153
Reviewed-on: http://gerrit.openafs.org/7576
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3c16a2b296722f548309b10e6744639608c0861b
Author: Niklas Jonsson <niklas.jonsson@hp.com>
Date: Wed Jun 20 10:03:54 2012 -0400
Auth: increase size of DNS resolver answer buffer
This patchset increases the size of the res_search() answer
buffer from 1024 octets to 4096 octets. This is not a proper
long term solution but will permit sites with longer response
lists to make use of SRV and AFSDB records.
This patchset only impacts UNIX systems. Windows uses the
Win32 DNS resolver which dynamically allocates memory based
upon the size of the response.
FIXES 130936
Change-Id: I8434e128fb5918839c216209851b37a17cf94065
Reviewed-on: http://gerrit.openafs.org/7575
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 5019ecd5fad0846abcd92835411c7b0f3f2170ca
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Jun 1 13:20:57 2012 -0400
rx: provide mechanism to send a bare abort packet
simply put an abort on the wire
Change-Id: I0486e1826da9466a2982ac07c3749876848a7f66
Reviewed-on: http://gerrit.openafs.org/7562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4660b53e69fd65ba961e62bed1a1c126e375011c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue May 15 16:45:57 2012 +0100
opr: Add simple time type
Add a simple time type to the opr library, which provides helper
routines to implement the 100ns time format selected for on-the-wire
use for AFS-3 (this also provides a handy single integer internal
time format)
Change-Id: I1f2d81e61a3e4124e0dd49830a115b72d7a7b37f
Reviewed-on: http://gerrit.openafs.org/7559
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit ba300e35a5c17730dabde735385222d7e12a4bbc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jun 10 11:43:56 2012 +0100
viced: Abstract out peer mapping code
Pull the code which gets the peer information for an incoming connection
into its own function.
Reformat this function a little to avoid if-ladders.
Change-Id: I4a48e0079f00cca4fe651161fb19453f63527336
Reviewed-on: http://gerrit.openafs.org/7561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fa1f2687aff79469d521bdef7b23a253a1e62756
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Jun 9 22:29:44 2012 +0100
viced: Tidy up VL initialization
Tidy up the routines which initialize the VL server so that they
don't reopen an already open configuration directory, and so that
some global variables are less globally scoped.
Change-Id: I7e83073b2d984203e03133e94da4ec875d1b8472
Reviewed-on: http://gerrit.openafs.org/7560
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ed02c6ff8a4bc2cc82876a4b1736a8985548a71c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed May 30 18:25:51 2012 +0100
rxgen: Make input strings const
Modify the code generation routines so that string inputs to RPCs
are declared as (const char *) on the client side. This doesn't affect
callers as we can freely cast from (char *) to (const char *), but means
it is easier to write API wrappers that accept const arguments.
Change-Id: I4719d04f03bd76cbe7ee21ad7511f6f3b3d36163
Reviewed-on: http://gerrit.openafs.org/7556
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9b97b80dd8d29278de209fcecfdfd95a46863eb8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Jun 7 23:21:48 2012 +0100
aklog: Fix error message fallback for Heimdal
Since we reverted to using Russ's upstream version of rra-c-util's
krb5.m4, we no longer check for the existence of the pure com_err
error_message().
So, for error message fallback on Heimdal, use krb5_get_error_message()
instead. As we don't have access to the context in which the error
occurred, build one to get the raw com_err error translation - this
won't give us any additional context specific detail.
Change-Id: I4bab080704ec5d08e8b85e6b7ad69cf1f89bf3b3
Reviewed-on: http://gerrit.openafs.org/7554
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5db615100afd97233550abfe19625ac7ee7dbc5f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri May 11 00:34:24 2012 +0100
viced: Abstract out hpr thread context code
Every hpr lookup function had a copy of the same code to pull a thread
specific ubik context out of the pthread library, and to create one if
one wasn't already there.
Instead of endlessly repeating this code, create a small inline function
to do the job.
Change-Id: I7eac0eaebbd42978e40c90f0ce59b26f2e67d96d
Reviewed-on: http://gerrit.openafs.org/7558
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c855dd726a6f2681bf51a9596ec600a8cc88fb59
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Jun 7 20:46:27 2012 +0100
rx: Constify rx_opaque_populate
rx_opaque_populate doesn't modify the data passed into it, so
make that argument const
Change-Id: Icc7c121bda43a8abc19f72affc70967baba91e6d
Reviewed-on: http://gerrit.openafs.org/7557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fac69a5c88f1756aafd283e66a971e389dc8a62c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue May 15 17:01:50 2012 +0100
viced: Remove unused profiling code
src/viced/profile.c is never built, and contains unused code which
is now useless to us. Just remove it from the tree - it is in git if
we ever need it again.
Change-Id: I04da5395f5c4a618968958f1696f638e0db69122
Reviewed-on: http://gerrit.openafs.org/7555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a08604b78f82ae2adf57b7a30bd8c80a11223b0d
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jun 12 14:23:12 2012 -0400
uss: allow disabling by configure switch
provide an option to disable building uss. current heimdal
when built static can leak symbol names for its flex/bison parser
causing symbol conflicts. this is but a workaround, but
sites not needing uss can at least use it.
Change-Id: Ibab1dd189e7fbc41ca01e7ef7479421c056999f5
Reviewed-on: http://gerrit.openafs.org/7553
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5d53c12b95c6ffac6c00e4fec6138a51b6185dd7
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jun 12 14:10:04 2012 -0400
gtx: add configure switch to force not building
allow gtx and associated software to be turned off.
Change-Id: If02427311c79e0784fcc5fb1816a449f7dcdd879
Reviewed-on: http://gerrit.openafs.org/7552
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6d3390bc16281e6f889bb555abb1182985556287
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jun 12 13:46:46 2012 -0400
aklog: can't assume krb5_524_conv_principal based on convert_creds
add probing for krb5_524_conv_principal directly instead of
assuming finding a 524 library will find it. current heimdal
does not include it.
Change-Id: Iea523e3e7ba4cb51ec5a0d4b38fec9c7df30529d
Reviewed-on: http://gerrit.openafs.org/7551
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3e0eaec61e1df9341ca67b902a5ec86a863a3423
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jun 11 16:37:53 2012 -0400
viced: fix GetVolumePackage to not bomb always when GetClient called
master only. already correct in 1.6. the gotos for error exit should
be called only when we have an error, due to missing braces that was
not true
Change-Id: I396be7d34ad741e01634a702784a0892f47a2d5a
Reviewed-on: http://gerrit.openafs.org/7549
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3770ffe41689bc5b37795f23b0d4f3de4bc0619a
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Jun 11 16:05:10 2012 -0400
viced: fix merge error
when 37fc2dfbb9e3a8a8ecb022febae7ccd04d7340a4 was merged, the close
bracket went in the wrong place, meaning for non-remote calls
we don't re-enable keepalives. fix it.
Change-Id: I163db9b3b2f42f629d8a5ff22a75902a61a3138b
Reviewed-on: http://gerrit.openafs.org/7548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4f9c3f2be9abd5548dd52888b49c407d574b6557
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 31 17:45:56 2012 -0500
vol: Avoid getting stuck in ATTACHING in attach2
Since commit 5fc2365f, a VNOVOL error early in attach2 meant that we
skipped changing the volume state to anything, and just returned
instead. When we do this, the volume is in VOL_STATE_ATTACHING for
DAFS, and so if we return, the volume will forever be in
VOL_STATE_ATTACHING. The next thing that tries to access the volume
will wait forever for the volume to come out of that state.
So, revert half of 5fc2365f, and transition to ERROR state instead.
This code path should not be hit during normal usage, since a
nonexistant volume access for the fileserver will be detected earlier.
If the volume does not appear to exist at this stage of attachment,
something is wrong with the volume, so this warrants the ERROR state.
For the volserver and other volume utilities, we may hit this when a
request just plain references a nonexistant volume for whatever
reason, but in that case the vp should go away soon. For non-DAFS,
this commit does not change much, since the difference between
error_notbroken and unlocked_error is very small.
The other half of 5fc2365f is not changed, since it is correct. For
VOFFLINE errors at this point, the volume has already been
transitioned to VOL_STATE_UNATTACHED, so it is okay to return. Add a
comment to help make this more explicit.
Change-Id: I63853f6e1721020cd204639c6e3ce4b59de08f75
Reviewed-on: http://gerrit.openafs.org/7516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a43f0e4717fd72727ae325eb4437cef065419cdd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 31 16:41:15 2012 -0500
DAFS: Preattach, not attach, in FSYNC_Drop
FSYNC_Drop currently attaches volumes that were checked out by the
dropped fssync handler, but not checked back in, in order to make the
volume available again. For DAFS, however, a full attachment is
unnecessary; just preattach instead.
Change-Id: I2c9d0b8cf0ddc7f4182347706b2c26d86f69725e
Reviewed-on: http://gerrit.openafs.org/7515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fff80cb1983a8cf7ccf1c1dc4f69e232785700c5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 31 16:15:33 2012 -0500
vol-salvage: Unlock volumes before exiting
Normally, volume locks acquired by an exiting salvaging process would
be automatically given up when the process exits, since our FDs are
closed. However, if we exit by calling Exit() or Abort(), we
gracefully shutdown our SYNC channels before exiting. For FSSYNC, this
can result in the fileserver trying to online the volumes we had
checked out but had not yet checked back in, so the fileserver may try
to online a volume we have locked, before the locks have been
released.
To avoid this, unlock all volume locks for all partitions before we
shutdown SYNC channels on exit.
Change-Id: Idcda5fcf4639da7d4b951bea36606ea8daf68f3c
Reviewed-on: http://gerrit.openafs.org/7514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 80359f562a459ef1dba2cdf53ee486578b50752d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 31 16:08:00 2012 -0500
vol-salvage: Indent some ifdefs
Change-Id: I213859d35ba4908e088a0ba2117f527ab8db3dc8
Reviewed-on: http://gerrit.openafs.org/7513
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9bb876f6829f137e534b961f7374b310bfa8aa7d
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri May 25 09:40:54 2012 -0400
libafs: initialize free dcache list for memcache
reuse the disk cache dcache creation code for memcache, then
call it to prime the list
Change-Id: If63268aa1a89c9642236f944e1ac8328d68aeba5
Reviewed-on: http://gerrit.openafs.org/7446
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit a8e35e9fd7b24b6d8523a3ac9da0f77c84423ef9
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Jun 8 19:52:33 2012 -0400
viced: clear optstring before parsing
we try to free the string if there was a value, so
if there's none we should probably ensure we know it
Change-Id: I20fc535e56d65c82f26852ba59528d5660c98e20
Reviewed-on: http://gerrit.openafs.org/7546
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 7273c8b4ae123ce555dde3bee7b9878c59ad1805
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Jun 8 16:12:17 2012 -0400
cmd: avoid issues with static heimdal
stealing the krb5 parser and linking with static heimdal can cause problems.
remap things we have which duplicate heimdal's private namespace.
Change-Id: I89030967a32997f00a21e97258056c26f2a4cbf6
Reviewed-on: http://gerrit.openafs.org/7545
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 5227148ae17949705487ea673d558ebfe143e635
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Jun 2 21:35:53 2012 -0400
Linux 3.5: encode_fh API change
The encode_fh export operation now expects two inode arguments
instead of a dentry and a "connectable" flag. Use the inode of
the dentry we're interested in, and NULL as the parent inode which
is the same as passing a 0 flag in the previous API.
Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804
Reviewed-on: http://gerrit.openafs.org/7523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bc3a32a84facb8114a8c7de87025f972d0281098
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Jun 2 20:45:08 2012 -0400
afsd: include sys/resource.h in afsd_kernel.c
With a recent glibc update, sys/wait.h no longer includes
sys/resource.h unless __USE_SVID, __USE_XOPEN or __USE_XOPEN2K8
are set.
Don't rely on the indirect inclusion to get the bits we need;
include it directly in afsd_kernel.c. This include used to be
there but was dropped when afsd_kernel.c was split off.
Change-Id: I1bfd2e0c340e15ca44472aa89614f088e0c0ce0c
Reviewed-on: http://gerrit.openafs.org/7522
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0d2c1dfd5510e9c84cb3b56c00370f0fc114e87b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jun 5 23:25:08 2012 -0400
windows: AFSQueryVolumeInfo exception info
Protect against NULL FileObject or ObjectInformation.
Log additional information when an exception is caught in
AFSQueryVolumeInfo.
Change-Id: I6111345e53edc641f4d809839c1666f7a11a93d3
Reviewed-on: http://gerrit.openafs.org/7525
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 371af87a23b61187ca9d54c8e6819f2121fbf1db
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jun 5 23:07:40 2012 -0400
Windows: SMB GetFileAttributes support
commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41 added a
GetFileAttributes query to the pioctl interface to protect
against printing pages on printers with a broken smb protocol
implementation. This patchset adds support for GetFileAttribute
on _._AFS_IOCTL_._ files to the SMB implementation.
Change-Id: I9d60dc77b7048892eb816e9d1c6e94033711ae7b
Reviewed-on: http://gerrit.openafs.org/7524
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6e704d967334a3f990e2ba1c758e4f054234e97e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 26 19:16:47 2012 -0400
Windows: Introduce AFSFreeExtent()
Consolidate all operations necessary to free an extent in
a single function, AFSFreeExtent().
Change-Id: Id0edd2009136c49cbafb9374e373749d6a906d40
Reviewed-on: http://gerrit.openafs.org/7521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cee6a383d3d1732e78827c839ee9513847e03aa6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 26 18:11:06 2012 -0400
Windows: Adjust extent release strategy
All extents were flushed whenever AFSReleaseExtentsWithFlush was
executed. This included a call at the completion of each
NonCached Read operation which could result in heavy thrashing
as the data would be released prior to it being needed by the
application.
This patchset makes the following adjustments. First,
AFSReleaseExtentsWithFlush() has been modified to release all
but 1024 extents belonging to the file. Second, NonCached Reads
only execute AFSReleaseExtentsWithFlush() when there are more
than 4096 extents associated with the file. Third,
AFSReleaseExtentsWithFlush() now has a 'bReleaseAll' parameter
which is used for calls from AFSCleanup() and AFSFlushExtents()
which need to be able to flush all extents attached to a FCB.
Change-Id: Id8b05f02c59eb46b1881e4d905a511a2597455e8
Reviewed-on: http://gerrit.openafs.org/7520
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5335f77bd56b7a94fd0225477fe7b7a707df86b7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 26 18:09:30 2012 -0400
Windows: AFSRedir code cleanup
Remove unnecessary intermediate variables.
Do not drop lock only to reacquire.
Formatting.
Change-Id: I7396047f30ee81755927b90a7b3f990d481d8d3e
Reviewed-on: http://gerrit.openafs.org/7519
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ed0eb70f36121ca5cacbf0b87ab9d05bfbb526b8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 26 18:06:07 2012 -0400
Windows: Remove extent from all skip lists
Before freeing the memory for an Extent object, the extent must
be removed from all of the extent skip lists. Otherwise, the
lists will be corrupted.
Change-Id: I891321477b9f0e194544e9e73dad53473f0865b4
Reviewed-on: http://gerrit.openafs.org/7518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c5f32b315982bf23f33d0395f404fe93563f0b8d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 26 18:04:25 2012 -0400
Windows: consoldiate NextExtent() implementations
Both AFSExtentsSupport.cpp and AFSIoSupport.cpp provided
NextExtent() implementations. The AFSExtentsSupport version was
more general. Use that one for both modules.
Change-Id: I19d17c989b4eadd40dcbb3d6d4186c316c26577e
Reviewed-on: http://gerrit.openafs.org/7517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e94b2338691d9450749e5f3e51f85e99f90b4bea
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun May 27 11:20:11 2012 -0400
Windows: Protect against null volp dereference
In cm_RecycleSCache cm_GetVolumeByFID can fail leaving 'volp'
a NULL pointer. Do not call cm_PutVolume() if cm_GetVolumeByFID
fails.
Change-Id: I57eaf5d40130ecad75a312ef5487cdfa6e7367e3
Reviewed-on: http://gerrit.openafs.org/7506
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ce8d0aefd1a6915df281ec2551b3f090c2a3b322
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 25 21:47:23 2012 -0400
Windows: Avoid deadlock on ProcessTree Lock
Change-Id: I2c1be0df615c513eefc27be167d7acda113c06e2
Reviewed-on: http://gerrit.openafs.org/7505
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 25948ccbc369087958d2159fb7dd995c21c92b20
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 24 20:46:27 2012 -0400
Windows: Add CCB NonPaged Resource for synchronization
Add a NonPaged ERESOURCE object to the AFS_CCB structure for
use in synchronizing access to the Ccb->Flags field and the
construction of Directory Snapshots.
Change-Id: I10ecc95619d0e5bd1ca02b044c2f1541a1b9a9f0
Reviewed-on: http://gerrit.openafs.org/7478
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fffce9aee4c7c93e140eb56e449f9a9ff6345659
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 24 20:45:07 2012 -0400
Windows: Make CCB_FLAGS_DIRECTORY_QUERY_MAPPED consistent
Use CCB_FLAG_DIRECTORY_QUERY_MAPPED instead of
CCB_FLAGS_DIRECTORY_QUERY_MAPPED.
Change-Id: I504b8fda9867a82e5b45d5a1905970a1de11fc27
Reviewed-on: http://gerrit.openafs.org/7477
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 611436eaec4db67a856b0617c00224d4359d804a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 24 17:47:25 2012 -0400
Windows: Remove unused async read/write operations
Removing dead code.
Change-Id: I60f3f098a3afb922143941f59b0146eebf60ac84
Reviewed-on: http://gerrit.openafs.org/7476
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 06a602bfd40661ef89b3d6b39dd8574015a15b92
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 24 04:57:19 2012 -0400
Windows: Avoid deadlock on VolumeCB->VolumeLock
AFSPrimaryVolumeWorkerThread() holds VolumeCB->VolumeLock SHARED
across the call to AFSCleanupFcb() -> CcPurgeCacheSection().
If a filter driver such as Sophos (savonaccessfilter.sys ->
savonaccesscontrol.sys) triggers an AFSCreate() in response to
the cache section being purged that will force the evaluation of
the file path by AFSLocateNameEntry(). If the path contains a
mount point that requires validation, AFSBuildMountPointTarget()
is called which in turn required the VolumeCB->VolumeLock EXCL.
AFSBuildMountPointTarget() only requires the VolumeCB->VolumeLock
if the VolumeCB->RootFcb == NULL. That should only be true if
the VolumeCB was allocated by AFSInitVolume() or under very rare
race conditions.
This patchset refactors AFSInitVolume() to ensure that it holds
an extra VolumeCB->VolumeReferenceCount reference. This reference
is used to assist in the refactoring of AFSBuildRootVolume() and
AFSBuildMountPointTarget() to avoid races with volume root object
invalidation as well as permitting the VolumeCB->VolumeLock to
be ignored in the common case.
Avoiding the acquisition of VolumeCB->VolumeLock during mount
point target evaluation has the additional benefit of reducing
lock contention during path evaluation.
FIXES 130812
Change-Id: Id9b0dcc2bfd91277d522f3724893b60ce4d947f5
Reviewed-on: http://gerrit.openafs.org/7474
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 02018d729f3d1b1177ee271d566b8acba488a515
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon May 28 21:49:46 2012 -0400
gtx: remove unused variable numBuffBytes
Commit 9efc255a makes the numBuffBytes variable unnecessary.
Remove it to clear up an "unused but set" warning.
Change-Id: Ifc50c40542e008d76007c76a9ce146fe6ebab4be
Reviewed-on: http://gerrit.openafs.org/7504
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2b33384a4a7b88842281021129ffccc837d91d36
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon May 28 21:43:12 2012 -0400
Linux 3.4: replace end_writeback with clear_inode
end_writeback() is renamed to clear_inode(). Add a configure test
and cope.
Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e
Reviewed-on: http://gerrit.openafs.org/7503
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 85626606e9ad0aac2c513de56215362b4672acf8
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Thu May 24 22:33:04 2012 -0400
afsd (FUSE): Avoid a compilation error and spell it "asprintf" not "asprint".
Change-Id: I126e9c57877e4969af68dcc4ec1fd1786ecfbd4e
Reviewed-on: http://gerrit.openafs.org/7479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0e81db38b549d79a3af5fce0f9f8fa48d9e6efeb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri May 18 17:40:38 2012 -0400
afs: Do not QueueVCB before osi_dnlc_purge*
In afs_FlushVCache, when we QueueVCB, we might drop the afs_xvcache
lock (as of 76158df491f47de56d1febe1d1d2d17d316c9a74). The vcache may
still be on the DNLC, so a lookup while xvcache is dropped can cause
someone else to grab a reference to the vcache while it is being
flushed. This can cause panics and failed assertions, since someone
will have a reference to the flushed vcache, which is effectively
freed and many of the structure fields are no longer valid.
So instead, do not call QueueVCB until we have purged the vcache from
the DNLC.
Change-Id: Ia6b51b4a2bb26903346217fbd6fc7d959d87eae7
Reviewed-on: http://gerrit.openafs.org/7430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7b35b409a484772989bb76633232b6e1d4f9bcc5
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue May 22 11:45:50 2012 -0400
fix audit init in vl and pr servers
Correct error introduced in commit
0dd7c980acda0756150f11992a0d2236f340e0c2
Change-Id: I929bb35a6a7070d637f1b332dae50cd182aaf9c5
Reviewed-on: http://gerrit.openafs.org/7447
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 40123db55ec36e8f5536db749e0a935141de74c7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 13:28:51 2012 +0100
comerr: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: Idc5f098a20809a5f869c4ea9f3970e598520c0e9
Reviewed-on: http://gerrit.openafs.org/7468
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 519d2cd5d8bb2bc1d2e315b8fea9616504674c79
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 13:33:33 2012 +0100
Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: Ie328ebd2d31160bf07b86b760fbb5ce7108a532d
Reviewed-on: http://gerrit.openafs.org/7473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 152bda64c662f719b167d05c0489ce4cb6e65c36
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 13:32:28 2012 +0100
util: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: I8287709413fe0e34f417936d1fc64c421fea6d28
Reviewed-on: http://gerrit.openafs.org/7472
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1c734bd7e59b0e2b1f79dbd9b203de1ecb921f3c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 13:31:53 2012 +0100
update: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: I6a33ab25b092faa96c764f0a469d052c181344ee
Reviewed-on: http://gerrit.openafs.org/7471
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 695e3a028e1257e1a1460205eba3fc7a837c5b41
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 13:31:07 2012 +0100
sys: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: I58b7695e3cf4b99f17869a46e1efca5c7daf6ff7
Reviewed-on: http://gerrit.openafs.org/7470
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e33f1dc0b6ec497133903918f1918adfa46f10ea
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 13:29:42 2012 +0100
xstat: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: Iaddc6c44041dc77a576f32133b2aa80aefce5cb2
Reviewed-on: http://gerrit.openafs.org/7469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 900f7cc5f7c0b35a8efebc6c7166efa7625a0493
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 12:33:28 2012 +0100
lwp: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it is
unnecessary noise.
Change-Id: Ie41f7b831f0ba70796649e2493e014fe44f1c39e
Reviewed-on: http://gerrit.openafs.org/7467
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3613d41515438a5615c3ffcdde5616c5f4e1c6ae
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 12:31:39 2012 +0100
rx: Don't cast returns from allocator
malloc() and osi_Alloc both return (void *). So, don't bother
casting the return value before assigning it - its unnecessary
noise.
Change-Id: I71a66a8fa0d9f49f4833dd77bbb55422e6f20d6f
Reviewed-on: http://gerrit.openafs.org/7466
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 56e350b8559cbc16ee9087dd8ada47fe9a9d79f2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 12:29:51 2012 +0100
auth & [ak]log: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I270b81c239afb9ac4bd8121adfd5a48fcfac9c3b
Reviewed-on: http://gerrit.openafs.org/7465
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b0ccfea010df0c38f1e53efe384b9e2a29fed40a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 12:28:41 2012 +0100
afsmonitor & gtx: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I74b1f3ba3000ecaeb3da8eb3201f6050c9972c4e
Reviewed-on: http://gerrit.openafs.org/7464
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cbdf31d9fff7be2bd99142a7c6ee7b04b96942fc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 12:26:37 2012 +0100
dbservers: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I5a7c800e2836e7401f5f8bccf1aa2a1b223100b7
Reviewed-on: http://gerrit.openafs.org/7463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4d96d0d5e4f21e208be60df53216ff7b113f4b87
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 12:21:57 2012 +0100
libadmin & uss: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I9a3387c07c6ee02efbaa1ec0035fcea8691f171c
Reviewed-on: http://gerrit.openafs.org/7462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0df1f0023a4aef7126c031e2e30990446093ac7e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 10:52:46 2012 +0100
fileserver & friends: Don't cast from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I9d41f2f1aee03d9317b4c5780fb00e13d30b0821
Reviewed-on: http://gerrit.openafs.org/7461
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ca48be9161cacf5c301379a17c4d7be70a78642c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 10:18:24 2012 +0100
backup: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I6a878d53007e27179c11d8f745b09dacade4c83d
Reviewed-on: http://gerrit.openafs.org/7460
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0cf3c58d807d74d8ee1b4692a936079fb767412c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 10:03:16 2012 +0100
bos: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: If6f0dbc00b31f5d9a1622984c6ac9eba83c04900
Reviewed-on: http://gerrit.openafs.org/7459
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 25bc7849caf855b08a69b1701db089b1da9b506b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 09:37:50 2012 +0100
JAVA: Don't cast returns from malloc()
malloc() returns a (void *) on all of our current platforms. So,
don't bother casting the return value before assigning it - it's
unecessary noise.
Change-Id: I534d424da13e03d3c0f0de3dddf1dd19088d1659
Reviewed-on: http://gerrit.openafs.org/7458
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cfcb45d4aeda972cd1dd18044fa791e61dc6163d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 09:19:03 2012 +0100
Unix CM: Don't cast allocator returns
All of our allocators return (void *) values, so there is no need
to cast the returns - doing so is just noise.
Change-Id: I6b1009efbb5034225a4af0e19d03b74c628dfb82
Reviewed-on: http://gerrit.openafs.org/7457
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9547615445ccbe07d8f6d7baeb7fd0315354fce0
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 09:10:03 2012 +0100
Don't cast the return from calloc()
calloc returns a (void *) argument. So we don't need to cast its
output before storing it.
Change-Id: Ibdfc61a8a2cf9779a0bfb17ff8ebf1f3bef3ea0e
Reviewed-on: http://gerrit.openafs.org/7456
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bdd8187c040ac3898fe5ae4429b5408f04c685d1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 09:01:02 2012 +0100
Don't cast the return from realloc()
realloc takes, and returns a (void *) argument. So we don't need to
cast these parameters into, or out of, realloc. Doing so is just
noise, so don't bother.
Change-Id: I64e721703536515b2e315e3b033eb2be14f7e18c
Reviewed-on: http://gerrit.openafs.org/7455
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9efc255ab8de7ad90c7d599fea7bd1956bfd48c2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 17 08:36:11 2012 +0100
Use calloc, rather than malloc/memset
Rather than doing
a = malloc(sizeof(me));
memset(a, 0, sizeof(me));
Just use
a = calloc(1, sizeof(me));
This is simpler, shorter, and removes the potential for the size of
the memset not matching the size of the malloc (or the target of the
memset being wrong!)
Where the size is of the form (n * sizeof(me)), we also use
calloc(n, sizeof(me));
Change-Id: Ia0f75665c1031fd2982eee0e1d8c8ebe23d7fbc0
Reviewed-on: http://gerrit.openafs.org/7454
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d142c8f97afb5bb3e1bb5bd31a53ed1dade2fd3b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed May 16 20:38:02 2012 +0100
Don't cast arguments to free()
free(3) is defined as:
void free(void *ptr);
so there is no need to cast the pointer argument being past to it to
(char *), (void *), or whatever other randomness happened to be floating
through the author's mind. Remove all such casts, as they are just
noise.
Change-Id: Ib7c8c259d53e9ce74fc486cb0997360044795395
Reviewed-on: http://gerrit.openafs.org/7453
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8961793dbbae2f8b213372906a281dc38c77186c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed May 16 20:27:22 2012 +0100
auth: Simplify DNS lookups with asprintf
Instead of allocing a maximal string, and using snprintf to
construct each possible DNS search string, just use asprintf to
construct each string. This greatly simplifies the code, and makes
it much less likely that maths errors can creep in causing buffer
overflows in the future. The downside is that we have more round
trips to the allocator, but that shouldn't matter in this context.
Change-Id: Iae9ab7d45f454c90a937354c71c9ec7fa2c55b69
Reviewed-on: http://gerrit.openafs.org/7452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 044785d587b15e02855b6c9e396d27db962d867a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed May 16 20:23:41 2012 +0100
Use asprintf for string construction
Rather than using something along the lines of
strOut = malloc(strlen(strA) + strlen(strB) + strlen(strC) + 1);
strcpy(strOut, strA);
strcat(strOut, strB);
strcat(strOut, strC);
use asprintf for string construction, so we can just write
asprintf(&strOut, "%s%s%s", strA, strB, strC);
roken provides an implementation of asprintf for platforms which are
missing one.
Change-Id: Ieef9f4b65f72260c0d372cdf3865daab98733ad9
Reviewed-on: http://gerrit.openafs.org/7451
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bd1248ca3988edb230174ff34c3ff79bedcf559e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed May 16 06:44:30 2012 +0100
Use strdup to copy strings
Where we have
newStr = malloc(strlen(oldStr)+1);
strcpy(newStr, oldStr);
replace these with
newStr = strdup(oldStr);
It's shorter, clearer, and gets rid of a load of occurences of strcpy,
which some compilers are now warning is unsafe (although it isn't in
this context)
Get rid of a number of custom duplicate string functions and replace
them with strdup where the behaviour is identical
Change-Id: If800343a7d13b1ba6362d4570a2a324fa3525250
Reviewed-on: http://gerrit.openafs.org/7450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 47e12584804b287051552900c94c99a3c84daa92
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 21 18:15:58 2012 -0500
afsd: Report fakestat correctly
A fakestat value of 1 is for -fakestat-all, and 2 is for -fakestat,
not the other way around.
Change-Id: Iedfb7b4a5223c809ace5b5f704a671e8523eb53a
Reviewed-on: http://gerrit.openafs.org/7445
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 258a092260f3831dbf5ee693724e561b088f35ae
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 21 18:14:16 2012 -0500
afsd: Detect -dcache presence correctly
cmd_OptionAsInt will return 0 if the requested option is present and
valid.
Change-Id: Ie5154648ccb274b04617dcb8cc397ed3aa3d97e6
Reviewed-on: http://gerrit.openafs.org/7444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9eb924f16c6f3bb06d83ed281317f2ba29473202
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 21 18:01:49 2012 -0500
afsd: Avoid printing cacheBaseDir for memcache
cacheBaseDir is NULL when memcache is turned on; don't print it.
Change-Id: Ib75a64767a9027a9eaf0341d0ad543d023cfcad4
Reviewed-on: http://gerrit.openafs.org/7443
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2e2bc535bd03df86f78b648f78d2d0a95d273fab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 21 17:11:29 2012 -0500
afsd: Avoid dir interpolation for memcache
memcache doesn't make use of fullpn_DCacheFile, fullpn_VolInfoFile,
etc. Do not even try to generate these strings for memcache, since
cacheBaseDir will be NULL, and so this can cause a segfault on some
platforms including Solaris.
Change-Id: I0decdb9a8866272adf500125af7edb03c98e6bdc
Reviewed-on: http://gerrit.openafs.org/7442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6f6c799c4ba4d03c6c381738b2db8aafe741ba5e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 21 12:28:58 2012 -0500
afs: Add some comments explaining 'needvalid'
Add some comments to try and help explain the meaning of the
'needvalid' parameter to GetDSlot, added in
1a672914ab050811c99b6307c657630ab9b5c8ee.
Change-Id: I4f1c704fa131df07e671f46b1b7575fbf607fce4
Reviewed-on: http://gerrit.openafs.org/7429
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cfae6cda3fe1efa8703ece3e6a8118f76e6c5411
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 21 12:22:24 2012 -0500
Revert "afs: the assert seems to be inverted when using memcache"
This reverts commit bc7f10130f7b96923d1a1ad5c688ef0106a83178.
Change-Id: Ie4f4a103177f0485fc1196acfe4203ce06b6ce15
Reviewed-on: http://gerrit.openafs.org/7428
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bc7f10130f7b96923d1a1ad5c688ef0106a83178
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Thu May 17 20:57:38 2012 -0400
afs: the assert seems to be inverted when using memcache
needvalid will always be 1 for the memory cache -- i.e. the slots are
always valid. see change id I53ea6e99649e4d6d5cbde58929dfcee1d45a3e7b.
Change-Id: Id1294d54cb5f20d226258e5da39fb4d4f782a694
Reviewed-on: http://gerrit.openafs.org/7421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 33eff6597facc01bbcd5266fb83c8a6bfa40dfa8
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue May 8 15:03:46 2012 -0400
vos: volume lock not released on convertROtoRW error
If an error occurs during convertROtoRW, the volume lock may
not be released.
Change-Id: Ic03af00676de836cade4e39a743b234a0dc9b6cf
Reviewed-on: http://gerrit.openafs.org/7389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 38ebd79bafee3c97323aa603906d1d5f279ec450
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue May 8 14:45:16 2012 -0400
vos: convertROtoRW does not respect volume lock
vos convertROtoRW was not checking the return code from
ubik_VL_SetLock().
Change-Id: I651c543f9a0070a9d34d9cca7583437e50e95dc8
Reviewed-on: http://gerrit.openafs.org/7388
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3a7dbe331580e418d1bdd5d75769512bb5e38cee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 18 16:31:19 2012 -0400
Windows: avoid deadlock TreeLock vs Fcb Resource
Cannot call AFSPerformObjectInvalidate directly because
ObjectInfoCB->Specific.Directory.DirectoryNodeHdr.TreeLock is
held during the sequence
AFSVerifyEntry->AFSValidateDirectoryCache->AFSVerifyDirectoryContent
and AFSPerformObjectInvalidate requires the Fcb->NPFcb->Resource
which must be held prior to the TreeLock.
Change-Id: I337f52e2927c8e5ae2d218867987625c3240a792
Reviewed-on: http://gerrit.openafs.org/7423
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 564c9733e5f1f1bd2417063e3ccd8228ca763a2e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 18 10:19:13 2012 -0400
Windows: buf redir queue mgmt scp can be null
buf_InsertToRedirQueue, buf_RemoveFromRedirQueue, and
buf_MoveToHeadOfRedirQueue can be passed a NULL cm_scache_t pointer.
If the pointer is NULL (as is the case during buf_Init() processing)
the scp->redirMx must not be obtained or a crash will occur.
Change-Id: I157091afd973a8b4789976c42de253831a2698a3
Reviewed-on: http://gerrit.openafs.org/7422
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e04f324b5dc87391d9fc08820a4ff22b7dda84c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 16 09:52:00 2012 -0400
Windows: Apply MAX_FID_COUNT to AFS Redirector
Provide consistency between the SMB path parser and the AFS
redirector path processing by using the same constant, MAX_FID_COUNT,
for both. MAX_FID_COUNT is the maximum number of unique file ids
that can exist in a path after all mount points and symlinks have
been expanded. The current value is 512.
Change-Id: Ife1a29ce7c064c986589bc9e2836899864da2f76
Reviewed-on: http://gerrit.openafs.org/7412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 94f96c6aae142478bf0824e7c3a3a810494a123d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 14 11:11:57 2012 -0400
Windows: AFSTearDownExtents may experience active extents
If there are extents with a non-zero ActiveCount when AFSTearDownExtents()
is executed, it must leave them alone and attached to the File Control
Block. This has implications for its callers, especially AFSCleanupFcb()
since it may be the case that a Cleanup cannot be completed.
The AFSPrimaryVolumeWorker thread must therefore check after calling
AFSCleanupFcb() whether or not the Fcb ExtentCount is zero before
calling AFSRemoveFcb().
Change-Id: I164dbe24d2bfe69aba0fcb5d845f66415d5bb0c3
Reviewed-on: http://gerrit.openafs.org/7406
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a9a768fb7ac06c887c45f6ed144c312fe357ab1e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue May 15 23:27:36 2012 -0400
Windows: avoid duplicate work cm_Analyze
During VNOVOL processing, if the volume is replicated and the
server reference status is "not busy", set the status to busy
and avoid calling cm_SetServerBusyStatus() because that function
mirrors the loop that is already being processed.
Change-Id: I1c92fd02fecc92c3dcd94a33eb87fe5c2fa254ae
Reviewed-on: http://gerrit.openafs.org/7411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9a728fd86c7add13e15dfa0d3062fa94cc77c53f
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue May 8 10:01:12 2012 -0400
vos: convertROtoRW may create two RW volumes
If the RW volume is listed after the RO convert target in the VLDB,
the code failed to detect that an RW is already present and would
create a second RW volume.
Change-Id: Ia77004214c4d1b18699b5527bc1fc928e8e1143d
Reviewed-on: http://gerrit.openafs.org/7385
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 97581f751024527d1090566f2d59fd1b14235b67
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue May 15 00:23:17 2012 -0400
Windows: init section ptrs for pioctl files
FIXES 130783
Change-Id: I809d21d5d30727172d6e1026d99b32466fcc74c6
Reviewed-on: http://gerrit.openafs.org/7407
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ac08a0c30d1b8f4f5f13a6e78b86d32e2cb34f65
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 14 00:12:17 2012 -0400
Windows: Redir Ioctl thread safety
A crash dump showed that it is possible for a Cleanup
to race with a Read from the ioctl file. Add reference counting
to protect against crashing under such a circumstance.
Change-Id: I5dada2b5855603807b48a191db46ff48043c1997
Reviewed-on: http://gerrit.openafs.org/7405
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a160606616cae6e047d97d4e86f075ebe8c2e366
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri May 11 19:24:54 2012 -0400
Windows: Permit Media Player to work with mapped drives
Windows Media Player was failing to play media files from
mapped drives if the mapping was to a directory several
levels below \\afs\cellname\. The code to permit SUBST drive
letters to work got in the way during NPGetConnection processing.
Try to get the connection info without the drive substitution
logic. Try again with the drive substitution if the result
is no connection present.
FIXES 130757
Change-Id: I0c2037d1d8f4c6cf82fbff7d4baee995b5124b39
Reviewed-on: http://gerrit.openafs.org/7402
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit dfceff1d3a66e76246537738720f411330808d64
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Feb 23 12:34:44 2012 -0500
volser: preserve stats over reclones and restores
Optionally, preserve the volume usage statistics instead of clearing
them during reclone and restore operations.
Change-Id: I436b39b129b892912533ddeff5569b07224b075c
Reviewed-on: http://gerrit.openafs.org/3312
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e1c6ad7d580041caf35f698c9b2241fb45f02361
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Tue May 8 12:38:38 2012 -0400
vos: convertROtoRW misc error reporting problems
Fixes a few inconsistencies and bugs in some error messages.
Change-Id: Ic4971c4cc3a3aa3623ee0f13161fd7793d3acb19
Reviewed-on: http://gerrit.openafs.org/7387
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0f30c95a03ecf2a964db566fd8c3e96c1bcb6211
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 9 01:20:57 2011 +0100
cmd: Add support for pulling options from files
With this change, we gain the ability to set our command line options
from krb5.conf configuration files. This is only available for tools
which are implemented using the new cmd_OptionAs accessor methods.
Callers should load their configuration file using
cmd_OpenConfigFile("/path/to/config/file.conf");
(an addition to libauth to return a path to a system wide
configuration file will be forthcoming)
and then set their command name (for example, "fileserver", "afsd",
"vos" and so on) using
cmd_SetCommandName("mycommand");
The accessor functions will then populate their return values with
either:
a) The command line options, if specified
b) The contents of the tag matching the option name, in the
[command_subcommand] section of the configuration file, if it
exists
c) The contents of the same tag, in the [command] section of the
configuration file, if it that exists.
d) The contents of the same tag in the [defaults] section of the
configuration file.
Callers can also gain access to the entire configuration file by
calling cmd_RawFile, or to just the section corresponding to their
command line by calling cmd_RawSection. Note that when using the file
directly, it is up to callers to preserve consistency by implementing
similar inheritance rules as the above.
Change-Id: Ic501ab296af3638f961486869af79c9ce47b77b8
Reviewed-on: http://gerrit.openafs.org/7135
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ad347dea3245b84c4478b6a6be01b4031c3c36e0
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu May 10 16:51:01 2012 +0100
tests: Add additional cmd tests
Add additional tests to the libcmd test suite to verify the
behaviour of cmd_OptionPresent and cmd_OptionAsList
Change-Id: I81a235fb5ee87682c72ca942f1341f77be6fda39
Reviewed-on: http://gerrit.openafs.org/7392
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0524e0d1915f519a76d62540b695abc16634d4c9
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Apr 18 11:57:10 2012 -0400
macos: update AFS prefs pane
modify afshelper to just run what it's told instead
of offering fixed operations. this avoids having a setuid
tool around. in spite of apple's suggestion this is correct,
it's actually more dangerous. instead, elevate privilege only
to run a small set of commands, then drop. allow
unlocking of the prefs pane, but make the menu extra prompt
for authentication when needed.
deactivate controls in the prefs pane when locked.
Change-Id: I0e2510efc98605f464e04d26cc8f2ce2bfe116f4
Reviewed-on: http://gerrit.openafs.org/7196
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0debf2d2274db1ea862bfdc2ef767372f1fa77e3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri May 4 17:23:42 2012 -0500
Call rx_SetNoJumbo earlier
For ubik server processes, rx_SetNoJumbo needs to be called before
ubik initialization for it to effect the communication between
dbservers; otherwise, full database transfers may result in Rx
jumbograms on the wire regardless of the jumbo/nojumbo setting. Move
the call to rx_SetNoJumbo to before ubik initialization to avoid this.
Also move the call to rx_SetNoJumbo to immediately after rx_Init* for
all server processes, for consistency. Move similar calls to
rx_SetMaxMTU for the same reason.
Change-Id: Ic79415829601fcfb4e74e72fbf5711d0c32aaa0c
Reviewed-on: http://gerrit.openafs.org/7350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a2f523b50592e261fe9cd3ef32978e786011c3c7
Author: Mark Vitale <mvitale@sinenomine.net>
Date: Wed May 2 13:55:16 2012 -0400
DOC: vos convertROtoRW security requirements
They were copied from another command; corrected them.
Change-Id: Ic77f1a91520ec4147e42864438d98942f6a7effc
Reviewed-on: http://gerrit.openafs.org/7305
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 186158c9eb2379ec350831b8fb244c51ae234a6e
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Fri Mar 16 13:37:20 2012 -0600
doc: add Windows section to fs newcell
fs newcell works slightly differently on Windows. Document the
differences in the man page.
FIXES 125094
Change-Id: I3fb71ebb28290222069d795762f50a82f3fb6495
Reviewed-on: http://gerrit.openafs.org/6919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ecfd9549fc29cdad8042e830c656caee1363c6cf
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 3 16:36:03 2012 -0500
vol: Free vol header on attach_volume_header error
In attach_volume_header, make sure we free the volume's header if
we're returning an error. We take care of the locks and i/o handles in
the immediately preceding block, but for an actual error we don't get
rid of the header. Do so.
Noticed by Tom Keiser.
Change-Id: I97e61700f644066ac1a0e6b45a67dd62c5397034
Reviewed-on: http://gerrit.openafs.org/7325
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f45ed29d5f5e029ef8c38c5d71ab069336f86866
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 22 10:20:18 2012 -0400
Make the cmd config file parser build on Windows
Change-Id: Id6c3515869529b6fb5c48a06661b63bed974e436
Reviewed-on: http://gerrit.openafs.org/7141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1a823e9326ca7210a7381b9691227e1b4c8f89a8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 9 01:17:19 2011 +0100
cmd: Don't expose krb5 error codes
Don't use krb5 error codes in our configuration parser, instead use an
error allocated from the existing cmd error table
Change-Id: I777d9638c676d198d13a3bd33a90acdc53dc26cc
Reviewed-on: http://gerrit.openafs.org/7134
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0f5dc583a9d942e67953f84a6d800e9b969149b2
Author: Russ Allbery <rra@stanford.edu>
Date: Fri May 11 21:28:41 2012 +0100
Import of code from rra-c-util
This commit updates the code imported from rra-c-util to
3900f94b9b8c46a3cb2d83d73c6cf4b73be1cc10 (release/4.4)
New files are:
m4/krb5-config.m4
Change-Id: I6ef966e4a30cd23feac4a159be2ffeb7357765b7
Reviewed-on: http://gerrit.openafs.org/7401
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 99108f95443680db0bbd098a7b93c04c8f4bd7c2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri May 11 21:27:02 2012 +0100
rra-c-util: Add additional file
Add the m4/krb5-config.m4 file, which is required for version 4.4,
to the list of imports.
Change-Id: Ib5d3d0d7be67eaa75f6edc6d030cdb3c47838d3c
Reviewed-on: http://gerrit.openafs.org/7400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c877c0b419d04a0e754f99b9d975f2229b660df5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon May 7 21:52:16 2012 +0100
tests: Start using the upstream C TAP harness
Instead of bundling our own copies of Russ's C TAP Harness, start using
source pulled from his git repository using the src/external import
mechanism. Note that we are not currently building the floating
point (is_double) portion of the harness.
In the process of doing so, we also upgrade our test harness to the latest
upstream version, 1.11. This is somewhat problematic, as there have been
some significant code changes since the version bundled with OpenAFS.
Work around these by
*) Referencing the basic.h header as <tests/tap/basic.h>, rather than
just <tap/basic.h>, to match the new upstream layout
*) Changing the include path so that the tests/ directory can be
found within it.
Change-Id: I63efbb30248165e5729005b0a791e7eb7afb051d
Reviewed-on: http://gerrit.openafs.org/7374
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 319ec27236d40318819163ae10e897e4a3f7b50b
Author: Russ Allbery <rra@stanford.edu>
Date: Fri May 11 21:16:22 2012 +0100
Import of code from c-tap-harness
This commit updates the code imported from c-tap-harness to
d3fc03606efc8e76ff34f04470e6133db25a3982 (release/1.12)
New files are:
LICENSE
NEWS
README
tests/runtests.c
tests/tap/basic.c
tests/tap/basic.h
tests/tap/float.c
tests/tap/float.h
tests/tap/libtap.sh
tests/tap/macros.h
Change-Id: I4435bbb240f9db3cf2883cb0711f592f9d865f92
Reviewed-on: http://gerrit.openafs.org/7399
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a18848fcae234258113012839483aceb3ada1281
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri May 11 21:14:38 2012 +0100
c-tap-harness: Fix import paths
Somehow or another, the file list committed as
098e6f141f2234dcd0196096ab6f739db678f746 is missing the tests/
prefix for a number of object files. Reinstate this prefix.
Change-Id: I2b807bf6fb8e5f136aef571e576c036714280b0c
Reviewed-on: http://gerrit.openafs.org/7398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c6782b86d77f8653d8dd4bc27d0cbcca5f13747f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 10 08:36:33 2012 -0400
Windows: Avoid deadlock during "fs memdump"
When the afs redirector is in use, it is possible that "fs memdump"
could be executed while all of the pages in the Windows page cache
are dirty with data that must be purged and flushed to \\afs. In
such a situation it is not safe for afsd_service.exe to hold
global locks such as buf_globalLock, cm_scacheLock, etc. while
performing WriteFile() calls against %TEMP%\afsd_alloc.log if
afsd_alloc.log was opened without the FILE_FLAG_NO_BUFFERING flag.
Doing so can result in a deadlock as it can become impossible for
the Windows page cache to purge data to complete the WriteFile()
as all extent operations block waiting for the global lock to
be cleared.
The correct long term approach would be to use the FILE_FLAG_NO_BUFFERING
flag when opening %TEMP%\afsd_alloc.log. However, this requires that
all writes to the file be performed using buffers that are consistent
with the drive geometry. Such an approach would be incompatible with
the _CrtMemDumpAllObjectsSince() operation and would require a redesign
of the current interfaces. See
http://msdn.microsoft.com/en-us/library/windows/desktop/cc644950(v=vs.85).aspx
for requirements when using non-buffered writes.
The short term fix is to dump the contents without holding the
global locks. This can result in an inconsistent view of the world
but will ensure that deadlocks are avoided. This patchset makes
such a change when the afs redirector is in use.
Change-Id: I6ffc0ff7c80707f16bf132f2dcab7dab5727894d
Reviewed-on: http://gerrit.openafs.org/7391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 90ecc0ff72607afeebafd9355a4fa42d5d994180
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 9 10:44:39 2012 -0400
Windows: cm_GetBuffer do not retry if biod empty
Change-Id: I583a69199b0e3163c3bc5b620543028f2950bfeb
Reviewed-on: http://gerrit.openafs.org/7390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4b58432de4f6eef93900786dad7d6b84e7123f5c
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Mon May 7 12:31:15 2012 +0200
Make it build outside source tree
some missing ${srcdir}/ inserted
Change-Id: I323d4475dcf10bb5753741d611e3869779ff22d9
Reviewed-on: http://gerrit.openafs.org/7383
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 1e13ae53b3f1e753211f3ed39ae9d2ea9597cf48
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed May 2 12:11:01 2012 -0500
vol: Remove redundant vop check in GetVolume
VAttachVolumeByVp_r (specifically attach_check_vop in attach2) already
handles checking for conflicting vol ops, and gives us VOFFLINE
appropriately. We don't need to check again in GetVolume.
Change-Id: Ibb93d423d3c856dd957a2569412a85698180ff8e
Reviewed-on: http://gerrit.openafs.org/7304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 80cb7bdebe2d8f852338eebc26c1bf507adbb4c5
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon May 7 23:31:02 2012 -0400
c-tap-harness: add float.h
add float.h to the list of files we import for c-tap-harness from
upstream
Change-Id: I133dd6172bab17ae183cc6fc983f92f19005ba85
Reviewed-on: http://gerrit.openafs.org/7381
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a9595ab04712b523db8b0ca934613aa1a60cda99
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 8 23:33:37 2011 +0100
tests: Use enum rather than #defines for tests
Change the command test so that it uses an enum, rather than #defines
for offsets into the parms array. This is mainly a cosmetic change, but
brings the test suite into line with the way that we're doing stuff in
the "real" code.
Change-Id: Ia9d72e13230edd4fe13af52ba6816cf775693c36
Reviewed-on: http://gerrit.openafs.org/7133
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a81f9237bfa7b2e3a0567a930f3c49234b9a4376
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed May 2 12:07:49 2012 -0500
vol: Pay attention to specialStatus after VAVByVp
attach2/VAttachVolumeByVp_r do not alter the yielded error code
according to specialStatus. So, pay attention to specialStatus after
receiving an error from VAttachVolumeByVp_r, to ensure we respond with
the correct error code.
Change-Id: I59e977dd1f0949f8fe5670c7a52429acbfb7d7e9
Reviewed-on: http://gerrit.openafs.org/7303
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 21ed79aeaee2d3b2b47436db0491943829ac44a6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed May 2 11:38:57 2012 -0500
vol: Avoid VBUSY/VRESTARTING trick for offline vop
Currently, if GetVolume() finds that the volume we're trying to attach
has a vol op that leaves the volume offline, we do the
VBUSY/VRESTARTING trick as described in CheckVnode(). This doesn't
make any sense for a couple of reasons.
For one, VBUSY/VRESTARTING is not the correct error code to return to
the client when an offline vol op is in progress and vp->specialStatus
is not set everywhere else we yield VOFFLINE.
Additionally, this block of code is only hit once for a particular vol
op. Once we reach this section, the volume is in UNATTACHED state, and
so on the next iteration of GetVolume we will immediately return
VOFFLINE (or specialStatus). So the CheckVnode-like situation is not
applicable, since we are not returning VBUSY to the same client for 15
minutes; we would return VBUSY once and then return VOFFLINE.
Change-Id: I0e8376df7937fd6bd01f9998371b9289c4ad2618
Reviewed-on: http://gerrit.openafs.org/7302
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 098e6f141f2234dcd0196096ab6f739db678f746
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon May 7 21:21:26 2012 +0100
Configure src/external for c-tap-harness
Setup the src/external system so that we can pull in releases of
the C Tap Harness using that mechanism.
Change-Id: I312db7991b037e7bb885c8f93a5c94c793dada30
Reviewed-on: http://gerrit.openafs.org/7372
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 427f53eea7f9c05e7b1913c91d57777d72bc30b2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon May 7 15:49:34 2012 -0500
fs: Report default storebehind when errors exist
After 904c9fbe, we no longer print out the default store asynchrony
when any of the supplied paths results in a pioctl error. However, if
just one (or a few) of the paths supplied results in an error (such
as, the path does not exist), this does not prevent us from reporting
the default value.
Instead, keep track of whether or not we have a valid value, and try
to determine the default if we haven't already by the end of
StoreBehindCmd, and print it out.
Change-Id: I16a5faed15141d0bb00ea9b6f991c0a8e404d4d5
Reviewed-on: http://gerrit.openafs.org/7376
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e9e14b551901db8f5be4d4c6060c709d2a3596be
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 7 11:35:07 2012 -0400
Windows: cleanup redirector pipes
If pipe creation fails, cleanup the mess.
At shutdown, if there are pipes that have not been closed by
Windows, clean them up.
This is just to ensure that at shutdown the reference counts of
cm_scache_t objects in the cache are reset to zero.
Change-Id: I1d738c31faafce445f05adc4884c7711123589e2
Reviewed-on: http://gerrit.openafs.org/7366
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 542dad75733354a6fb1e912d3ff75d414459078b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 7 00:56:11 2012 -0400
Windows: Correct refcount leak
The new duplicate avoidance code in cm_QueueBKGRequest() leaked
a cm_scache_t and a cm_user_t reference count.
Change-Id: Iceaf32a8d20cf350024fe40e3185c723f6203676
Reviewed-on: http://gerrit.openafs.org/7365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6da91dfcb8ffa83a4663e73359abc6c8b6128e34
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon May 7 00:54:27 2012 -0400
Windows: fix build with DEBUG_REFCOUNT
cm_GetSCache added a new parameter. The same parameter is required
for the cm_GetSCache macro when DEBUG_REFCOUNT is defined at build
time.
Change-Id: Id198cdf845b8339259716d4a61c0347c33ffd83d
Reviewed-on: http://gerrit.openafs.org/7364
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4fce72b0e6ddabce64af5fb7cef35492933f58d8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun May 6 19:31:03 2012 -0400
Windows: Checksum server lists on Volume Errors
For VMOVED, VNOVOL and VOFFLINE checksum the server lists for
the current volume. If the server list changes as a result of
the forced volume location update, do not set the updated flag
which prevents subsequent volume location updates for the current
cm_req object.
This combined with the previous patchset to filter volume locations
based upon the VLSF_NEWREPSITE flag will avoid outages during
vos release operations.
Change-Id: I39e6981b9fac5ed0dfd900e09474df43cb72feec
Reviewed-on: http://gerrit.openafs.org/7361
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 345d643729ed588c4e49e69607bee5793809b01d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun May 6 09:54:55 2012 -0400
Windows: cm_SetServerBusyState use cm_ServerEqual
When the busy state of a server is set it must apply to all
server references if the server is multi-homed. Use cm_ServerEqual()
to do so.
Change-Id: I76c07746eb396af988a5270804e221e7a641db66
Reviewed-on: http://gerrit.openafs.org/7355
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 193a56aa664ccfb39a3447f81735f2183a914c76
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 5 21:37:00 2012 -0400
Windows: Track Mixed RO Volume Release State
If the volume location information indicates that a replica site
is VLSF_NEWREPSITE then it implies that some of the replicas are
out of date. Ignore the out of date replicas when constructing
the list and force a volume location list reset every five minutes
while the replica site info is mixed.
Change-Id: I136e66b1d2da66578970932553d14f59a666721b
Reviewed-on: http://gerrit.openafs.org/7354
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1af906799b2de90d41139dadaf2dd654e4fd2df3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 5 20:46:08 2012 -0400
Windows: Make CM resilient to transient VNOVOL
The 1.6.0 and 1.6.1 file servers send transient VNOVOL errors which
are no indicative of the volume not being present. For example,
VNOVOL can be sent during a transition to a VBUSY state prior to
salvaging or when cloning a .backup volume instance. As a result
the cache manager must attempt at least one retry when a VNOVOL is
receive but there are no changes to the volume location information.
This patchset records the VNOVOL error in the cm_req_t structure
If the volume is replicated, the volume's server reference into a busy state.
If the volume is not replicated, the thread is paused for two seconds.
In both cases, the request is retried. If the VNOVOL error is received
a second time from the same server, the volume server reference is
deleted as before. This is done to prevent repeated requests to the
VLDB server and the file server that are expected to fail. The server
reference will be restored to the volume on the next volume location
update.
Change-Id: Ica51f853683f80cb17c804cdc216f7a113cca60a
Reviewed-on: http://gerrit.openafs.org/7353
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 46c1f1391b6e1b95798e183b8f34cba5c074e0ad
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 5 19:11:07 2012 -0400
Windows: cm_GetNewSCache drop lock to permit change
In cm_GetNewSCache the entire LRU queue is searched for a
cm_scache_t object that is safe to recycle. If none are the LRU
queue was immediately searched again without dropping the
cm_scacheLock or taking a pause. As a result it is quite possible
that a thread about to release a cm_scache_t was blocked from
doing so.
This patchset factors some of the logic a bit differently to
improve readability and adds new log messages to help diagnose
the cause of a problem if no cm_scache_t ever becomes available.
Change-Id: Ica6ebee0ce0456e879ae7188d9c8cdc935a92e5b
Reviewed-on: http://gerrit.openafs.org/7352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit dbab42ca724668a8d0b0e33dd998fa9312b781d1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat May 5 13:50:36 2012 -0400
Windows: Remove dead code in AFSRead.cpp
Change-Id: I9ebaf0a43b0b14c11fc7d1b0935a8d436e70e900
Reviewed-on: http://gerrit.openafs.org/7351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4cdb94dbc4f7cfc13c9f3e07929adcd96b3df1c8
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri May 4 17:13:32 2012 -0500
ubik: Initialize ubik_callPortal earlier
As of 7caf4143, we call ubeacon_InitServerList* before ubik_callPortal
is set, causing Rx connections to be created to port 0, causing
various problems with communicating with other sites. Initialize
ubik_callPortal to the correct value before calling any such
functions, so we create connections to the right port.
Change-Id: I37dbf575bcdec10463c7b6006738678096a92573
Reviewed-on: http://gerrit.openafs.org/7349
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f76cf9a3fb30b8c89c91ca10eaff8308cab9630a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 3 20:01:22 2012 -0400
Windows: FCB cleanup must be done before ObjectInfo
When processing the cleanup and destruction of a File Control Block
the related ObjectInfoCB is required for proper cleanup. Reorganize
the AFSPrimaryVolumeWorkerThread logic to ensure that this is true.
This involves dropping the VolumeCB->ObjectInfoTree.TreeLock around
the AFSCleanupFcb() call. While the lock is released it is possible
for the ObjectInfoCB->OpenReferenceCount to change. Therefore, new
checks must be added after the lock is re-acquired to ensure that
an in-use object is not destroyed.
Change-Id: I6b26fb2fe1ef4077c6edd643ec40715c8e2928ac
Reviewed-on: http://gerrit.openafs.org/7327
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e691a757d6f43fa11e3b9a84cf5cbb151a8e9a3b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu May 3 19:58:31 2012 -0400
Windows: AFSInitFcb STATUS_REPARSE cleanup
If a race is detected when creating a new File Control Block in
AFSInitFcb() the Fcb Header must be torn down and the ExtentsResource
and DirtyExtentsListLock must be deleted prior to freeing the pool
memory.
Change-Id: I3c3f45aed26ea62b4d20e5c5e80d1237d96c912c
Reviewed-on: http://gerrit.openafs.org/7326
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f12a20e2279dc9446a1b74217c9995e3d9fc099b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 18:20:45 2012 -0400
Windows: cm_BkgFetch do not impose arbitrary timeout
The afs redirector will queue extent requests for the entire file
if it is being copied to local disk as long as there is enough
page cache space to store it. If the file is 8GB and the bandwidth
from the file server is 100K/second it may take a while to get to
the end of the request queue. Do not arbitrarily time out the
requests.
Change-Id: I12d9358ee5de37fc78d68c8e07dd14ca5dda1832
Reviewed-on: http://gerrit.openafs.org/7320
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b12a038b487a47e99700c0d51273aee37aecbfca
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 18:05:26 2012 -0400
Windows: Treat all cached writes as write-through
Treat all writes that are cached in the windows page cache as
write-through requests so that they are delivered immediately to
the AFS cache.
The upside is that the afsd service can begin to store data to the
file server immediately which can be of significant importance whe
the AFSCache is larger than the file size and the file size is large
and the bandwidth to the file server is slow. In that situation
the entire file can be written into the windows page cache and
will only be flushed to disk at the last handle close on the file.
The downside is that all data will be written to the file server
including that for files that will later have the delete pending
flag applied.
Change-Id: Icff536f9ec768068692c1e024a943448409e7e40
Reviewed-on: http://gerrit.openafs.org/7319
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0fb70aab0e06099bbfe9b1fa388722d0b28f81a3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 18:04:23 2012 -0400
Windows: AFSQueueFlushExtents permit NULL AuthGroup
If the AuthGroup is NULL, search for an AuthGroup to use when
queuing the flush extents request.
Change-Id: Ie77f292dd992c4f8621434cecc70c7633de60320
Reviewed-on: http://gerrit.openafs.org/7318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ba8e60d70a74fc2c6899b29f330a5bfa59175912
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 18:02:28 2012 -0400
Windows: refactor AFSCleanupFcb
move the checks for deleted and invalid files earlier in the
function to simplify other conditional tests.
Change-Id: I973f411b65c0327227f07718ae764572d6f37c85
Reviewed-on: http://gerrit.openafs.org/7317
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 23bec3fe9f12c0af08f03b0b9cb70add7be859ba
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 18:01:31 2012 -0400
Windows: correct typos or mistaken comments
Change-Id: Iae278c0121c1b4d3cc9aaab276fab798c1a8065b
Reviewed-on: http://gerrit.openafs.org/7316
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f86b17ab2b9ea75dacfcb508f138256c3827655b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 17:58:39 2012 -0400
Windows: RDR_RequestFileExtentsAsync set current DV
if the buffer returned from cm_GetBuffer() has an offset that is
beyond the serverLength and it has a "bad" data version, set the
data version to the current value. This is for debugging clarity.
Change-Id: Icb3ee4accd0219a41813c44428070248245f2549
Reviewed-on: http://gerrit.openafs.org/7315
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a7fec07348889e9455ccec3b5028aec385b83e5f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 17:52:44 2012 -0400
Windows: refactor cm_GetBuffer avoid BIOD construction
Constructing a BIOD is a very expensive operation as it requires
obtaining exclusive locks on each and every buffer that in the
collection. The prior code would construct a BIOD for a chunk
worth of buffers and then check to see if the current buffer is
beyond the serverLength or the truncation position. If so, the
buffer is cleared and the buffer is returned as current after
releasing the BIOD. This is very wasteful. Instead, check every
buffer in the BIOD to see if it should be made current or not.
If yes, do so before releasing the BIOD. This permits the construction
of the BIOD to be avoided for the rest of the buffers in the chunk.
Change-Id: I0a413f8be9686cd0e326a3ea3608ca954cdf4370
Reviewed-on: http://gerrit.openafs.org/7314
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6b602e59af8d360f7ca2c48734477c21a94396af
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 17:47:46 2012 -0400
Windows: cm_InitDaemon initialize cm_bkgQueueCountp[]
Change-Id: Ie4abd1c26d54208921a78e421b447a8f4fc5684a
Reviewed-on: http://gerrit.openafs.org/7313
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b750d82a8460cc1bd5a5761ed160b09ac5c132f5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 17:42:59 2012 -0400
Windows: cm_QueueBKGRequest improvements
Do not add duplicate requests into the queue. Outstanding extent requests
will be re-issued by the afs redirector on a periodic basis while
waiting for them to be satisfied. If they are pending there is no
need to remember them a second time.
Use separate queues for Fetch and Store operations. Store operations
might be blocked on the file server but a Fetch operation might be served
from the cache.
Change-Id: I8e15c71275921c9a062944d52bf97a0ba68fe430
Reviewed-on: http://gerrit.openafs.org/7312
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ce7fe9ccfbfe0fd17416758357036881d5d2b5f4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 17:39:12 2012 -0400
Windows: buf_GetNewLocked skip redirector owned buffers
If a buffer is owned by the afs redirector, regardless of whether
or not it is dirty, do not use it.
Change-Id: Icc92f3cb8606ac67bcf561d409c76bd5a4a7bc06
Reviewed-on: http://gerrit.openafs.org/7311
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fcf1079f580fe1f2afa86f5e0312792817d52d2f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 16:57:11 2012 -0400
Windows: buf_RemoveFromRedirQueue in buf_Init
use buf_RemoveFromRedirQueue in buf_Init instead of the roughly
duplicated code.
Change-Id: Ibf070d3e44f7a0749d1046c9d1168bdfb9aa6f2b
Reviewed-on: http://gerrit.openafs.org/7310
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2246e7887cccd9e3d3524c3079b80b5cecaac433
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed May 2 14:32:01 2012 -0400
Windows: AFSInitializeProcessCB failure stack exhaustion
If AFSInitializeProcessCB() fails in AFSProcessCreate() it can
lead to a recursive loop of AFSValidateProcessEntry() ->
AFSProcessCreate() calls. Only call AFSValidateProcessEntry()
if AFSInitializeProcessCB() succeeds. On failure, log an error
to the trace log.
Change-Id: I67a65bed9a3193a5ce44eb01d30aed15fe9e469d
Reviewed-on: http://gerrit.openafs.org/7309
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ad5916d19fe85c89db7675cac551a1e7634d5bdc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 30 06:22:41 2012 -0400
Windows: More useful AFSDumpFile exception info
Modify AFSExceptionFilter to accept the __FUNCTION__ name
where the exception occurred.
Generate the trace dump file after the exception has been
handled so that it is possible to see where it happened
in the trace output.
Change-Id: Icddafc1066dd85b63d8d97c40c0f76c54d181ebe
Reviewed-on: http://gerrit.openafs.org/7308
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f70a12adef9a915ada728350e0b9e1e5104f7ea7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 30 06:18:58 2012 -0400
Windows: VNOSERVICE error translation
Translate VNOSERVICE as CM_ERROR_RETRY and not CM_ERROR_OFFLINE.
Change-Id: I6daf9b9fb607192cedc057c518137772a7eb1bab
Reviewed-on: http://gerrit.openafs.org/7307
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c87fe04a61a97d61859684d53bb2d3ef7ee65da8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 30 06:18:06 2012 -0400
Windows: VNOSERVICE message text
correct message text to indicate that an rpc has not been serviced.
Change-Id: Id2d82756253136ae6221aa2227be64bf654ee36e
Reviewed-on: http://gerrit.openafs.org/7306
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 50752e2f60d613fda1e70b798a72679bea5d65f8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 29 10:31:07 2012 -0400
Windows: reorg RDR_CleanupFile to prevent lock leak
RDR_CleanupFile could fail to drop a file lock if the user does
not have write permission on last handle close even if the file
is readonly or there were no dirty extents to be stored. The
error handling would return the error immediately and skip the
file lock release. This patchset changes the logic so that the
user permissions are not tested if the file is located on a readonly
volume or if there are no dirty extents or metadata changes to store.
In addition, if there is an error, skip to unlock processing and
not to function exit processing.
Change-Id: I03f8cbbae5ead2a66ce261631e7e34dd533de930
Reviewed-on: http://gerrit.openafs.org/7292
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f19e9d72466785bb3b543922f153ad8be2395e6e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 3 14:57:08 2012 -0500
vos: Default to server confdir for -localauth
For -localauth, we traditionally default to using the server
configuration directory, since that's usually the dir that has the
KeyFile in it. Keep doing that with the new ubik client interface.
Change-Id: I0f7e1ed180874f52c2b91b1ea3f74e763c26cd0c
Reviewed-on: http://gerrit.openafs.org/7324
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d206783e0d1666464eb333ce58c72534448c2987
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 3 14:55:39 2012 -0500
vos: Correct comment
This is -localauth, not -serverauth
Change-Id: I8337c231905a5424b5a91b0ed981adade64ca144
Reviewed-on: http://gerrit.openafs.org/7323
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 663185d62df501fb9d7a18e6ef329e4f53aa8854
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu May 3 12:40:40 2012 -0500
vos setaddrs: notice unexpected errors
Currently 'vos setaddrs' only prints a message and errors out if the
VL_RegisterAddrs call fails with certain error codes (VL_MULTIPADDR
and RXGEN_OPCODE). But if we get something else like an access error,
we should of course print that out, instead of reporting success.
Change-Id: Id90c65604289651d9f20fb1ab2c706446162f324
Reviewed-on: http://gerrit.openafs.org/7322
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b71f4ffa7c58ef7b27eb6e28d00892906aec49ec
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Apr 11 15:34:29 2012 -0400
volinfo: show header filenames even if error
When invoked with -header option, print the header inode
number, and namei filename, even if the header file cannot
be opened.
Change-Id: Id2a2e63f07e12cd817718a9da63d24250718ae06
Reviewed-on: http://gerrit.openafs.org/7190
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2460e132a9ed63714754745fe24f6f3a5712c81d
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 16 22:29:24 2012 -0400
bozo: increase salvage instance poll rate
Increase the bos client poll rate of the salvager temporary bnode
instance status, from every 5 seconds to 1 second. This reduces the
minimum time bos salvage takes, from 5 seconds to 1 second, which
can add up when doing a large number of volume salvages.
Change-Id: Ia0f48bfabae9442ab0f1b4a6f43df34699892f66
Reviewed-on: http://gerrit.openafs.org/7231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 200a02f69a7f2ac1604c42e28498171c81df9b43
Author: Jeffrey Altman <jaltman@secure-endpoints.com>
Date: Wed May 2 19:32:22 2012 -0700
Revert "viced: avoid crash if missing volume header"
This reverts commit 2b40e6d2abbf842e6823661b94cfa9aa833b9990
Change-Id: I9df0fd4fa6232286babdf64da54d491d2ec1e91a
Reviewed-on: http://gerrit.openafs.org/7321
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ae5ad937997ae6e29f81e4049451eda09c2efb6f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue May 1 10:09:44 2012 -0400
viced: avoid crash if missing volume header
Avoid a fileserver crash if the volume header is
missing in SetVolumeSync.
Change-Id: I509081306402fc7147d0624aa1181330b9fa9fc5
Reviewed-on: http://gerrit.openafs.org/7301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 94a8ce970d57498583e249ea61725fce1ee53a50
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 23 14:42:24 2012 -0400
libafs: log server errors on hard mount retry
Save the last errors seen during a request and log those
errors if a hard-mount retry is done.
Change-Id: I65e41207c5f667c41c7f9cf459243118e5baa074
Reviewed-on: http://gerrit.openafs.org/7275
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 07ff10c7fc194ee503b52691da000ab2c69d0fb1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 29 10:40:31 2012 -0400
Windows: Cc FileObject Settings
Modify the assigned CcSetReadAheadGranularity() from 64K to
the afsd_service configured chunk size.
Assign a CcSetDirtyPageThreshold() to be twice the configured chunk size.
Change-Id: I1cfa67612058cf5e08906e369236d0d8a48c54f0
Reviewed-on: http://gerrit.openafs.org/7294
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cf0d53b06a42a21238f13d65feb8e5ebf602da4d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 29 10:37:35 2012 -0400
Windows: correct cm_Analyze log message
A VNOSERVICE log message takes three parameters and not one.
Use the correct log macro.
Change-Id: Iedb5e568b7ac39c061c0b70738a5c7ac670d9687
Reviewed-on: http://gerrit.openafs.org/7293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a400f2a8a0732db57d725a8629ba869ed71caf9f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 27 08:54:56 2012 -0400
Windows: remove unnecessary libs from aklog/asetkey
Unnecessary lwp libs were linked into the aklog/asetkey binaries
on Windows. lwp and pthread should not be mixed.
Change-Id: I53deed9ab210b8ccb394e754c66e15f35dfe89c2
Reviewed-on: http://gerrit.openafs.org/7289
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2a83f03100deae0f13c255e41ab849d172859971
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 25 20:16:22 2012 -0400
Windows: Remove High Security Integrated Logon
High security mode for integrated logon never was high security.
It use was deprecated in the 1.5 series and it has no use at all
in the afs redirector world. Remove it.
FIXES: 21702
Change-Id: I019b4fecc430517d29195e79e39529a782c88073
Reviewed-on: http://gerrit.openafs.org/7285
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7d0a0b66cca5dfd7f9c42032393632abadb1aa76
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 25 18:05:01 2012 -0400
Windows: fs getcacheparms
The get cache params output is supposed to include two values:
. the size of the cache
. the size of the cache in use
Windows no longer has a concept of an unused cache buffer. All
buffers are inserted onto the freelist and are available for
recycling when the AFSCache file is created. Instead of reporting
the used cache space as 0K, report it as the full cache in use.
It is likely to disturb users less.
Change-Id: I6c1475f26e561d245bfa2b658c77ba683f735bb5
Reviewed-on: http://gerrit.openafs.org/7284
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8095503bc1021515c48966f77e9561acfea1aa0c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Apr 28 23:46:26 2012 -0400
doxygenize afs_analyze
Change-Id: Idb5d873a0c2727928f80364aa5e99e48c05649ad
Reviewed-on: http://gerrit.openafs.org/7291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d10f71d44fddd7ea6e37481cffd7ee1be2a93217
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Apr 27 12:59:25 2012 -0500
vol: A GOING_OFFLINE volume should yield VOFFLINE
Currently, GetVolume treats a volume in the VOL_STATE_GOING_OFFLINE
state the same as VOL_STATE_SHUTTING_DOWN, and so returns VNOVOL for a
GOING_OFFLINE volume, but these states are very different.
GOING_OFFLINE indicates that a volume should soon be in the UNATTACHED
state, so we should treat GOING_OFFLINE the same as UNATTACHED for
returning errors to the user. For UNATTACHED, we return specialStatus
if it's set, or VOFFLINE otherwise; so, just do the same for
GOING_OFFLINE.
Change-Id: Ia9500d2cfd90b8c15782a06025f39298810d0a99
Reviewed-on: http://gerrit.openafs.org/7290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 868378cc00b9ac7016da3dc457abf3fa2016687c
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Apr 26 09:24:25 2012 -0400
libafs: don't crash on no addresses in afs_Conn
we try to avoid a crash on a missing serverHost; do the same
on missing addrs in that host
FIXES 130714
Change-Id: Ic6bab8654cf7bf85351a9482b9ba5d51e5a768d5
Reviewed-on: http://gerrit.openafs.org/7287
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 229131ab12d3c62a650ebff8c97acd5778f5bca1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 24 15:41:39 2012 -0400
Windows: AFSValidateEntry CcPurge on DV change
The variable bPurgeExtents was not being set when a DV change
was detected in AFSValidateEntry(). This resulted in the purge
being skipped and old data being left in the cache.
Change-Id: I6f5a35e5c7a51d28267e0ff25318782a766771ac
Reviewed-on: http://gerrit.openafs.org/7280
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d4c9cbc75edd632bd5bf22042c6502d03dda2d9c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 23 20:18:20 2012 -0400
Windows: Directory validation should purge data changes immediately
During AFSEnumerateDirectory() and AFSVerifyDirectoryContent() calls
use AFSPerformObjectInvalidate() instead of AFSInvalidateObject()
to trigger the data purge. This is necessary to avoid a race as
AFSInvalidateObject() will queue a work request that will be performed
after the metadata is updated.
Change-Id: Iaf09c6448927a037175cb4a83502fd4a1d210ef2
Reviewed-on: http://gerrit.openafs.org/7279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 76f2e07fd039e0175540ae0ca3330a4bec86e1fe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 23 20:08:47 2012 -0400
Windows: Flag purge on close if CcPurgeCacheSection fails
CcPurgeCacheSection can fail. If it does, remember that the
purge still needs to be performed by setting the
AFS_FCB_FLAG_PURGE_ON_CLOSE flag on the File Control Block.
Change-Id: I83fab09ed5c506879e219606f8b10fdd7c021204
Reviewed-on: http://gerrit.openafs.org/7278
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit be1f110f3efb41a72278c7abc8a22cbfcfa8d0e3
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Apr 22 22:45:09 2012 -0400
macos: remove mistyped vnode warning
newborn vnodes are corrected if needed; don't worry about it.
Change-Id: I3bc4d6e9a467a8e09a3a77e027254f0da1448f80
Reviewed-on: http://gerrit.openafs.org/7270
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 7e7a4ff328d279330e0c3f3e4c6fc07b43c4d9eb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 22 18:19:07 2012 +0100
tests: More fixes for the vos test
The vos test wasn't running correctly from runtests, as it contained
a relative path which assumed that the CWD was tests/volser, rather
than tests/
Modify this to use the BUILD environment variable when invoked from
runtests, and also add an exit after the exec(), so that if we do
fail to launch the binary we don't have two processes both running
the same code.
Change-Id: I7b2d7e6a517e9e9f74f15803da7507037671226a
Reviewed-on: http://gerrit.openafs.org/7265
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e3c93b87b7fa751e9cf4c1356d606b7bb399b06c
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Apr 18 11:58:52 2012 -0400
libafs: stop bkg first
because background daemons can have dependence on other subsystems, but
are not needed for other operations, stop them first.
Change-Id: If65cf922b84cfca7b8c5d7b7a2d571bfe1e5ff12
Reviewed-on: http://gerrit.openafs.org/7246
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a08f9baa7620a6643f12f0b847c2bbab41a0b255
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Apr 18 11:58:03 2012 -0400
macos: lock module against unload during shutdown
during shutdown, once umount finished, it was possible to
unload the module before shutdown completed. fix that.
Change-Id: I7eae5210ec9553fa862d96148f963dcdfee79c4b
Reviewed-on: http://gerrit.openafs.org/7245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 749cb03e3c4b95c19803fc718d59ba79e8f8292f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 19 07:14:16 2012 -0400
Windows: Add global root to name array if share name
If the share name was resolved by querying the service instead
of finding the entry in the root.afs root directory, construct
a name array in AFSParseName() that includes the AFSGlobalRoot
above the resolved share root directory.
In AFSBackupEntry, check for the case where two volume root entries
appear in sequence without an intervening mount point.
Change-Id: Ied0e0dc8226b0460d85a1f3a8b389294cfdef34b
Reviewed-on: http://gerrit.openafs.org/7252
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9dce9e2461d7b375c0ff4caaf400a6b448322e74
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 19 05:14:51 2012 -0400
Windows: cm_ResetACLCache handle NULL cellp
It is valid for the cellp parameter to be NULL. When invalidating
all ACLs for a user pass 0 to cm_EAccesClearUserEntries().
FIXES 130704
Change-Id: Ic6b6e5f1c2e10aa633390ee3d7c709dc202bbd29
Reviewed-on: http://gerrit.openafs.org/7251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d55a767287d7f0ae1b3a018f3cb7b2a6730ebafa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 18 17:26:00 2012 -0400
Windows: reverse order of EACCESS and USER locks
The user lock is obtain while holding the eaccess lock.
Reflect it in the hierarchy.
Change-Id: I3aac945287415cd3babbe52f9fdeb93ab4d729bd
Reviewed-on: http://gerrit.openafs.org/7247
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3029ed4003d900bda7767aa1d4a46683fd8f7b4d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 21:08:13 2012 +0100
ptserver: Complete pr_realmName removal
Commit 9ddf9eca56e02be978ff7d065ee16c85de2cfb06 changed the mechanism
by which the local realm is determined such that pr_realmName is
no longer required.
Tidy things up by removing the unecessary variable.
Change-Id: I9b21340a8ecd38fbb8326dbed276882c9f0e9a62
Reviewed-on: http://gerrit.openafs.org/7266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fbc9599484850f7f9fc41a98d3bd2105001fd802
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Apr 19 15:15:04 2012 -0400
configure: solariscc check update
Add checks for recent versions of sunstudio for solaris. The
installation paths are documented in the release notes of versions
12.1, 12.2, and 12.3.
Change-Id: Ic28f40a061f288a1c39acb6a5d11e81876631d7f
Reviewed-on: http://gerrit.openafs.org/7253
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4b63b93f24157aefa33f28c67ebea41803cc068e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 11:25:25 2012 +0100
rx_identity: Add a super user value
Add an RX identity type that can be used to represent the super user
who is granted access using printed tickets.
Change-Id: I3d6e657a04136746b502efa7698901225410f3c0
Reviewed-on: http://gerrit.openafs.org/7261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e1eb0fd66af158b86aec9c21cda836d84bc21c59
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 11:24:25 2012 +0100
rx: Make identity and opaque usable with NULL vals
Make it possible to have NULL values for elements of the rx_identity
and rx_opaque structures.
Change-Id: I3624d490d92da3cf75da5edb91c7d4e5ce1fa937
Reviewed-on: http://gerrit.openafs.org/7260
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5815a04cf1f3c7f4dec8ef3b9783e01bac599d1c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 20 18:13:30 2012 +0100
tests: Move token faking code to its own file
Move the token faking code out of superuser-t.c into its own file in
tests/common, so it can be used by other tests.
Change-Id: I7b420250ef974b4b80a8dde692d2666657bb82ca
Reviewed-on: http://gerrit.openafs.org/7259
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5cfea96b23b268bc93c6ffa5888c773031da7d67
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 20 15:36:29 2012 +0100
tests: Make afstest_StopVLServer generic
The StopVLServer function can be used to stop any server for which
we know the pid. So, rename it as afstest_StopServer to make this
apparent.
Change-Id: Ia5973342e81dc15a698e84e69b314cd6157831f7
Reviewed-on: http://gerrit.openafs.org/7258
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2ce3fdc5dc888693c8a7698aae7805a7d4dee145
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 20 15:34:26 2012 +0100
tests: Abstract out code to produce a Ubik client
Abstract out the code which the volser test uses to produce a
ubik client so that it can be used to test other ubik services
Change-Id: I800fda9e53ad45c91f3de8eceea387cc011dda3c
Reviewed-on: http://gerrit.openafs.org/7257
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a6d64d700794601bb003a6e5693b34faa2214c18
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 07:43:59 2012 +0100
ptserver: Refactor per-call ubik initialisation
The way in which the ubik database is initialised is identical for
all read transactions, and for all write transactions. Rather than
duplicating this code in each call handler, pull it out into two
helper functions - ReadPreamble and WritePreamble.
Change-Id: I40f2d8d609bc4e6e8e3e0fc8851da86978c77818
Reviewed-on: http://gerrit.openafs.org/7256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ddcd9ede775ef64de281bc4994b3c7477f7105e9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 19:24:10 2012 +0100
tests: Add missing vos test
Add the missing volser/vos test, and fix it so that the plan is correct
Change-Id: I017679176f5df8fb18002175a75ac0dcd108aded
Reviewed-on: http://gerrit.openafs.org/7255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 25a5c423a0d12086ab3cc390306bcd0f0324a731
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 22 10:58:17 2012 +0100
ptserver: Remove PR_REMEMBER_TIMES
The #define PR_REMEMBER_TIMES is always true, so remove the #define,
and all of the #ifdefs that it triggers
Change-Id: I445a2cd8f5e5b2570e6ef1311cc6bb3d66592fdc
Reviewed-on: http://gerrit.openafs.org/7264
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5c9be9a2f8eb4e2e8e9bf80132976adc506d968b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 20:55:23 2012 +0100
util: Completely remove get_krbrlm
Commit d85ece0977e043154b7d8f5aef5f4cd972771e8e added a new
mechanism for determining whether a realm is local or not, and
susequent commits removed all in-tree calls to the now-legacy
functions in get_krbrlm.c
To avoid confusion, just remove all of these legacy functions, as
we don't want to end up supporting two ways of doing this
operation.
This change is not suitable for pullup to a stable release.
Change-Id: Ie2f5c447f751d12a0d85a4a438efd7e210133e97
Reviewed-on: http://gerrit.openafs.org/7263
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a38df1befb5a92f4f2c034576ead830b8d0c72c7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 21 20:32:38 2012 +0100
dumpscan: Add missing .gitignore
Add the missing gitignore file from the new src/tools/dumpscan
directory
Change-Id: I8fc7a3de4e717ef657c331a5ce82afb8f05ff726
Reviewed-on: http://gerrit.openafs.org/7262
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3a1e129b76be5109feaa52deeffb8a51c024a6cc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 18 12:46:31 2012 +0100
tests: Add a RX functionality test
Use the rxperf performance testing tools to add a couple of simple
RX tests. The first moves 1Mbyte of data backwards and forwards 30
times. The second starts 30 threads, which each move 1MByte of data
once.
This is by no means an exhaustive test of RX, but the single and
multi-threaded invocations should provide a useful smoke test if
things get very broken.
Change-Id: I11267be067cf6c05a20aeb90a18ed4031502a1b1
Reviewed-on: http://gerrit.openafs.org/7244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 06cc5bec2c2485f49a39fcd4af378279178fab36
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Apr 17 23:19:17 2012 +0100
rxperf: Move into the tools directory
Move the 'rxperf' RX performance testing utility out of the
src/rx/test directory, and into the slightly more visible top level
src/tools/ directory
As this is the first time that rxperf has been built as part of the
default build, make a number of changes so that it will build on all
of our supported platforms.
Change-Id: Ice37e7db694dbfed34009bf76d24f1e0bf272e47
Reviewed-on: http://gerrit.openafs.org/7240
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit db733e325e558d4f36835639e340ecee94f7fcb5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 18 23:25:33 2012 +0100
roken: Add setprogname
Add setprogname to the list of functions that we test for, and replace
with a libroken alternative if it is missing.
Remove setprogname and getprogname from the AC_CHECK_FUNCS list, as
AC_REPLACE_FUNCS is a superset of this test.
Change-Id: If81dc8ba6d9245329f3abae6a6f062e3827dcfab
Reviewed-on: http://gerrit.openafs.org/7250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c0952be8d870cf1fc7837b86b373a100886742e4
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Wed Apr 18 23:16:39 2012 +0100
Import of code from heimdal
This commit updates the code imported from heimdal to
ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408)
New files are:
roken/setprogname.c
Change-Id: I4e6bbe0b76f6a79035937c1eb830008c972f1db4
Reviewed-on: http://gerrit.openafs.org/7249
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 02eb5507481a3f05423081df3c1d07597cd36dc4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 18 23:15:15 2012 +0100
roken: Add setprogname to list of imports
Change-Id: I0aff8d1b3228e702012ffbe8bc8707a6d60ffbaf
Reviewed-on: http://gerrit.openafs.org/7248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 418886567064c9266824fe940592399e8daac3b9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 18 09:10:36 2012 +0100
Update .gitignore files
Update (and create) .gitignore files across the tree
Change-Id: I7534e4f1eac44e6024f86591a171b63a64c6f320
Reviewed-on: http://gerrit.openafs.org/7241
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 18db7ede1c570710d361a2e7cc3a641260e6a08a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 18 12:44:43 2012 +0100
tests: Explicitly include DES in superuser test
When the hcrypto/des header was removed from our installed headers, it
wasn't added back in to the superuser test. Add it now, so that the test
can build.
Change-Id: I38023ee94abe801f6f2313b492e4f80855001c41
Reviewed-on: http://gerrit.openafs.org/7243
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6f20e9ddc2d15ec70b7c2d4035c78b156a36656a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Apr 18 12:35:10 2012 +0100
Mac OS: Fixed shared library symbol issues
Some of our shared libraries (in particular, roken) build with different
symbols in them depending on the exact configuration options for a
particular platform. This means that not all of the symbols in the map
file may be present within the library. On Mac OS X we have been working
around this by using the "-flat_namespace,-undefined,suppress" linker
options.
However, with Lion this no longer works, as the linker still expects to
find the symbol in the library whose mapfile indicated that it was
present. So, for example, we end up with errors like:
dyld: Symbol not found: _errx
Referenced from: openafs.git/tests/rx/../../src/tools/rxperf/rxperf
Expected in: openafs.git/lib/librokenafs.dylib.1.1
... despite errx actually being provided by the system libraries.
The fix to this is to use the default two level namespace, and change
our behaviour for undefined symbols to 'dynamic_lookup', rather than
'suppress'
Change-Id: Ide37856198a8db3d42ee0a5261d097176bcc9301
Reviewed-on: http://gerrit.openafs.org/7242
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9dca26ac192f0538e8f76a8935819b6f9f4c438e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Apr 17 22:28:14 2012 +0100
tools: Move dumpscan into its own directory
Move dumpscan into its own directory, so that it's Makefile rules can
be better contained, and not pollute the whole 'tools/' namespace
Change-Id: Ic58d007824ab802eae469dd2996300f80671a3b8
Reviewed-on: http://gerrit.openafs.org/7239
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0dd7c980acda0756150f11992a0d2236f340e0c2
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 5 10:47:45 2012 -0500
audit: remove static local realms
Remove the static list of local realms and use the
auth interace to do the local realm check. A callback
function is registered by the servers to avoid a circular
dependency between audit and auth.
Change-Id: Ic0f25cd79da7987704de68bade14054490b26c80
Reviewed-on: http://gerrit.openafs.org/6879
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8a040cfd848410b75b4e5ac5498f00f073932598
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 5 08:27:55 2012 -0500
viced: remove static local realms
Use the new auth function to do the local realm match
check instead of static local realms lists.
Override the krb.conf file with the -realms command line
option.
Change-Id: Ic364e61b03385fbc9496ac4af3877a1fdee3a3a5
Reviewed-on: http://gerrit.openafs.org/6878
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9ddf9eca56e02be978ff7d065ee16c85de2cfb06
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 28 22:31:45 2012 -0500
ptserver: remove static local realms
Use the new auth function to do the local realm match
check instead of static local realms lists.
Change-Id: I8b509188103916bdd2e575e5e9a14e3671b81e65
Reviewed-on: http://gerrit.openafs.org/6877
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d85ece0977e043154b7d8f5aef5f4cd972771e8e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 28 09:19:11 2012 -0500
auth: remove static local realms
Remove the static list of local realms and use the auth
interface to perform the local realm match check.
Change-Id: I0f56e7974e59035eb9bf9fb343b550ab6b7ef314
Reviewed-on: http://gerrit.openafs.org/6876
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8e62ddaa3706319b425327b9516c91290274590a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 13 14:49:59 2012 +0100
rx: Use native 64bit data counters
Modify the peer, call and rpc_stats structures to use native 64 bit
types for the bytesSent and bytesRcvd data counters. All of our
platforms support native 64bit quantities now, so there's absolutely
no value in rolling our own.
Change-Id: I7c51de73be17821c6472eea535c8476fe0d7a23e
Reviewed-on: http://gerrit.openafs.org/7205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c83e1ae68022993399402911eab84ee157d34de2
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Apr 17 08:55:45 2012 -0400
aklog: heimdal kvno is rapidly changing
in 1.6 it's unsigned. in 1.5 it's signed.
it's 32 bits. i don't care. just copy the darn thing.
Change-Id: I51efd2be64eac108e5b1591643f24fd0a51bfdff
Reviewed-on: http://gerrit.openafs.org/7235
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 0ac28aa703459df60e9f18348fb1d4f73d5c042c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 16 15:22:35 2012 -0400
Windows: Drop Fcb Resource across SetEOF and SetAllocation
If the file size or allocation is being altered, we must hold
the PagingResource and drop the Fcb Resource. Dropping the
Fcb resource is necessary to avoid a deadlock with TrendMicro's
filter if the size is set to zero and acquiring the PagingResource
is necessary to prevent races now that the Fcb Resource is no
longer held.
Change-Id: Ie72a018adc52c479a4bb2469b2b1abe317644e8b
Reviewed-on: http://gerrit.openafs.org/7224
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fd161ec0e474485c6a1a43019b802e3b663098df
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 16 14:47:38 2012 -0400
Windows: Hold PagingResource across ExtendingWrite
When the file allocation size changes the PagingResource must
be held exclusively to prevent races.
Change-Id: I6ff3a2061563dbb858bb284b463913f6d3b33e7a
Reviewed-on: http://gerrit.openafs.org/7223
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8e1490f5799f0a307760047a133aade806b32afc
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Apr 16 12:25:01 2012 -0400
Windows: AFSProcessOverwriteSupersede CcSetFileSizes
Instead of calling CcPurgeCacheSection() in AFSProcessOverwriteSupersede()
as part of the file length truncation to zero, call CcSetFileSizes().
Wait to call CcSetFileSizes() until after the Fcb->Resource has been
dropped but while the Fcb->Header.PagingIoResource is still held.
Make sure that file sizes are restored in the Fcb->Header if the
afsd_service rejects the file update.
Change-Id: I7574e80781ac1dbbe69814c69644bb3825de9b6a
Reviewed-on: http://gerrit.openafs.org/7220
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f8b759b63ff938e2829fefd71059202c44e7ca13
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Feb 28 08:50:33 2012 -0500
auth: local realms configuration
Add krb.conf and krb.excl support to the auth cell configuration
library. Provide a function to determine if the user is local to the
cell. Provide a function to set the local realms during application
initialization. These changes are intended to replace the functions
afs_krb_get_lrealm and afs_is_foreign_ticket_name.
Change-Id: Iba57e9ffc2c958f3a4565a9352ce172189276ce9
Reviewed-on: http://gerrit.openafs.org/5744
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a3ff62857cb76e403c11a27a250aa3c79d66ebb6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 13 19:14:44 2012 +0100
rx: Remove surplus call to FindPeer
When stats are enabled, rxi_ReadPacket calls FindPeer immediately
the packet is received from the wire. The peer structure that it
gets is used solely to increment a counter, and then thrown away.
Given that FindPeer requires a lock, and a hash lookup, this is
really inefficent.
Instead, delay the compilation of statistics until rxi_ReceivePacket.
Call FindPeer for version and debug packets which have no associated
connection otherwise wait until we have found the packet's connection,
and use the peer which is linked from there.
Change-Id: Ic2eb08e52b97d6b033b9d3de59da9346e012d70d
Reviewed-on: http://gerrit.openafs.org/7206
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 660720d1f54a867e21f78b6ec4c024235e4c37b7
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Mar 29 10:30:47 2012 -0500
rx: dec rx_nWaiting on clearing RX_CALL_WAIT_PROC
Currently, a couple of callers (rxi_ResetCall, and
rxi_AttachServerProc) will decrement rx_nWaiting only if
RX_CALL_WAIT_PROC is set for a call, and the call is on a queue
(presumably rx_incomingCallQueue). This can cause an imbalance in
rx_nWaiting if these code paths are reached when, in another thread,
rx_GetCall has removed the call from its queue, but it has not yet
cleared RX_CALL_WAIT_PROC (this can happen while it is waiting for
call->lock). In this situation, rx_GetCall will remove the call from
its queue, wait, and e.g. rxi_ResetCall will clear RX_CALL_WAIT_PROC;
neither will decrement rx_nWaiting.
This is possible if a new call is started on a call channel with an
extant call that is waiting for a thread; we will rxi_ResetCall in
rxi_ReceivePacket, but rx_GetCall may be running at the same time.
This race may also be possible via rxi_AttachServerProc via
rxi_UpdatePeerReach -> TryAttach -> rxi_AttachServerProc while
rx_GetCall is running, but I'm not sure.
To avoid this, decrement rx_nWaiting based on RX_CALL_WAIT_PROC alone,
regardless of whether or not the call is on a queue. This mirrors the
incrementing rx_nWaiting behavior, where rx_nWaiting is only
incremented if RX_CALL_WAIT_PROC is unset for a call, so this should
guarantee that rx_nWaiting does not become unbalanced.
Change-Id: I7dba4ba5f7cc33270c2d0f486b850fc0391927d1
Reviewed-on: http://gerrit.openafs.org/6986
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6a9b0d8c56ab80bdcc8d4e2d0b28a606837141cc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 15 17:40:03 2012 -0400
rx: conn_call_lock leak
In rxi_ReceivePacket, if the packet is for a client connection
and there is no call allocated, the conn->conn_call_lock was
leaked. Introduced by 95c38dff3740d7e24971ceb5875c06e7abfce102.
Change-Id: Icfc10849c1da08d7c96d139b0a10d9ffe7ee57df
Reviewed-on: http://gerrit.openafs.org/7218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 15cde0e40db8c99ef9af7e9f04c406ce6ea3bfeb
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Feb 20 15:26:09 2012 -0500
auth: get local cell internal function
Add an internal function to retrieve the local cell
name when the auth mutex is already held. Implement
afsconf_GetLocalCell in terms of the new internal
function.
Change-Id: I2f021a9966129e8e256b61d5219e7315b904ac0e
Reviewed-on: http://gerrit.openafs.org/6875
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c242c5a4ae156b6a4432edd3258e87eb283c7ef1
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Thu Apr 12 21:30:47 2012 -0400
TESTS: Add the libwrap script to "make check" to handle library paths
LICENSE MIT
Change-Id: I5f77d8703a163b8b9224f64010b9e008bb386c59
Reviewed-on: http://gerrit.openafs.org/7202
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Garrett Wollman <wollman@csail.mit.edu>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 56a2cbb5fbdcab51bd5f4720e610796abbce5c41
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 14 09:43:48 2012 -0400
Windows: pioctl use GetFileAttributes
Instead of attempting to CreateFile(OPEN_EXISTING) the _._AFS_IOCTL_._
file, try using GetFileAttributes() to obtain the attributes of the
file. The file doesn't exist in the directory listing but the
afs redirector and the afs smb server will respond to the request.
Perhaps the SMB servers in the broken printers will fail it.
Change-Id: I792bcc89c63871043ce6835a971de284fd754d54
Reviewed-on: http://gerrit.openafs.org/7210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 718a6a0c464e1c2f477acbe48770c2297720a57d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Apr 14 11:06:58 2012 -0400
Windows: _._AFS_IOCTL_._ hidden and system
Query file attributes returned only the system attribute
and not the hidden attribute. Must return both.
Change-Id: Id29465adf3e3524b59c63b2e6f8ef482f536a0e1
Reviewed-on: http://gerrit.openafs.org/7209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3cdfdc4792444c54a36341b6a8a66ae1a8085cec
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 13 23:16:56 2012 -0400
Windows: Remove PurgeContent param AFSVerifyEntry
When verifying a directory entry we must update the metadata
for a file therefore we must also purge the data if the version
number changed. This is not optional.
Change-Id: Icb673c7a6c52b3778978248fcb243d110685aa8d
Reviewed-on: http://gerrit.openafs.org/7208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ead0a458272abe79fcca5e521b2960d90d358465
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 13 20:17:48 2012 -0400
Windows: Flush data and then drop locks
The redirector must flush the data to the file server
and then drop the file locks. Doing it the other way
creates races.
Change-Id: Ic3a48546ee9e0066df9d228fc4e57f52b43587c2
Reviewed-on: http://gerrit.openafs.org/7207
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit dcefc4576020c2c076af1a4af07cc827bf4eea40
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Apr 13 11:58:02 2012 -0400
Build: check for gencat
Check for the gencat program and give a missing warning if
not present.
Change-Id: I71cdaa0840215b53071be4481a5f23b2f8667bda
Reviewed-on: http://gerrit.openafs.org/7203
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c11d1c031940f298e96def822024d2857f603268
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Apr 13 13:01:05 2012 -0400
Build: error if solariscc is not found
Fail configure if the solariscc is not found and give the builder
a message to cope with non-standard installation paths for
sunstudio.
Change-Id: I64c1e752833f2aa824f4a15cc144e54bb03a1ec8
Reviewed-on: http://gerrit.openafs.org/7204
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a187be182ce2915b68af0e318bef352d41f7715a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jan 8 11:45:57 2012 +0000
rx: Rework code which pulls packet from recv queue
Both rxi_ReadProc and rxi_FillReadVector contained copies of the
same code to pull a packet out of the receive queue, and turn it
into the call's currentPacket. Abstract this out into a single common
function, so we're not maintaining the same code in two different
places.
Change-Id: I20af6b4ff19f05e21ffde1a80609be12ad6cfeee
Reviewed-on: http://gerrit.openafs.org/7195
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7b45d62ec18726a49dcffe8ddbca8f446ca0bb3e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Jan 6 10:12:26 2012 +0000
rx: Tidy up currentPacket handling
Instead of making a copy of the call->currentPacket variable in our
read/write routines, reference it directly. Make it clear that
currentPacket is used solely by the application thread, and remove
a number of mistaken comments that suggest otherwise.
Change-Id: I7ad799acbf110422df7c1e18ab552caf26b7766a
Reviewed-on: http://gerrit.openafs.org/7194
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e6105fcd33db8af6a5ea5da5f221b6acc8d39f04
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Apr 12 17:35:27 2012 -0400
aklog: heimdal kvno is unsigned
heimdal's kvno is unsigned. comply.
Change-Id: I5960ec33dccb10ae2bbc121e231b6aa58fa17993
Reviewed-on: http://gerrit.openafs.org/7201
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 83b76f564b0972c6163656637b2d64d06895e41a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Sep 8 11:26:39 2011 +0100
Remove redundant header includes
Remove includes of system headers where roken.h already takes care of
including them. This simplifies the source tree, reduces the amount of
work done by the compiler, and ensures that all of our headers are
included with the correct guards
The list of files to edit was generated with the following script:
list=`grep include external/heimdal/roken/roken.h.in \
| sed -e's/#include//g' | sort | uniq`; \
for A in `find . -name *.c | xargs grep -l roken.h \
| grep -v external/ | grep -v WINNT/`; do \
found=0; \
for B in $list; do \
if grep "$B" $A > /dev/null; then \
echo "$A : $B"; \
found=1; \
fi; \
done; \
if [ $found == 1 ] ; then mvim -f $A; fi; \
done
Change-Id: I2edbda550a129709b1dc6860b17d6a8a7509af58
Reviewed-on: http://gerrit.openafs.org/5815
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 03ec768fa65dc5961e161517871f3035df70b643
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Mar 27 00:33:26 2012 -0400
volscan: index offset output column
Add index offset as a possible volscan output column.
Change-Id: I1bf6e8dc3c506a2ee013536e19141ddb214879a6
Reviewed-on: http://gerrit.openafs.org/6980
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 22fbed08a6f23dbbc05fd567e6e8e21e4d1a9709
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 26 20:20:28 2012 -0400
volscan: option to ignore dir vnode magic
Option to ignore directory vnode magic when looking
up the path names. Print which vnode failed when
doing the checks.
Change-Id: Id4b74ee9f139305025b849a007a4534b8ed04dbf
Reviewed-on: http://gerrit.openafs.org/6979
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ed8b38d1d0f2e74ff7280c09afbc6fd4d2df1b23
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 11 11:59:17 2012 -0400
Windows: missing brace in RDR_CleanupFileEntry
Fix 46d76d8821f4c8476499757d509ce1a6bab764b1
Change-Id: I6c6cf5e1dec431544963f6a4c283e2ae0d52a7d9
Reviewed-on: http://gerrit.openafs.org/7189
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit df522b588396aaac3ec662b516ef7287f3b7c47b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Mar 22 17:54:12 2012 -0500
salvager: Trust inode-based special data over OGM
Currently the salvaging code looks for special inodes, and infers the
volume id and inode type from the OGM data in each special inode file.
However, we can already derive this information from the inode number
itself for the special inode, so if they disagree, use the values
based off of the inode number and correct the OGM data.
The inode number should be more likely to be correct, since that is
how we look up the special inode from the header when attaching the
volume. It is also impossible to get special inode files with the same
name, so this ensures we don't get duplicates. And for people that go
snooping around /vicepX/AFSIDat even though we tell them not to, it
seems more likely that they go around 'chmod'ing or 'chown'ing rather
than 'mv'ing.
This change avoids an abort in the salvaging code when the OGM data is
wrong. If we trust the OGM data when it is incorrect, we assume the
special inode file is for a different volume. So when we go to
recreate one of the special files for the volume we're actually
working with, the IH_CREATE fails (from EEXIST) and so we abort.
Change-Id: Ibfaa1bfb27d190c5fec6fc673d88df366268e302
Reviewed-on: http://gerrit.openafs.org/6946
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0594fc80b48152b4b03edda7e19133b59fc0670e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 23 13:02:22 2012 -0500
namei: Abstract out OGM functions a bit more
Add GetWinOGM and SetWinOGM for getting and setting the
Windows-equivalent of the Unix OGM data. Make those and CheckOGM use
GetFileTime/SetFileTime so we can operate just via an FD_t, without
needing the full pathname. Modify the NT namei_icreate to use
SetWinOGM.
Change-Id: I5077911d8473d44ad9ba1d17d3b6deec3a12ba39
Reviewed-on: http://gerrit.openafs.org/6945
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 4c8a3cd789a8495d0c0b3f8ff1a7ebb2a20f5336
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Feb 14 21:58:09 2012 -0500
libafs: dont handle outstatus on write error
if a write errored, we can't trust the OutStatus we got. don't.
Change-Id: I74934c32426c6f25aace06f6ee59c1c1b547af90
Reviewed-on: http://gerrit.openafs.org/6714
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7a650025c5387db483b1c061cc78c9e9c528d582
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Feb 29 09:40:14 2012 -0500
Build: link libaudit before util
libaudit depends on util symbols, so link it first to avoid
unresolved symbols. Include libaudit in the list of libs
instead of making it a special case.
Change-Id: Ide6d5f7e3ce8fd76b504088dcae3110872a87092
Reviewed-on: http://gerrit.openafs.org/6847
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ef6ae1e7eda56e1d6ff7b9ade25b290c855e5780
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 3 10:05:01 2012 -0500
viced: fix log message for MapName_r
Do not log a code of zero if the name plus instance length exceeds
the max pr name buffer.
Change-Id: I8b8f970213c0beb35a728bcc2158796f84120a3b
Reviewed-on: http://gerrit.openafs.org/6861
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit bc770a5007ae16aa5477bf1748f3e0666f665781
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Apr 10 16:07:37 2012 -0400
doc: distributed files are under dest
Add the dest path component in the quick start guide instructions for
copying files from a binary OpenAFS distribution file.
Change-Id: I5c39ac0426ef2eab89ae5d3df260628e949dc21e
Reviewed-on: http://gerrit.openafs.org/7187
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fbe6f0f4ad983389b77309be49af658f6c0dfeb3
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Sep 13 07:17:27 2011 +0100
afsd: Move to newer cmd syntax
Move afsd over to using the newer cmd functions, and avoid using
direct array access, and fixed offsets.
Change-Id: I6e09823d764cbe6109c9a72700239d814b91db0c
Reviewed-on: http://gerrit.openafs.org/7137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 46d76d8821f4c8476499757d509ce1a6bab764b1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Apr 11 00:29:03 2012 -0400
Windows: Do not delete in CleanupFile if error
If an error was detected when processing RDR_CleanupFileEntry()
do not perform the file deletion. Just return the error as
attempting the deletion could result in an exception.
Change-Id: I57b17a15d1bdda4d0890dbe59f9e2432d465250f
Reviewed-on: http://gerrit.openafs.org/7186
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f0b039fc4761bb0151c7ee69110926ef16e264c7
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Apr 9 15:49:50 2012 -0400
libafs: log error code when marking server down
Log the error code when marking the server down due
to server/networks issues.
Change-Id: Ib3d57562642ca564dcfeaa775de66f54d08f23af
Reviewed-on: http://gerrit.openafs.org/7138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3720f6b646857cca523659519f6fd4441e41dc7a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 16:21:52 2011 +0100
Rework the ugen_* interface
Remodel the ugen_* ubik initialisation interface so that more complex
sets of security flags can be passed through it. A number of new
functions are provided, all of which take the AFSCONF_* security flags
defined in libauth:
*) ugen_ClientInitCell is used to initialise a ubik client structure
when the caller already has afsconf_dir and afsconf_cell
structures for the cell being contacted
*) ugen_ClientInitServer is used to initialise a client which will
contact a specific server within a given cell, rather than
selecting one from the pool
*) ugen_ClientInitFlags is used to initialise a client given a
cellname, and a path to a configuration directory. It is is
closest to the legacy ugen_ClientInit function.
All of the in tree callers are updated to use this new interface
Change-Id: I6a438aa70d94114c8b6626fa1396b7580ab07c07
Reviewed-on: http://gerrit.openafs.org/7131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5dd997762897e290083a96a2179afacc4caa2fbd
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Jan 22 10:03:43 2012 -0500
viced: Make Update_TargetVnodeStatus usable by replication code
Add a remote flag, skip rights related code for the remote case.
This will need to be revisited later; in the case that what ends
up on disk is slightly different than the InStatus passed in, the
changes should be preserved to pass to the replicas.
Change-Id: I596698ba00174efbdc6a170a24f86ea88554f9af
Reviewed-on: http://gerrit.openafs.org/6675
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 37fc2dfbb9e3a8a8ecb022febae7ccd04d7340a4
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Jan 22 09:34:28 2012 -0500
viced: Make GetVolumePackageWithCall usable by replication code
Add a remote flag to GetVolumePackageWithCall to make it usable for
remote replication RPCs. For the remote case the checks related
to access rights are skipped.
Change-Id: I81db0bb1ae90c5f98cf4e59d9ba28466b312c763
Reviewed-on: http://gerrit.openafs.org/6673
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 74e5f32aaca5313f153f13c7ce9442527b758a0a
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Jan 21 14:42:01 2012 -0500
vol: Allow VAllocVnode of specific vnodes
Add parameters to VAllocVnode to allow the caller to specifiy the
vnode and unique numbers to use. This will be used by the RW
replication code to keep vnode numbers in sync between the master
volume and the replicas.
Adapted from code by Vishal Powar and Derrick Brashear.
Change-Id: Ibaf79aad2b3e7a52802f5e01f7e4c7730c3f5090
Reviewed-on: http://gerrit.openafs.org/6672
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 46474374e1914fb556d38f09f50cdbbaeaa1aef0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 10 10:17:51 2012 -0400
Windows: AFSValidateProcessEntry, ullProcessId 64-bit
In AFSValidateProcessEntry(), ullProcessId is 64-bit and must be
printed as an %I64X in AFSDbgLogMsg() formats.
Change-Id: I0e1cd45383c4512eb271c294674bbfe3f0f39bef
Reviewed-on: http://gerrit.openafs.org/7172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7bab9649aa9d4fe467d2f0fa6df2747a97f35950
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Apr 9 23:13:28 2012 +0100
roken: Add rk_getprogname to Windows mapfile
Add the rk_getprogname symbol to the Windows mapfile so it can be
used by roken consumers.
Change-Id: I77c7db3fcd9136d36e2b17b6250bfcfa6327b0e5
Reviewed-on: http://gerrit.openafs.org/7139
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit bb16c6f38f30c59be1849e3b30cad6928530066b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Apr 5 16:00:32 2012 -0400
rxkad: Remove DES include from header file
Remove the hcrypto/des.h include directory from the rxkad_prototypes
header file. We ship rxkad_prototypes.h, but we don't ship the hcrypto
headers. Having an installed header depend upon an uninstalled one is
a pain when building out-of-tree code like perl-AFS.
Change-Id: Idac93ba834c84f6f9e2e49361f88d0e357a328d6
Reviewed-on: http://gerrit.openafs.org/7068
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1e858293d3aea047953edef626b8b3e36feca814
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Apr 5 15:58:11 2012 -0400
rxkad: Move conversion functions to own file
Move the various key conversion functions into thir own header file,
rather than rxkad_prototypes.h. This means we can isolate the dependency
on the hcrypto DES headers (which we don't install)
Change-Id: I8efcbf97b6794d9573f35eec9d4a32e9ff4cf352
Reviewed-on: http://gerrit.openafs.org/7067
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 10a7428b79e44b203a132e70cf929a6ee9b18650
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 6 23:56:30 2012 +0100
shlibafsauthent: Add a load more objects
The perl-AFS module needs to link against a pthreaded, PIC, library
that contains all of the routines that it provides perl shims for.
At the moment, libafsrpc_pic and libafsauthent_pic are the only such
libraries that OpenAFS provides.
Add all of the necessary objects to libafsauthent_pic such that the
2.6.2 version of perl-AFS can build with a minimal set of patches.
Minimise the damage by only making these available through the static
version of the libafsauthent_pic library.
Change-Id: I5a2aa5f5fbcfbe15aa7a23c3ab57b34b979ab2f3
Reviewed-on: http://gerrit.openafs.org/7070
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c3dd14759d592463eb29a1e15dc6648bfe25e583
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Apr 6 23:54:10 2012 +0100
opr: Install the queue.h header
The opr queue definition is required by a structure in the installed
cellconfig.h header. So that header can still be used by out-of-tree
applications, install the queue.h header too.
Change-Id: Ifaf49d59df24275ff50c215de6a0f40fc2bd2230
Reviewed-on: http://gerrit.openafs.org/7069
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7051672c7118b44e40a59b645f48428aabc9ee8a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 10 01:05:14 2012 -0400
Windows: report error on panic
If afsd_notifier() is called the service is going to exit(1).
Report to the service manager that the service exited with an
error as well.
Change-Id: I88bb2f315016ab17a526d1eab162ccde8beb0dd0
Reviewed-on: http://gerrit.openafs.org/7148
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 846cef3685edbdba9f186f595daecb5241551ec1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 9 23:24:07 2012 -0400
Windows: correct afsredir log entries
AFSVerifyEntry != AFSValidateEntry
Change-Id: I5b138e121f66724afddde9eadce4c11009ec6ec4
Reviewed-on: http://gerrit.openafs.org/7147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 779c27bf1daaf01c79c0bb7c687781151abb4383
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 9 18:41:13 2012 -0400
Windows: Refactor AFSValidateEntry
Refactor AFSValidateEntry to avoid obtaining the
ObjectInformation->Fcb->Resource when it isn't necessary.
This will avoid contention and improve performance.
The only time that the Fcb->Resource is required is when
the object requires verification, the object is a FILE,
and the object was successfully evaluated.
Even with this reorganization there is a small window
of opportunity for a deadlock to occur if a CcPurgeCacheSection()
which is called with the Fcb->Resource held triggers a filter
driver to issue a CreateFile and in between the two operations
an invalidate object is received.
Change-Id: Iddf64f030c6a608ac29a10b7a9a7e130ae6c4249
Reviewed-on: http://gerrit.openafs.org/7143
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d1e59d2d82787d19c81e60db68c76f45560b8465
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Sep 9 07:46:01 2011 +0100
Generalise the new background daemon code
Move the new background daemon code out from under the AFS_DARWIN80_ENV
ifdef into its own AFS_NEW_BKG define. This lets us use it for things
other than the Darwin mv helper, on other platforms.
Based on code originally written by Derrick Brashear
Change-Id: Iba9431f5dc4bbbe10222b25a595cdd1ea2f592f4
Reviewed-on: http://gerrit.openafs.org/7136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 46bdb318c45b4e93a5b297e6fdee2b2acbed4b55
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Apr 9 17:16:42 2012 -0500
vos: Do not try to remove backup volume id 0
Currently we always try to delete a BK volume if we're deleting the
RW. If the BK volume id is 0, this is never going to do anything, so
don't try to delete it.
Change-Id: I0c003040cface9999944d61637077fce1736445e
Reviewed-on: http://gerrit.openafs.org/7140
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 5e7e3724fc354a17ebc05814d8693a50d859bd84
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Apr 10 00:35:43 2012 +0100
Import the expand_path.c file from Heimdal
Import expand_path.c from Heimdal so that it can be used for path
parsing with the Windows version of the INI file parser.
Change-Id: I764ea10edb8bb63bd45216c912c0f67597c4467a
Reviewed-on: http://gerrit.openafs.org/7144
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4545abb09686f2af91c937548af281587a61fe55
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Tue Apr 10 00:37:07 2012 +0100
Import of code from heimdal
This commit updates the code imported from heimdal to
ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408)
New files are:
krb5/expand_path.c
Change-Id: Ib4093b72257f9a0d1a49edb0fe6779908a78cd83
Reviewed-on: http://gerrit.openafs.org/7145
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3109a66fb2df8e3f2878938c5b62222e8212c0f1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 1 12:27:04 2012 -0400
rx: Remove packet burst elements from peer struct
The peer structure contains a number of elements left over from an
earlier, burst based, congestion control strategy. As OpenAFS has
never implemented this strategy, just remove these elements from
the structure, and store 0 values for these elements in the debug
packets.
Change-Id: Ib50a8ac587890efb483d3c2640ead615d170db34
Reviewed-on: http://gerrit.openafs.org/7006
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit aa6f52584ea1aea170da578328cc35e567a5b0b4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Nov 25 20:51:40 2011 +0000
rx: Remove the unused packet skew code
We don't (and haven't, since the release of OpenAFS) use the packet
skew calculations for anything. However, maintaining them requires
taking locks in some critical parts of the transmission code path.
For both speed, and maintainability, reasons remove the skew code
from the tree - it's in git if we ever want to go back to it.
Change-Id: Idc6dc80fb06ca959ad02a85f2c536a94ca3d5c02
Reviewed-on: http://gerrit.openafs.org/7004
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 84d09a831afcfa8d0971dcbe4f1fc7823cec9e10
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Dec 6 14:06:05 2011 +0000
rx: Hide internal packet functions
Hide functions in rx_packet.c which are only used by that file by
making them static.
Change-Id: I22d4be2130cc4a46183254d3ba36c61644891852
Reviewed-on: http://gerrit.openafs.org/7003
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9862ac0dbb72d8f5f9f894e567261e52354e0b15
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Dec 5 18:56:03 2011 +0000
rx: Hide struct rx_peer from the rest of the tree
The peer structure is an internal RX structure, so it shouldn't
be contained in public header files, or used by non-rx modules.
Hide the structure definition in rx_peer.h, and convert the
rx_HostOf and rx_PortOf accessors from macros into functions. This
will also help with adding support for non-IPv4 addresses to RX.
Change-Id: I790fa3193bfa629a2872fc5395d0146e76a2de9e
Reviewed-on: http://gerrit.openafs.org/7002
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f971a36968bdcb224ff3ffb663929d4febcab5d5
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Apr 9 19:00:36 2012 -0400
tests: remove unused variable in tests/util/ktime-t.c
errors is set but not used - remove it.
Change-Id: I00c99ac8b9c61ab2667aecbdf0fd04401d018bf8
Reviewed-on: http://gerrit.openafs.org/7142
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cc06d00b215b4aebfdd05ad205c088e3dc1ba666
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Sep 25 21:30:02 2011 +0100
Move configuration parsing into libcmd
Rework the API for directly parsing configuration files and move it
out of util/ and into libcmd, where we can actually make use of it.
This is a raw API - it provides direct access to the parser. The
eventual intent is that this will predominantly be contained within
libcmd itself, which will then wrap this with the more general purpose
Option functions
Change-Id: I9f4a9c373c4123023120f69e595068ead6160507
Reviewed-on: http://gerrit.openafs.org/7132
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e4430d9d487b1b93717886eeb2621bbe50899838
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 1 15:40:24 2012 -0400
rxperf: Build again
Fix rxperf so that it builds again
Change-Id: I9747bc1b3fedb96d5bc317acde69f35b1dc6efb8
Reviewed-on: http://gerrit.openafs.org/7011
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 91303604f69a317b12e22b02f74a572573c8f3ca
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 1 15:15:35 2012 -0400
roken: Prefix getopt and getprogname
The roken symbols for getopt and getprogname are now prefixed with
'rk_'. Fix the map file so it lists the correct symbols.
Change-Id: I61adba7d5bec3e86b8e29d1eefda23df4ef91988
Reviewed-on: http://gerrit.openafs.org/7010
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 80ec5db21d6395c29d5433541a2d9d63c975782f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 1 15:09:57 2012 -0400
all needs to be first rule in the Makefile
Just running 'make' in a subdirectory will fire the first rule in that
directory's Makefile. When the buildtools rules were added to roken and
crypto, they were put at the start of the file, meaning that they fire
in perference to 'all'
Swap the ordering back so that 'make' does what would be expected
Change-Id: I598a183f42c150a5da724b7403e91f89f74a0109
Reviewed-on: http://gerrit.openafs.org/7009
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 46c5aabfc6f5af2875e8b20252a17955ad89dd38
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Apr 5 15:50:35 2012 -0400
bos: Change to using char casts for ka functions
The ka_IsZero and ka_PrintBytes function just use char strings. Cast
directly, rather than going via a helper functions to simplify this
code.
The helper functions add complexity, and additional dependencies which
cause problems with some uses of this code.
Change-Id: I831ff0f8fbecec602d8c2b9112675938facfb06b
Reviewed-on: http://gerrit.openafs.org/7066
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 00992c66972aeab96cca9781b02a780ab49dce23
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Apr 5 15:43:23 2012 -0400
shlibafsrpc: Add additional XDR functions
Export the afs_xdr_pointer and afs_xdr_u_char functions so that
shlibafsauthent can make use of them.
Change-Id: I16cf3f69904bffb3a034fd4052117845c1067a2c
Reviewed-on: http://gerrit.openafs.org/7065
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 578cdc35e645489823f322b09632fca2fd7b2c31
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 9 07:18:32 2012 -0400
rx: remove peer burst elements from rx/test
Subsequent patchsets will turn rx_peer into an opaque object
and remove the burst elements entirely from the tree. For
now remove them from rx/test
Change-Id: I728f7b74497701c0ef965009dff5550e1b153696
Reviewed-on: http://gerrit.openafs.org/7130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 01a1b79288c532f99e2da52aa13262d4c0fc1f79
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Dec 7 18:30:00 2011 +0000
rx: rxi_AckAll isn't an event handler
rxi_AckAll is coded as if it is an event handler, yet the only
call site is a direct call from rx.c. So, rework the function to
remove all of the event handling code, change its arguments to match,
and make it static.
Change-Id: I947c02bf91bf5a3f42d2a389f9393e68f3ccee4b
Reviewed-on: http://gerrit.openafs.org/6999
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a20c4893670df80c15585f68d244f2f82bfa0758
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Dec 7 19:14:03 2011 +0000
rx: Tidy up function scope in rx.c
Rework headers to more clearly indicate which functions in rx.c
are considered part of the 'public' rx interface, and which are for
internal use only.
Move internal functions either to be static in rx.c
(if they are used only within that file), or defined in
rx_internal.h.
Remove entirely the unused function rxi_NatKeepAliveOn()
Change-Id: I878374dc137f4c7e204de4b2d9ca17fa1c5db628
Reviewed-on: http://gerrit.openafs.org/6998
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 084c2c1687fda07c768837e8fd7cc0904818f977
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Nov 14 10:28:38 2011 +0000
rx: Remove trailing else from RX_KERNEL_TRACE
The RX_KERNEL_TRACE ifdefs all contain a trailing else, which makes
no logicial sense given the rest of the code. The only effect of this
trailing else is to cause packets to not be sent when tracing is
enabled, which probably isn't the desired behaviour.
Change-Id: I2175b1d8270cd096361f349a467245b49efabf6b
Reviewed-on: http://gerrit.openafs.org/7001
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 49ddcc3b3e9645255db394af0256ea374d06766e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 8 18:31:31 2012 -0400
kas: Don't require config for help
Modify the call to ka_Init in kas, so that a fully configured client
isn't required in order to generate help output. In particular, permit
kas -help, kas -version and kas apropos to run without initialising the
ka library.
This fixes a problem with running 'make check' on systems that don't
have an AFS client installed (or where the AFS client is installed in
a different location)
Change-Id: I5edd10a319ed6aee163723f99c4f37183f572b2f
Reviewed-on: http://gerrit.openafs.org/7129
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9037358b6a49d45ba8170a1d71de8b7c678d4f0f
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Apr 7 10:11:14 2012 -0400
tools: return error code in xfclose
The code variable takes the return code from do_close, but
is then unused. Return its value instead of systematically
returning 0, avoiding an unused variable warning.
Change-Id: I831b5b81721400ee08106d2ecdbf2b7b8e126348
Reviewed-on: http://gerrit.openafs.org/7123
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
commit 2427cb000cb70cfca5b2a61d4f5f9ca54488fc55
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Jun 25 18:29:27 2011 +0100
rx: Remove unused ACKHACK macro
rx_globals.h had a macro called ACKHACK which at one point looks like
it was used to determine whether to send an ACK or not. We now have a
more sophisticate mechanism for determining this, and the old macro
doesn't seem to have been used in a long time. So, remove it to avoid
confusion.
Change-Id: I9b17cdca69c903c7a952489791088f2899ac7e60
Reviewed-on: http://gerrit.openafs.org/7000
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2c0ed7ace6e10cb7fa053f0eb6d2a1fa45f76577
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 8 18:31:25 2012 -0400
tests: waitpid requires sys/wait.h
Calling waitpid requires the sys/wait.h header to be included to
guarantee that the prototype is enabled.
Change-Id: I2d845236347d1be46cd750c2e766b305a64cde53
Reviewed-on: http://gerrit.openafs.org/7128
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 02f470e99d5853808bca532ff953c2bbc0b8176c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 8 18:31:15 2012 -0400
tests: rx needs roken
On Linux, the RX library has a dependency on libroken for the rk_socket
function. Add this dependency to the RX tests.
Change-Id: I306e846524232bc136cd969ab1b8664d1c570e2d
Reviewed-on: http://gerrit.openafs.org/7127
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bdca02dfe7df3800a3e5f3a9b10ca1d223779ef9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 15:27:53 2012 -0400
cmd: Don't leak memory when constructing help string
It's not critical, because we'll be exiting soon afterwards, but just
to be nice, don't leak the name of every command option whilst we're
constructing the help string.
Caught by clang-analyzer
Change-Id: I87fdb2030c6a7c5ad810f2a06820c08cbe2fb18e
Reviewed-on: http://gerrit.openafs.org/7107
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4dc40bade411ddc1a0cc85ee9e242307ea2c96b2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 15:23:22 2012 -0400
ktime: Don't leak token list
ktime_ParsePeriodic generates a malloc'd token list when it parses
the time string passed to it. Make sure that we free this list before
exiting from the function.
Change-Id: I6edacc6504aeec06ede5b5ae36c22f69b0d6cea0
Reviewed-on: http://gerrit.openafs.org/7106
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 63f7b0a2051b1c5cc20208b20b73c587f3d74b4f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 15:16:16 2012 -0400
budb: Don't leak memory
Don't leak the malloc'd path variable everytime we call truncateDatabase
Caught by clang-analyzer
Change-Id: I583d81b136113820dab00a6eb35ca8e1aeec2cd1
Reviewed-on: http://gerrit.openafs.org/7105
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 39bdcebad71cf4c7636e7c1007f228dbd36510cb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 15:13:49 2012 -0400
vol-dump: Don't leak memory
Don't leak a Volume structure everytime we call HandleVolume
Caught by clang-analyzer
Change-Id: Id8cf79dd2178b8647d88f0765ec4ad9d327a23ae
Reviewed-on: http://gerrit.openafs.org/7104
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1b4d2b53ccb4bece0c5be78fa87ba085f070bdf5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 15:11:10 2012 -0400
vol-dump: Make static things static
vol-dump is a self contained object. Make everything in it static to
make clear that these functions are not being used by other objects in
the tree.
Change-Id: I0345c884167ed322fdf7a6e83b77b0ae261b9d8f
Reviewed-on: http://gerrit.openafs.org/7103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit be8d8b7c78eb54f460489084650ba13f3946d7a2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 14:59:47 2012 -0400
auth: Don't leak key on file parse error
If we fail for any reason whilst parsing the keyfile from disk, don't
leak the key structure which we allocated to store the results of the
parse.
Change-Id: I21a27723f96af9428465134cfb975c83e10da535
Reviewed-on: http://gerrit.openafs.org/7102
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8f39150b2718d5d758ba9d02bf3becd9c8947120
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 14:52:58 2012 -0400
opr: Flag assertion error handles as noreturn
Flag both of our assertion error handlers as being AFS_NORETURN, so
that static analysers can truncate their decision trees, and avoid
false positives, based on assertion statements.
Change-Id: I511c9c19a714cd3eaa5a886bf9561f577244360e
Reviewed-on: http://gerrit.openafs.org/7101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d55a5d70802a1907ef7cf9c9d20646cb69e89989
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 14:42:39 2012 -0400
pts: Don't malloc(0) when there's nothing to do
If GetNameOrId is called with no work to do, then don't attempt to
malloc a load of 0 length strings. Instead just return an empty array
to the caller.
Change-Id: I245cfde71d65b8a3b6df4217b90dad81e9e60a58
Reviewed-on: http://gerrit.openafs.org/7100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8d497e575c85979c7107a0a1efd6bc75ac1d391f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 14:37:04 2012 -0400
bucoord: Don't malloc(0) if there's no work to do
If there's no work to do, then don't attempt to malloc 0 bytes, and
just return success to the user
Change-Id: I060852a247acb8309c75f3670577561b5a9af591
Reviewed-on: http://gerrit.openafs.org/7099
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 54ca22a905c65e0544ce17c74fd59073f46b8c9f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 14:33:33 2012 -0400
auth: Handle empty lists of keys
Handle the case where a list of keys may be empty - don't attempt
to calloc a 0 length array, and have Put handle the case where the
array being freed has no elements.
Caught by clang-analyzer
Change-Id: I665035cb00a8da411710a71a17ae66545702127f
Reviewed-on: http://gerrit.openafs.org/7098
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5815c5ffb03e8afa0d36eef7da865e564d568296
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 14:23:18 2012 -0400
Unix CM: We're disconnected if RW disconnected too
At the moment, the Unix CM doesn't support entering a purely RO
disconnected mode (the historical AFS_IS_DISCONNECTED mode). If we
go disconnected, or reconnect we always toggle RW discon at the same
time as we toggle RO. Arguably, the RO disconnected mode should just
be removed, as it is now superceded.
For the moment, make it clear to the compiler that RW disconnected
implies RO disconnected, so that static analysis can make more sensible
decisions about code paths.
Change-Id: I7e2d04d2cf67740c6b6285950874c6a4eaeb0537
Reviewed-on: http://gerrit.openafs.org/7097
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit de94f97649cbf36a5d8ae805a0d211573fcb11be
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 12:20:25 2012 -0400
auth: Make sure we get AF_INET addresses from DNS
The routines which do AFSDB and SRV lookups copy the results of
gethostbyname directly into an afs_int32, and use the size of the
result to limit the copy. If, for any reason, they get a result that
isn't an int, then they will overflow this value.
Check that the result we get from gethostbyname is in the INET
address family, and also limit the size of the copy by the size of the
destination, rather than that of the source.
Caught by clang-analyzer
Change-Id: Icf1426e090bc1ed382212d5de6c291d0816fb2c9
Reviewed-on: http://gerrit.openafs.org/7096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 20265ddd78dbe4a7777b17912f2c3f00dbf2a1db
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 11:59:16 2012 -0400
vos: Initialise total counters
When VolumeStats_int calls DisplayFormat, it isn't interested in
the total counters it provides. So, it doesn't both initialising the
variables it passes in to hold these counters - garbage in, garbage out.
However, this shows up as an uninitialises variable warning, so set them
all to 0 to keep clang happy.
Caught by clang-analyzer
Change-Id: Ia3e1eadde6eac6fa924a4ff9ad566c5c50f9ff40
Reviewed-on: http://gerrit.openafs.org/7095
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6c1a7e68c4859573f636dec9b7e4b2ac1f5bb8a4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 11:51:19 2012 -0400
vol: Don't return an uninited val from LookupNode
If the SalvageHashTable for a particular node is empty, then LookupNode
can return an uninitialised value to the caller. It isn't clear from a
broader code inspection whether LookupNode can ever be called with an
empty SalvageHashTable, but returning a NULL vsp does seem like the
correct thing to do in this situation.
Caught by clang-analyzer
Change-Id: Ibee79e6acf7d3bdbc2995ef924338ade4de77d08
Reviewed-on: http://gerrit.openafs.org/7094
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9cbc3b77db818bd65a8ec3c5b804178449c2bb67
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 07:01:46 2012 -0400
fs: Fix bad frees
On an error GetLastComponent was freeing completely the wrong thing.
Fix this so it frees the memory it has allocated, and not some random
stack pointer.
Caught by clang-analyzer
Change-Id: I8b65f7ab36647b876fae5cbe59d82fd8d38ce0b7
Reviewed-on: http://gerrit.openafs.org/7093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9a007a9df43645b63a8b642029b4931928f9268b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 06:58:01 2012 -0400
cmd: Use strl* rather than strn* to avoid overrun
The NName function was using strncat(a, b, sizeof(a)), which doesn't
work as you would expect if 'a' already contains data. To avoid the
potential buffer overflow, switch to just using strlcat.
Caught by clang-analyzer
Change-Id: Idd2c630c07a93b27e8d629339589aa6686290eae
Reviewed-on: http://gerrit.openafs.org/7092
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b5ebfec329ef428e242c7458ccbfc807b25f1d63
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 20:36:56 2012 +0100
autoconf: One CC to rule them all
(well, in userspace at least)
We have 3 different ways of specifying the C compiler - CC, CCOBJ and
MT_CC. On most platforms these are set to identical values by the
configure script. However, this causes problems for a user who wants
to override the default complier choice by doing
make CC=my-favorite-compiler
as this doesn't catch all of the ways we specify the compiler [1]
So, change the specification of CCOBJ and MT_CC so that, by default,
they reference CC, rather than copying its value. This means that on
platforms where CC is the appropriate compiler to use in all situations,
a user need only change CC to modify their compiler choice.
[1] - it might be argued that the correct place to substitue the
compiler is in configure's environment, which does currently work.
However, this doesn't work with special things, like static
analysers, that can build the source tree, but not the configure
tests.
Change-Id: Ib95e2ac00b36f33c3cb2491feacd6c898f8f61dc
Reviewed-on: http://gerrit.openafs.org/7091
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3198cef8ccf0d9cb9a7479c0b973e604e21e62fc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:41:17 2012 +0100
afs: Handle reading past the end of a file
... except that this change doesn't actually handle this, it just
stops clang from throwing an error about the bogus code that's already
in there. This needs fixed properly ...
Change-Id: Ifbf190a86037fced8104ed0843dd1e7aa0b999a7
Reviewed-on: http://gerrit.openafs.org/7090
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f1842bcb87c84e8862ca521f491215e42ce1ee2a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:40:30 2012 +0100
xdr: Len can never be negative
The len parameter to xdr_len is unsigned, so can never be negative.
Don't bother testing to see if it is negative, so that clang likes us
again.
Change-Id: Iad5f8b1b2d20ec55846bc1ef7b7499a30956e17f
Reviewed-on: http://gerrit.openafs.org/7089
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5e107724f3661254cfdb693ae2d4d1c5238eba7d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:39:51 2012 +0100
rx: Remove needless braces
Doing if ((a==b)) is unecessary. It's also potentially dangerous, as
that's the syntax required to do assignment within an if statement.
clang now issues warnings (errors in -Werror mode) when it encounters
these.
Remove pointless braces from the Unix CM to make clang happy.
Change-Id: I031db80c3f85c0e4c4db365b1c36b5d4b4a7cb48
Reviewed-on: http://gerrit.openafs.org/7088
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 438d6ba63cda7d7484c545a4fd181803e84d68eb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:37:36 2012 +0100
rx: Handle negative returns on packet reads
rxi_RecvMsg returns an int, because it can return a negative value upon
error. Don't store its return value as an unsigned int, because this may
hide the potential errors.
Modify the error handling loop so that errors get to where they are
intended.
Change-Id: I212e5881f83a2a95c177c23dbc2da2583155f1aa
Reviewed-on: http://gerrit.openafs.org/7087
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4e68282e26b0c4569d25d076d54274f0da47a691
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:35:51 2012 +0100
venus: Make clang happy with strlcpy use
clang now expects that strlcpy will always be used to prevent overflow
of the destination string, and gives a warning if the size parameter is
based solely on the length of the source string.
Modify the BreakUpPath function so that it takes the size of the
destination string as an argument, and uses this to limit the amount of
data pasted into it.
Change-Id: I86f68dd2013ca8bc4c88ade78d27c4d416a9ae94
Reviewed-on: http://gerrit.openafs.org/7086
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6d83b33324b68389d0cb8fee73f3bf3a06e9abe5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:34:53 2012 +0100
viced: Remove pointless braces
Doing if ((a==b)) is unecessary. It's also potentially dangerous, as
that's the syntax required to do assignment within an if statement.
clang now issues warnings (errors in -Werror mode) when it encounters
these.
Remove pointless braces from viced to make clang happy.
Change-Id: Iee8c1d60cc2296fefd0e7f82127821dcefb931ec
Reviewed-on: http://gerrit.openafs.org/7085
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 350b5d58779cc127b96497283c2d982e099b911c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:33:55 2012 +0100
vlserver: unsigned values are always >0
Maxvolidbump is defined as an unisgned int, and thus can never be less
than 0. Remove the pointless check, as it just makes clang sad.
Change-Id: I78a2c8f6fcaee17196e37183256e6935cdca183b
Reviewed-on: http://gerrit.openafs.org/7084
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 408afc5690fc8ac3b6942983765ab36e63d2534d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:31:10 2012 +0100
vol: Call memset with the correct size
Call memset with the size of the structure we're initialising to 0,
and not the size of the pointer to that structure.
Caught by clang's new warnings.
Change-Id: I8cded7bed4e289e9603778e06873f94fd3924aa8
Reviewed-on: http://gerrit.openafs.org/7083
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e202822b8efd7511f8652064cd8831c0a049dce6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Jan 5 10:51:06 2012 +0000
rxgen: Tidy up server side freeing
The way in which rxgen handles freeing of objects allocated by the RPC
stub has evolved over the years. Originally, there appears to have been
a "somefrees" parameter which was used to track whether objects required
freeing or not. However, this parameter has fallen in to disuse, as
support for typedefs and unions were added, and which parameters
require freed is now tracked within the description structures
themselves. So, get rid of somefrees, as it is now just confusing.
The generated code to free a set of RPC arguments currently looks
something like:
fail:
z_xdrs->x_op = XDR_FREE;
if (!xdr_string(z_xdrs, &Name, AFSNAMEMAX)) goto fail1;
if (!xdr_string(z_xdrs, &OfflineMsg, AFSOPAQUEMAX)) goto fail1;
if (!xdr_string(z_xdrs, &Motd, AFSOPAQUEMAX)) goto fail1;
if (rx_enable_stats) {
rx_RecordCallStatistics(z_call, RXAFS_STATINDEX,
19, RXAFS_NO_OF_STAT_FUNCS, 0);
}
return z_result;
fail1:
if (rx_enable_stats) {
rx_RecordCallStatistics(z_call, RXAFS_STATINDEX,
19, RXAFS_NO_OF_STAT_FUNCS, 0);
}
return RXGEN_SS_XDRFREE;
Which isn't very efficient, or easy to modify. So, change the code
generator to produce code that looks like:
fail:
z_xdrs->x_op = XDR_FREE;
if ((!xdr_string(z_xdrs, &Name, AFSNAMEMAX))
|| (!xdr_string(z_xdrs, &OfflineMsg, AFSOPAQUEMAX))
|| (!xdr_string(z_xdrs, &Motd, AFSOPAQUEMAX)))
z_result = RXGEN_SS_XDRFREE;
if (rx_enable_stats) {
rx_RecordCallStatistics(z_call, RXAFS_STATINDEX,
19, RXAFS_NO_OF_STAT_FUNCS, 0);
}
return z_result;
This does the same thing, but is easier to read and is more consistent
with the way that we structure marshalling and unmarshalling.
Change-Id: I8b56f320c05c5d4270daf409d57514cbe8d076f5
Reviewed-on: http://gerrit.openafs.org/7005
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 709a6358e1d1f6cc0b025522e1e595c50bb2b733
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Apr 8 13:58:25 2012 +0100
fileserver: Fix NeverAttach support
Commit 35becabed870d4bfe49abaa499d99a3ffb0a2d31 added support for
the /vicepXX/NeverAttach. However this code only appears to work on
Linux. It fails build testing on (at least) Mac OS X, FreeBSD, and AIX.
Modify the code so that the NeverAttach call uses the same variable to
locate the path of the partition as the AlwaysAttach call does.
Change-Id: Ic87e112f362ac6d23376fb0a263d021c29c0b06e
Reviewed-on: http://gerrit.openafs.org/7125
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f26330904607c6c939c037587b473644deea669d
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Sun Apr 8 12:10:58 2012 -0400
DOC: Factored common text out of the vos_backup and vos_dump man pages
Change-Id: I84bd722834297778ab2e719996b2f8528d8706d6
Reviewed-on: http://gerrit.openafs.org/7126
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 58be19d792e6b8e93fbd49bc4ef04bbb8f4560ef
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:30:18 2012 +0100
vol: Remove unneeded braces
Doing if ((a==b)) is unecessary. It's also potentially dangerous, as
that's the syntax required to do assignment within an if statement.
clang now issues warnings (errors in -Werror mode) when it encounters
these.
Remove pointless braces from vol to make clang happy.
Change-Id: I805c52fd76de4d028741ae4382b747917581d2f2
Reviewed-on: http://gerrit.openafs.org/7082
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit a0af50a9dcab6935ad7701b81e76cab750633615
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:27:30 2012 +0100
vice & vol: Cast FDH_SYNC results to void
FDH_SYNC is a macro which returns a result. This leads to clang
complaining about an unused expression when the macro is expanded.
Avoid this by just casting the macro result to (void) when we aren't
interested in it.
Change-Id: I99eaac7432211d6b0cab10c3e1af0c6d4e2092a8
Reviewed-on: http://gerrit.openafs.org/7081
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 4d4e4dde7c0efcf238251b1ea1dc3933810062d0
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:24:23 2012 +0100
ptserver: Remove redundant braces
Doing if ((a==b)) is unecessary. It's also potentially dangerous, as
that's the syntax required to do assignment within an if statement.
clang now issues warnings (errors in -Werror mode) when it encounters
these.
Remove pointless braces from ptserver to make clang happy.
Change-Id: I1bf1698b1d12f8228e0456d3d2dff4439879cfba
Reviewed-on: http://gerrit.openafs.org/7080
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 10a02e70c38c5ccb23f95f0990643230b9709ca5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:23:24 2012 +0100
pam: Don't check if unsigned is < 0
uid_t is unsigned, so checking to see if it is less than 0 is a bit
redundant.
Remove the checks to silence a warning from clang.
Change-Id: I5ae429247d328b3320063b4c035f6e5bb101620b
Reviewed-on: http://gerrit.openafs.org/7079
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 0d2c2b454bc83f6b8d1b5d7294dcaccdaf96455c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:21:41 2012 +0100
pam: Use &, not && for bitwise operations
All of the LOG_MASK() checks are performing bitwise operations, and so
should be using '&', not && (which will always be true, providing
logmask is non-zero)
Caught by clang's new error messages
Change-Id: Idce9229b7351adc6c15279c94e1cc1e7fc45596e
Reviewed-on: http://gerrit.openafs.org/7078
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit ca9fa87543df616b5bc2955090f6a8260da3efc1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 7 12:44:17 2012 +0100
tools: Use native 64 bit integer
Modify the tools directory to use a native 64 bit integer type, rather
than rolling its own.
Change-Id: Ib2545b43aa3bf34e8917a4ae7ae4ee3f4be6d1c0
Reviewed-on: http://gerrit.openafs.org/7118
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cc489b880c86d4e4e16dc9ca98c6dd3b1b93d47c
Author: Derrick Brashear <shadow@dementix.org>
Date: Sat Apr 7 08:12:48 2012 -0400
ubik: utst needs opr for assert in util
add libopr after libafsutil so assert can be satisfied
Change-Id: I77494dc529f21246ae84f6522a578b14a803b6a9
Reviewed-on: http://gerrit.openafs.org/7116
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 35becabed870d4bfe49abaa499d99a3ffb0a2d31
Author: Jason Edgecombe <jason@rampaginggeek.com>
Date: Fri Apr 6 20:58:13 2012 -0400
Fileserver: Add the /vicepXX/NeverAttach flag to skip mounting a partition
FIXES 130561
LICENSE MIT
Change-Id: Ib465a978d08238d83c4c0a03813f5ec240f9bd9b
Reviewed-on: http://gerrit.openafs.org/7108
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jason Edgecombe <jason@rampaginggeek.com>
commit 12eb3e26a3149527997ca6039ebdeb7cafbf9012
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 7 13:26:25 2012 +0100
tools: Add roken.h to afsdump
On AIX, building afsdump currently produces the following warnings:
"afsdump_scan.c", line 34.10: 1506-296 (S) #include file <sys/fcntl.h> not found.
"afsdump_scan.c", line 275.32: 1506-045 (S) Undeclared identifier O_RDWR.
"afsdump_scan.c", line 275.41: 1506-045 (S) Undeclared identifier O_CREAT.
"afsdump_scan.c", line 275.51: 1506-045 (S) Undeclared identifier O_TRUNC.
"afsdump_scan.c", line 305.29: 1506-045 (S) Undeclared identifier O_RDONLY.
Rather than including more platform specific goo, just add a roken.h
include to the various files to pull in the necessary headers.
Change-Id: I46db92511c804cfc9b5d67b97cd3596480d306d6
Reviewed-on: http://gerrit.openafs.org/7117
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 47545cb93d292a89d21c3d4f554584d9f00a9103
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Apr 7 12:36:54 2012 +0100
tools: Rename u_int64 to solve AIX problem
AIX's system headers define u_int64. Rename our local 64 bit integer
representation as dt_uint64 to avoid this collision.
Change-Id: I997e3ff89df369a5f0643921a846a759bf8fa90b
Reviewed-on: http://gerrit.openafs.org/7115
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1e30c00e7d9b45d65e819d39414939f2d5f7631b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:18:47 2012 +0100
libafscp: Use strdup, rather than rolling our own
A = malloc(strlen(B)+ 1);
memset(A, 0, strlen(B) + 1);
strlcpy(A, B, strlen(B) + 1);
can be more simply written as
A = strdup(B);
Doing so also avoids a warning from clang that strlcpy isn't checking
for A overflowing.
Change-Id: I0e21f86eda7bdc0ce869e651c5ceb23d7494e1e2
Reviewed-on: http://gerrit.openafs.org/7077
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 34afb3e6b903fc1659b1c869fa2fb4226038e076
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:16:50 2012 +0100
libadmin: Clear structures according to their size.
memset(a, 0, sizeof(a)) is rarely correct, unless a is an error. Use the
size of the destination structure, rather than the size of a pointer to it
when deciding how much memory to clear.
Caught by clang's new error messages
Change-Id: Ia6c566534efae2f67f1b9bd22198d352238a987c
Reviewed-on: http://gerrit.openafs.org/7076
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit b5f75c122875b4212eb1a885d09bfdd63f537a19
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:14:38 2012 +0100
libadmin: read returns an ssize_t, not a size_t
size_t is unsigned, and therefore can never be less than 0. Using it as
a return code from read() means that we never catch read errors. read()
is defined as returning ssize_t, so just use this to capture its return
code.
Caught by clang's new error messages
Change-Id: Ibf61119dec2c64fd4b1e16e6ef02178e427116f0
Reviewed-on: http://gerrit.openafs.org/7075
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 345656ec140f0156f2076629bdfc84940c02160b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:12:37 2012 +0100
Unix CM: Purge needless brackets
Doing if ((a==b)) is unecessary. It's also potentially dangerous, as
that's the syntax required to do assignment within an if statement.
clang now issues warnings (errors in -Werror mode) when it encounters
these.
Remove pointless braces from the Unix CM to make clang happy.
Change-Id: I0f1558b42a487e1de722b77f8423500365a20eee
Reviewed-on: http://gerrit.openafs.org/7074
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 1d8937b860509fcaabb041bc14faf7aa3023f3c9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Mar 30 19:09:36 2012 +0100
DARWIN: Make crfree() an inline function
On Darwin 100, we have
#define crfree(X) kauth_cred_unref(&X)
which expands in one place to
kauth_cred_unref(&(afs_ucred_t *)avc->linkData)
clang warns about this in -Werror mode, because arguments to the
address-of operator must be lvalues.
To fix this make crfree an inline function, which will then let us do
the indirection required.
Change-Id: Ic5adb63dcdc11e04c1e428c32e85f33a987fcf42
Reviewed-on: http://gerrit.openafs.org/7073
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 2454e3d96af2be9f316a5c50199d34444defe4a8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Aug 7 19:41:51 2011 +0100
util: LogCommandLine has to have a command line
Add an assert() to LogCommandLine to catch the case where it is
called without a command line to log.
Change-Id: Ia1be28b3a1d1d4e144626976f0f82b9675809c0a
Reviewed-on: http://gerrit.openafs.org/7072
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 047ff7e9fd283f67ede2b873e3ad64ebbcf8d3ef
Author: Simon Wilkinson <sxw@inf.ed.ac.uk>
Date: Tue Jun 15 19:20:50 2010 +0100
Salvager: Don't use garbage vnodes when Testing
If Testing is true, and the salvage wants to repair the '.' file,
then it will end up using a garbage value as the location of the
repaired file (vnodeNumber gets set to fid.Vnode, but fid.Vnode is
uninitialised)
Fix this by making it behave as if no repair is necessary when running
in Testing mode. It's unclear that this is entirely the correct answer,
but it's definitely better than the current behaviour.
Caught by clang-analyzer
Change-Id: I1bddd889b3350cf31fe6384573e49e82159c7095
Reviewed-on: http://gerrit.openafs.org/7071
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 8648a8c45b593dce8982deec41e3caf48e80dc0c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 6 22:30:41 2012 -0400
Windows: Disk Full errors instead of Quota Exceeded
The AFS Redirector does not support the Windows quota interface
therefore return STATUS_DISK_FULL for all over quota conditions.
Change-Id: Idd8755b26ab65e423330eeb6cb0e1806dd6306c9
Reviewed-on: http://gerrit.openafs.org/7111
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 85fad9a69f0d3df73ec8285722e788fe49ae9459
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Apr 6 22:18:59 2012 -0400
Windows: AFSCheckCellName one level of indirection
The parameter 'CellName' is a UNICODE_STRING *. No need to
take the pointer of it to pass to AFSDbgLogMsg().
Change-Id: Id49f95058541a1a0ddaa0db9cb2c5ef0e5a32c64
Reviewed-on: http://gerrit.openafs.org/7109
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c1ef200a76b334309b0202c70165374305beb8fb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 5 07:38:47 2012 -0400
Windows: CleanACLEnt requires cm_scache write locked
Therefore, cm_FindACLCache() must be called with the cm_scache_t
write-locked and therefore cm_HaveAccessRights() must obtain a
write-lock and not a read-lock on 'aclScp'.
Change-Id: I884cd5a70a793d893999bf750264e76d436f40a2
Reviewed-on: http://gerrit.openafs.org/7049
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3db44bacd4b3ac3b9ed63bcf671b03f7f7eeb8af
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 18:10:07 2012 -0400
Windows: Name Array store mount point and volume root
Modify the Name Array processing to store both the mount point
object and the volume root directory object in the array. This
is necessary for proper operation of
AFSPopulateNameArrayFromRelatedArray when the DirectoryCB parameter
is a mount point object.
Modify AFSBackupEntry to remove two entries if a volume root
directory entry is being removed.
Remove AFSReplaceCurrentElement() as it is no longer used.
Change-Id: Iaa0a4effc3448351d04bcdd72be9ee726ffe4e9a
Reviewed-on: http://gerrit.openafs.org/7021
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 048b24ae2b8accb33bc92ab9fdc4cdda14bc425b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 07:10:17 2012 -0400
Windows: do not call time() in a loop
When checking for ACL Entry expiration, obtain the current time
once per call to cm_FindACLCache() instead of once per ACL entry.
Change-Id: I4da9e290a43315bd226f6c1b5dc12abe45ed19f5
Reviewed-on: http://gerrit.openafs.org/7016
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7c5b8346b305911c981620fff70503008e9cf488
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 1 01:17:21 2012 -0400
Windows: Add per object per user EACCES caching
If a cache manager is told by a file server that the user does
not have permission to fetch status for an object, the cache
manager must avoid requesting a fetch status a second time for
that object for the same user. Doing so risks triggering the
rx call abort throttling which can have a significant impact on
end user usability of the Explorer Shell and other applications.
The cache manager cannot make a decision on whether or not to
issue an RXAFS_FetchStatus RPC based upon the type of the object
because the type is unknown to the cache manager. A file server
will succeed a FetchStatus request when the parent directory ACL
grants lookup permission if the object in question is the directory
or is a symlink/mountpoint. Only file objects require read/write
permissions to obtain status information.
The rx call abort throttling is broken is many ways and must be
avoided. Call aborts are tracked by call channel and occur whenever
ten call aborts are issued on the same call channel in a row
regardless of the amount of time that has elapsed.
The EACCES cache works by storing EACCES events by the FID and User
for which the event occurred, when it occurred and the FID of the
parent directory. By definition, the parent FID of a volume root
directory is itself.
Entries are removed from the cache under the following circumstances:
1. When the parent FID's callback expires or is replaced.
2. When the parent FID's cm_scache object is recycled.
3. When the user's tokens expire or are replaced.
Entries are not removed when the FID's cm_scache object is recycled.
This patchset also implements correct behavior if the VLF_DFSFILESET
flag is set on a volume.
Change-Id: I69507601f9872c9544e52a1d5e01064fa42efb81
Reviewed-on: http://gerrit.openafs.org/6996
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4c5819e22852afe4e83bdcd05268864ac1953a8c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 13:41:27 2012 -0400
Windows: Fail recursive path evaluation with access denied
Matching the behavior of the AFS SMB server, the afs redirector
should return STATUS_ACCESS_DENIED if File ID recursion is detected
in the Name Array for any given path.
Change-Id: Ie846b42a228c634f1c38a8103332c7bb72803d1f
Reviewed-on: http://gerrit.openafs.org/7018
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3d024372293a279cf3a6cbdfe75a384ec7c8b200
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 5 23:14:18 2012 -0400
Windows: Check Avail Space on extending SetEndOfFile
When cm_SetLength() is called with an extending file length,
check the available free space in the volume to see if the
new length will fit. If not, return CM_ERROR_SPACE.
This permits applications to discover that there is insufficient
space prior to writing all of the data into the windows page
cache at which point it will be too late.
There is still the possibility of a race that can result in
data loss if two applications are writing into the same volume
at the same time and there is insufficient room.
Change-Id: Ieef2c48f5b6edc8d101b6527af3a3f87fe55f6ca
Reviewed-on: http://gerrit.openafs.org/7057
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 613f14727fbb404fb7fc1cac953dda46b671222e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 5 17:55:17 2012 -0500
viced: Do not offline volume on successful IH_DEC
If we fail to CoW a file due to ENOSPC, we try to IH_DEC the new file
copy, and if IH_DEC fails, we take the volume offline for salvaging.
But IH_DEC returns 0 on success, not on error. So take the salvaging
path when we get non-zero.
Change-Id: I4f0276fd4f077ca42087e92af8ba77b4e5347422
Reviewed-on: http://gerrit.openafs.org/7054
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c19d1b875fab472dc7474c70529ab7fc2f7bf106
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 5 14:40:18 2012 -0400
Windows: Redirector must query volume size when asked
The volume size and free space cannot be obtained at volume
initialization and then re-used for all FileFsSizeInformation
and FileFsFullSizeInformation queries. Doing so prevents Windows
from being able to see changes in the available free space.
The maximum size of the volume is not the size of the partition
and the available space on the partition unless there is no quota
applied to the volume. If there is a quota, then the free space
is the smaller of the available quota and the available partition
space.
Add a new ioctl request to permit the redirector to query the
current Volume Size Information details.
Change-Id: I3414f314d7780fd12489e0d278b71bcadc1a72e6
Reviewed-on: http://gerrit.openafs.org/7052
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7881de8cc17924120e45e498add1adc63fd85e5c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 5 17:00:28 2012 -0400
Windows: cm_AddACLCache lock ordering
cm_aclLock must be obtained after cm_user_t mx and cm_cellLock.
cm_user_t mx must be obtained before cm_cellLock.
Change-Id: Iaf9fcf17c7ea50f2f5a83aefa759b7077ef28be6
Reviewed-on: http://gerrit.openafs.org/7051
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ea82d1014372383334fd05c01db135da870d3928
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 5 17:16:15 2012 -0400
rx: fix bad merge 95c38dff3740d7e24971ceb5875c06e7abfce102
An extra
CALL_HOLD(call, RX_CALL_REFCOUNT_BEGIN)
was added in rx_NewCall(). Revert it.
Change-Id: Ief1493ae9ec69ace5afd534a97fbf43f55872153
Reviewed-on: http://gerrit.openafs.org/7050
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ba3ba96976f17cb5e83fae1e0a42fd6564b75719
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Apr 5 00:11:11 2012 -0400
Windows: AFSVerifyEntry purge file data on DV change
If the data version change is detected during AFSVerifyEntry(),
treat it the same as if the AFS_OBJECT_FLAGS_VERIFY_DATA flag
had been previous set. Purge the old data from the Windows
file cache. Be sure to set the new metadata after the purge
so that if the file length was truncated the old data beyond
the truncation point will still be purged.
Change-Id: I80c33f303c6499f22955e9874b2f4c50d666a3cb
Reviewed-on: http://gerrit.openafs.org/7048
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1a458e8e72455e480ccf4c0e3fd926dd9af9beea
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 3 18:13:17 2012 -0500
xstat_cm_test: Print all call info stats
For CM xstat collecton 0 (function call statistics), there are many
more stats given to us on the wire than we currently print. Change
this so we print out everything in the afs_CMCallStats struct.
Change-Id: I959571731fe8bf2a714e4cb3b47c52c39c516621
Reviewed-on: http://gerrit.openafs.org/7047
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e6e8e26a3d7d97f2ad056251859f258fee509e7e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jan 8 11:49:53 2012 +0000
rx: Get rid of some uneccessary temporary vars
rx_ReadProc and rx_ReadProc32 originally used temporary variables
(which were, at one time, declared as "register") to hand optimise
a couple of routines. With the removal of register throughout our
code, this is no longer helpful.
Change-Id: Id21a931408489b985b726af620a687b838303a86
Reviewed-on: http://gerrit.openafs.org/6997
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e53e189c3e99e28d31e0e1d1b52041aadcbd3ffa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 1 23:09:32 2012 -0400
Windows: Redirector Dir Enumeration Bug
An enumerated directory was not validated properly if
AFSValidateEntry() was called with PurgeData == FALSE even
when a data version change was detected. Now it does.
FIXES 130636
Change-Id: Ic5d2fd62b40fb16652fc09d459caf43905566d37
Reviewed-on: http://gerrit.openafs.org/7012
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2982f8c5b1182f855c439e54778fd0bc5bd9a2d2
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Apr 3 13:51:38 2012 -0400
tools: move useful tools from test dir to tools dir
move the dump utilities out of tests
Change-Id: I21d0550e09fde3b1feb078bde4e9b4dc7ca3614e
Reviewed-on: http://gerrit.openafs.org/7043
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 72f5d88acc752ff447a9e63327c135473326a34d
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Mar 29 10:44:53 2012 -0400
linux: update spec requirements
don't require things which don't exist on el5. do require them
in el6. require kernel-devel if building modules
don't do anything involving the kernel if not building modules
if we can figure out that we don't have 2.4 based on the version,
avoiding the need to depend on kernel-devel just to build an srpm.
Change-Id: I4bef6a00f50935b8efa057b42cd2147a22c0c1e6
Reviewed-on: http://gerrit.openafs.org/6985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 33903244ae2408dd86ee260d111e74dec0940abd
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Mar 30 16:15:52 2012 -0400
linux: make mockbuild more reliable
previously, a "cached" repo which was assumed to be of the same
releasever and arch of the host was created in /var/tmp,
which would screw up repoquery across a multiple-OS-build.
well, you can tell repoquery what you really mean. so now we do.
Change-Id: I5f477e4eeddb755fcd410a37a2b58e1334da2863
Reviewed-on: http://gerrit.openafs.org/6991
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a66268f69a2da0dc21957338eebe5c91b279ddda
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Apr 2 16:16:37 2012 -0500
SOLARIS: Correct misplaced osi_machdep.h #endif
Commit 64778fd7bece52360482f9a51f19b34dac1d2678 removed some '#ifdef
KERNEL' blocks, but for one block in SOLARIS/osi_machdep.h, the wrong
trailing #endif was removed. This effectively makes the last part of
the file Solaris 10+ only, and bypasses the header guard. On systems
before Solaris 10, this causes us to lose the osi_procname definition,
which eventually shows up as an undefined symbol.
So, reinstate the original #endif, and remove the correct #endif
instead.
Change-Id: I28a78dabc2c65abeadc003b95600026c3cb68e37
Reviewed-on: http://gerrit.openafs.org/7042
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit e1eba145843996ce50eae79356a3f88b92a2ea86
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Apr 3 09:09:42 2012 -0400
Windows: cm_GetNewSCache must return NULL on failure
cm_GetNewSCache was leaking a valid cm_scache_t pointer in some
failure cases. On failure, explicitly set the return value to
NULL.
Change-Id: I074b278f969224aa535abe256ac33a90d0f4e62d
Reviewed-on: http://gerrit.openafs.org/7037
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e3a50ea0d314df4e8caf0e25c57042a5f2a6e008
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 12 09:31:43 2012 -0500
Rx: give grow mtu its own call ref count type
Change-Id: Ibf62408203d615ff87454a9ecb50c38b6db6d45a
Reviewed-on: http://gerrit.openafs.org/6543
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 95c38dff3740d7e24971ceb5875c06e7abfce102
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 29 13:52:17 2012 -0500
rx: conn->callNumber protected by conn_call_lock
The conn->callNumber array should be protected by the conn_call_lock
since the conn_call_lock is what protects the binding of calls to
connection channels.
Change-Id: I9f9b4e8f90d1e4ebbc4429af286358807784d84f
Reviewed-on: http://gerrit.openafs.org/6629
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 33185db16aca40a3bdbcb66caf994924220b5012
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 20 01:50:01 2012 -0500
Rx: rxi_FreeCall conn_call_lock vs call->lock deadlock
The conn->conn_call_lock is held before call->lock in the lock
hierarchy which is violated within rxi_FreeCall(). While the
deadlock is rare, it is possible and has been experienced on
both Windows and Linux.
Change the signature of rxi_FreeCall to return 1 if it frees
the call and 0 if it does not.
Due to the lock hierarchy violation use MUTEX_TRYENTER()
to attempt to obtain the conn->conn_call_lock. If the lock
cannot be obtained set the call state to dally and
return. If the conn_call_lock can be obtained, behave as
we did before this patchset.
Only increment the callNumber if the original call->state
was dally or hold and the conn_call_lock could be obtained.
We must not increment the callNumber otherwise. Doing so can
result in call numbers being skipped when the conn->call slot
is reused.
Change-Id: Ic10bd2004e9b06df319c2f2efaa0b37bcb90c896
Reviewed-on: http://gerrit.openafs.org/6443
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0ca4dc279a49141a63727134898c58f30ad15e8d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 17:32:39 2012 -0400
Windows: Pass name array to AFSRetrieveFileInformation
AFSRetrieveFileInformation does not parse the complete path.
That information is available in the Ccb->NameArray. If the
object on which AFSRetrieveFileInformation is called is a
relative symlink containing ".." references, the full contents
of the evaluated path is required for context. Pass the
Ccb->NameArray so that it is available.
Change-Id: Id02d3fb47df74c0a0de849eb10550be76150ce8b
Reviewed-on: http://gerrit.openafs.org/7020
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 766c62b918dba793f738a075918947b8dad76229
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 13:39:17 2012 -0400
Windows: Use hash when comparing File IDs in redirector
AFSIsEqualFid() should use the hash value included in the FileId
as part of the comparison algorithm.
Change-Id: I2723e2e9795ce16869c6a0dc33611078b04a6a28
Reviewed-on: http://gerrit.openafs.org/7017
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0896602f6e7c409990fcae40dd54f84260312472
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 06:57:53 2012 -0400
Windows FindACLCache must hold scp write locked
In the SMB modules, calls to cm_FindACLCache() were not
holding the cm_scache_t rwlock writed locked as required.
Change-Id: I213912eb8dd570ea918d92602c647e6aed8cfccb
Reviewed-on: http://gerrit.openafs.org/7015
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 68a42ed88db3e457b6d5169c2beb8fa7bb144ea3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 06:57:02 2012 -0400
Windows: fix indentation
Change-Id: Id3cd061badd1c8c4e22843e84999954e5424511d
Reviewed-on: http://gerrit.openafs.org/7014
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b84496b8593dd9c220022c78d8b9b571c7b78e8d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 1 12:40:36 2012 -0400
Windows: Freelance HaveAccessRights
Change the test in cm_HaveAccessRights related to Freelance
mode. All objects in the freelance cell and root volume
by definition have access rights.
Change-Id: Ibb96b12c15728bc6b711b3d7f2ad892c55109cbf
Reviewed-on: http://gerrit.openafs.org/7008
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9a76279ef154730150594cc560a34eada3ae9fe4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Apr 1 12:11:40 2012 -0400
Windows: optimize InitCallback3 processing
Do not drop and acquire locks if the cm_scache_t does not
have a callback.
Change-Id: I6f84729838e7e4c2d84c0a40f0811ed837b79287
Reviewed-on: http://gerrit.openafs.org/7007
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8fcdef55f8e422f4762f38374be32993d2b2551e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 30 15:13:55 2012 -0400
Windows: Record callback issued time
Save the time at which a callback was issued. This can be
used in a later patchset to determine if a callback was issued
after a negative access entry for a {fid,user} pair.
Change-Id: Iab54eb729fd5f2a2daf4855b7e7e75245dc28051
Reviewed-on: http://gerrit.openafs.org/6995
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fd919b3ae52695b8a83fabc736c8ea82f383a5c9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 30 14:58:11 2012 -0400
Windows: Implement cm_TGTLifeTime()
cm_aclent.h defined cm_TGTLifeTime() as a macro that always
returned 0x7fffffff. Implement cm_TGTLifeTime() as a function
that returns the actual token lifetime.
Change-Id: I8b19626395f536db248ae8324b13e49eda9a1a87
Reviewed-on: http://gerrit.openafs.org/6994
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cf81cd790f71b7ce83c802df8e7094f93bff63fb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 30 12:24:43 2012 -0400
Windows: add parent FID to cm_GetSCache
When a cm_scache_t object is created in 98% of the time, the
parent FID is known to the cache manager. Normally the cache
manager will obtain the parent info from the AFSFetchStatus
structure but if the user credentials do not permit status info
to be obtained from the file server the parent info will be unavailable.
Having the parent directory FID is useful for debugging but can
also be used to check the user's access rights on the parent directory.
Change-Id: I262345bc686392a4edef4c627182a8a67a392aa2
Reviewed-on: http://gerrit.openafs.org/6993
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e8f6dfac59fe042a04a9ac5eb3c37356cb3a22a3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Apr 2 22:35:41 2012 -0400
viced: AFSDisk, AFSFetchVolumeStatus Int31 PartSize
The AFSDisk and AFSFetchVolumeStatus structures use signed
32-bit integers for representation partition size and
available blocks. RoundInt64ToInt31() should be used instead
of RoundInt64ToInt32() when assigning their values.
Change-Id: I3834141fce2d54ce8bdfac3dc566074583bb305e
Reviewed-on: http://gerrit.openafs.org/7022
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 223cbf5a5bc1812f3b2ce86a7b05dc56f517c6f8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 23 13:41:10 2012 -0400
rx: handle clock reversals for call timeouts
If the clock is set backwards, call timeouts will not trigger
until the clock regains its original value plus the timeout period.
In rxi_CheckCall(), look for a backward clock shift and if one is
noticed, fail the call with RX_CALL_TIMEOUT.
Change-Id: I7ca5abee165fc21d72d3881670f9522d315b4982
Reviewed-on: http://gerrit.openafs.org/6943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9498cebd11ac26ed7986b5496440159f7ef745f2
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Mar 31 19:21:04 2012 -0400
viced: Do error translation for InlineBulkStatus
When a host has requested universal errors, error code conversion
is performed in the CallPostamble. However, the InlineBulkStatus
errorcodes are passed as part of the data set, not as RX errors,
so this translation is not performed.
Fix this so that we also translate error codes that are part of
the InlineBulkStatus response.
Change-Id: Ia23232d948990bdf9b7c4e5e0bcd8be087289a03
Reviewed-on: http://gerrit.openafs.org/6992
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 134943a7a55d73f567d3f336e06783c405347fa7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 29 23:49:43 2012 -0400
Windows: avoid deadlock with Trend Micro
Trend Micro's anti-virus driver attempts to open the file in
response to CcPurgeCacheSection(). While processing
AFSSetDispositionInfo() the Fcb->NPFcb->Resource is held which is
also required if a status verification is required during the
CreateFile operation. That results in a deadlock.
Avoid the deadlock by setting the PENDING_DELETE flag prior to
calling CcPurgeCacheSection().
Change-Id: I40d93d70e120525343afb917d473ad79a1f36e29
Reviewed-on: http://gerrit.openafs.org/6988
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6cb256375bb0aab73cc802e50620f1fcf0f564e4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 29 23:39:17 2012 -0400
Windows: Use ulFilter in AFSInvalidateObject
ulFilter was assigned appropriate values but it was not passed
to AFSFsRtlNotifyFullReportChange as a parameter.
Change-Id: Ie362b2b762e599a7cb040640539a098fdf80a259
Reviewed-on: http://gerrit.openafs.org/6987
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0bc328b9729cb5bfe3085ac01455fe82c9cef7a4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 27 00:16:30 2012 -0400
Windows: ObjectInformation.ObjectReferenceCount comparison
If there is an undercount of the ObjectReferenceCount, consider it
the same as if the object count is zero for comparison purposes.
Change-Id: Ia4ec2d1194f00cb530e7a50ed9db9c71cc4c5313
Reviewed-on: http://gerrit.openafs.org/6970
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 05a703a320e549efe7f68e27cfa86e391cf5839d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 27 14:18:14 2012 -0400
Windows: Add Name Array Processing Trace Subsystem
Change-Id: Ief4026e9bb3045046a031b56ceb584f2daf1cf43
Reviewed-on: http://gerrit.openafs.org/6973
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 32ad50bcee9a5b087bea7e0c9c1cfe3d1e58293e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 26 11:10:36 2012 -0400
Windows: AFSInvalidateObject can overwrite input param
AFSInvalidateObject() must not be called with an AFSObjectInformationCB
pointer variable that it is not safe to overwrite as the function sets
the input value to NULL if the invalidation is going to be performed
asynchronously in a worker thread.
In AFSEnumerateDirectory(), the following call took place:
AFSInvalidateObject( &pDirNode->ObjectInformation,
AFS_INVALIDATE_DATA_VERSION);
which requires a worker thread to process. As a result, the
ObjectInformation pointer was being set to NULL which detached the
AFSObjectInformationCB from the AFSDirectoryCB. That in turn produced
an execption in AFSLocateName() which resulted in a resource not being
freed that in turn produced a deadlock.
Change-Id: Id30e84cf96b69156d648e3b452e7e03390559c43
Reviewed-on: http://gerrit.openafs.org/6962
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f7bea476c7f6e8489372e138dc60ebcdd92c40c1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 25 21:29:40 2012 -0400
windows: ObjectInformationCB.ObjectReferenceCount
The ObjectInformationCB.ObjectReferenceCount is protected by
the VolumeCB->ObjectInfoTree.TreeLock. When the TreeLock is
dropped the reference count can change. Hold the TreeLock across
both ObjectReferenceCount == 0 tests and the associated tear down
or repeat the ObjectReferenceCount == 0 test after the TreeLock
is reacquired.
Change-Id: I069c22ae8f3a93fad3ef9a662df5b4903b317897
Reviewed-on: http://gerrit.openafs.org/6959
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 79665a251d8b6cf9cb821accfd3819081f81f4c6
Author: Michael Meffie <mmeffie@aphid.sinenomine.net>
Date: Mon Mar 26 14:22:09 2012 -0400
remove athena env conditionals
Remove the conditionals AFS_ATHENA_STDENV, AFS_ATHENA_ENV
and AFS_KERBREALM_ENV.
Change-Id: If58743acd7d71dd3ed05e76316ff3efd475ca123
Reviewed-on: http://gerrit.openafs.org/6963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d1d51852be1daf45f92a8cbf5f294892141108f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Mar 27 00:00:30 2012 -0400
Windows: Fix VNOSERVICE EventLog parameters
Add missing volume and cell.
Change-Id: If1efeb0defb3812e3f41572fb7d46f5e867be70c
Reviewed-on: http://gerrit.openafs.org/6969
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5b4e0e3c2eb161eabbb7a9ea8486315040e9705a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 26 20:49:03 2012 -0400
Windows: CreateProcessNotify verify changes
PsSetCreateProcessNotifyRoutineEx will fail with STATUS_ACCESS_DENIED
if the driver does not have the IMAGE_DLLCHARACTERISTICS_FORCE_INTEGRITY
bit set in the image header.
Do not include the ParentProcessId in the AFSProceSSDestroy
parameter list. It isn't available to use and isn't used for
anything in any case.
Assign AFSProcessCB blocks to processes that were created before
AFSRedirector registered the CreateProcessNotify callback and
access the file system.
Change-Id: I4b78cd94949cfdea6b36f601a851c0e2f53a7dbf
Reviewed-on: http://gerrit.openafs.org/6967
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 745e1bb00350ac481cd0998b1623b6e040fc7312
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Mar 27 12:09:38 2012 -0400
macos: iterate mdfound packagemakers when spaces are present
even if we get more than one match, and even if there's a space,
work anyway
Change-Id: I8e71af0cb02fda7ea0fcf1c2f7a0404eca4bc073
Reviewed-on: http://gerrit.openafs.org/6971
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit fba35ba4e1d933126c788824f464a78ca1c93bf8
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Mar 26 20:33:26 2012 -0400
macos: find packagemaker instead of assuming path
in xcode 4.3, packagemaker is unbundled. make no assumptions
about where it can be found; instead, let spotlight tell us
Change-Id: I5e3431ce40ad6e9114e98c9bf047a4312d42284d
Reviewed-on: http://gerrit.openafs.org/6966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d5c13a0f3ce7d9f0a01820ff9c12dfb1cbc12047
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Mar 22 10:52:47 2012 -0500
afs: Slight adjustments in afs_GetDCache
maxGoodSize is only used in one block, so move the decl to that block.
Adjust some of the comments to more accurately reflect what's going
on.
Change-Id: Ifee3a6f98158a314cef6d241c53a0f881f4f2d2b
Reviewed-on: http://gerrit.openafs.org/6936
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e53221d9a82fd8e3d545704abae51cc844bc31a3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 2 17:22:12 2012 -0600
afs: Do not limit fetches based on vcache length
Currently, when we go to the fileserver to fetch some data, we try to
make sure that we do not ask for data beyond the end of the file. For
example, if our chunk size is 1M, and we need to get the first chunk
for a file that is 4 bytes long, we will only ask the fileserver for 4
bytes.
This can cause issues when the file is being extended at the same time
as when we are trying to read the file. Consider the following
example. There is a file named X that has contents "abcd" at dv 1, and
we issue a FetchData64 request for X, only requesting 4 bytes. Right
before the fileserver gets the FetchData64 request, another client
writes the contents "12345" to file X.
The client will then fetch the contents "1234" for that file, at dv 2,
and store that as the contents of the first chunk for file X. On
subsequent reads for file X, applications will now get "1234<NUL>" as
the contents, since the size of the file will be updated to 5, but the
cache manager thinks that "1234" is the correct contents for the first
chunk of X at dv 2. The cache manager will continue to think so until
the cache entry is evicted or invalidated for whatever reason.
To avoid this scenario, always request a full chunk of data if we have
any data to fetch and the file has not been locally truncated. We can
still avoid the fetch at all if it looks like we're fetching beyond
end-of-file, since we know that at least at some point that was
correct information about the file. If this results in us trying to
fetch beyond end-of-file, the fileserver will respond with the correct
length anyway.
We still need to restrict the fetch request length based on
avc->f.truncPos, since the dcache data after avc->f.truncPos needs to
stay empty, since we don't track truncated data any other way. If we
also avoided this restriction, extending a file via truncation after
reducing a file's length via truncation could cause the old file data
to appear again, instead of filling the new file range with NULs.
Note that on at least Linux, with this fix an application can still
read the contents "1234" on the first read in the above example, and
"12345" on subsequent reads. This is just due to when we give the VFS
updates about file metadata, and could be remedied by updating file
metadata immediately from the FetchStatus information from the
FetchData64 call. However, just reading the contents "1234" in the
above example seems like a somewhat plausible outcome; at the very
least, it is an improvement.
Change-Id: I158593502ac96ba2c856a0b5997355a53d4173aa
Reviewed-on: http://gerrit.openafs.org/6882
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b3b267d16eefb993f52f66bf44f3e659c1017e58
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Mar 22 10:42:38 2012 -0500
afs: Set DWriting when truncating a dcache entry
When we truncate a file, we truncate the contents of the relevant
dcache entry chunks, and prevent future FetchData operations from
fetching data beyond the truncation offset. If we never write anything
to that chunk, we never set DWriting, and so on disk it looks like
that dcache entry has valid data for the specified DV. However, since
the data is truncated, this is not true.
If a process holds a file open, truncates it without writing to it,
and then the client crashes (or we have trouble contacting the
fileserver when we close the file), the dcache entry will appear valid
on disk. So the next time we read the dcache entry, we will use the
incorrect cache contents as if they were accurate for the specified
DV.
To avoid this, set DWriting when we truncate a chunk. Normally we only
clear DWriting when we actually send data to the fileserver, so to
clear DWriting in this case, add an additional line to clear it in
afs_StoreAllSegments, after the StoreMini has completed.
Change-Id: Ifc3bfc21712ab37b1f2865ce59fa45bf03811dd8
Reviewed-on: http://gerrit.openafs.org/6937
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 577d5d99fefb62f0b52a568207d2352946b36137
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 2 17:18:25 2012 -0600
afs: Log a message on invalid FetchStatus receipt
If we get an invalid AFSFetchStatus structure from a server, log a
message to indicate as such. This serves as a warning to urge people
to fix their fileservers, and to explain what is doing.
Change-Id: I33845f6228f96f693dcbfddcee38dae583f1b092
Reviewed-on: http://gerrit.openafs.org/6881
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5af63fabc553a2fecd4c3080b25fe14483f5bd98
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 2 17:06:48 2012 -0600
afs: Sanity-check some AFSFetchStatus structures
We currently do not do any sanity checking on the AFSFetchStatus
structures returned from fileservers. Add some sanity checking for
BulkStatus and FetchStatus calls, so we do not screw up our cache if a
fileserver gives us bogus data.
If we do get an invalid AFSFetchStatus structure, act as if the server
gave us a VBUSY error code, so we will retry the request. For OpenAFS
fileservers prior to 1.6.1 that yield this situation, VBUSY is likely
the error code the fileserver should have responded anyway.
Change-Id: Ie16a5210149b21dd5945380f5d7b6a4d9ee01a72
Reviewed-on: http://gerrit.openafs.org/6880
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 29cb3b9f838eacf3348f83c81ce687f5882c77a2
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Mar 19 13:07:41 2012 -0400
Finish removing sunos 4.x references and build cruft
Also, fix afsxbsa.h to always include <time.h> since this should get
struct tm on any fairly modern operating system.
Change-Id: Idfb39f12d28a2a0aa470c8549e4149d0b2ccde9e
Change-Id: Ia1c563e5954c533f18bd56155f2ae1825813efe3
Reviewed-on: http://gerrit.openafs.org/6923
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 690a4c144b53fd1f3538d83017ecf581a2bcded5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Mar 2 14:55:04 2012 -0600
viced: Do not ignore all InlineBulkStatus errors
InlineBulkStatus currently returns 0 unconditionally, no matter what
errors are encountered. If we encounter an error early enough, from
CallPreamble for example, we do not fill in the OutStats nor CallBacks
structures at all. Since we return success anyway, this results in the
client getting AFSFetchStatus structures full of zeroes (or garbage,
before commit 726e1e13ff93e2cc1ac21964dc8d906869e64406).
Since current OpenAFS clients do not perform any sanity checks on the
information received, this can result in cache corruption of files
being seen incorrectly as empty, and, before commit 726e1e, more
arbitrary corruption.
So instead, return an error if we encounter an error before we iterate
over the given FIDs. We still of course do not return an error for any
errors encountered during the actual metadata retrieval, as those are
reflected in the individual per-fid status structures.
Change-Id: Icfab4516e510be5f0063ddf9c69f11ab3d511b35
Reviewed-on: http://gerrit.openafs.org/6871
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a0a1ad06c2dd632e3e471e5f40ff3eda470bf71a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 19 22:38:06 2012 -0400
Windows: Assign AuthGroup during Process Create
As the process is being created, assign the AuthGroup so that
the must up to date information is used to assign AuthGroup
inheritance from Impersonation states and to prevent the parent
process from being destroyed before the AuthGroup is determined.
Change-Id: I176360a589d7f2bcf4b1ededad069424e3ce5393
Reviewed-on: http://gerrit.openafs.org/6927
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a54fefc0449fbccc881c017480cb92878bb460cb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 19 21:10:31 2012 -0400
Windows: Refactor AFSProcessSupport
Breakup AFSProcessNotify() into AFSProcessCreate() and
AFSProcessDestroy().
Correct inconsistencies with ETHREAD vs ThreadId HANDLE.
Add AFSProcessNotifyEx() and use PsSetCreateProcessNotifyRoutineEx()
to register it on Vista SP1 and above.
Change-Id: I2be85c3e8229883b4e239e1fdba9a65fc704daaa
Reviewed-on: http://gerrit.openafs.org/6926
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 95ec152a850c0cde33829481b8e71e7e7e686a58
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Mar 25 09:56:48 2012 -0400
doc: correct implicit ACL permissions volume owner
OpenAFS changed the behavior of implicit administrator permission
for directory ownership. In OpenAFS only the volume root directory
owner has implicit administrator permissions and they apply to all
directories in the volume not just those with matching ownership.
Change-Id: I8ca0a8874fe17cf7fc575107bd76efb5dc472b10
Reviewed-on: http://gerrit.openafs.org/6951
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d0ea3b18e2893943f9deb46244f2674db1920622
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Mar 24 09:23:50 2012 -0400
softsig: not used on windows
Do not install afs/softsig.h on Windows from src/util
Do not include it in src/viced/viced.c
Change-Id: I8b6dcb1508dcda7da297a0c9a6bfeaf037c40c88
Reviewed-on: http://gerrit.openafs.org/6950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit eaea11ef0f44dc9d743f85bbce53b98c2d568b74
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Mar 22 14:48:16 2012 +0000
tests: Add opr to the command test libraries
The cmd/command-t test needs libopr, so give it to it
Change-Id: I74ca08efffb0c0f6245498c9dc0dcf5287915bbd
Reviewed-on: http://gerrit.openafs.org/6949
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 20429272805d029de80275a4e092291be7d747e9
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Mar 22 14:39:27 2012 +0000
libafsrpc: Export connection accessor fuctions
Add various connection accessor functions to the export map file for
libafsrpc so they can be used from within RX security layers.
Change-Id: I0b5c75d987aadd6942dcb87fb1b98586bcc9e553
Reviewed-on: http://gerrit.openafs.org/6948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d2594f706b1eeaf7b16537f95b3617dcb1af63c2
Author: Chas Williams (CONTRACTOR) <chas@cmf.nrl.navy.mil>
Date: Mon Mar 19 16:47:28 2012 -0400
opr: should be built as shared
Since this library could be use anywhere (including a shared library)
it should be built as position independent code.
Change-Id: I9e9c8b5c08e73ce43c04341b1106126f7774c405
Reviewed-on: http://gerrit.openafs.org/6925
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 39964d08792f3a09694f97d7c7fa76a86ca213a7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 22 15:55:47 2012 -0400
Windows: Client handling of VNOSERVICE
VNOSERVICE should not be grouped together with the volume status
error codes. It is used to indicate that the RPC was not serviced.
The file server issues it when its idle dead timeout period is reached
while receiving rx call data. The client's existing status information
is still valid and the client can retry the call.
Change-Id: I51e447824366381e740361576c96559f1c4f3fd3
Reviewed-on: http://gerrit.openafs.org/6938
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b695eb272d66269a57cdca2550c00f2b0003ae35
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 21 10:11:31 2012 -0400
Windows: AFSRedir Debug for STATUS_NOT_A_DIRECTORY
Add additional logging to handle the case where the afsd_service
returns STATUS_NOT_A_DIRECTORY for eval by id/name.
Change-Id: Ib510fcea6102a92e5e810af5923f06dffbba1ed9
Reviewed-on: http://gerrit.openafs.org/6930
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f246aa5f84a5233b6525ae43456a8da5b7e92984
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Mar 21 22:19:04 2012 -0400
Linux 3.4: Switch to d_make_root
If d_make_root is available, use it instead of d_alloc_root.
The helper was introduced in 3.3, and d_alloc_root gets removed
in 3.4.
Change-Id: I39aaa6fd14d04c05ad9cb5b610e7f12f70fe0c94
Reviewed-on: http://gerrit.openafs.org/6931
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e55f1b4dc3134762c61143c7dcc8e252d9973365
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Tue Mar 13 20:06:43 2012 -0600
doc: remove references to AFS's NTP daemon
AFS's own ntpd and runntp are obsolete. Remove them from the
documentation, and recommend the OS vendor-supplied NTP instead.
Change-Id: If0cd837aa407eb49049881790e618ccd75ca6e5b
Reviewed-on: http://gerrit.openafs.org/6903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 640fe82315838f60cce5789ad7d9965db3dabe0a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Mar 19 19:27:33 2012 -0400
build on solaris 10 again
Use min and max instead of the non-standard MIN and MAX macros.
Commit 64b00c3a1a87739621f58c777fc3cc54fb15a0af removed inclusion of
rx_packet.h, which included definitions of MIN and MAX on various platforms.
Change-Id: I3d3c75af375704b8baddd72aec3aecf3c4fd43d7
Reviewed-on: http://gerrit.openafs.org/6924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4d98adc83cd09d75c99abd9d29af79f9de5b1d1a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 16 01:09:42 2012 -0400
Windows: invalidate correct objects during dir verification
When processing a directory verification, if a change of data
version is detected or if the FileID of a FileName changes,
be sure to invalidate and verify the directory entry. Setting
the verify flag on the parent after updating the directory
entry's metadata does not result in the correct behavior.
Change-Id: Ib24bd71b82964e150a6ce730071106c9cbea0d23
Reviewed-on: http://gerrit.openafs.org/6914
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 59b57ff85acbef10bcec9724c42e3bad78538687
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Mar 15 11:51:39 2012 -0400
osx: deal with more kerberos damage
the number of things which can return success without succeeding is
truly sad.
Change-Id: Iab3a6ef72afc8075462dfd98548ad7aa3051d40f
Reviewed-on: http://gerrit.openafs.org/6911
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit e5821239cde138f74f73bec1bd9a3880d08ac3df
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Mar 7 16:36:57 2012 -0600
afs: Never #define away afsd_dynamic_vcaches
Some versions of the Solaris Studio compiler on SPARC (at least 12.2
and possibly others, but not 12.3) get a little confused by code like
this:
extern int foo;
int
somefunc(void) {
if (0) return foo;
return 0;
}
When optimization is turned off, this results in an undefined symbol
reference to 'foo' (which is normal), but the resulting object file
lacks a relocation entry for the symbol 'foo', so the symbol remains
undefined after linking. In the OpenAFS tree, this occurs in
afs_daemons.c which references afs_vcount and afs_cacheStats in this
manner due to afsd_dynamic_vcaches being defined as '0' on Solaris.
The end result is that the libafs kernel module is not loadable, since
it complains about afs_vcount and afs_cacheStats being undefined, even
though the symbol definitions are also in the module.
While this is a bug in Solaris Studio and has since been fixed, it is
simple to work around this so we are usable with more compilers. If we
just always declare afsd_dynamic_vcaches as a regular variable, it
works around this issue and keeps the code a tiny bit simpler. So, do
that.
Change-Id: I3f8fc6aafd52487d729289e393fc59dac84d36ea
Reviewed-on: http://gerrit.openafs.org/6888
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0fdcf171a8d2b2153648b6b799096e09eb469beb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Mar 14 10:56:06 2012 -0400
rx: hold call->lock across RXS_PreparePacket
RX Security Classes have a right to assume that when RXS_PreparePacket
is called that they have exclusive access to the rx_call structure.
Commit e445faa68c5ec6e47d3fd9d7318ade71d98703a9 unintentionally
failed to acquire the call->lock prior to RXS_PreparePacket being
called.
Change-Id: I5a9dfb2818fa17ba6fc1ab6f76ec5cde602c6f16
Reviewed-on: http://gerrit.openafs.org/6904
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 317b227a20a99960b313d06a3441822472d638c8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 12 15:53:47 2012 -0400
Windows: Drop resource across AFSCleanupFcb
Avoid additional deadlocks involving
VolumeCB->ObjectInfoTree.TreeLock.
Change-Id: Ibfeb8f230c54e95d3a0b7b9d84c63cb7f4b9ce2d
Reviewed-on: http://gerrit.openafs.org/6893
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6fb1078e08d4077fb0602f97b1a83bcd72f55db8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Mar 7 06:54:54 2012 -0800
Windows: Wait for memory allocation if necessary
The kernel has a limited pool of memory. If there is no memory
available to satisfy a request, that request will fail initially
with a STATUS_OUT_OF_RESOURCES error which in most cases is exposed
to the user-mode application as STATUS_ACCESS_DENIED. This can
produce inconsistent results.
This patchset introduces an Event object, MemoryAvailableEvent,
which is signalled when the redirector deallocates memory. This
should in many cases permit requests to succeed where they otherwise
would have failed immediately.
The WaitingForMemoryCount field tracks the number of threads that
are waiting for memory to become available. A subsequent patch
could use this value to accelerate the tear down of cached data.
To avoid deadlocks, blocking threads will only wait for a maximum
of 30 seconds at a time. As long as the redirector continues to
free memory, the thread can re-queue itself. However, if a timeout
occurs, the allocation request will fail.
Change-Id: I0aa549be3852b31b68d7b42ecab4ca982c75f6ba
Reviewed-on: http://gerrit.openafs.org/6886
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b7f6d8e3964592543d4706c58c395fbe2f81218b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Mar 5 23:14:28 2012 -0600
Windows: Correct Data Version change synchronization
The data version must be checked and set while the ObjectInformation
DirectoryNodeHdr.TreeLock is held exclusive. Otherwise, it is
possible for a race to occur.
Change-Id: Ia4d94cca1d161062e9d98675976ba8fad5731032
Reviewed-on: http://gerrit.openafs.org/6883
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d62456255e13beef41770ad90ee6cb58068007b9
Author: Paul Smeddle <paul.smeddle@morganstanley.com>
Date: Mon Mar 12 19:56:11 2012 +0000
Make volscan's column delimiter option work
Currently, volscan ignores the -delim command-line option,
using the hardcoded default. This patch adds processing
for this option, allowing alternative characters.
Corrects an error in a08c3207255756c825ab69a19e04f79dd879c646
Change-Id: I750f2d998cff029fc02556ed0baaaa0ca1c95e08
Reviewed-on: http://gerrit.openafs.org/6894
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7dce85e4e5db7420c5c359fdd02a8005a12fb29c
Author: Jens Wegener <jens.wegener@hrz.tu-chemnitz.de>
Date: Tue Mar 6 07:28:32 2012 -0600
viced: fix inverted lockCount assignment
FIXES 130605
Change-Id: Ibfdbc03100094ca33630dc9e1ddbcacf770a1a02
Reviewed-on: http://gerrit.openafs.org/6884
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0f3cb2a43e3487d9b5ec774c417ae6744d6e4d83
Author: Jonathan Billings <jsbillin@umich.edu>
Date: Thu Mar 8 09:23:40 2012 -0500
redhat: Don't replace modified configuration files during rpm update
The previous setting for three %config files mentioned in the spec file:
%config /etc/sysconfig/openafs
%config %{_prefix}/vice/etc/ThisCell
%config %{_prefix}/vice/etc/cacheinfo
When using an unadorned %config, it's possible that these files will
be replaced by the packaged version during a package update. Changing
%config to %config(noreplace) means that the packaged file will be
installed with the extension .rpmnew if there is already a modified
(from the existing package's version) file with the same name on the
installed machine.
The concern here is that updating an existing system could potentially
change the configuration if the person installing doesn't pay close
attention. The Rule of Least Surprise indicates that we should
try to preserve existing configuration changes whenever possible.
Change-Id: Ie132c12a3c5defe9bf6fec9ec0f8bd08f3d98646
Reviewed-on: http://gerrit.openafs.org/6887
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 4cc3923b1b857368a522be55c55fce4c9b62548a
Author: chas williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Date: Mon Mar 5 11:41:08 2012 -0500
rxgen: fix to use rx accessor routines
apparently some uses didnt get converted during the previous work.
Change-Id: Iaa4dcf73fd2e29e3f95feede5217eac4eaded4e2
Reviewed-on: http://gerrit.openafs.org/6874
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c0268c7299afc3eb0a3bde2972a8fee800b735b1
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Mar 3 09:42:12 2012 -0500
viced: fix -realm option arg parse
Advance only once per realm argument when processing the
realm command line option.
Change-Id: Id3873fbe213f27be673ec0c02a27a032dd33c002
Reviewed-on: http://gerrit.openafs.org/6860
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fc1c58910c5991fa9d132d171d1d976dbfc44a95
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Feb 29 11:08:10 2012 -0500
viced: fix log message in hpr initialize
The wrong dir object is used to log an error in hpr
initialize.
Change-Id: I4460b541a6458742839b47e8277990f426b233a7
Reviewed-on: http://gerrit.openafs.org/6845
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 0a3f0608fcf6c14b44484cfa6fe106c568aa1035
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Mar 4 09:48:07 2012 -0500
macos: don't crash on krb5 damage
if we get success but still no client, don't crash
Change-Id: I6be28ac6ecece3448123a84cf442a791eebc93cc
Reviewed-on: http://gerrit.openafs.org/6868
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 88ec2929fddec2ae53a74d3e40cbdeb566aeacc5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 2 10:54:38 2012 -0500
Windows: add __try..__except
Wrap potential exception locations in __try ... __except so
that the exceptions can be caught by us instead of Cc/Mm which
use exceptions to signal status.
Change-Id: Ifef02bbf2c76b8583b538e4b67d4136c832b6cc6
Reviewed-on: http://gerrit.openafs.org/6859
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5762d9c3c7d941b856bfa86ce8e1ee6a76f41eda
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 2 10:54:23 2012 -0500
Windows: fix indentation
Change-Id: I2decb4093986c316fe6b9102f2d42a583a24b1f4
Reviewed-on: http://gerrit.openafs.org/6858
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fdf1dfc5f92fcd149a7ae0945e4458993b2ad61e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Mar 2 10:52:35 2012 -0500
Windows: Avoid deadlock in invalidation path
During data version invalidation the AFS redirector must CcPurge
any non-dirty extents on a file. This operation can be intercepted
by a filter driver which in turn might open the file and close it
again before the CcPurge completes.
The AFSPerformObjectInvalidate call holds the ExtentsResource
shared which can deadlock if AFSClose attempts an extent tear down
which requires exclusive access to the ExtentsResource.
Change-Id: I7cb0289d8036aabf56bb11fd12a79308be45faa8
Reviewed-on: http://gerrit.openafs.org/6856
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 81a9a33e0bc5455841ba105dab52735c64c7096b
Author: Dave Botsch <botsch@cnf.cornell.edu>
Date: Thu Mar 1 12:43:36 2012 -0500
Fixes dkms.conf for Redhat Enterprise
commit 8e0aaae076f4cccfd2d6ed81ede4e355235b578e , while fixing dkms.conf for
Fedora, broke dkms.conf for RHEL. In RHEL, you get a dkms.conf with too
many backslashes in the "mv" line. The dkms.conf should have the mv line
reading:
mv src/libafs/MODLOAD-*/\$KMODNAME \$DSTKMOD"
for Fedora.
This change checks if we are building on Fedora, and if so, maintains
the extra backslashes. Otherwise, not.
modified: src/packaging/RedHat/openafs.spec.in
Uses the dist tags as specified at
http://fedoraproject.org/wiki/Packaging:DistTag
Change-Id: I7fd7531758a63b2634424c2fcba23ae1b0fc8f2f
Reviewed-on: http://gerrit.openafs.org/6851
Reviewed-by: Ken Dreyer <ktdreyer@ktdreyer.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 579976cf246bd55dea2dfd3bf8470fd8bb8bde0a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Mar 1 15:49:12 2012 -0500
unix: always retry RX_CALL_BUSY
RX_CALL_BUSY is an indication that the call channel is busy not
that the server is down or otherwise cannot respond. Unconditionally
retry the RPC and do not alter state. We just want to force the use
of a different call channel.
Change-Id: Ic4ef9bac800087f1b287d3da08fcd5eec84374ef
Reviewed-on: http://gerrit.openafs.org/6852
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 28a33f8492098c23f7c3c58763ace93b82ea80a7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 29 13:07:47 2012 -0500
Windows: Workaround Win7 SMB Reconnect Bug
The SMB specification permits the server to save a round trip
in the GSS negotiation by sending an initial security blob.
Unfortunately, doing so trips a bug in Windows 7 and Server 2008 R2
whereby the SMB 1.x redirector drops the blob on the floor after
the first connection to the server and simply attempts to reuse
the previous authentication context. This bug can be avoided by
the server sending no security blob in the SMB_COM_NEGOTIATE
response. This forces the client to send an initial GSS init_sec_context
blob under all circumstances which works around the bug in Microsoft's
code.
Do not call smb_NegotiateExtendedSecurity(&secBlob, &secBlobLength);
As a result of the SMB 1.x bug, all attempts to reconnect fail due to
SMB connection resets. The SMB 1.x redirector will retry indefinitely
but all processes with outstanding requests to \\AFS will block until
the machine is rebooted.
Change-Id: Iedd58fccbf85495d48871935f6e61ede1e1240ff
Reviewed-on: http://gerrit.openafs.org/6846
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2a6ddae62e4fac5eecdf4634746e7294405393d6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Jul 8 11:25:19 2010 -0500
viced: Ignore client loopback alternate addresses
When we receive interface information from a client to determine its
alternate IP addresses, ignore any addresses that look like loopback.
Change-Id: I245ebfc74ad1e8bd2fcd235a00f000d29229668d
Reviewed-on: http://gerrit.openafs.org/2368
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0e610fdacb4484d245bf1f727d035812774192ea
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 24 12:23:28 2012 -0500
Windows: Fix an ExtentResource trace message
This instance is logging a SHARED acquisition not an EXCL one.
Change-Id: Id4e69bb275ff4eb242b2c145df80ed9b73313776
Reviewed-on: http://gerrit.openafs.org/6792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cfb7f205d8153899c0165594a29d91926a40425d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 24 12:21:46 2012 -0500
Windows: cm_UpdateCell never applies to Freelance mode
The Freelance.Local.Cell is updated by the registry monitor
thread and cm_UpdateCell should be a no-op. Make it so.
Change-Id: I2961114590af6b64b8ae06d608a97513e83aad4e
Reviewed-on: http://gerrit.openafs.org/6791
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6bb0014be2c3ea5ca411bf349fb3987c5d496c40
Author: Vaibhav Kamra <vkamra@maginatics.com>
Date: Thu Feb 23 09:58:07 2012 -0800
Windows: Redirector opens must set a valid FsContext
A successful open must have FileObject->FsContext set to a structure
with a valid/initialized FSRTL_ADVANCED_FCB_HEADER object.
Not having this breaks assumptions in the kernel.
Patchset edited by Jeffrey Altman <jaltman@your-file-system.com>
Change-Id: I70c9045bfa02c54074c015e6e871ead63efb6769
Reviewed-on: http://gerrit.openafs.org/6782
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit de93a78b870b40338cfd0f4839fe4ef3b959481b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 23 11:13:08 2012 -0800
Windows: remove AFSOpenRedirector from AFSRedirLib
The AFSOpenRedirector functionality must exist in the framework,
AFSRedir.sys, not the library, AFSRedirLib.sys.
Change-Id: Id688efba016d94df558b241e9bee421c86c60e27
Reviewed-on: http://gerrit.openafs.org/6781
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 315b97ab587247d7750ff4b64275e397ac4b97a7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 23 06:31:31 2012 -0800
Windows: do not bugcheck in AFSExAllocatePoolWithTag
If the Bug Check flag is set, the call to AFSBreakPoint() in
AFSExAllocatePoolWithTag() will trigger. There is no need for
an explicit bug check test in AFSExAllocatePoolWithTag().
If AFSExAllocatePoolWithTag() returns NULL there is no need
to ASSERT() the return value since AFSBreakPoint() would already
have been called to signal a debugger.
Change-Id: Ie8564f41f811c3afd99dc2e9c02f4aa68d63ef8e
Reviewed-on: http://gerrit.openafs.org/6780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fe6cc80fdbbd3c66ddc32bb6a8e639753244da70
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 23 06:28:49 2012 -0800
Windows: Revert "AFSRedir DebugFlags Turn on BugCheck"
This reverts commit 209df87d08fb07d9641b81858a0821b9fd95dbcc.
Turning on BugCheck by default was a good idea because we needed
to track down the cause of exceptions that were otherwise being
thrown resulting in resource leaks. However, it is a bad idea
because it results in out of memory conditions throwing bug checks
that result in a BSOD.
Change-Id: If0965657957ed73b83686a9be42b0d7f89964f2f
Reviewed-on: http://gerrit.openafs.org/6779
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fb03b1380f82a6bdc8a78ad92069da38b4e98c26
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Feb 23 18:28:21 2012 -0600
Rewrite make_h_tree.pl in shell script
The current usage of make_h_tree.pl adds a build requirement of
/usr/bin/perl that we did not have prior to commit
1d6593e952ce82c778b1cd6e40c6e22ec756daf1. Do the same thing in a
bourne shell script instead, so we don't need perl.
Note that this is not as generalized as make_h_tree.pl, but it doesn't
need to be. Specifically, this does not strip a leading ../ from found
include directives (nothing in the tree that includes h/* files uses
this), and header filenames containing whitespace almost certainly do
not work correctly.
The h => sys mapping is also much more hardcoded, but that's all we
were using this for anyway.
Change-Id: If07888abfdb9e8ec822b33abed0bf744b7210a52
Reviewed-on: http://gerrit.openafs.org/6790
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 46e85dd4682a3273e15bbf96c4d5492087555cab
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Feb 23 13:02:13 2012 -0600
salvager: Do not fork for single VG salvage
Currently we always fork a child in the salvager in order to salvage a
volume group. I believe this is in order to protect SEGV, exit(), etc
in one salvage operation from preventing salvaging anything else. When
salvaging a single volume group, though, there appears to be little
benefit.
In addition, we need to keep the VG salvaging code in the same process
as the cleanup code for single-volume salvages, so we can know which
volumes were deleted by SalvageVolumeGroup, so we know which volumes
to bring back online. So, do not fork for the singleVolumeNumber case.
Note that for DAFS, we already never fork for the entire salvage
operation when salvaging an individual volume group. So, this is
effectively a non-DAFS-only change.
Change-Id: I2b646b9ff932a673c714bc27ac32ed41cc3e22e6
Reviewed-on: http://gerrit.openafs.org/6787
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 2a1719faa810663d6d9cf774339e286c18ef2717
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Feb 21 18:05:32 2012 -0600
salvager: Remove VolumeSummary->fileName
The 'fileName' field in VolumeSummary serves two apparent purposes:
- Storing the filename of the volume header file (V0XXX.vol).
- Indicating whether or not a given VolumeSummary object is
referenced by any inodes on disk. fileName is set by
AskVolumeSummary/GetVolumeSummary, and is cleared in
SalvageFileSys1 when a matching inodeSummary entry is found.
This is very confusing. The first purpose is completely unnecessary;
we can always calculate the filename from the volume id for the
volume, and we already enforce the filename to be of that specific
format. The second purpose is very unclear in the current code, and
overloads the meaning of the field.
So instead, remove fileName entirely. Code that was using it to locate
the header file are changed to use VolumeExternalName_r. Code that was
using the field to determine if the volume is "unused" is changed to
use a field just called "unused", set to 0 or 1.
Change-Id: I5e257ea633b7ae821136c88e1b2024f62125ab30
Reviewed-on: http://gerrit.openafs.org/6786
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d426e613b9a4802c3b404903f7122f6fd0046aba
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Feb 21 18:03:24 2012 -0600
salvager: Remove PrintVolumeSummary
Nothing uses this function; remove it.
Change-Id: I55ae048ba920bbd10030c227724323fa20681941
Reviewed-on: http://gerrit.openafs.org/6785
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 839638870986ebd4cf992f7a2c81a23e37c14228
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Feb 21 17:46:41 2012 -0600
salvager: Do not require MaybeZapVolume fileName
In MaybeZapVolume, currently we do not remove the volume header if the
given isp->volSummary->fileName is not set. This effectively means
that we only actually "zap" volumes for which we have just created the
header, or which are not referenced by any inodes.
For readonly volumes that have errors, we want to delete the volumes
instead of salvaging. Readonly volumes with valid headers will have
fileName as NULL, though (set back in SalvageFileSys1), so
MaybeZapVolume will refuse to remove them. What ends up happening is
that the headers will stay around, but since we do not finish checking
the volume, all of the inodes for the data in the volume will be
dec'd. This results in a volume whose header exists, but none of its
inodes (including special inodes) exist, so the volume will need to be
salvaged again, and during that salvage will be deleted (because there
are no inodes for the volume).
Avoid all this, and just delete volume headers for volumes that lack a
valid fileName. Instead try to avoid deleting headers with
volSummary->deleted set, just so we don't try to delete the same
headers twice.
Related issue reported by Åsa Andersson.
Change-Id: I4797d0cabe3851debdc78f4ed9ee619534397970
Reviewed-on: http://gerrit.openafs.org/6784
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 76f12c2389fd2a8e09b4e869730169401d154ce9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Feb 21 17:40:46 2012 -0600
salvager: Do not set fileName on header fixup
Currently, SalvageVolumeHeaderFile will set isp->volSummary->fileName
to a new string whenever the volume header needs to be created or
re-written. When control reaches back to SalvageFileSys1, this can
cause DeleteExtraVolumeHeaderFile to delete the header, since
vsp->fileName is used as a sort of indicator to see whether or not a
volume has been referenced by the inode summary.
When we create a new header, we avoid this because we allocate a new
VolumeSummary struct, which is not caught by the last
DeleteExtraVolumeHeaderFile for loop in SalvageFileSys1. However, we
do delete the header when we simply re-write a header, since we use
the existing VolumeSummary struct. Set fileName in neither, for
consistency.
Change-Id: Ibb7b5fbadb701028a6bafe01ae9f8d3265e2f443
Reviewed-on: http://gerrit.openafs.org/6783
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 634c6f184b17e30ade86c0a838ab55ddddc730d6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Feb 22 15:40:20 2012 -0600
LINUX: Use afs_convert_code in afs_notify_change
afs_notify_change currently just returns "-code". This can cause a
panic if the error code is negative, since we will return a positive
error code, which may get interpreted as a valid pointer value in
higher levels.
Specifically, if we hit afs_notify_change via something like this code
path:
do_sys_open -> do_filp_open -> open_namei -> may_open -> do_truncate
-> notify_change -> afs_notify_change (via inode->i_op->setattr)
the positive error value will be interpreted by do_sys_open as a valid
'struct file' pointer, and will be dereferenced.
So pass the return value through afs_convert_code, like all of the
other vnode ops, so we ensure we return an error properly.
Change-Id: I941cc2d77d5a96cf86dfe133d30af4ccf6e9f2cb
Reviewed-on: http://gerrit.openafs.org/6776
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 620d4169b73088579e691aec2cfdafc7f44e2fee
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Feb 22 15:36:37 2012 -0600
LINUX: move afs_notify_change to osi_vnodeops.c
afs_notify_change is almost always used solely in inode_operations
structs, and is more similar to the other per-vnode functions. Put it
with the other per-vnode functions for better organization, and so
they can use the same static functions.
Move the helper functions iattr2vattr and vattr2inode along with it.
Change-Id: I47a69fe673cfc3318ce583596ba25cbeb9cb0b96
Reviewed-on: http://gerrit.openafs.org/6775
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 75a3dabe66a9fbc232b05e2f744ad5b867e18262
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Feb 22 15:57:46 2012 -0500
libafs: retry retriable RPCs instead of abandoning
if we get e.g. an idle dead error we should retry
retriable actions, namely data stores. in order
for writing files to work correctly given how
the writeback code is structured it's important that
this not interfere with analyze's shouldRetry decision
on those RPCs
Change-Id: Ie091a72b924c8414ec66c377fa13da14575a69cf
Reviewed-on: http://gerrit.openafs.org/6749
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2378895fc66a19a050f302711f2e18dbbf2e3d6f
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Feb 12 22:45:59 2012 -0500
libafs: ensure one nat ping connection per srvAddr
track the natping conn with the srvAddr, ensuring exactly one.
Change-Id: I2e424a71d398563f9d0ec3ca77b83320cbef4ea1
Reviewed-on: http://gerrit.openafs.org/6706
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4ed91fe59468ed6c834f968a5b8202e967ea43b5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 22 14:19:51 2012 -0500
Windows: invalidate data version on link creation
notify the redirector that the directory data version has
changed when a pioctl is used to create a symlink or mount point.
FIXES 130589
Change-Id: I07e1ae130b9db8d3dd68fef892c47de008be7cd4
Reviewed-on: http://gerrit.openafs.org/6747
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5965c5390bf8264dacf60016929fc8d3aa83a7ea
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 20 20:50:53 2012 -0500
Windows: AFSPerformObjectInvalidate hold ExtentsResource shared
The AFSPerformObjectInvalidate() was obtaining exclusive
access to the Fcb ExtentsResource even though it was not
tearing down the extents list. The ExtentsResource could
be held shared instead. Doing so will avoid the following
deadlock:
Thread 1:
nt!MmPurgeSection+0x403
nt!CcPurgeCacheSection+0x100
AFSRedirLib!AFSPerformObjectInvalidate+0xd4
AFSRedirLib!AFSWorkerThread+0xa4
nt!PspSystemThreadStartup+0x2e
Thread 2:
AFSRedirLib!AFSAcquireShared+0x18
AFSRedirLib!AFSMarkDirty+0x68
AFSRedirLib!AFSNonCachedWrite+0x603
AFSRedirLib!AFSCommonWrite+0x5fa
AFSRedirLib!AFSWrite+0x20
nt!IofCallDriver+0x45
AFSRedir!AFSWrite+0x57
nt!IofCallDriver+0x45
fltMgr!FltpDispatch+0x6f
nt!IofCallDriver+0x45
AMFilter+0x2c6e
nt!IofCallDriver+0x45
PMDriver+0x112a
nt!IofCallDriver+0x45
OpLoader+0x1cd2
nt!IofCallDriver+0x45
savonaccesscontrol+0x6f15
savonaccessfilter+0x2fa0
nt!IofCallDriver+0x45
nt!IoAsynchronousPageWrite+0xd0
nt!MiMappedPageWriter+0x127
nt!PspSystemThreadStartup+0x2e
Thread 1 is attempting to perform a cache purge which cannot complete
until Thread 2 is finished but Thread 2 requires the ExtentsResource
which is held by Thread 1.
Change-Id: I4582093cf973f61cf6aff0df5e23b6711ec708b3
Reviewed-on: http://gerrit.openafs.org/6744
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 08d800b896db688cd96d742781e8225c9e58ef57
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 20 01:48:20 2012 -0500
Windows: fsLockCount not accurate
Prior to 1.6.2 the file server does not report an accurate value
for the lock state. In addition, callbacks are not broken when
locks are freed due to lease expiration.
Change-Id: I5b79d1d59c2ace9834cf23dfbef33e343ce6dda0
Reviewed-on: http://gerrit.openafs.org/6741
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4603057d99a1501275f14f6d5aba089364785e09
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 20 01:40:03 2012 -0500
viced: lockcount only valid if not expired
locks are issued on a lease. If the lock is expired, the lock
count is zero.
Change-Id: I628dd5b8b0d38694d653d9e8e82ff60ec2e1505c
Reviewed-on: http://gerrit.openafs.org/6740
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fd19b39b151e3dddd18b4280252ac3e0fdf3964d
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Mon Feb 20 17:56:29 2012 -0500
volser: Remove unused variable
tid is now unused - remove it to avoid a warning.
Change-Id: If2d4fdf16415bbf19de3cd8a3e621d04d4d9b018
Reviewed-on: http://gerrit.openafs.org/6743
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fe4e52655ce7e5a8e5f6c23cde678fc66c3db490
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 17 17:12:46 2012 -0600
viced: Relax "h_TossStuff_r failed" warnings
Currently, h_TossStuff_r bails out and logs a message if we detect
that somebody grabbed a reference or locked the host while we tried to
h_NBLock_r. The reasoning for this is that it is not legal for anyone
to h_Hold_r a host that has HOSTDELETED set (but the error is
detectable and recoverable); callers are supposed to check for
HOSTDELETED and not hold a host in that case.
However, HOSTDELETED may not be set when h_TossStuff_r is called,
since we call it if either HOSTDELETED _or_ CLIENTDELETED are set. If
CLIENTDELETED is set and HOSTDELETED is not, it's perfectly fine (and
necessary) for callers to grab a reference to the host. So, if that's
what is going on, don't log a message, since that's normal behavior.
Check for HOSTDELETED before we h_NBLock_r, since it is technically
possible (and legal) for someone to grab a reference to the host and
somehow set HOSTDELETED while we wait for h_NBLock_r to return. Also
log the flags when we see this message.
Change-Id: Ie50a0617de094bb1c721da28f100ed4b31aa849f
Reviewed-on: http://gerrit.openafs.org/6733
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit f52c33ea10de8d1d07a9c4805366283e6ca635dc
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 17 16:24:16 2012 -0600
viced: Remove extraneous h_AHTAHT_r in h_GetHost_r
We added this address to the host with an addInterfaceAddr_r call just
a few lines before, which adds the host to the address hash table.
Another call to h_AddHostToAddrHashTable_r is pure overhead and
confusing.
Change-Id: Ib08817274e632f67776956ede8b56eaf0dce879e
Reviewed-on: http://gerrit.openafs.org/6729
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 3c803580bb503c7650f7b138c1b3f2eafd92b985
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 17 15:46:50 2012 -0600
viced: Set h_GetHost_r probefail if MPAA_r fails
Currently, in h_GetHost_r, if we get a connection whose address does
not match an extant host, but the reported uuid does, we ProbeUuid the
old host. If it fails, we call MultiProbeAlternateAddress_r and set
'probefail'. Later on, if 'probefail' is set, we always add the
connection address to the host, and remove the host->host,host->port
address from the host.
However, this is not always correct. Consider the following situation.
We have an existing host that has primary address 1.1.1.1, and also
has addresses 1.1.1.2 and 1.1.1.3 on the interface list but not on the
hash table. Say that host A stops responding on 1.1.1.1, and a
connection comes in from 1.1.1.2. We ProbeUuid 1.1.1.1 and get a
failure, so we call MultiProbeAlternateAddress_r.
MultiProbeAlternateAddress_r probes via rx_Multi the addresses 1.1.1.2
and 1.1.1.3. Say that 1.1.1.3 responds first, and responds
successfully, so MultiProbeAlternateAddress_r sets 1.1.1.3 to be the
primary address for the host.
After MultiProbeAlternateAddress_r returns, 'probefail' is set. A few
lines down, we see that oldHost->host does not match haddr, and
'probefail' is set, so we add 1.1.1.2 to the interface list, and
remove 1.1.1.3, and set 1.1.1.2 to be the primary address, even though
1.1.1.3 is the address we most recently 'know' is correct.
To fix this, only set 'probefail' if MultiProbeAlternateAddress_r also
fails after the failed ProbeUuid call. Conceptually this makes sense,
since if MultiProbeAlternateAddress_r succeeds, it found an address
that responds successfully to ProbeUuid, and it sets that address to
be the primary address. Therefore, after MultiProbeAlternateAddress_r
returns success, the situation is the same as if the 'good' address
was already the primary address, and the ProbeUuid call succeeded, so
'probefail' should be cleared.
Change-Id: Id32817916a8a42db567ad099aae00745b79598c5
Reviewed-on: http://gerrit.openafs.org/6728
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 7a6efc9bfcd955901d19274cc96f9a1b67f54f95
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 17 13:14:31 2012 -0600
viced: Correctly update addrs on alt addr probe
The functions MultiBreakCallBackAlternateAddress_r and
MultiProbeAlternateAddress_r try to find a valid address in a host's
interface list of addrs. If they find one, they update host->host and
host->port. However, they do so just by changing those fields directly
and by calling h_DeleteHostFromAddrHashTable_r and
h_AddHostToAddrHashTable_r. This leaves the old host->host, host->port
on the interface list, and leaves it marked as 'valid'. Similarly, the
new host and port may still be marked as not 'valid'.
This can result in the host being on the addr hash table via an
address that is not on the host's interface list. After the above
situation occurs, we may call
removeInterfaceAddr_r(host, host->host, host->port);
and then update host->host and host->port, which happens in a variety
of places. Since host->host, host->port is not marked as valid in the
interface list, it is not removed from the addr hash table, but it is
removed from the interface list. Eventually, this can cause the host
to be referenced from the addr hash table even after it has been
freed.
Since this can result in hash table entries pointing to the 'wrong'
host, this can result in FileLog messages such as:
Sun Feb 5 03:16:35 2012 Removing address that does not belong to host 0xdeadbeefdead (1.2.3.4:7001).
And bogus instances of the message:
Sun Feb 5 03:16:36 2012 CB: new identity for host 0xdeadbeefdead (1.2.3.4:7001), deleting(1 baadcafe 12345678-9abc-def0-12-34-456789abcdef fedcba98-76543210f-ed-cb-a9876543210f)
To fix this, make MultiBreakCallBackAlternateAddress_r and
MultiProbeAlternateAddress_r update the address list the same way as
all of the code in host.c does; by adding the new address with
addInterfaceAddr_r, removing it with removeInterfaceAddr_r, and
updating host->host and host->port.
Change-Id: I0a95e0186c03c1831c4df86daae901bf2462da0e
Reviewed-on: http://gerrit.openafs.org/6727
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9754c4e15fb9073ed9f95d5d4242d311eb65d717
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Feb 16 16:20:16 2012 -0600
viced: Delete dup host before probing old host
Currently, when the fileserver gets a new connection from an address
not on the addr hash table, we allocate a new host structure and add
that host to the addr hash table. If we then find that that host's
uuid matches the uuid of an extant host, we do the following:
- probe the old host with the uuid, and MultiProbeAlternateAddress_r
if the probe fails
- mark the duplicate host as HOSTDELETED
- manipulate the interface lists
Consider, for example, that we have an extant host ('oldHost') with
address 1.2.3.4:7001, but with 5.6.7.8:7001 on its alternate interface
list. At some point, the 1.2.3.4:7001 interface goes away or becomes
unreachable. A new connection comes in from that same host on
5.6.7.8:7001.
What will happen is we create a new host for address 5.6.7.8:7001, and
then detect the uuid collision. When we try to probe the old address
of 1.2.3.4:7001, it will fail, and we will try to
MultiProbeAlternateAddress_r. MultiProbeAlternateAddress_r will
determine that the alternate address 5.6.7.8:7001 responds
successfully to the probe, and it tries to set 5.6.7.8:7001 to be the
primary address of 'oldHost', and add 'oldHost' to the addr hash table
under 5.6.7.8:7001.
But the "new" host from the incoming connection is already hashed on
the address hash table under 5.6.7.8:7001, so the
h_AddHostToAddrHashTable_r call in MultiProbeAlternateAddress_r fails.
Since we later delete the new duplicate host, this results in
5.6.7.8:7001 being the primary address for the host, but that address
is not anywhere in the address hash table.
This behavior can be seen by the following pair of FileLog messages:
Wed Feb 1 11:02:38 2012 CB: ProbeUuid for 0xdeadbeefdead (1.2.3.4:7001) failed -01
Wed Feb 1 11:02:38 2012 h_AddHostToAddrHashTable_r: refusing to hash host beefdead, baadcafe (5.6.7.8:7001) already hashed
While those message do not necessarily indicate this problem, this
problem will result in those messages.
To fix this, mark the duplicate host as HOSTDELETED before we do any
probing on 'oldHost'. This way, if MultiProbeAlternateAddress_r tries
to add 'oldHost' to the addr hash table under 5.6.7.8:7001, it will be
able to do so successfully, since the old duplicate host is deleted.
Change-Id: Id3aaab0718425492dca1deba892725160677b85f
Reviewed-on: http://gerrit.openafs.org/6726
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 13a4f2b18bb84d05773529a794371d29f64570ab
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 12:46:36 2011 -0500
vos: allow releases without offline time
allow releases using dumps to clones to avoid offline time
Change-Id: I06ed71f12494e362aa10a851081c9dcaf8c9a1af
Reviewed-on: http://gerrit.openafs.org/6254
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8d618dceeefacbeb37c4ef3b1f9a8e80552311aa
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 12:29:30 2011 -0500
vos: refactor code
change vos to remove lots of duplicated code for volume deletes and clones
Change-Id: I1f39e857de6eefa0d8897e4eb8ece49e4a72f518
Reviewed-on: http://gerrit.openafs.org/6253
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2a4c6c3b9e1dc30d5599e67e02237a1aeef8a0f0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Feb 13 14:11:36 2012 -0600
Rx: Avoid lastBusy/PEER_BUSY discrepancy
If an rx call has the RX_CALL_PEER_BUSY flag set, but the call's
conn->lastBusy is not set, we can easily cause an rx caller to loop
infinitely. rx_NewCall will see that lastBusy for a call channel is
not set, and will use that call channel, but rxi_CheckBusy will note
that the call appears busy and that there are non-busy call channels
on the same conn, and so will return RX_CALL_BUSY.
This can currently happen in rxi_ResetCall, since we set
RX_CALL_PEER_BUSY on the call again if the call had that flag set when
rxi_ResetCall was called. If we are calling rxi_ResetCall with
'newcall' set, the passed in call is unrelated to the new call, since
it was obtained from the free list. Thus, the busy-ness of the call
should be ignored. Fix this by only paying attention to the incoming
RX_CALL_PEER_BUSY flag if 'newcall' is not set.
Also prevent this from happening by clearing RX_CALL_PEER_BUSY in
rx_NewCall when we select a call and clear lastBusy for that call.
Change-Id: Ic5a4709854b62d962ed91ee0103c6cbdd735d175
Reviewed-on: http://gerrit.openafs.org/6707
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4b93c42513785d1094c5336b5c9cc4add1b89c5e
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 12:00:52 2011 -0500
vol: allow clones of readonly volumes
allow writing of data where it's not user data we're changing
(e.g. allow a vnode to be marked cloned in the vnode index)
Change-Id: If3338ab0474ddbfe895b705217d61c054c4cb696
Reviewed-on: http://gerrit.openafs.org/6251
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 641c67473615e80cfb8cf1e67636a82e42e5c899
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 11:24:16 2011 -0500
volser: allow clonevol purge id to be new id
effectively the same functionality that reclone already uses, but
for some reason we artificially limit it out of clone despite
the interface being there for it. it used to be there. put it back.
Change-Id: I22868c41f8d3b920ba61d01e5334ff2320b38376
Reviewed-on: http://gerrit.openafs.org/6250
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f1de04f3b35e91923efddca57e744b2138619223
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 11:22:38 2011 -0500
volser: allow cloning non-rw volumes
remove EROFS error which is the only thing preventing a working clone
on a non-RW.
Change-Id: Ic3d4d07519188712e9a38267fc74ebd1eaef7d8a
Reviewed-on: http://gerrit.openafs.org/6249
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 91d38b93566734734f559a84c38a09e5c7d530c0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 18 19:57:25 2012 -0500
Windows: Dereg Lanman and Lsa reg values for afsredir
If the machine has been upgraded from an AFS SMB Server to the
AFS Redirector, the registry will have leftover configuration
for the "AFS" netbios name in the Lsa BackConnectionHostNames
value and the LanmanWorkstation ReconnectableServers and
ServersWithExtendedSessTimeout values. These values are not
useful with the AFS Redirector since \\AFS is owned by afsredir.sys
and not the SMB redirector. Remove the "AFS" netbios name from
these values when afsd_service.exe has started in redirector mode.
Change-Id: If8c100d3569595645c041ac58fedb1c835f9129f
Reviewed-on: http://gerrit.openafs.org/6737
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1cc8feb6fc7b8d551b343b276e40e023ab1dccbe
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Sat Feb 11 09:43:30 2012 -0700
doc: replace hostnames with IETF example hostnames
There were several different real and made-up hostnames and company names used
throughout our documentation examples.
The IETF has reserved "example.com" and other "example" TLDs for use in
examples (RFC 2606). Replace almost all references to ABC Corporation, DEF
Corporation, and State University, as well as "abc.com", "bigcell.com",
"def.com", "def.gov", "ghi.com", "ghi.gov", "jkl.com", "mit.edu",
"stanford.edu", "state.edu", "stateu.edu", "uncc.edu", and "xyz.com".
Standardize on "Example Corporation", "Example Network", "Example
Organization" (example.com, example.net, and example.org).
The Scout documentation in the Admin Guide contains PNG images that contain
the old cell names, so I left those references until the images can be
replaced.
Change-Id: I4e44815b2d2ffe204810b7fd850842248f67c367
Reviewed-on: http://gerrit.openafs.org/6697
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d5bf33ec94b1ac1a6c08863bac39154f762f0810
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 17 22:21:00 2012 -0500
Windows: Explorer Shell Set Unix Mode bits
The Unix Mode bits were not being saved. This patch permits
them to be saved.
FIXES 130572
Change-Id: I6bf96c04115ee0f01e84b44b9efaacb578d95cbc
(cherry picked from commit 534d95ef90ac5e5ebf5deb227008e0b023e7ef8b)
Reviewed-on: http://gerrit.openafs.org/6734
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 168d730a6f227c9b9dce228314eb75aa76b8cddb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 17 10:37:34 2012 -0500
Windows: remove unnecessary DirectoryEnumEvent
The DirectoryEnumEvent is not required to implement:
AFSSetEnumerationEvent
AFSClearEnumerationEvent
AFSIsEnumerationInProgress
The DirectoryEnumCount is modified by interlocked operations
and can be used as a marker for when an enumeration is in progress.
Change-Id: I414ce2bc753b0fd60a3fac51c2cf3d264a32ab05
Reviewed-on: http://gerrit.openafs.org/6725
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 780e497b32a927e008474a63b0427eca5d5a8877
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Feb 16 23:50:18 2012 -0500
Windows: VolumeCB->ObjectInfoTree.TreeLock Deadlock
AFSPrimaryVolumeWorkerThread held the VolumeCB->ObjectInfoTree.TreeLock
exclusively across calls to AFSCleanupFcb() which in turn triggers
a file extent release to the service which can in turn result in
an object invalidation. Processing the invalidation requires shared
access to VolumeCB->ObjectInfoTree.TreeLock which results in a deadlock.
This patch alters the processing of AFSPrimaryVolumeWorkerThread
so that the VolumeCB->ObjectInfoTree.TreeLock is not held across
the AFSCleanupFcb() calls.
FIXES 130431
Change-Id: I3726df02ab47d2dcc83a32c75957a5dafcfbf20e
Reviewed-on: http://gerrit.openafs.org/6724
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e5e9260c7936ce0b4d51855291421679acccaed4
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Feb 16 10:58:50 2012 -0500
volinfo: initialize vnode details
Clear the vnode details object. Fixes the path lookup in volscan.
Change-Id: I5176cf50bdb54529230fc72e4d1a65a20b4c14ba
Reviewed-on: http://gerrit.openafs.org/6722
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a4d9fbaa8036cc78ae0119330314f6deab159c90
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Feb 13 16:11:19 2012 -0500
libafs: kill rxevent daemon even in upcall mode
the switch from rxk listener env to upcall env could leave the event
daemon running. fix that.
Change-Id: Ibe36e7473536c36a739c0ad1e18fcf6880c98021
Reviewed-on: http://gerrit.openafs.org/6713
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 07d9b18e36fff6fc96c629ac2bebe8bb43f6b9dd
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Wed Feb 15 20:12:56 2012 -0700
doc: refer to aklog instead of klog
klog (and kaserver) is deprecated. In generic examples, refer to the Kerberos
5 equivalents.
Change-Id: I95806a384686033fe2f03573017fc619c2a376c7
Reviewed-on: http://gerrit.openafs.org/6721
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit f38780b38d6097832b6d49453a0a47044bc06903
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Feb 15 00:06:47 2012 -0500
Windows: disable afsdhook.dll reload by daemon
The daemon thread's loading and unloading of afsdhook.dll every
second prevents the disk drive from sleeping and forces a search
of the PATH. Make the periodic reloading configurable and
disable it by default.
Change-Id: I7e1a5b2bc7e1c4d4ea39fc30cf34c1195a326ed2
Reviewed-on: http://gerrit.openafs.org/6715
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fcc8244095a9cfb5235b39afc25c8817167e895c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 14 21:52:28 2012 -0500
Windows: remove install9x rules
Change-Id: I293f982d0f1466fd9bf213db055eedafc3c79977
Reviewed-on: http://gerrit.openafs.org/6712
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 32de17264e229fca94742da7b6278536c24fe713
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 14 16:02:02 2012 -0500
Windows: remove AFS_WIN95_ENV
No longer build for Win9x. Remove AFS_WIN95_ENV conditionals.
Change-Id: I7082017a3aaa9a30723549974c4d8af50025b923
Reviewed-on: http://gerrit.openafs.org/6711
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9a394780abb782f7a4f8b6095b6faf46b8e819a6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 14 15:35:07 2012 -0500
Windows: add KTC_TOKEN_MUTEX_FAIL error code
If acquisition of the Global\AFS_KTC_Mutex fails, return a
different error code from a pioctl failure since the pioctl
was never issued.
Change-Id: I001227f87e97a06bf419c68d6579843e4f93f032
Reviewed-on: http://gerrit.openafs.org/6710
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit da17eb6c8619c0f781cd4601c0da1258043aa475
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 14 12:01:38 2012 -0500
Windows: avoid GetComputerNameW call for all ioctl
Cache the value of GetComputerNameW() to avoid repeated calls
for each and every redirector ioctl request.
Change-Id: I4476db982897a631510eba7d859385268b16ce34
Reviewed-on: http://gerrit.openafs.org/6708
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 12e2a3abe7ca640a7cef2630039c06964f779f17
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Feb 8 16:03:29 2012 -0600
RedHat: Fail openafs-client 'stop' on rmmod error
Currently, the openafs-client RPM init script ignores any error
reported by rmmod. If 'umount /afs' succeeds but rmmod does not, the
client may panic the machine if the client is started again (from e.g.
running the 'restart' init script method), since afsd will try to
initialize AFS with a libafs that has been shut down.
So, do not ignore errors from 'rmmod', and instead fail the 'stop'
method from the init script if we get an error.
Change-Id: Id4a07703fb4df69ad3a6a3569c91e48f73a0d309
Reviewed-on: http://gerrit.openafs.org/6709
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit aaab21e7a123ce701a8d5b2144032739fe177d6f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 11 22:14:23 2012 -0500
doc: fix AdminGuide
The AdminGuide was broken by e99224f2fe049bc339e87c8b6c195de67dca2f08.
Change-Id: I4fc67d36857d62b562092b9892636f3e4c6d6623
Reviewed-on: http://gerrit.openafs.org/6703
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9d5a4530916a243632d911d78d93db676cd860d5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 11 17:31:00 2012 -0500
Windows: default cell grand.central.org
Change the default cell from openafs.org to grand.central.org
since there is no openafs.org cell. All openafs software is
distributed from the grand.central.org cell.
Change-Id: I21ea2c5a9b55fbe3bb4ea19ae34ecf0e5a38084f
Reviewed-on: http://gerrit.openafs.org/6699
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8127eeced29beb43984de73b14ff55337103470c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 11 17:29:51 2012 -0500
Windows: reset version to 0.0.0 on master
Master does not track a particular version number.
For Windows builds on master, reset the version to
0.0.0 so that the builds are not confused with the actual
1.5.7600.
Change-Id: I3c84bb117418284de0d65e2a4069b88908b91659
Reviewed-on: http://gerrit.openafs.org/6698
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5c4e49062af0e9b81b963d1d6e50c7cc52c68eb9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 11 12:49:33 2012 -0500
Windows: AFSRemoveFcb() cannot race
Modify AFSRemoveFcb to use InterlockedComparePointerExchange
to ensure that only one thread can remove and deallocate an
AFSFcb structure.
Change-Id: I27d27b6a99806bee2fc2cfc04c2ac04d975a553d
Reviewed-on: http://gerrit.openafs.org/6696
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e99224f2fe049bc339e87c8b6c195de67dca2f08
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Thu Feb 9 17:37:01 2012 -0700
doc: add section on direct volume access
Provide examples of the direct volume access syntax, using the
fictitious example.com cell.
Change-Id: Ia2ea592531e29f6b744d0bd6993d598d78a799c4
Reviewed-on: http://gerrit.openafs.org/6691
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 42aba4391ab3fadca2103e1df1f47445e40c436e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 10 08:56:12 2012 -0500
Windows: Perform rename to self check earlier
In AFSSetRenameInfo(), the rename to itself check was performed
after the name collision check. Move the check earlier in the
routine to ensure that we catch the no-op before any real work
is done.
Change-Id: I580dd9958a259d4a1819c6bd882dae8067d2853d
Reviewed-on: http://gerrit.openafs.org/6692
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d6f977830c164ee079c68101595c28ff1847f88f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Dec 20 17:44:42 2011 -0500
viced: Keep H_LOCK while locking host in h_Alloc_r
Currently in h_Alloc_r, we h_Lock_r the host, so we have it locked on
return. However, h_Lock_r drops the host glock, which is bad in this
situation since we have already added the host to the global hash
table, so other threads may see it. This can mean that by the time
h_Alloc_r returns, the returned host may have HOSTDELETED set, and/or
the addresses associated with the host may be completely different.
h_Alloc_r's caller, h_GetHost_r, seems to assume that the host is
still associated with the address of the passed-in connection. When
this is not true, this can result in the host structure getting into a
strange state, such as the primary addr/port may not be hashed. The
host may also have HOSTDELETED set, in which case we're not supposed
to be dealing with it at all.
To avoid these problems, lock host->lock directly in h_Alloc_r,
without going through h_Lock_r and dropping H_LOCK. Also do it as one
of the first things we do to initialize the host, just to make sure
that if anybody else happens to see the host, it is locked by us when
they do.
Change-Id: Ia99cb84ad94f3e143ed0bae33485a88d60ff5b27
Reviewed-on: http://gerrit.openafs.org/6389
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 01301d0a5323a836efaae30cac325c25f6a7577a
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Jan 22 09:45:22 2012 -0500
viced: Allow null host for BreakCallBack
For replication writes at the remote site, we will want to call
this without a host structure.
Change-Id: I9cdef18f35229c9ab162cc07f6d60fe443204654
Reviewed-on: http://gerrit.openafs.org/6674
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fb0d056c69489d76a5aad216277bf81ac3420aea
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Tue Feb 7 15:23:23 2012 -0600
libafsauthent, tvolser: fix objdir build
Change-Id: I50c3424d61fc440f870207229a9540ebdb9a9632
Reviewed-on: http://gerrit.openafs.org/6689
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c0ac71d92fda5c1cd451bd453b00983362f47ce7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Feb 7 15:56:12 2012 -0500
Windows: Release Notes corrections
Add missing BlockSize registry value
Correct AFSRedirector\NetworkProvider registry key description
Add note that LanAdapter value is ignored if SMB mode is not in use.
Change-Id: I449988f1f6841c1b254d73b08a6ee53ca2dbaeda
Reviewed-on: http://gerrit.openafs.org/6685
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8bc139b4acdd2c06643abb44d3f5b3bfdcbf639d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Feb 6 12:00:58 2012 -0500
Windows: OpenAFS reparse points are surrogates
OpenAFS reparse points represent mount points, symlinks, and dfs
referrals. All of which are file system objects that represent
another named entity in the system. As a result the reparse tag
field must include the Reparse Tag Surrogate bit (0x20000000) set.
This permits the IsReparseTagNameSurrogate() macro provided in
winnt.h to be used to determine if the reparse point is a surrogate
or not.
See
http://msdn.microsoft.com/en-us/library/windows/desktop/aa365197%28v=vs.85%29.aspx
Change-Id: I2561823e23371c2fdf01941da99fe848ca1fa11d
Reviewed-on: http://gerrit.openafs.org/6668
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 58159672536df128cb21b449865acb011e8c90fc
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 18 14:04:28 2012 -0500
RW Replication: Add basic definitions
Add some basic definitions that will be needed to handle RW
replicas.
A new volume type RWREPL is added. Replicas will share the same
volume ID as the RW volume, so the array of volume IDs by volume
type is unchanged, as is the VLDB entry format.
A new flag bit ITSRWREPL/VLSF_RWREPLICA for serverFlags identifies
RW replica sites in VLDB entries.
Change-Id: I882b238f34e682ebea782e11dc418ae1340d4546
Reviewed-on: http://gerrit.openafs.org/6676
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e93786b01b358dce419fa7f446cf154e6e40f5a0
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Oct 4 17:47:48 2011 -0400
vol: remove OPENAFS_VOL_STATS
OPENAFS_VOL_STATS has been unconditionally defined since the IBM days.
Adjust the code to assume it is set.
Change-Id: I3b5ff99a469e6865ff1e10405a7f77d8c3890f59
Reviewed-on: http://gerrit.openafs.org/5551
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 80592c53cbb0bce782eb39a5e64860786654be9f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Feb 6 13:23:41 2012 -0600
Disable kernel opt by default on Solaris 10 and 11
With newer Solaris Studio (sometime in the 12.* series), cc started
adding SSE instructions to optimized x86 code, which is invalid for
kernel code and can generate panics. There appears to be no way to
turn this off currently (-xvector=%none is non-functional), so default
to not optimizing kernel code.
Change-Id: I5fdedb11219df68e0146b8e0cee9010c2eb4067e
Reviewed-on: http://gerrit.openafs.org/6671
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3a621a8518f96e15a08448fecdfdb0cbce6a02c2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Feb 3 16:06:16 2012 -0600
Rx: Add missing rx_packet.h includes
We no longer include rx_packet.h from rx.h, so rx_kcommon.h was not
picking up some packet-related definitions. Some files
(SOLARIS/rx_knet.c, IRIX/rx_knet.c) were using packet-related defines
(e.g. RX_HEADER_SIZE) while just including rx_kcommon.h. Include
rx_packet.h in those files to get the relevant definitions.
Change-Id: Ib012f295d8e324dd8b38eb0b89933eac392a9583
Reviewed-on: http://gerrit.openafs.org/6670
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit dc6beb3ea29a64bcf59807fd451a573aa54e1122
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Feb 2 17:35:52 2012 -0600
SOLARIS: Use kcred instead of afs_osi_cred
For many vfs ops to the cache, we currently pass &afs_osi_cred for our
credentials, which is a mostly zeroed-out credential structure. In
some modern versions of Solaris (Solaris 11), at least some parts of
this structure need to not be NULL (cr_zone), or we will panic.
The Solaris kernel provides a 'kcred' credentials structure for the
purpose of using "kernel" credentials for i/o. So just use that
instead, since kcred has existed at least since Solaris 8.
Change-Id: Ia5252580d2de6dd7adfa1a1929148362d1da6360
Reviewed-on: http://gerrit.openafs.org/6669
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 39d152810de9adfa89acb994506d0b9d368395f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 4 17:26:02 2012 -0500
Windows: Avoid race during PIOCtl DirNode allocation
Use InterlockedCompareExchangePointer to assign the DirNode to
ObjectInfo->Specific.Directory.PIOCtlDirectoryCB. Otherwise,
one thread could race with another thread when allocating the
pioctl object.
Change-Id: Ic5b1a0ff2e44f2c4520cc7f5e536bd876bc83a65
Reviewed-on: http://gerrit.openafs.org/6661
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b819d3e3abcfedf10a1c91a26f45d0d85e6b93f1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Feb 4 12:48:24 2012 -0500
Windows: Hold Fcb references prior to service call
If the Fcb reference count hits 0 while the service is called
it is possible that the Fcb can be garbage collected prior to
the completion of the call.
Change-Id: I32c3c5e3debb246fe63ac6f6cc5625b493ee47a9
Reviewed-on: http://gerrit.openafs.org/6660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit deb41441f0671d46de876d30f641f86cca7d256e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Feb 5 12:58:22 2012 -0500
Windows: Do not build NSIS by default
NSIS installers are no longer up to date and do not support 64-bit
builds. OpenAFS no longer distributes them for 1.7 and beyond.
Stop building them by default.
Change-Id: I6b8c2b46ccc30654cfb4661c9bde50483bc99785
Reviewed-on: http://gerrit.openafs.org/6664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 339189c88ba9c6bc7e4ea6434acef0b96da24dae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 3 11:35:33 2012 -0500
Windows: add buf_InvalidateBuffers
Add a utility function that invalidates all buffers for a
cm_scache_t object.
Change-Id: Ib10139fb2aefa03d597d5afd494652fade40432e
Reviewed-on: http://gerrit.openafs.org/6651
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 865f2442e682ff71b28a6b21363de8262f9e2bd1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 3 11:21:45 2012 -0500
Windows: fix cm_DirOpDelBuffer assert
In cm_DirOpDelBuffer() the data version field for a buffer
in cm_dirOp_t.buffers[] can be CM_BUF_VERSION_BAD if the buffer
was added to the buffer list but was never fetched from the file
server. If the buffer was recycled by buf_Get() an attempt to
remove an entry from the directory will be failed as opposed to
fetching the buffer from the file server and performing the local
removal.
Change-Id: Id9af5180f2176c2a90ef9907ae84139e66ffe5d6
Reviewed-on: http://gerrit.openafs.org/6650
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 25142a9c2db933607507ee20e20216c635465d6d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 3 11:17:40 2012 -0500
Windows: buffer DV ranges do not work for directories
In cm_MergeStatus, always set cm_scache_t.bufDataVersionLow
to the new data version because the cm_dir package does not
support version ranges. All modified dir buffers have their
dataVersion field set to the current data version value.
Failure to update the bufDataVersionLow field can result in
B+ Trees being constructed from out of date directory information.
Change-Id: Ic6bb6f78275de9c6c7960f2fc7c06c507b1144c1
Reviewed-on: http://gerrit.openafs.org/6649
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 09ab91bf9d27258c126411d4c80e5363118b7bba
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 3 11:16:04 2012 -0500
Windows: update btree debugging code
B+Tree key strings were changed to wchars for unicode support,
the debugging printf format patterns were not updated to match.
Do so now.
Change-Id: I70619d2e3fbc007f3f21eaf56cc5d61503203818
Reviewed-on: http://gerrit.openafs.org/6648
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4224dc5c281ffc2bf8dd34eadb76762304eece75
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Feb 3 11:14:50 2012 -0500
Windows: Do not open file if shutdown in progress
Perform the shutdown check earlier in AFSCommonCreate() to prevent
a request from being processed after the service indicates that
a shutdown has begun.
Change-Id: I8959141b5e2161ffe960e93a500b1153d9594a28
Reviewed-on: http://gerrit.openafs.org/6647
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 209df87d08fb07d9641b81858a0821b9fd95dbcc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 31 22:34:30 2012 -0500
Windows: AFSRedir DebugFlags Turn on BugCheck
Turn on bug checking by default via the installation.
This permits sites to disable the functionality but will allow
us to capture more meaningful minidump output.
Change-Id: I62b6d0ce5deed2c8798c9afb09565a8846c32a8c
Reviewed-on: http://gerrit.openafs.org/6646
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fe952116f3f0968e6c9f584297bafd3e8dd56903
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 31 15:51:34 2012 -0500
Windows: Improve AFSNotifyDelete
Do not call AFSNotifyDelete after the reference count on the
DirEntry->ObjectInformation is given up.
Log the Parent FID and file name since that is what are passed
to the service to perform a delete. Log the actual FID of the
object being deleted and not the address of the FID fields.
Change-Id: Ic02e2cec625258356d1b08e03a02a7a9c4eb4ce7
Reviewed-on: http://gerrit.openafs.org/6645
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9a1d7518b62f43586f4d228f9261adb0fac4f5a4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 31 15:49:22 2012 -0500
Windows: do not lower case direct volume references
Not all volumes are lower case. Do not lowercase the string.
Change-Id: Icb5f5ee9865bd856775486dffb1849f17f9b23f7
Reviewed-on: http://gerrit.openafs.org/6644
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ef63547e955edc60e2d074ef825b091e1c43882e
Author: Tom Keiser <tkeiser@sinenomine.net>
Date: Wed Feb 1 03:31:23 2012 -0500
com_err: correctly deal with lack of libintl
On machines lacking a libintl, _intlize() currently fails to initialize
the output error string--leading to tools (e.g., translate_et) returning
a null string; make afs_com_err fall back to returning the en/US canonical
error text when we don't have any i18n support...
Change-Id: I333745fb0a16e5bc9adb0755591d80de010d4d31
Reviewed-on: http://gerrit.openafs.org/6638
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 20e82cecd9008f9b3467c9a323c5c3abf27f3021
Author: Christof Hanke <christof.hanke@rzg.mpg.de>
Date: Sun Jan 29 18:08:57 2012 +0100
linux: fix probing for noop_fsync
Commit 267934d0e6910c8d8166a6e78f93c1bab40857b8 introduced
probing code to deal with the renameing of simple_fsync
inside the linux-kernel.
This test does not take different parameter-lists
for noop_fsync or simple_fsync resp. into account.
Fix this.
Change-Id: Ib490f0bb7e8098acc83fce001a43c08f478ad582
Reviewed-on: http://gerrit.openafs.org/6628
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 87049b873b08ddd2246c02cd66099940eae2b1fd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 29 16:46:22 2012 -0500
man-pages: add fs_getverify and fs_setverify
Add man pages for two new Windows only commands
fs getverify
fs setverify -verify {on, off}
Change-Id: Id784608fba35147a4e33f22e43c7cd50a2307b9e
Reviewed-on: http://gerrit.openafs.org/6632
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7b3f5df6dca09a15d56aae5c431a50529c119db2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 29 14:41:06 2012 -0500
Windows: do not panic if afsredir not ready during shutdown
Change-Id: I0de6ad0f799e2acf1c02c6d53cfd9b1b437328fc
Reviewed-on: http://gerrit.openafs.org/6630
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5e08628da2c24b40aeedebe0fef4e6ddd4690904
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 29 10:39:28 2012 -0500
Windows: Increase size of worker thread pools
The size of the afs redirector worker thread pools should be
made configurable but for now just increase the pool size to
be in parity with the default worker pool created by the
afsd service.
Change-Id: Ib3c9356783162620112041582fa3d9dbaf8fce37
Reviewed-on: http://gerrit.openafs.org/6627
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0f65600b675e641575efaf81a71db990cebbb7d3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 29 10:37:50 2012 -0500
Windows: Run Workers until empty task queue
Do not allow a worker thread to sleep until the task queue is
empty. It is better for the running thread to pick up and process
a task then to sleep this thread and wait for another one to wake
up to perform the work.
Change-Id: I776bb9408ab054b045acb9bc003b88436cc4266b
Reviewed-on: http://gerrit.openafs.org/6626
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 55af3387ef90053a10b012ffe7ae1ebee7575e01
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 29 00:22:03 2012 -0500
Windows: Release Notes for 1.7.5
Release notes updates for 1.7.5.
Change-Id: Ie44441150fc077cc4ca7924c67322a1aed4cb9af
Reviewed-on: http://gerrit.openafs.org/6624
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit de4d12dd5366bfddb6fde5bb050ce8fbaeb95f1a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 20 14:43:06 2012 -0500
Windows: Stop the thundering herd
The afs redirector used notification events to wake up worker
threads when a task was added to a work queue. Notification
events when signalled wake up all threads instead of just one.
Instead, use synchronization events to wake up a single thread at
a time and restructure the code to permit workers to wake up
additional workers if there is additional work to be performed
or during library shutdown.
Thanks to Peter Scott for his assistance.
Change-Id: I0fb9d8578035f606f03170622fc9c50a1dbfee3a
Reviewed-on: http://gerrit.openafs.org/6595
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1161d5fc3cde5e15cb2d13f01ff225710fc04766
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 25 11:27:39 2012 -0500
Windows: DriveSubstitution handle too small buffer
If the buffer passed to DriveSubstitution is too small the
resulting file path will end up being truncated. At the very
least log the fact that truncation is occurring. In addition
return the fact that truncation occurred to the caller.
In NPGetUniversalName allocate a 4K buffer on the heap instead
of calculating a buffer based on the local name buffer size.
The local name buffer size has no relationship with the required
buffer size for the expanded unc or device path.
FIXES 130548
Change-Id: I86fbb9db4aa6a438dbb5e793678ec52283d5546b
Reviewed-on: http://gerrit.openafs.org/6618
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3d10edc2d49e0e1c7a7a67c538a932347a91504c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 24 17:09:01 2012 -0500
Windows: Invalidate all volumes at library init
The afsredirlib.sys library driver is unloaded when the afsd_service
stops and is reloaded when the afsd_service restarts. During the
shutdown window any objects known to the kernel are preserved by
afsredir.sys. When the afsd_service restarts, there are no valid
callbacks on any objects so the afsredirlib.sys must invalidate all
status info to permit the service to request a callback from the
file server on next use.
Change-Id: I3e8fa9513f435ff5cd1a8cfb8daa766aa30dd8c1
Reviewed-on: http://gerrit.openafs.org/6617
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e44163a5470c6a9ff766641e4ce1ade6569cbadb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 24 12:52:12 2012 -0500
Windows: Refactor and consolidate afsredir invalidation
Invalidation requests were being processed in an inconsistent
manner because different rules were being applied to volume root
directories and other objects and whether or not the invalidation
was a whole volume invalidation or not.
This patchset consolidates all invalidation logic for an object
in the new AFSInvalidateObject function. AFSInvalidateObject
is then called from AFSInvalidateCache and AFSInvalidateVolume
as necessary.
AFSInvalidateVolume executes AFSInvalidateObject on all objects
in the volume object tree. As a result, whole volume invalidations
whether triggered by the file server or "fs flushvolume" now work.
Change-Id: I83f110b0987eb153794b6803a1fe48247090277f
Reviewed-on: http://gerrit.openafs.org/6616
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e0eb5405a8fab142be26375f8daa87621d20cbe9
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Jan 22 21:21:51 2012 -0500
vlserver: Consolidate VLDB entry server flag definitions
Group the definitions of server flags for VLDB entries in one place,
and rename VLSERVER_FLAG_UUID to make its name consistent with the
other flags.
This makes it easier to see the complete set of flags and avoid
conflicts.
Change-Id: I3b326e3d97bc297c0314cfc48f0a066c3ff0415e
Reviewed-on: http://gerrit.openafs.org/6615
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ca0fdd84a4311628b8310be66c62aaec51c86d4d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Nov 7 09:48:14 2011 +0000
viced: Remove the LWP fileserver
*) Remove all LWP specific code from the fileserver, and make pthread
the default
*) Build the pthreaded fileserver in the 'viced' directory, rather than
in tviced
*) Move the DAFS specific files from tviced to viced (arguably, these
should move into dviced, but there are currently no source files in
that directory)
*) Remove tviced from the build
Change-Id: I6e186c9fad6d9dccd04cf1317a80c087587ef25f
Reviewed-on: http://gerrit.openafs.org/5816
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 40bf6dee2409197f7494c3d09bf2dea7c248d185
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Jan 13 13:43:16 2012 -0500
vol: remove SYNC fatal_error processing
Currently SYNC clients will "disable" themselves on certain error
patterns. For example, if the server end closes its file descriptor
too many times, or takes too long and then closes the fd, the SYNC
client will return an error and set fatal_error. On any subsequent
SYNC requests, the request will immediately fail without contacting
the server, often making SYNC client programs effectively useless
until they are restarted.
There isn't really any reason to cause future requests to fail.
Transient problems in the fileserver can easily make this situation
possible (e.g. a fileserver can crash but still take several minutes
to close the SYNC fd while the core is written to disk), and so while
we may return an error for a specific problematic request, future
requests may be fine.
So, just remove everything related to fatal_error, so future SYNC
requests can continue to be attempted. Adjust some log messages to
reflect the new behavior.
Change-Id: I4b8bfe53f591a9e8541cd5a98c909208df5bcbac
Reviewed-on: http://gerrit.openafs.org/6548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cd1f72649650404581cfcdcf3beeeaf2bb960bd6
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Jan 12 16:48:54 2012 -0500
libafs: add replicated connection pool
keep pool of connections to use for replicated volumes,
so we can have a separate idle time setting
Change-Id: I61ed62c652c924b33fde920fac766c4ca0043826
Reviewed-on: http://gerrit.openafs.org/6546
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a9803ae643b070b8c805cf94b4ac3205ba8668b1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 15 11:43:40 2012 -0500
Windows: make lock reader history debug only
The lock reader history on osi_rwlock is proving to be too
expensive. Only use it for DEBUG builds. Leave the data
structures the same so that DEBUG builds can be mixed with
a RELEASE build of afsd_service.exe.
Change-Id: If0eeddb63c8f9919cdb5e119f31cde77974447b6
Reviewed-on: http://gerrit.openafs.org/6559
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit dfd0c2acc103cd2881bbfecd923c05012001e12a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 22 18:42:32 2012 -0500
Windows: store data verification mode
Over the lifetime of OpenAFS a number of bugs have been discovered
that can result in data corruption. This new mode (Windows only)
will double check that the data received by the file server does
in fact match the data that was written by the cache manager.
After a successful StoreData and status merge but before the BIOD
is released, a fetchdata is issued to read the data written by the
cache manager. If the data fails to match, the StoreData operation
is repeated.
Data verification mode can be queried with "fs getverify" and set
with "fs setverify {on, off}". The default value can be set with
the TransarcAFSDaemon\Parameters DWORD "VerifyData" registry value.
By default verification is disabled.
Change-Id: Ic99c1692e6e78790e65ae600c3e428a79df59370
Reviewed-on: http://gerrit.openafs.org/6601
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1474b4a739c60f96a8d2e38546778ab9572c138d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 22 18:38:49 2012 -0500
Windows: VIOC_GETUNIXMODE = smb_IoctlGetUnixMode
VIOC_GETUNIXMODE pioctl should execute smb_IoctlGetUnixMode not
smb_IoctlSetUnixMode.
Change-Id: Ia7dc3e1a82d7d14810f743f50ff7666f13ba8afc
Reviewed-on: http://gerrit.openafs.org/6600
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 898930fc3ca81a5e5dde31967c00cdf5f4734ffa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 22 18:37:14 2012 -0500
Windows: fix fs setcrypt help message
Options are on, auth, and off.
Change-Id: I671df4233801f39482b8cac096e89fa38955a852
Reviewed-on: http://gerrit.openafs.org/6599
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 111de76ea8dac713247c99ebe2182ae16cc0a3c0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 22 18:33:43 2012 -0500
Windows; release BIOD after status merge
Releasing the BIOD permits the accumulated buffers to be accessed.
Releasing the BIOD before the cm_MergeStatus() call creates a
window where the buffer data version is larger than the cm_scache
data version. Release the BIOD after the status merge.
Change-Id: I023413cd41fbbd2d844d79a3b29c087792fffa24
Reviewed-on: http://gerrit.openafs.org/6598
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 05f3a0d1e0359f604cc6162708f3f381eabcd1d7
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Jan 5 17:19:45 2012 -0500
viced: disable rx keepalives during disk io
when we are going to hit the backend storage, disable keepalives.
the net effect of this is that no idle dead time is needed; instead,
the normal dead time will result in a connection with no activity
simply dying naturally if i/o blocks forever.
it's important that keepalives be enabled during callback breaks,
so that is done.
Change-Id: I1a7bfe0bc62a092ca7dd6dbc4710f1b8254ca9a1
Reviewed-on: http://gerrit.openafs.org/6515
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6e85044efe1305cec56a2589e096eca7d8a1053a
Author: Jeffrey Altman <jaltman@secure-endpoints.com>
Date: Fri Jan 20 20:10:51 2012 -0800
Revert "Windows: disable memory extent interface"
This reverts commit 503bc56403baf741a4a7056a4077edc43812b9d1
Change-Id: I9e40787ecd0833370a86486fab6644667e03aa3b
Reviewed-on: http://gerrit.openafs.org/6603
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 44261b25648a419abbc61b2a9d2d3f0373428080
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Oct 4 17:35:18 2011 -0400
viced: remove FS_STATS_DETAILED
FS_STATS_DETAILED has been unconditionally defined since the IBM days.
Adjust the code to assume it is set.
Change-Id: If7fb913bbb42dba5d749e7c30b8d9b7d81e4b4f8
Reviewed-on: http://gerrit.openafs.org/5550
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9056d09887c84a480e0a9ee3457a9469fbb97064
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 17 19:46:30 2012 -0500
Windows: failover and retry for VBUSY
When a file server returns the VBUSY error for an RPC the
cache manager records the 'srv_busy' state in the cm_serverRef_t
structure binding that file server to the active cm_volume_t
object. The 'srv_busy' was never cleared which prevents the
volume from being accessed.
Clear the 'srv_busy' flag whenever cm_Analyze() receives a
CM_ERROR_ALLBUSY error which means that all replicas have
been tried or whenever the error is not VBUSY or VRESTARTING.
FIXES 130537
Change-Id: I5020198e4f0ded1df0f64e228e699852f9de7c4d
Reviewed-on: http://gerrit.openafs.org/6563
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f768fb95f3eb3815d6225e074c43341ed2ad5347
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 25 09:28:18 2011 -0500
Windows: improved idle dead time handling
RX_CALL_IDLE has been treated the same as RX_CALL_DEAD which is
a fatal error that results in the server being marked down. This
is not the appropriate behavior for an idle dead timeout error
which should not result in servers being marked down.
Idle dead timeouts are locally generated and are an indication
that the server:
a. is severely overloaded and cannot process all
incoming requests in a timely fashion.
b. has a partition whose underlying disk (or iSCSI, etc) is
failing and all I/O requests on that device are blocking.
c. has a large number of threads blocking on a single vnode
and cannot process requests for other vnodes as a result.
d. is malicious.
RX_CALL_IDLE is distinct from RX_DEAD_CALL in that idle dead timeout
handling should permit failover to replicas when they exist in a
timely fashion but in the non-replica case should not be triggered
until the hard dead timeout. If the request cannot be retried, it
should fail with an I/O error. The client should not retry a request
to the same server as a result of an idle dead timeout.
In addition, RX_CALL_IDLE indicates that the client has abandoned
the call but the server has not. Therefore, the client cannot determine
whether or not the RPC will eventually succeed and it must discard
any status information it has about the object of the RPC if the
RPC could have altered the object state upon success.
This patchset splits the RX_CALL_DEAD processing in cm_Analyze() to
clarify that only RX_CALL_DEAD errors result in the server being marked
down. Since Rx idle dead timeout processing is per connection and
idle dead timeouts must differ depending upon whether or not replica
sites exist, cm_ConnBy*() are extended to select a connection based
upon whether or not replica sites exist. A separate connection object
is used for RPCs to replicated objects as compared to RPCs to non-replicated
objects (volumes or vldb).
For non-replica connections the idle dead timeout is set to the hard
dead timeout. For replica connections the idle dead timeout is set
to the configured idle dead timeout.
Idle dead timeout events and whether or not a retry was triggered
are logged to the Windows Event Log.
cm_Analyze() is given a new 'storeOp' parameter which is non-zero
when the execute RPC could modify the data on the file server.
Change-Id: Idef696b15a8161335aa48907c15a4dc37f918bdb
Reviewed-on: http://gerrit.openafs.org/6118
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c7673f4fad8e8b9390564e3cbfa11d5f1b52ba2f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 28 12:58:02 2011 -0500
rx: RX_CALL_IDLE and RX_CALL_BUSY
Allocate new Rx error codes for Idle and Busy calls but do not
send these errors on the wire. They are only intended for local
use.
RX_CALL_IDLE is an indication to an application that requests it
that the rx peer is maintaining an open call channel but has not
sent any actual data for the length of the registered idle dead
timeout.
RX_CALL_BUSY is an indication to an application that requests it
that the rx peer believes the selected call channel is in use by
a pre-existing call.
When either RX_CALL_IDLE or RX_CALL_BUSY are assigned as the call
error and an abort must be sent to the rx peer, the errors are
translated to RX_CALL_TIMEOUT. This is necessary because it is
not possible to add new Rx error values in a method that is safe
for peers that are not expecting them.
This patchset also documents which Rx errors defined in rx.h are
used on the wire and which are not.
The Unix and Windows cache managers are updated to build with
these new error codes.
Change-Id: Ib236f27b88d503c68134534bb069e12dd83537d8
Reviewed-on: http://gerrit.openafs.org/6128
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f6828bd9f158870002e8eeeb2325a40eb7ca5041
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Jan 18 18:42:19 2012 -0700
Windows Asynchronous purging of file content after a DV change
Purge all regions of the file surrounding the extents which are to be
purged. If a failure occurs on the purge due to an existing mapping, flag
for purge during handle close
Change-Id: Id8ef81afaa614ea08e03bbd55ec2cdded0d7139f
Reviewed-on: http://gerrit.openafs.org/6573
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 22cba8e9702f3673c335bf834a9ee2c5e5fd9b6e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 19 15:25:44 2012 -0500
Windows: cm_buf refcnt must hold buf_globalLock
An assertion in buf_Recycle() was being triggered when a cm_buf_t
object was supposed to be in the free buffer list but wasn't.
buf_Recycle() was racing with another thread. The test for
refCount == 0 was performed while holding the buf_globalLock
exclusively but the InterlockedDecrement(refCount) in buf_Release()
was performed without holding buf_globalLock at all. buf_globalLOck
must be held at least as a read lock. Otherwise, the refCount can
reach 0 prior to the thread blocking for exclusive access to the
buf_globalLock. This provides buf_Recycle() which is holding
buf_globalLock the opportunity to race.
The solution is to make sure that buf_Release() always holds
buf_globalLock as a read lock and then use buf_ReleaseLocked()
to perform the actual decrement and test.
Change-Id: Ieb67548a7e44fa5f06f9346f428b1edadfc80696
Reviewed-on: http://gerrit.openafs.org/6576
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 201c954a36fe6ec19f96e4c8e24e6e080c3ba55a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 19 01:21:02 2012 -0500
Windows: Redesign daemon thread queue management
The daemon thread worker pool has some very poor properties.
The threads spend a significant amount of time polling for
ready to process tasks because so frequently a store/fetch data
request is accompanied by many other requests for the same FID
that would block.
Lets try a new approach. Create one queue for each worker thread
and assign the tasks to a thread by a hash of the FID. This ensures
that all tasks for a single FID are serialized and prevents multiple
threads from attempting to perform the same task only to decide that
the thread would be forced to block.
Change-Id: I1d00ba0df1aa646e05b2cb3cb0796629f2e6d233
Reviewed-on: http://gerrit.openafs.org/6575
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit afeb3c3a83ed0869e4a70b0725e3f85713330c3a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 17 19:43:54 2012 -0500
Windows: prevent race assigning Fcb in AFSInitFcb()
AFSInitFcb() is executed when the ObjectInformation->Fcb pointer
is NULL. More than one thread can make that determination at the
same time. Use InterlockedCompareExchangePointer() to detect
a race and permit cleanup to be performed.
Remove the output parameter of AFSInitFcb() to avoid a double
assignment.
Change-Id: I3870cccd5cd5e95134446523cce3547a2135d5e3
Reviewed-on: http://gerrit.openafs.org/6562
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 503d09413add1831dff5db24ee907eec59eda9e2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jan 14 10:32:51 2012 -0500
Windows: cm_EndCallbackGrantingCall refactoring
Refactor cm_EndCallbackGrantingCall to prevent assigning a
callback to the cm_scache object in the case where it is going
to be discarded. If the race was lost the callback data was
already discarded by cm_RevokeCallback. By assigning and then
discarding we are forced to issue an additional change notification
to the smb client or afs redirector. Not only is this extra work
but the afs redirector notification can result in a deadlock with
a kernel thread that is waiting for the current thread to complete.
modify the function signature to return whether or not a race
was lost with a callback revocation.
rename 'freeFlag' to 'freeRacingRevokes' since that is what
the flag is meant to indicate.
create a new 'freeServer' flag to indicate when the server
reference should be released. There was a leak of server
references when a race occurred.
modify all calls to cm_EndCallbackGrantingCall() that provide
an AFSCallBack structure on input to check for a lost race.
If a race occurs, cm_MergeStatus() should not be performed.
Change-Id: Ib17091ed51a24826bf84d33235125b3ccbbe47d4
Reviewed-on: http://gerrit.openafs.org/6556
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d9884a480c96d14a3e5a6b08cde5e5003d7a4694
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Jan 15 11:08:23 2012 -0500
Windows: deadlock bet. DirEntry lock + DirectoryNodeHdr.TreeLock
The DirectoryNodeHdr.TreeLock must be obtained before the
DirEntry->NonPaged->Lock. In AFSLocateNameEntry(), the
DirEntry lock is obtained before the TreeLock when processing
a symlink object. For that case obtain the TreeLOCK first.
Drop it if it is not required.
Change-Id: I5b73f98b4bc7fcd5c02b8f255fa2423b52eb4a4d
Reviewed-on: http://gerrit.openafs.org/6558
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2fa7f36f74adc9a40a6b7c7ac5b5ea528733e0dc
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Jan 18 12:04:29 2012 -0700
Windows: Correctly mark extents dirty when using the non-persistent AFS
cache
Change-Id: I9e03264bb94fe6494f1ca3721e4d7c7faf469fb5
Reviewed-on: http://gerrit.openafs.org/6571
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3cf5064c91af5efb5e2be80fb59db43b674d467a
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Jan 11 06:49:23 2012 -0700
Windows: Performing async work after cache invalidation
The code now queues a work item to perform additional work on extent
processing after a cache invalidation has occurred. This additional work
involves walking the current list of extents and purging/flushing regions of
the system cache based upon the current state of the extent.
Additional changes to filter which invlidation events result in a queued
worker to perform asynchronous work.
Change-Id: I72e4e0bac2caf69e41a095ce8fc4c2e083702b5c
Reviewed-on: http://gerrit.openafs.org/6528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6fda61ba2e2290dac818b42440fac1346d05b73d
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 18 10:06:36 2012 -0500
Parallel build fixes
Assorted fixes for issues seen with parallel builds:
- bucoord must depend on butm, since it uses libbutm
- for most object files in roken and hcrypto, headers must be installed
before building
- remove rules with 2 targets in rxkad and ubik
- budb: add dependencies for db_dump.o
Change-Id: Ide05f223c2f1fe53bff33cb03011ca47bf741c80
Reviewed-on: http://gerrit.openafs.org/6568
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit beafc7f742ebad021bfcbed73884aecedee4e04b
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 18 11:22:35 2012 -0500
Linux 3.3: use umode_t for mkdir and create inode ops
The mkdir and create inode operations have switched to using
umode_t instead of int for the file mode.
Change-Id: Ib8bbf6eaa6e87d6a9692c45b1a3fe93fcc3eff7a
Reviewed-on: http://gerrit.openafs.org/6567
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 64bd0b728ca95ba7bb4f1fdd909386fde3ce81e1
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 18 10:25:03 2012 -0500
Linux: use standard macro for set_nlink configure test
A generic macro exists to test for functions in the kernel, use
it for set_nlink.
Change-Id: Iaec2b29e48f500bcf7a1ef80a3f2a1305e5dbb8f
Reviewed-on: http://gerrit.openafs.org/6566
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 60df98806b1aaf6ea4ba8f089faf8e9247b2fba5
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jan 17 16:08:56 2012 -0500
volinfo: fix formating of placeholder printfs
needed to placate gcc-llvm on lion
Change-Id: Ie15e4768d2e3feb7ad80dfef05395f2c4a227c0f
Reviewed-on: http://gerrit.openafs.org/6565
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6ad3d646e62801cb81a3c9efeac320daa44936e1
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Tue Jan 17 20:19:54 2012 -0500
rx: Correctly test for end of call queue
The intention of this condition is to check if the current call
being considered is the last one on the queue, but the test is
incorrect. A null next pointer indicates a removed item, not
the end of the queue.
Use the queue_IsLast macro instead to correctly determine that
this is the last item in the queue and that a call has to be
selected, either the current one or a previously seen good choice.
This can cause calls to get permanently stuck in the call queue
and never get assigned to a thread, even when all threads are
idle.
Change-Id: Ie44a45734ab25bd3d2be3635c2e8f05857ca935e
Reviewed-on: http://gerrit.openafs.org/6564
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 20151a869911a98f0938d74ae6096f3308d7ec01
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jan 14 10:44:56 2012 -0500
Windows: disable memory extent interface
There have been reports that the memory extent interface which
is used when NonPersistentCache is active can lead to data corruption.
Change-Id: I3a8acae0648a67534e46c73ef1dcbf7f939a558d
Reviewed-on: http://gerrit.openafs.org/6557
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 69196e41ec9c5a6ce8efd370fb8582f66667bcf7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Jan 14 10:31:01 2012 -0500
Windows: restrict service to 2 cpus by default
Performance drops off considerably when the number of processors
increases due to lock contention and the cm_SyncOp wait processing.
If the MaxCPUs registry value is not set, limit ourselves to two.
Setting MaxCPUs to zero permits use of all CPUs.
Change-Id: I4bae328ed589811b0ea2a514501a0c1aa74e8015
Reviewed-on: http://gerrit.openafs.org/6555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7ae2c0df3373bdce129694efaf8d0097bab606da
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 13 23:58:50 2012 -0500
Windows: AFS_SERVER_FLUSH_DELAY AFS_SERVER_PURGE_DELAY
Alter the flush delay to 5 seconds from 30 seconds
Alter the purge delay to 300 seconds from 5 seconds
Change-Id: I3f8e79d84582c4015e35d58cf1bedc9a023c0d73
Reviewed-on: http://gerrit.openafs.org/6554
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f549911027417cdb4fbacfc8deaa8bd664d1651f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 13 23:57:10 2012 -0500
Windows: AFSParseName edge cases
If the input path is \afs\ behave as if the path is \afs.
If the input path is \afs\*\ detect the wildcard and return
STATUS_OBJECT_NAME_INVALID.
Change-Id: I0ef4f30fb3b6245a52160b5e7f9233bc5f599485
Reviewed-on: http://gerrit.openafs.org/6553
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 96b9900d306645bb79d631250e3d740f163a2b40
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Jan 13 19:32:16 2012 -0500
Windows: afs root is always a directory
If the root is opened with the FILE_NON_DIRECTORY_FILE option,
fail the request with STATUS_FILE_IS_A_DIRECTORY.
Change-Id: Ic7d29f9032c2a19617276138833938fcf304838e
Reviewed-on: http://gerrit.openafs.org/6552
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7fd67cb2899368ff091c9fca8b3ad82ac9cf004b
Author: Ken Dreyer <kdreyer@usgs.gov>
Date: Mon Jan 16 16:04:14 2012 -0700
fix spelling in comments
Change-Id: I4b4558833825295bbd16134cbd403a87b1c7b14c
Reviewed-on: http://gerrit.openafs.org/6561
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fda2fe8538e00baddcd7fcf2c669162634b9d14e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jan 11 10:28:56 2012 -0500
DAFS: Fix SYNC_FAILED VScheduleSalvage_r log
SYNC_FAILED is not an unknown protocol code, so stop saying it is.
Change-Id: I87ce896fe061e6b5bfd3efdbb442281682a3e652
Reviewed-on: http://gerrit.openafs.org/6530
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 627cfb1d4e7b32b4342c59b162a36ba9beb8a066
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Jan 11 10:00:35 2012 -0500
vol: Fix VCreateVolume special inode cleanup
In order to dec the relevant special inodes, we need to know the
parent vol id in addition to the vol id itself. Use the appropriate
volume IDs when IH_DEC'ing special inodes after we fail to create the
volume, so we don't leave behind special inodes.
Change-Id: I77cfafac80c49debf46c86faefadd2a586d6f06b
Reviewed-on: http://gerrit.openafs.org/6529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e77b6858ee889ec9e4e3fe3bb62c23b1c1f5727f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 21:10:32 2012 -0500
Windows: dir buffers out of date - mark them as such
if cm_CheckForSingleDirChange() fails, mark the cm_scache_t
bufDataVersionLow as the current data version so that old directory
buffers are discarded.
Change-Id: I8d587a024027e74e66190fdc993564b640993b4c
Reviewed-on: http://gerrit.openafs.org/6498
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7a25010a6e1719fc056b7367893c24267334978e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Jan 5 11:52:00 2012 -0500
Windows: Avoid file server rpcs on deleted files
If a file has been deleted, do not attempt to issue RPCs
to the file server in response to AFS redirector extent processing.
All RPCs will fail with VNOVNODE which will in turn trigger invalidation
requests to the AFS redirector which can deadlock.
Change-Id: I85b6b4a0ce619e54df648163392be93761f709f0
Reviewed-on: http://gerrit.openafs.org/6514
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cde0539f79b54dc3c4aa496be16b89a5e6a3654c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 4 12:13:40 2012 -0500
Windows: use local var for interlocked result
Save the result of the interlocked operations for use in
debug logging. Do not reference the incremented or decremented
object in the log messages, it may have changed.
Local assignment is provided even in functions that are currently
not logging to assist with debugging and as a reminder to use
the result variable in future log messages.
Change-Id: Ia7ed8bf14b204b265e1db7713b96864634a731d7
Reviewed-on: http://gerrit.openafs.org/6508
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6185532db58692e58fca035a7b89767523d33225
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 4 01:10:37 2012 -0500
Windows: AFSParseMountPointTarget buffer overrun
When parsing the AFS mount point string do not overrun
the buffer if the colon cell/volume separator is not
found.
Change-Id: Id7275cc8815223730f7c39bd11a6f495beb117c4
Reviewed-on: http://gerrit.openafs.org/6507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ba4f5afc9c68f74587c7a9669571c2c32cb7a13b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 4 00:02:42 2012 -0500
Windows: Directory Enumeration, DVs, and TreeLocks
Hold the TreeLock exclusively across all operations that
enumerate, validate, or otherwise manipulate directory tree
lists or data versions.
Take the data version into account when deciding what to do
with directory data. If a directory enumeration takes more
than one request to service and the DV has changed from the
time the directory snapshop was taken by the service and the
enumeration completion, merge in the changes and then mark
the directory as requiring verification.
If a directory change operation completes (create, rename, remove)
and the directory DV has changed by more than one force a full
directory verification.
Set the directory data version to -1 whenever a directory
verification is required. Otherwise, the check to clear the
VERIFY flag will only update the metadata for the directory.
During a directory verification, if a new entry has been discovered
it is added to the directory. Make sure the VALID flag is set so
that the entry will not immediately be removed as invalid.
Change-Id: I6be8d00126fccf88bde8ae5f97e850dfb9a2f60f
Reviewed-on: http://gerrit.openafs.org/6460
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9783384af764fae23eb34cb26193cc295ee1a185
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Jan 4 00:01:09 2012 -0500
Windows: correct log messages in AFSCleanup
Change-Id: I1e202547d82195f85e6de20e72f6b07c6c7475ba
Reviewed-on: http://gerrit.openafs.org/6506
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit bd09d06c3f5bb81023b438e43c4b9b49d663bb34
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 23:58:04 2012 -0500
Windows: Return Dir Data Version from AFSCleanup
This patchset returns the directory data version from AFSCleanup().
It does not do anything with it.
Change-Id: I86ac37f9e237bfec3ea612b896bec4ed7d43d068
Reviewed-on: http://gerrit.openafs.org/6505
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d2f9f8fa05b5b07965c8001d7b716da4ba486d83
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 23:43:30 2012 -0500
Windows: reorg open handle counts and Fcb->NPFcb->Resource
Reorganize when open handle counts are decremented in order
to avoid a race with worker threads performing garbage collection.
Change-Id: I07c1c5e80fad48cd3439dbc9c85bd6dff9b9bf44
Reviewed-on: http://gerrit.openafs.org/6504
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e28d77fc4b3b6e5a93e5518d28c241eb9767d863
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 23:39:53 2012 -0500
Windows: Permit renames of open files
AFS does not impose a restriction on renames of open files.
Failure to permit the rename can cause problems if an anti-malware
service opens the file immediately after the application performing
the rename does so.
Change-Id: Ib23a6a893c5c575e89b8a817faec4c11300a04b7
Reviewed-on: http://gerrit.openafs.org/6503
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b92a676517084432c64e1ccb1efff59e7bcbe088
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 23:36:50 2012 -0500
Windows: Do not prime the service directory cache
Performing a directory enumeration is an expensive operation
that we should be attempting to avoid. The current directory
enumeration and evaluate target requests will use inline bulk
status RPCs to the file server which obtain status for 49 items
at a time from a single directory.
Change-Id: I78e08680fec9715c3c446d0c4c5226cd79db80bd
Reviewed-on: http://gerrit.openafs.org/6502
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6ee54eb3821b70a51cfde8096f2d50d46ead1b8a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 23:35:51 2012 -0500
Windows: More specific error values
When a mount point, symlink, or dfslink cannot be resolved
return STATUS_REPARSE_POINT_NOT_RESOLVED.
When an operation fails because the volume is readonly, return
STATUS_MEDIA_WRITE_PROTECTED.
Change-Id: Ib35f0d7851c087bf8aa25d4b0138ee72fb6f3c68
Reviewed-on: http://gerrit.openafs.org/6501
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e5a2f955c782ee46d1b24671fd0bac555e11d1a8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Jan 3 23:12:34 2012 -0500
Windows: do not flush dirty extents without permission
When closing file handles, do not permit dirty extents to be
released back to the service if the current handle (Ccb) does
not have write permission. The cleanup operation will fail with
STATUS_ACCESS_DENIED, the extents will be released and all of the
dirty data will be discarded.
Change-Id: Iceacf5319147d1bd6277ea160bc67d91f1a49d5b
Reviewed-on: http://gerrit.openafs.org/6500
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 22005aae24006dbe9ed9169c82d09ecfb032438d
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Jan 8 21:02:04 2012 -0500
opr: fix generated target
we need opr for comerr, but we don't want it after. build,
then clean up.
Change-Id: I621f36bc5f6db85720b73b33578975d0dd126a18
Reviewed-on: http://gerrit.openafs.org/6525
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 2caf0778ddeb6eeb854360cac20c6b3f0894f3eb
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Fri Jan 6 17:22:35 2012 -0500
libuafs: only rebuild h directory when needed
A few changes to allow a "make all ; sudo make install ; make all..."
workflow to work without manually removing files in between.
Make the rebuilding of the h directory dependent on the source
files scanned to build it. This prevents it from being rebuilt
for every "make install".
While we're here, use -f when removing linktest for the clean target.
This allows "make clean" to remove it without prompting when the user
doesn't have write access to the file, as is the case when make install
rebuilds it as root.
Change-Id: I45b34ad41560ef8c905e6be4201fa438a3cc7bc3
Reviewed-on: http://gerrit.openafs.org/6519
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 80a2e6ed74c9bc1634f2aca76ee69fd81fcbb386
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Jan 7 15:40:42 2012 -0500
opr: add buildtools target
opr needs a buildtools target for "make generated". Make it install
the headers, which are needed by the other generated targets.
Change-Id: I34faa81fa84407c5e6e1460dc765d0c2ce1ef3e8
Reviewed-on: http://gerrit.openafs.org/6523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 967d7201ee5c27db6d75d5efafcad9458e2b5167
Author: Andrew Deason <adeason@sinenomine.net>
Date: Sun Jan 8 11:31:39 2012 -0500
Make libjafs buildable again
libjafs is surprisingly close to being buildable. Fix a few misc
things which have bitrotted over the years so it is possible to
actually build:
- Add -I$SRC/config to the cflags, so we can include afsconfig.h
- Remove references to the nonexistant rxkstats.o
- Do not link with UAFS' AFS_component_version_number.o, since this
gives us duplicate version number symbols
- Include afs_vosAdmin.h in Group.c, to satisfy some missing symbols
Change-Id: Ie8da88872288073d080a58ed7fe8c8b52052488e
Reviewed-on: http://gerrit.openafs.org/6524
Reviewed-by: Steven Jenkins <steven@synaptian.com>
Tested-by: Steven Jenkins <steven@synaptian.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9620b67c138797e815621f0254cf15d0de504121
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Jan 4 15:04:41 2012 -0500
afs: discard cached state when we are unsure of validity
in the event we got a network error, we don't know if the server
completed (or will complete) our operation. we can assume nothing.
a more complicated version of this could attempt to verify that the
state is what we expect it to be, but in extended callbacks universe
this is potentially easier to solve anyway. for now, return the
error to the caller, and mark the vcache unstat'd.
Change-Id: Iafb67f24b89d78b8236660d047da12fce1dd6061
Reviewed-on: http://gerrit.openafs.org/6510
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit a12527c87a6f9e476861abbf18b9af84cef0db04
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Jan 6 06:33:22 2012 -0500
afs: put back conn if not using in checkserver loop
we get a conn, check it for eligibility, and if not,
just abandon it. "oops"
Change-Id: Ie3841c19b05a87fb225c3e8124cd485cba3c3648
Reviewed-on: http://gerrit.openafs.org/6516
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 2a31f35936698c504c863702ebb675ac9dfe47e1
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Jan 6 06:53:46 2012 -0500
rx: add and export a public keepalive toggle
make enabling and disabling keepalives a public function.
export the function
Change-Id: Ia553d91488511edc0b483d95326f14ac0e315332
Reviewed-on: http://gerrit.openafs.org/6517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d6876d3d8c7888cb9ef8efc9971e24259adf025a
Author: Chaskiel Grundman <cg2v@andrew.cmu.edu>
Date: Thu Dec 29 13:06:31 2011 -0500
Make src/opr objdir safe
Update the Makefile for src/opr to use $? to reference headers, so objdir
builds work correctly
Change-Id: I3d8e0d885715a1d1bc1578f4e8ce69fe4239bb56
Reviewed-on: http://gerrit.openafs.org/6444
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0f4da13137612a9b0c0c3b57aa939d6661fb67f8
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Jan 3 15:57:14 2012 -0500
afs: increase idledead time
it's actually important this be more than the rx call dead time
so timing out server callbacks to clients don't result in us idle deading
a call to the server when callbacks need to be broken
FIXES 130327
Change-Id: Ibe2468edb61f307da9174d2c51cb0ea61c118c56
Reviewed-on: http://gerrit.openafs.org/6497
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 38b74b34d2d370030f0e1abf835cfefefeaa0de2
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Jan 4 13:21:43 2012 -0500
ukernel: enable nat ping again
if we're not root, no nat ping at all. fix that.
Change-Id: I7ea4db77b30ba639921b11c4ccad35a2e14133b4
Reviewed-on: http://gerrit.openafs.org/6509
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e3c8bd457476ddd83a0e483a24fb08c436cf4aac
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Jan 4 21:44:30 2012 +0000
afs: Negate codes using a clear, standard method
The bulk of our code uses 'code = -code' to negate an error code.
Use this, rather than 'code *= -1', as the latter form makes my
head hurt.
Change-Id: I578fbd7c123c37d89ceb1a6373409feb8b619d86
Reviewed-on: http://gerrit.openafs.org/6511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 52944ff61a455770da451b551ffa0ae10c19ea2e
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 4 19:27:18 2012 -0500
Use offsetof() in set_header_word to get field offset
Use offsetof() to replace a few instances where the same logic is
open coded in set_header_word and inc_header_word macros. In cases
where the field name involves a variable as an index to an array,
newer gcc gives a sequence point warning.
Change-Id: I43e3d6ef6a63b51003496a1beb72c445a9109615
Reviewed-on: http://gerrit.openafs.org/6513
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d4fba5f92db18d77c1fab20af3815637c132bc6f
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Jan 4 18:49:32 2012 -0500
vol: initialize readmeinode
Newer gcc complains about readmeinode being potentially used
uninitialized. Doesn't look possible in the code, but initialize
it to quiet the warning.
Change-Id: I7172475a64a3bfb90a76c0266d7812d5d42a2c4c
Reviewed-on: http://gerrit.openafs.org/6512
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit faa58c9f60a158481bdfee27e175a37c5fcd64aa
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Dec 14 12:52:51 2011 -0500
Unix CM: reset blacklist on hard-mount retry
Reset black-listed servers on a request when retrying due to a
hard-mount retry. When hard-mounts are in effect, a request may
retry indefinitely. If all the servers have been black-listed
due to a transient error, the request may never complete.
Change-Id: I2510f729cbbb21836b139c94e25867118a6ad873
Reviewed-on: http://gerrit.openafs.org/6330
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 8e15e16c9e6a5768f31976cc21b48d5bb10617b7
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Nov 18 10:25:08 2011 -0600
DAFS: Atomically re-hash vnode in VGetFreeVnode_r
VGetFreeVnode_r pulls a vnode off of the vnode LRU, and removes the
vnode from the vnode hash table. In DAFS, we may drop the volume glock
immediately afterwards in order to close the ihandle for the old vnode
structure.
While we have the glock dropped, another thread may try to
VLookupVnode for the new vnode we are creating, find that it is not
hashed, and call VGetFreeVnode_r itself. This can result in two
threads having two separate copies of the same vnode, which bypasses
any mutual exclusion ensured by per-vnode locks, since they will lock
their own version of the vnode. This can result in a variety of
different problems where two threads try to write to the same vnode at
the same time. One example is calling CopyOnWrite on the same file in
parallel, which can cause link undercounts, writes to the wrong vnode
tag, and other CoW-related errors.
To prevent all this, make VGetFreeVnode_r atomically remove the old
vnode structure from the relevant hashes, and add it to the new hashes
before dropping the glock. This ensures that any other thread trying
to load the same vnode will see the new vnode in the hash table,
though it will not yet be valid until the vnode is loaded.
Note that this only solves this race for DAFS. For non-DAFS, the vol
glock is held over the ihandle close, so this race does not exist.
The comments around the callers of VGetFreeVnode_r indicate that
similar extant races exist here for non-DAFS, but they are unsolvable
without significant DAFS-like changes to the vnode package.
Change-Id: I84c5d1bdd29f9e7140e905388b4b65629932c951
Reviewed-on: http://gerrit.openafs.org/6385
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7461fa11939556d3b6f3ea38da7ff65607805579
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Dec 26 21:22:08 2011 -0500
afs: Grab a reference to setp in afs_icl_Event4
We can drop GLOCK in several places in afs_icl_Event4 and the
afs_icl_AppendRecord callee. To ensure that the given afs_icl_set does
not get freed while we have GLOCK dropped, grab a reference to the
set.
Thanks to Ryan C. Underwood for reporting an issue triggered by this.
Change-Id: Ifeda229b444abd75b0f22c7acf18a7553d833964
Reviewed-on: http://gerrit.openafs.org/6431
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 267934d0e6910c8d8166a6e78f93c1bab40857b8
Author: Geoffrey Thomas <geofft@ldpreload.com>
Date: Sat Dec 31 19:51:29 2011 -0500
linux: fsync on a directory should return 0, not EINVAL
Directory writes are synchronous, so this is fine. There's a
mostly-convenient function in fs/libfs.c that returns 0 that we can use
to do what we want ("mostly" because it was renamed in 2.6.35).
FIXES 130425
Change-Id: I9a2af60ed3152be036f0145c94152d8cff2e1242
Reviewed-on: http://gerrit.openafs.org/6491
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit dee93ff1d114da711df345e06b5e1a682c877315
Author: Geoffrey Thomas <geofft@mit.edu>
Date: Sun Dec 11 05:06:24 2011 -0500
rpm: Don't attempt to restart on upgrade when using systemd
systemd is actually rather capable of leaving the OpenAFS client in an
incredibly broken state, thanks to its willingness to track services and
kill their processes. We should not attempt to restart the client on
upgrade, whether a normal upgrade or a migration from SysV initscripts.
In the former case, it's fine (and correct) for the old AFS to keep
running; in the latter case, the unit file is capable of correctly
shutting down an initscript-launched client. The same is true for the
OpenAFS server.
This brings the packaging in line with the SysV initscript code in the
specfile, which does not attempt to restart the service, as well as with
e.g. Debian's packaging, which uses --no-restart-on-upgrade.
While we're here, clean up a redundant BuildRequires on systemd-units.
Change-Id: I3b1771a7246f04be0e82765976664c50e0adae47
Reviewed-on: http://gerrit.openafs.org/6247
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit af08b745117899d116d4ee14e08e1184369f591f
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Thu Dec 29 17:23:32 2011 -0700
Windows: Support correct status codes from service
When performing object verification, check for status failures corresponding
to parent object issues which require a validation of the parent
Change-Id: I4a73b55961eda62079c933f9e85888ea24b39f1f
Reviewed-on: http://gerrit.openafs.org/6447
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 52c3bace5ac4c93883d4913933a58573abded3e9
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Thu Dec 29 17:30:45 2011 -0700
Windows: Handle invalid node types
In the case where the direntry data is invalid, construct an Fcb
of type INVALID so that the direntry can be displayed and the objected
deleted even if it cannot be evaluated.
Change-Id: I37da154b7429929fe833874c7cd048a3a804a96f
Reviewed-on: http://gerrit.openafs.org/6445
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ac56cd9e6182742e0b586ea8d833e4c7346e03b8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 21:45:54 2011 -0500
Windows: AFSFileUpdateResultCB ParentDataVersion
Add the parent directory data version to the AFSFileUpdateResultCB
structure.
Change-Id: Ia1b1345c410ff216b35f3d42912ac921b978a299
Reviewed-on: http://gerrit.openafs.org/6459
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 85f4971f850c0110915ba862922c1536ebe506c2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 20:09:06 2011 -0500
Windows: renames that overwrite existing target
The Windows client up to this point has never correctly implemented
directory renames. For the longest time it assumed that the file
server would not replace a pre-existing target. As a result, when
the target name was already in use the contents of the directory
would end up with the target name existing but its previous file id
associated with it.
A second problem was that lookups for the source and target names
were not performed while the directory (or directories) were exclusively
held to ensure that competing changes could not occur.
This patchset corrects both issues in cm_Rename() and adjusts the
redirector interface to match the new behavior.
Change-Id: I4f5cff7debcf9925947ac3fc6931565acb57ebd9
Reviewed-on: http://gerrit.openafs.org/6457
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d64983bab047ad6349d2edfe2ffa35b484529889
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 01:34:51 2011 -0500
Windows: AFSDirEnumResp and AFSDirEnumEntry changes
A directory enumeration is not an atomic operation. The redirector
reads an enumeration a chunk at a time. During the entire enumeration
it is possible that the data version of the directory object has
changed due to entries being added or removed. This patchset adds
two data version values to the AFSDirEnumResp structure.
The first is the snapshot data version which is the dv of the
directory object at the time the entry list snapshot was taken.
The second is the current data version number of the directory
object.
If an object has been removed from the directory after the snapshot
was taken, attempts to fetch status information for the object will
fail with a VNOVNODE (aka CM_ERROR_BADFD aka STATUS_INVALID_HANDLE).
The NTStatus field has been added to the AFSDirEnumEntry structure
to permit notifying the redirector of such failures.
RDR_PopulateCurrentEntry() has been extended with an additional
cm_Error parameter that accepts the errorCode field provided by
the cm_direnum_entry_t object constructed during the enumeration.
Change-Id: Iee8f6bf9919780ce4dd6c2b184810c0d6afc39cc
Reviewed-on: http://gerrit.openafs.org/6455
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f142b615bbac6195aa4e275179f37da490013432
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 01:24:27 2011 -0500
Windows: Add AFSFileEvalResultCB
In response to AFS_REQUEST_TYPE_EVAL_TARGET_BY_ID and
AFS_REQUEST_TYPE_EVAL_TARGET_BY_NAME, return the new AFSFileEvalResultCB
instead of a raw AFSDirEnumEntry. AFSFileEvalResultCB includes
the data version number of the parent directory at the time the
node was evaluated.
Change-Id: Ida25790688f8ab193c234c9b3fadf4f594edd740
Reviewed-on: http://gerrit.openafs.org/6454
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ccd6614c8f92e349e1892fa59f814b615c8816e0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 01:10:08 2011 -0500
Windows: Add AFSFileCleanupResultCB
Add AFSFileCleanupResultCB which includes the parent directory
data version number. This is necessary because object deletion occurs
during the Cleanup processing and the redirector needs to know the
resulting data version of the affected directory.
Change-Id: Iac07ddaaa3e3373f1690c85d247313e070450169
Reviewed-on: http://gerrit.openafs.org/6453
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9115c437c4113a554f3c3b97c4eaeafea6949600
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 18:31:11 2011 -0500
Windows: STATUS_OBJECT_PATH_INVALID == invalid parent directory
Modify evaluation of nodes by name and id to consistently return
STATUS_OBJECT_PATH_INVALID if the parent FID no longer exists.
Change-Id: I94f56e5b525a35279152f6f7848654a56bbfa235
Reviewed-on: http://gerrit.openafs.org/6446
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e7ecda66eb2054012b4ec153a656ce674d6e70e4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:46:46 2011 -0500
Windows: Request extents readability
Two minor code modifications to make the code easier to read.
Change-Id: I1cf72911ace4eff17c857cd000cb24fbe0f28c2b
Reviewed-on: http://gerrit.openafs.org/6433
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 970d6e268011ab4ad8a4857121933514f7768b55
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:44:36 2011 -0500
Windows: RequestExtents avoid bufWrite if rdr held
If the cm_buf_t is held by the redirector the buffer cannot
be written back to the file server even if dirty. Therefore,
do not check whether or not the cm_buf_t is dirty until after
it is known that the buffer is not redirector owned.
Change-Id: I10dc8f74915c2267dc44138284eba273eb708e0a
Reviewed-on: http://gerrit.openafs.org/6432
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2ef57a3ee951660cb69d8656e9293c93b28e0d1e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 31 16:07:00 2011 -0500
Windows: avoid race during Fcb cleanup
The worker thread can race with a AFSCleanup() operation and
tear down the Fcb before the AFSCleanup() drops the Fcb->NPFcb->Resource.
Avoid this race by requiring the worker thread to obtain the resource
once before deleting the resource.
Change-Id: Iafad8260c5dfc4187a62c04b14d55ac0bf0e4aeb
Reviewed-on: http://gerrit.openafs.org/6462
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e2b42e2cde170102c07937d55db376416cb3965c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 31 16:04:27 2011 -0500
Windows: avoid deadlock if bulk error during enum
If the cache manager has a valid callback at the start of a
directory enumeration, the service can begin a bulk status rpc
which can fail. The error code from the rpc is never propagated
to the caller, therefore the caller loops forever attempting to
complete the enumeration with status info.
Fix it by returning the error.
Change-Id: I53892ddf338152d53c533ef31c3b1047c96bfbf2
Reviewed-on: http://gerrit.openafs.org/6461
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 36657b8505e3b232158a63b4ecad12fa59548b3a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 20:24:49 2011 -0500
Windows: AFSInsertHashEntry can fail
If AFSInsertHashEntry() fails, the object information structure
that was being inserted is not in the btree. Therefore, ensure
that the object does not have the AFS_OBJECT_INSERTED_HASH_TREE
or AFS_VOLUME_INSERTED_HASH_TREE flag set (as appropriate).
This permits the unreferenced object to be garbage collected.
Change-Id: I023f765571a7ba014556d9505ab2d46ec930f1a2
Reviewed-on: http://gerrit.openafs.org/6458
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d4eb369e7a5dada7e13585d934a63fa27e0d20ee
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 30 12:55:30 2011 -0500
Windows: additional AFSValidateEntry logging
Change-Id: Iecfbaff197b83de1c31c51d18f819c9d1be54f60
Reviewed-on: http://gerrit.openafs.org/6456
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ad3c00520b93174808f692ced3e35261030a8c1b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 22:20:38 2011 -0500
Windows: add DV and error status to dir enumerations
The cm_BPlusDirEnum family of functions are atomic when generating
the directory enumeration but are not atomic with respect to the
rest of the system as the enumeration is accessed. Therefore, the
data version of the directory at the time the enumeration is created
may not be the same as the directory version when the enumeration
is fully processed. We therefore store the initial data version in the
cm_direnum_t object.
When the enumeration is fetching status information for each of the
directory entries, it is possible that the fetch status will fail.
We therefore store the fetch status error code in the cm_direnum_entry_t
object. By doing so, the consumer of the enumeration can make a
reasonable decision about the lack of status info. For example,
if the resulting error is CM_ERROR_BADFD it is known that the entry
has been removed from the directory since the initial enumeration.
Change-Id: I289881e2c59525a9f998559b00769d3ac3f335c0
Reviewed-on: http://gerrit.openafs.org/6452
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9b42af9326dbf34a7a657a7d4a2ea6d845c845e1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 22:18:59 2011 -0500
Windows: protect merge status against dscp == scp
If the directory status object is the same as the object for which
status info is being merged, the object will refer to itself as its
own parent. Do not permit that.
Change-Id: I6f7b6416f4c875a30dd5b85ba679389484523b12
Reviewed-on: http://gerrit.openafs.org/6451
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 60992d4ffb94a8472ccff3ff7890c34e2572688d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 19:58:19 2011 -0500
Windows: protect dir ops by CM_SCACHESYNC_STOREDATA
CM_SCACHESYNC_STOREDATA is used to ensure that only one directory
modifying rpc can be issued to the file server at a time on a
single cm_scache_t. However, the local directory modifications
were being made after cm_MergeStatus() and cm_SyncOpDone()
were called. As a result, serialization of changes against the
local directory buffers and b+tree was lost.
Change-Id: I1e99685767b6b9b51e546be0946b189386e8dbd2
Reviewed-on: http://gerrit.openafs.org/6450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit dc06ebad8ba7a58c1561ddd03f0a8a79e610d7c7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 19:19:04 2011 -0500
Windows: init scache DV=CM_SCACHE_VERSION_BAD
zero is a valid DV. CM_SCACHE_VERSION_BAD is not.
Change-Id: I65c10153059bae6dbd4da344958db4a6be309633
Reviewed-on: http://gerrit.openafs.org/6449
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 83c52997b7b9e4d91a0263fbd26ec19fb2092d9c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 12:45:16 2011 -0500
Windows: afsredirlib log messages
Improve or correct a number of log messages. Report the correct
FID or NT Status value, etc.
Change-Id: I434b47e1350767f868170323280298f77e1a840a
Reviewed-on: http://gerrit.openafs.org/6442
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ea0865e3266884f15a05bb3edd316f5ce8f972ed
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 29 12:42:26 2011 -0500
Windows: Symlink resolve failure error
If a symlink cannot be resolved, return STATUS_REPARSE_POINT_NOT_RESOLVED
instead of STATUS_ACCESS_DENIED. The symlink is after all a reparse
point. This results in a more meaningful error being delivered to
the end user.
Change-Id: I30713dac7b916efaf3cf7a5d7717cb0bc971a31a
Reviewed-on: http://gerrit.openafs.org/6441
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 07655bc23e2ab7b5d0c808d79b3c7838a01eacfa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 28 17:08:23 2011 -0500
Windows: Make idle dead timeout very long
The idle dead timeout processing must eventually be removed
from Rx for initiators. In the meantime, make the timeout period
ten times longer than the hard dead timeout. This permits eventual
failure when the server doesn't respond in ten minutes but avoids
more transient issues.
Change-Id: Ia673666dd55b33c4375ee8fdcbb89c82e8b01185
Reviewed-on: http://gerrit.openafs.org/6440
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 19f1e0f7cf40c3da1d49c789358bd814f7e3b3eb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 28 17:07:01 2011 -0500
Windows: replace strdup with xdr_alloc in callback processing
The CRT allocator cannot be used for memory that will be freed
by afsrpc.dll. Use xdr_alloc() instead.
Change-Id: Idd33710c225d58b4e6eba0bfdb2f8b3282996258
Reviewed-on: http://gerrit.openafs.org/6439
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5d11bd665cd93b736f735d689f703e44f865cefc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:59:21 2011 -0500
windows: osi_TSignalForMLs simplify
Simplify logic for readability and efficiency.
Change-Id: I3c78b23b6fcf8478fe20a803755923108995d532
Reviewed-on: http://gerrit.openafs.org/6438
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f6f95ac4bfc5e504c1b825fd52b787d12a89e53c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:56:38 2011 -0500
Windows: osisleep do not tamper with queues
There is no need to manually remove an entry from a queue before
executing osi_QRemoveHT(). osi_QRemoveHT() removes the item
from the queue and fixes up the pointers correctly. Manual
intervention is a waste of cpu and can be harmful.
Change-Id: Iaea4ceac2cb5f61e5bb73fd181bd934e06ddf0a6
Reviewed-on: http://gerrit.openafs.org/6437
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4c2190784f1d4bb613cc140b8d189f0ab4ae10fc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:55:22 2011 -0500
Windows: osi_sleepInfo tid type
The thread id type is DWORD not size_t for consistency
with the rest of the client_osi package.
Change-Id: I2e2d31d8738d9de82d99f346f5109de133f3e25e
Reviewed-on: http://gerrit.openafs.org/6436
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3011a8228a04a54e04f5626e9f686840a25f2d5f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:51:33 2011 -0500
Windows: add osi_TWaitExt(), fix osi_TWait()
osi_TWait() was adding new locks to the turnstile at the tail
which is the end of the queue locks are removed from. This
implemented LIFO instead of FIFO when FIFO is the "fair" order
to service lock requests.
osi_TWaitExt() is added to permit the Reader to Writer upgrade
request to use LIFO when more than one reader is present.
Change-Id: Ib6435a3edc2cb8519939cfad93e0db4b0604da2d
Reviewed-on: http://gerrit.openafs.org/6435
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2b6a8d384bd4426a61c72e79c34ffd75a03e612e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Dec 26 20:48:24 2011 -0500
Windows: use waiters counter instead of osi_TEmpty
The osi_TEmpty() macro examines the values of the turnstile
pointers. Instead use the lock's 'waiters' counter to determine
if there are waiting threads to signal.
Change-Id: I8e14a03a30adcf1e67b07fc020104c2ada3b5c6a
Reviewed-on: http://gerrit.openafs.org/6434
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2cdd59d8f318193d0ef7937910466531caf1c963
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 24 15:16:12 2011 -0500
Windows: kauth search for kerberos iv port first
Modify src/kauth/user_nt.c to match the service name search
order of the Unix code:
kerberos4
kerberos-iv
kerberos
The standard Windows SERVICES file includes "kerberos-iv" as
port 750.
FIXES 127907
Change-Id: I518a812cc2d465334e8ef6929f8988c51b33749b
Reviewed-on: http://gerrit.openafs.org/6430
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8a574ba16a80fc2b8b703ddcfc99486b977e6071
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 22 15:48:49 2011 -0500
afs: Panic on afs_conn refcount imbalance
An undercounted afs_conn can easily cause a panic and/or memory
corruption later on, since we put an rx_connection reference with each
afs_conn reference. Panic as soon as we detect this, as this indicates
a serious bug.
Change-Id: I251fd3303114d0822b8cf70805a8a447986a7762
Reviewed-on: http://gerrit.openafs.org/6413
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 79f69f2eb130c1c5cb6cdfa4e7a129f450a58339
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 21 17:01:16 2011 -0500
afs: Add afs_WriteDCache sanity checks
Writing a non-free non-discarded dcache entry with a zero volume id
can easily cause hash table corruption later on, so make sure we don't
do that. Also log something if the write itself fails, as this usually
indicates an unusual situation involving I/O errors or something.
Change-Id: Ib9602227e8cee324cb63a4a3dee28e53af69b446
Reviewed-on: http://gerrit.openafs.org/6419
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9ed26da26f4a5a3fef3bf0a7b6f9dae751ce6659
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 21 16:05:40 2011 -0500
afs: Cope with afs_GetValidDSlot errors
Make callers of afs_GetValidDSlot deal with getting a NULL dcache,
which can occur if an error is encountered. Some of these just panic
at least for now, since a code path for recovery is complex, but this
is at least better than dereferencing a NULL pointer.
Change-Id: I4022a914bbaa0e1f3f4daadfdc32d165a6e2febd
Reviewed-on: http://gerrit.openafs.org/6418
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1a672914ab050811c99b6307c657630ab9b5c8ee
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 21 15:04:32 2011 -0500
afs: Do not always ignore errors in afs_GetDSlot
Currently afs_UFSGetDSlot will silently swallow any error in reading
the specified dslot from disk, and will return a "blank" dcache to the
caller. However, many callers of afs_GetDSlot will be asking for a
dcache that we know exists, and more importantly, we know is on the
global hash table. If a disk error is encountered and we're given a
"blank" dcache, we will erroneously believe the dcache entry is not on
the hash table, causing corruption of the hash table later on.
So instead, modify all callers of afs_GetDSlot to use either
afs_GetValidDSlot or afs_GetNewDSlot. Calling afs_GetValidDSlot
indicates that the given dentry index is known to be valid, and any
error encountered while reading the entry from disk should result in
an error (for disk I/O errors we have no control over, this results in
a NULL dentry returned; for internal consistency errors we panic).
Calling afs_GetNewDSlot indicates that the specified index may not
exist or may not be valid, and so returning a "blank" dentry in that
case is fine.
For memcache, the situation is the same, except any time we go to
"disk" it is an (internal) error, since there is no disk.
Change-Id: I53ea6e99649e4d6d5cbde58929dfcee1d45a3e7b
Reviewed-on: http://gerrit.openafs.org/6417
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 12177ba6fffaf8a693dd8c8e9445d5e7725ae743
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 21 17:25:29 2011 -0500
afs: Remove second argument to afs_GetDSlot
All callers of afs_GetDSlot were passing NULL as the second argument
to afs_GetDSlot. So, remove the argument, and behave as if tmpdc was
NULL unconditionally.
Change-Id: I138fe917d739c3020c35c20da48ffdf38f682fd6
Reviewed-on: http://gerrit.openafs.org/6416
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b5ca12ac4696c4049be14974f1e946bb55e1c440
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 22 15:01:52 2011 -0500
afs: Indicate error from afs_osi_Read/Write better
Currently afs_osi_Read and afs_osi_Write just return -1 on any I/O
error, even though they know the error code given from the OS VFS.
Just return that code instead so the caller can see what the error
was; but negate it, so it's clear that it is an error.
Change-Id: I3d8350da18d075713356137a1cacf182a749fe3e
Reviewed-on: http://gerrit.openafs.org/6412
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 456ee898ae77b201275363f4efc0098c28e195d5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 22 14:50:09 2011 -0500
afs: afs_osi_Read/Write returns negative on error
afs_osi_Read and afs_osi_Write need to return negative values on
error. EIO is not negative; return -EIO so we don't accidentally
return "success" if someone requested to read or write EIO bytes.
Change-Id: Id0693776737fdf7086de16a935ad3942f5026e55
Reviewed-on: http://gerrit.openafs.org/6411
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2d8fa26022e6a9aac1877d0b6b73a3b1922a2674
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 22 13:50:53 2011 -0500
klog.krb5: cast get_cred_keylen to unsigned
get_cred_keylen can yield a type besides an unsigned int (such as a
size_t on heimdal). But we are printing it with %u, which causes a
warning, so cast it to an unsigned int.
Change-Id: I7b89de5b0b163b9532ac347e9c56e865cb58f266
Reviewed-on: http://gerrit.openafs.org/6410
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2e5545342b0c644546f8a370bdbf836a6da68b60
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 23 18:31:10 2011 -0500
fuse: Autodetect Solaris 11 FUSE
FUSE exists in Solaris 11, but it does not come with a fuse.pc
pkg-config configuration. Autodetect the presence of FUSE anyway.
Change-Id: Ia052ba0a1bfe511dd051f3cfbee10395dc9d2c60
Reviewed-on: http://gerrit.openafs.org/6422
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 98a6db0b047efcfbeb0fb3c8b1e4e136b206f10d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 21 23:19:01 2011 -0500
afsd.fuse: Solaris 11 support
The FUSE in Solaris 11 has a couple of quirks; work around them.
Change-Id: I29b8a8858467d1c6ebacb4926a15165feae64f2c
Reviewed-on: http://gerrit.openafs.org/6421
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit af218dee6c517f4636a18c681bff6f1212a7d9c0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 21 22:00:12 2011 -0500
afsd: Parse cacheinfo during argument parsing
Currently we parse cacheinfo in afsd_run, when the client is
initialized and started. Parsing cacheinfo can change
afsd_cacheMountDir, however, which may be of interest to afsd.o users;
in particular, libuafs exposes this via uafs_MountDir(). This means
that if a mount dir is not explicitly specified in the libcmd
arguments to afsd, a libuafs-using program will see the mountpoint as
the empty string if it is queried after afsd_parse but before
afsd_run. For afsd.fuse, this causes the cryptic error message:
fuse: bad mount point `': No such file or directory
since the mountpoint is the empty string if it is not specified
explicitly on the command line.
To fix this, move cacheinfo parsing to effectively near the end of
afsd_parse, so the mountpoint is calculated in afsd_parse().
Change-Id: I058f2c7c2f0cc21db21c4b1d38ff63b9e9ed1562
Reviewed-on: http://gerrit.openafs.org/6400
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 83d3084e95ac025660f0b8064f49400eb94bfb60
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 2 16:06:42 2011 -0600
fuse: Add -oallow_other by default where possible
By default, fuse mountpoints are only accessible by the same uid as
that which mounted the fuse filesystem. When we're running as root,
specify -oallow_other so by default anyone can access the afs
mountpoint.
Change-Id: Idc732a22136fbe6bc585b76ac6291d8518f1f9de
Reviewed-on: http://gerrit.openafs.org/6390
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3ca42749357edc97922918d04558deb268fe78f0
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Fri Dec 23 17:00:57 2011 -0700
Windows: Avoid bottleneck on VolumeLock
The VolumeLock resource was obtained during each AFSParseName()
and held across a wide range of operations including volume
info queries, renames, and extent requests. These operations can
take a long time to complete and as long as the VolumeLock was
held exclusively there could only be one operation in flight at
a time on a given volume. This significantly reduced the parallelism
of operations.
The VolumeLock was not required in almost all cases. This patchset
adjusts the use of the VolumeLock and avoids the bottleneck.
Change-Id: I9d60fe41d157b9e315aeaa15feee8d1e0d4ded4c
Reviewed-on: http://gerrit.openafs.org/6420
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ff368a7ec70fca0673a21f6b283db13cabcc2286
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 24 03:15:53 2011 -0500
Windows: avoid race in cm_GetNewSCache
The cm_scacheLock is dropped while walking the scache LRU queue.
As a result it is possible for the cm_scache_t that is being
considered for recycling to be accessed and moved to the head
of the queue.
Track the prev and next pointers so it is possible to detect if
the cm_scache_t that is about to be recycled has been moved. If
so, restart the search from the tail.
Change-Id: I6c3b645b85aa60197b9b6d60cffdcb818eb6f4b2
Reviewed-on: http://gerrit.openafs.org/6424
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 17ce77f843e01ff96f66e05b4b932b0c6187493e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 24 03:11:04 2011 -0500
Windows: cm_BufWrite() must wait in cm_SyncOp()
Now that it is permissible for more than one store data operation
to construct BIOD lists in parallel, cm_BufWrite() must be willing
to wait in cm_SyncOp(). Otherwise, the daemon threads will spin.
Change-Id: I77ee2005025de9255b4c9cdb8bed8efc44b9518a
Reviewed-on: http://gerrit.openafs.org/6423
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5f939c64e575dab937feda819937ce3087a2d2e8
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Dec 24 17:23:48 2011 +0000
rx: Don't adjust non-existent events
If we notice that time has gone backwards (that is, the current
time is older than the time of the last event we fired), then we
reschedule all pending events.
On Windows, immediately after we have resumed from a suspend, this
code path can be executed with an empty event tree, causing an
exception:
FAULTING_IP:
afsrpc!adjustTimes+cf [c:\src\openafs\openafs.git\repo\src\rx\rx_event.c @ 213]
00000000`61041847 4c8b4030 mov r8,qword ptr [rax+30h]
EXCEPTION_RECORD: ffffffffffffffff -- (.exr 0xffffffffffffffff)
ExceptionAddress: 0000000061041847 (afsrpc!adjustTimes+0x00000000000000cf)
ExceptionCode: c0000005 (Access violation)
ExceptionFlags: 00000000
NumberParameters: 2
Parameter[0]: 0000000000000000
Parameter[1]: 0000000000000030
Attempt to read from address 0000000000000030
Resolve this by checking for an empty tree before we attempt to adjust
event times. If the tree is empty, we just zero the last event time
(so we don't keep running the adjustTimes routine), and continue as
normal.
Change-Id: I42a42ff1bd53a9d5c4733efc7ac5f629426b3aa1
Reviewed-on: http://gerrit.openafs.org/6425
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e18c620aa0e49fde31beaa8327bf02eb87d89e3f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:47:56 2011 -0500
Windows: AFSCleanup extent processing
1. Perform a CcFlushCache() any time the file is cached
and the Context Control Block indicates that the handle
has FILE_WRITE_DATA permission.
2. Perform an AFSFlushExtents() whenever there are dirty
extents and the handle has FILE_WRITE_DATA permission.
No point flushing the extents if the AuthGroup does not
have write permission. Another Ccb must exist that does
have write permission.
Change-Id: I3ece011b484c12e7dc936b81c272ba6a42f6c7d6
Reviewed-on: http://gerrit.openafs.org/6399
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 68b10efa7dbabbedbb95928dccac29ed8d4179c4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:37:41 2011 -0500
Windows: AFSRetrieveValidAuthGroup FILE_READ_DATA
Only an AuthGroup belonging to a Context Control Block that was
granted the FILE_READ_DATA permission is capable of reading
data from the file server.
Change-Id: I93a7d8e65a6bc87b44399a30da5c0dd7d4e07685
Reviewed-on: http://gerrit.openafs.org/6398
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4fa01ad7fc5434ca5ca42f30407d47c736f8b000
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:34:14 2011 -0500
Windows: AFSRequestExtentsAsync retry with alt authgroup
If AFSRequestExtentsAsync() fails to obtain requested extents
due to STATUS_ACCESS_DENIED using the AuthGroup associated with
the Context Control Block, try to find an alternate AuthGroup
to use to perform the extent request. We have already told
Windows what permissions the application has when the file was
opened. Windows will perform its own validation checks prior
to permitting the data to be accessed or altered.
Change-Id: I430657e8c8e30c9f636a5ec81065af4122c926d7
Reviewed-on: http://gerrit.openafs.org/6397
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b9ca435dcb5433218ecbb37ab41b85dabe0a5912
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:17:33 2011 -0500
Windows: Use AuthGroups for extent request error reporting
The afs redirector current tracks the most recent extent error
in the File Control Block. Prior to this patchset the error
was returned to the requesting thread when the process Id matched
the most recent Process to issue a request. This approach resulted
in a couple of problems.
1. There are multiple threads that can issue an extent request
on the same file at the same time representing different processes.
Resetting the process Id with each new request could clear the
error prior to its receipt.
2. The failure may be due to inappropriate permissions. Permissions
are not associated with proceses but with Authentication Groups.
This patchset makes several changes:
1. It enables the afsd_service to track the active authgroup as
part of the cm_user_t structure and associates that object with
the BIOD object to ensure that the active authgroup can be
reported to the afs redirector.
2. It modifies the AFSExtentFailureCB structure to include the
AuthGroup GUID.
3. It tracks the AuthGroup GUID associated with the extent
failure in the non-paged file control block.
4. It converts all tests on Process Id to use AuthGroup instead.
5. It alters the behavior of error delivery such that reported
error is only cleared after it has been reported once to a
thread using the matching AuthGroup.
These changes make the situation better but not perfect as error
states can still be lost. However, it avoids the case most often
seen in production where two processes (a end user process and an
anti-malware process) are fighting over a file and the anti-malware
process has no permission to access the file under its own credentials.
Change-Id: Ia5c3877b8d46de695c86884c4166dc812885a72c
Reviewed-on: http://gerrit.openafs.org/6396
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7e26dfd6dc893d14717aad411460fc781acc4001
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:10:45 2011 -0500
Windows: Explicit permission check on extent release
When a data extent is released by the afs redirector or the
afsd_service performs an extent claw back during a cleanup
operation, perform an explicit permission check before attempting
to store dirty buffers to the file server. Instead of waiting
for the file server to fail the request, fail it immediately.
The permission check is performed using the currently active
authentication group.
Change-Id: I533f06ec10b8a6f4dbe5e18b1205b20881b5559a
Reviewed-on: http://gerrit.openafs.org/6395
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6cd09ca2e699d2f9817b897e7165fac60560adcc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:08:59 2011 -0500
Windows: RDR_CleanupFileEntry restrict extent claw back
Only demand that extents be returned by the afs redirector
if this cleanup is the last open handle or the redirector has
requested that the file be flushed to the file server.
Change-Id: I03ddcd153d2ded5fc805148a192234742d20b29e
Reviewed-on: http://gerrit.openafs.org/6394
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f6c85f40c06ddb2e527fcd9c39cba779bc82485b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 21:03:52 2011 -0500
Windows: remove unused AFSRequestExtents()
Change-Id: I25251827ab2cfb68ba20cf97eaebb669e4f36a82
Reviewed-on: http://gerrit.openafs.org/6393
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7a1c8e57a08dcebce2f3b861a0d7bbabcc5272ba
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 20:49:59 2011 -0500
Windows: Bad DV invalidate only when new DV not 0
If the current DV is BAD_VERSION and the new DV is 0, do not send
an invalidation to the redirector. It only results in wasteful work.
If the current DV is BAD_VERSION the object either:
1. was never previously known
2. was recently flushed
3. the cm_scache_t was recycled
In all cases, the redirector does not have knowledge of the object
since either it didn't exist or a previous invalidation was sent.
Change-Id: I7e0cf41bae64660e4e1ec342bafcf3ef8a693d56
Reviewed-on: http://gerrit.openafs.org/6392
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f417dba69230c6b72882ca614a3a8c5691fe561c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 21 20:45:19 2011 -0500
Windows: Define times in terms of AFS_ONE_SECOND
The afs redirector defines the macro AFS_ONE_SECOND to indicate
the number of 100ns units necessary to indicate one second of time.
Use that definition when defining other time values. Also define
AFS_ONE_MILLISECOND and AFS_ONE_MICROSECOND.
Change-Id: Ie2a173b4037af61e9a1c5aa06129520c36d714bb
Reviewed-on: http://gerrit.openafs.org/6391
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott@kerneldrivers.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 37f537a21db6d560dd16a53ff5e0d2f0456d4c48
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Dec 19 17:11:31 2011 -0500
Include afsconfig.h before anything else
afsconfig.h can define various preprocessor symbols that can affect
how system headers behave. For example, the presence of the
_POSIX_PTHREAD_SEMANTICS symbol changes the number of arguments to
getpwnam_r on at least Solaris 8. So, we must include afsconfig.h
before including anything else, to ensure consistency.
Change-Id: I84bc73b3fada5dbc68cd355c24f2f746f2e982b3
Reviewed-on: http://gerrit.openafs.org/6387
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7ad2965bad8e8b2f085d05be661086dc81da52d3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 18 18:36:14 2011 -0500
Windows: avoid deadlock during SetRenameInformation
The VolumeLock must be held before the Fcb->NPFcb->Resource.
Obtain the VolumeLock in AFSSetFileInformation only in the
rename case instead of obtaining the VolumeLockin AFSSetRenameInformation.
Change-Id: I84f086e3a8f7d08630266c9e409e1e22c1f92742
Reviewed-on: http://gerrit.openafs.org/6377
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2d8f9141fa98df50ce682364ef5a7958ce422613
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 18 12:08:24 2011 -0500
Windows: terminate HOSTS/LMHOSTS with newline
If the original file did not terminate with a newline,
add one before appending the "AFS" entry.
FIXES 130210
Change-Id: I35f96120904d09679d62ea4fb65f29648c4abfa5
Reviewed-on: http://gerrit.openafs.org/6375
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 92bfaae062c596d678220dcb93f9dc61304d3c5a
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Dec 14 12:27:54 2011 -0700
Windows: Track AuthGroup in Context Control Block
Tracking the AuthGroup in the File Control Block proved to be
insufficient to ensure that dirty extents can be stored back
to the file server when an anti-virus service opens a file
in authgroup without 'write' permission immediate after the
application performing a WriteFile() opens it. In this situation
the Fcb ends up with the AuthGroup set to the anti-virus value
and not the one that belongs to the writing application.
Tracking the AuthGroup by Ccb provides the ability to select
an AuthGroup from the list of open handles instead of tracking
the most recent one.
Change-Id: I851ea646feb531d7c765e1cf789a4ba541e4a150
Reviewed-on: http://gerrit.openafs.org/6333
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 714ae7f1840757e0575d25c910b0b9fa2499e354
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 17 12:14:28 2011 -0500
Windows: Tear down extents upon file deletion
When processing AFS_INVALIDATE_REMOVED, tear down all extents
since they are no longer necessary and return them to the service
for recycling.
Change-Id: Iec6c0d2c68db16dbf3bd04c51536e13d45f0c1b8
Reviewed-on: http://gerrit.openafs.org/6365
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c29dc399769c54bbab4af5bd4f828f0d49755860
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 17 12:13:17 2011 -0500
Windows: notify file size change if flushed
When processing AFS_INVALIDATE_FLUSHED, notify any listeners
that the file size has changed to force a complete refresh.
Change-Id: Ie5f0076ea786357ae77ef6a76f162c776d555953
Reviewed-on: http://gerrit.openafs.org/6364
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 20d986fddf6b21abc58b2f3c24aac425cf5d2bf0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 17 12:08:49 2011 -0500
Windows: forget data version only for flushing
The AFS redirector was intentionally forgetting the data version
number for AFS_INVALIDATE_DATA_VERSION events. The point of that
event is to ensure that clean data be purged if the data version
in fact changed. Checking the data version for change cannot be
performed if the data version is reset to -1.
Only when AFS_INVALIDATE_FLUSHED is processed should the data
version be reset to ensure that all of the data is purged.
Change-Id: I430afc4889c55c49ef24904a987b08042994cfea
Reviewed-on: http://gerrit.openafs.org/6363
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ef31f0f6d1f23bcd882740db4d54a9ffea6e0a64
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 17 12:07:53 2011 -0500
Windows: fix indentation
Change-Id: I187cfa466830a528d0ac2c77b0006e2b66b0a47c
Reviewed-on: http://gerrit.openafs.org/6362
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 20c871cc67f332f77b1b766f15b2659c0fab8e40
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 17 11:57:15 2011 -0500
Windows: AFSSetRenameInfo log message
Fix a typo in the log message and change its priority from
error to verbose
Change-Id: I807d7d6d9118b0fa6af3de638bb9fa2c0d90cbcb
Reviewed-on: http://gerrit.openafs.org/6361
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d142082caed1eba870ffee017193883a0508306e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 16 17:24:36 2011 -0500
Windows: return error to system paging requests
If an error has been set on a file, return that error to the
System process for any outstanding extent requests.
Change-Id: I8f7244f19cc0e3f96a1599ce011251ade0afe3f4
Reviewed-on: http://gerrit.openafs.org/6360
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 307856353c3f168105ce82f3f3fa8e4c5efb0b6c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 16 18:24:50 2011 -0500
Windows: log volume and authgroup for redir open
If opening a volume root fails, log the authgroup and volume
to make it easier to debug the error.
Change-Id: I0c9ffc58ffaf7582a1b22043de2b5d096530de5b
Reviewed-on: http://gerrit.openafs.org/6352
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit db9e5775dd26e6362820b7267f8d971f62dfe2ed
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 16 00:12:39 2011 -0500
Windows: save fid/type for redirector invalidation
Must save the fid/type fields of the cm_scache_t object before
recycling in order to invalidate the contents in the redirector.
Change-Id: I7914faaa80082033044980deb471eaffbddf3cfc
Reviewed-on: http://gerrit.openafs.org/6359
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0b2639ff4fd732dfac2c1dc058d6c517cc966737
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 16 17:22:49 2011 -0500
Windows: move to head of queue no-op if not in queue
If the buffer is not in the queue, do nothing.
Change-Id: Icdb95775bcc6d010ca1926ce4384d9edcd8f1cd3
Reviewed-on: http://gerrit.openafs.org/6351
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b63ff1319e0ebecdfbdef7365d49d02543bccce8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 16 16:15:56 2011 -0500
Windows: Properly convert FID structures
Use the FID conversion function in RDR_SetFileStatus().
The FID structures are not the same in afsd_service and the
afsredirlib.sys driver.
Change-Id: I6360f39c8b90c46d468a06c08f0911f55f9142fb
Reviewed-on: http://gerrit.openafs.org/6350
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b3e6db22a1755b7633b522dfe5cbb61949e06466
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 16 11:43:32 2011 -0500
Windows: propagate directory enumeration failures
If a directory is enumerated with an AuthGroup that has no
permissions, do not treat the enumeration as successful.
Change-Id: I6a543a1b19b9d2e68ee2c99f67398ed94ad52896
Reviewed-on: http://gerrit.openafs.org/6344
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f73685c233974403fe63795303cd1659c5bcb2af
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Thu Dec 15 17:52:54 2011 -0700
Windows Problem with cross-directory rename
Not correctly handling cross-directory rename processing
Change-Id: I36e30a68d7755241c727868074e344beb9580c2d
Reviewed-on: http://gerrit.openafs.org/6343
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2d472f94ab1017724e56bcdd29b9ef451a13f182
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Dec 14 12:58:36 2011 -0500
Windows: Update Adv Firewall Rules
Do not specify the Service Name property. According to feedback
on openafs-info the Service Name blocks the rule from working properly.
If the rule already exists, attempt to remove the Service Name filter
and update NAT Edge Traversal and Permitted interface rules.
Change-Id: I1ab1a0c57f9271b68f91b08e530483a1fa40a165
Reviewed-on: http://gerrit.openafs.org/6332
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 37a0c3d00a6e2d072faf7c2958ef0c7224add161
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 15 03:28:34 2011 -0500
vol: fix a08c3207255756c825ab69a19e04f79dd879c646
Patchset a08c3207255756c825ab69a19e04f79dd879c646 broke the suse
and windows builds by relying on C99 language syntax. Fix it.
Change-Id: I8220e0504048d2caff00deb08e3bf53599e596b7
Reviewed-on: http://gerrit.openafs.org/6337
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f469be407789e696c0b9e9a431b4879798a00e2a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 14 14:42:08 2011 -0600
afs: Clear VHardMount on ResetVolumeInfo
afs_Analyze sets VHardMount on a volume struct when a hard-mount
scenario is encountered, and clears it after sleeping. However, if the
volume struct has VRecheck set, or if it's not in memory, afs_Analyze
cannot retrieve the volume struct in order to clear VHardMount again.
For the VRecheck case, this can results in VHardMount never getting
cleared, and so hard-mount messages for the volume seem to disappear.
So, clear VHardMount when we set VRecheck so this does not occur.
For the case where the volume struct is not in memory, this is not a
problem, since when we allocate a volume struct again, the VHardMount
state will not be retained.
Change-Id: I607741241e330391b8c857b2a72f0e0cfc0b91cc
Reviewed-on: http://gerrit.openafs.org/6335
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit da3f8d86dd216a90bc400367b7b95e9a427f99e8
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Dec 14 14:16:16 2011 -0600
viced: Yell when we GetSomeSpace_r
A GetSomeSpace_r call indicates we don't have enough callbacks
configured. For many people, this can happen without the administrator
realizing anything is wrong, since we never give any indication that
something is amiss, unless the administrator checks the xstat
statistics.
Since this can indicate a serious performance problem, yell in the log
when this happens. Only do it once, so we don't spam the log.
Change-Id: I5c881a3c127c20b4f086d59bf3768864307efe92
Reviewed-on: http://gerrit.openafs.org/6334
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b8e7d61965564557160dcc69301e35ab62ea0510
Author: Jeffrey Altman <jaltman@secure-endpoints.com>
Date: Thu Dec 15 07:00:28 2011 -0800
Revert "Windows: cs_CZ localization"
This reverts commit 642153cae6700e855a8abcc20be207612e1e6b3c
cs_CZ localization cannot be committed to the repository until:
1. Resource DLLs for all components are built in the tree.
2. All built components have been successfully tested so that OpenAFS is not shipping code that caused executable components to crash in the cs_CZ locale.
Change-Id: Id287d150a4c63afdc3f4105d26c9faf211da5395
Reviewed-on: http://gerrit.openafs.org/6339
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 170ce3db8a32c2b5df68ada3e84ecdaa98785e71
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Sep 29 14:44:11 2011 -0400
bozo: retry start after error stops
After a bnode is stopped because of two many consecutive exits
delay for some time and attempt to start the bnode again. Countine
to retry on each error stop, doubling the delay for each retry
attempt until a maxium number of attempts.
Change-Id: Ib6a4935d09c70c69de87f65717562bd3dcde761b
Reviewed-on: http://gerrit.openafs.org/5534
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit db472e730e3989dac1d49b54d7371b54b24cd63c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 30 12:22:27 2011 -0400
bozo: preserve all options over restart
On unix, save all the bosserver command-line options and reuse
them on bosserver restarts. On Windows, the SCM integrator saves
the argument list, just use them.
Change-Id: Ib54d1b0c9430946cce666d09f5ed923016d5ac8b
Reviewed-on: http://gerrit.openafs.org/5532
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 112b9b35fc701ca26ba7f99c31a73a7a1eecbdc0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Feb 3 16:11:38 2011 -0600
volser: Do not reset copyDate in ReClone
When we ReClone in the volserver, do not reset the clone's copyDate to
the current time. If we retain the copyDate between ReClone
operations, then we can know when the clone was first created (and
thus makes local RO clones more consistent with remote RO sites).
Change-Id: Ic76862c1a03ee3cafaf199f414fabc90e3b058d2
Reviewed-on: http://gerrit.openafs.org/3892
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ba24ef73934c2a84dc505cdffad5e41e904aec4b
Author: Garrett Wollman <wollman@csail.mit.edu>
Date: Fri Jul 29 21:33:10 2011 -0400
util: simplify thread-name interface
It appears that we don't actually need an interface to set the name
of an arbitrary thread (which Mac OS can't do), so remove the
afs_pthread_setname() interface and promote afs_pthread_setname_self()
to the status of primary.
Change-Id: I2d915d8165dac9ccfe0cb99630db657cb1473389
Reviewed-on: http://gerrit.openafs.org/5121
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit da89855b492d8d06128ed62b219dc968f5b38a9d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Dec 13 23:28:15 2011 -0500
Windows: AFSRDFSProvider stack overrun
StringCchXXX functions take the number of characters not
the number of bytes. Use StringCbXXXX functions whenever the
buffer size is being specified.
Check return codes from StringXXXXXX functions and return errors
instead of blindly continuing with a truncated string.
Allocate a larger buffer for substitution strings since they
need to handle the device path plus the target path.
FIXES 130392
Change-Id: I62ca980d145d6fef8cf771c26cd634ce1dd55b91
Reviewed-on: http://gerrit.openafs.org/6248
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 44045af35a6ae44880655115685e0755d6a0c828
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 12:19:48 2011 -0500
vos: fix code to not triple-negate
!!! is !. just write it that way.
Change-Id: I8e788177280c4a1d78cedaffd144a5c4ecba28f2
Reviewed-on: http://gerrit.openafs.org/6252
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1ca207f18491147bb7f7de3e588fb1979ac3d0c5
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Tue Oct 11 12:33:19 2011 -0500
build tsalvaged, tvolser, and dvolser targets on *nbsd*
Change-Id: Idb744f57ab92ba2d9af4d7d9ca7c800b3ee880d2
Reviewed-on: http://gerrit.openafs.org/5595
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit a08c3207255756c825ab69a19e04f79dd879c646
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Jul 26 09:18:44 2011 -0400
volscan: print vnode metadata information
volscan program to print vnode meta-data in a grep/awk/perl friendly
format. Optionally, find the paths of each vnode relative to the volume
root. Access control list data can be reported, and are listed as one
access entry per line. Mount point information can be shown to which
volumes are mounted from given volumes.
The path lookup code originally written by Tom Keiser.
Change-Id: I743e1a33d9e6076e4f1b1b2cc462960a94e3763b
Reviewed-on: http://gerrit.openafs.org/5102
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 33526acb56c1794838c6a8c02e9b8f5022a04ac1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 24 17:43:45 2011 +0000
Unix CM: Log reason for marking server up or down
When we mark a server up or down also log the error code that says
why we did so, for help in debugging connection issues.
Change-Id: I1a14434607499c9932e23724b8e403442dc400c7
Reviewed-on: http://gerrit.openafs.org/6116
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 752daf71cd75aa707fabb1b4598dd8ef1f51f973
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jul 25 22:02:04 2011 -0400
volinfo: implement -checkout option
Implement the -checkout option using the FSSYNC communication
channel with the fileserver.
Change-Id: I119fab0c238fd37eb85c9810626ee91210b2efb6
Reviewed-on: http://gerrit.openafs.org/5101
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0d0a8288c1cdd05bbf5717ac45638cf6760ee7a8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Nov 21 19:12:56 2011 -0500
vol: log error reason on header read failure
Log the error reason instead of just VSALVAGE when
ReadHeader() fails.
Change-Id: I24d5ca175310345ee4ce095229b08d9e7c75f700
Reviewed-on: http://gerrit.openafs.org/6108
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2df43a5cb6add00eed05d70537b3172452f4674c
Author: Lukas Volf <jimm98y@hotmail.com>
Date: Sun Dec 4 18:52:49 2011 -0500
Windows: cs_CZ localization
Resource conversion for the cs_CZ locale. Does not include
installer updates.
Change-Id: Ifac0d7d9818dc662e584bc74701133cada9fbf33
Reviewed-on: http://gerrit.openafs.org/6227
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4d76b19b600aad461ee1231eeadb9b7a27b7f117
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 23:49:38 2011 -0500
libafs: disable mtu discovery
we need to rework this to use lack of soft acks instead of this
method, which is too fragile
Change-Id: Iedcd1e57e2c6a6c15ce3c040a9a9e6ae7d78bb36
Reviewed-on: http://gerrit.openafs.org/6256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 78885611ac8aa6602a4a1f42379c9d78ef226100
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Dec 13 23:20:01 2011 -0500
libafs: only do pings for default conn with root uid
instead of doing it for potentially every unauth user, just do it for
root.
Change-Id: I39ef22578eb07c339b096b25753a1775c9917e0b
Reviewed-on: http://gerrit.openafs.org/6255
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit f30d70ba5575753302be0a2b08c27a639898d4aa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 10 13:28:17 2011 -0500
Windows: memory leak when setting tokens via smb
The SID string of the RPC used to set the token sessionKey
was being leaked. Be sure to free it when it is no longer
required.
Change-Id: I28261643680d608d5c8805e095650a751193ab6d
Reviewed-on: http://gerrit.openafs.org/6244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 41d145b303d61aa6f8f336e4d66748dea860d08f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 9 18:40:42 2011 -0500
Windows: Suspend/Resume for afsd_service
The power mgmt events are received in the service. The service
can block all requests from the redirector from being processed
until it knows that it is safe to process them.
The service will receive a SERVICE_CONTROL_APMSUSPEND just before
the system goes to sleep. The service has two seconds to respond
and it uses that time to attempt to send RXAFS_GiveUpAllCallBacks
to all file servers as an rx_multi with no wait. It also marks
all servers down and updates the callback expirations to be just
after the servers were marked down so that they will be forced to
be refreshed when the server is marked up.
Upon resume the service receives two events. First,
SERVICE_CONTROL_APMRESUMEAUTOMATIC which is used to perform an
SMB lan adapter change detection and perform a probe of all down
servers. The second, SERVICE_CONTROL_APMRESUMESUSPEND is used to
resume SMB listeners, perform a 2nd lan adapter change check (just
in case), check the status of all down servers in additional
networks have come up, and finally resume processing of redirector
requests.
With these changes no special logic in the redirector is required.
Change-Id: I5405ecab754dca04f34afb024c4dacc3fe089088
Reviewed-on: http://gerrit.openafs.org/6243
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6d6d52e18f3bd537331de6021a0fcc2e96fc48db
Author: Karl Ramm <kcr@1ts.org>
Date: Sun Dec 4 13:56:29 2011 -0500
Print "waiting for job termination" at most once.
This message is useless, annoying, and is the UI equivalent of littering... but
it does explain why your backup command is just sitting there.
Change-Id: Ied49d0bf9f81b0e10804133c6f05814321d80438
Reviewed-on: http://gerrit.openafs.org/6223
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f238d4854d1f32836228f2d191c8a9d265d4b181
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Dec 8 10:00:57 2011 -0500
Windows: increase timeout for extent request retries
The AFS Redirector requests file data extents from the afsd_service.exe. If
it does not receive the requested extent within 10 seconds it issues another
request for that extent. Extent processing in the afsd_service is handled
by background daemons that process tasks serially from a work queue. When
the load on the system is large enough that satisfying the work queue takes
longer than 10 seconds, the redirector would retry the request. This would
increase the length of the work queue and increase lock contention.
Increasing the timeout period for extent retries to two minutes
significantly reduces the number of retry attempts while maintaining
protection against a lost extent request. Two minutes is selected because
that is the rx hard dead call timeout.
Change-Id: I8169fbdc2d3456f151359ffe9eaa8eeccb2ceaf1
Reviewed-on: http://gerrit.openafs.org/6237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f2c0c51f781495be0d28a75e5d7a786bbe9dddda
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Dec 7 20:29:00 2011 -0500
Windows: include owner/group in Security DACL
Include the World (Everyone) SID as the owner and group for
all files in AFS.
FIXES 130343
Change-Id: I01d697d7a6dea8e0bea67b81c14597c197b4241d
Reviewed-on: http://gerrit.openafs.org/6236
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7a93c827f353e2ad695d8019ab789b02a3596f2e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 4 23:15:13 2011 -0500
afs: prevent nat pings on destroyed connections
If the connection is no longer in use, reset the nat keep alive
timer to 0 seconds.
Change-Id: I72b69979fb8b15ab5afaa654b317edc254253b4b
Reviewed-on: http://gerrit.openafs.org/6230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 942dae0dd02f2e222ace5d003b1c55397a4018ff
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Dec 4 13:42:08 2011 -0500
Windows: Release Notes Updates
Updates for 1.7.3.
Grammar improvements.
Reformatting.
Change-Id: Iff829f343e0140943495a19406746b30a70ed235
Reviewed-on: http://gerrit.openafs.org/6222
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 57316878e03691f7e320013b21f0c7640877e11e
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 20 18:11:53 2011 -0500
rx: Make CALL_RELE and CALL_HOLD lock refcnt mutex
The reference count mutex must always be held when calling CALL_RELE
or CALL_HOLD. Instead of requiring that the caller obtain, and release
the mutex, do so within the HOLD and RELE macros, greatly simplifying
calling code. Provide CALL_RELE_R and CALL_HOLD_R as versions of these
macros which can be used by callers who already hold the reference
count mutex for other purposes.
Change-Id: Ie3e9df8b9d2a79476f1707bd65e588f43271c636
Reviewed-on: http://gerrit.openafs.org/6219
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1ef8dc3dfbddcbe5610c276afc627c9fcfe30a65
Author: Ben Kaduk <kaduk@mit.edu>
Date: Sat Dec 3 14:37:09 2011 -0500
FBSD: switch afsi_SetServerIPRank implementation
Upstream has removed the ia_net{,mask} elements from
struct in_ifaddr, so we can no longer use them directly.
Switch to passing an rx_ifaddr_t (i.e. struct ifaddr*) in instead,
as that uses a slightly different codepath which still works
for our purposes.
We compile the kernel module with -Werror, so storing a pointer
(memcpy return value) in an int is forbidden, hence the conditional
declaration of 't'.
Change-Id: Ifefef88a353f4bd50a714ad88afa3a6f012fa3a1
Reviewed-on: http://gerrit.openafs.org/6203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit aefb10920740e537aa26d841d16302e6ce8e3d76
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 20 18:07:41 2011 -0500
rx: Helper function for decrementing conn refcnt
The code to lock the reference count mutex, reduce the connection
reference count, then unlock the mutex, is duplicated many times
throughout rx.c. Replace all of these multiple copies with a single
inline function.
Change-Id: I7adb460019d7434b32a16250cc026be667e7c55d
Reviewed-on: http://gerrit.openafs.org/6218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 64b00c3a1a87739621f58c777fc3cc54fb15a0af
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 20 16:31:28 2011 +0000
rx: Hide the rx_packet.h
Hide the rx_packet.h, and hence the rx_packet structure from
application view. rx_packet.h is currently still installed, and is
included directly by RX security classes, to reduce the per-packet
overhead there.
Change-Id: I269ccf4405a8f83cab4b0392b830bc1f36471c29
Reviewed-on: http://gerrit.openafs.org/6182
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a57f6434e81539d3f261f0dd57327ae4dcd98caa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 3 21:20:05 2011 -0500
Windows: define MIN and MAX
MIN and MAX are used throughout the tree. Windows does
not define them. A future patchset should convert the
openafs src tree to use min and max.
Change-Id: Ibe7bba6a49e3c85f94cd1e1c45e904764bf06e02
Reviewed-on: http://gerrit.openafs.org/6209
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d3eaa39da3693bba708fa2fa951568009e929550
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 20 14:58:28 2011 +0000
rx: Make the rx_call structure private
Hide the rx_call structure for public view. Provide accessors for
those elements which are currently accessed by applications.
Note that this change as it currently stands removes the visibility
of the last sent time, and sequence number information, from the
VolMonitor function.
Change-Id: Ib25ab5635126f893ae43acb684d92a78278d6ca6
Reviewed-on: http://gerrit.openafs.org/6181
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit aa76c8f670012d4591489db374bad48118defa36
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Nov 15 10:40:44 2011 +0000
rx: Make struct rx_connection private
Move the rx_connection structure into a private header file, so that
it is only visible from within the rx module. This allows us to use
types within the structure that are not visible to everywhere that
includes rx.h, as well as being a step towards a more stable ABI for
RX.
Add accessor functions for all of the connection members which are
currently used by external callers, and modify those accessors
which were implemented as macros to also be functions.
Change all external access to the connection structures to use these
new functions.
Change-Id: Ife67e63f37cb04273fbfc9079db3907bde78ab98
Reviewed-on: http://gerrit.openafs.org/6180
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 01f55bbf14210ef3e4f4c0246409af370de3a383
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 3 17:49:47 2011 -0500
Windows: apply Nat Pings only to cm_rootUser connections
Use CM_UCELLFLAG_ROOTUSER flag to identify the cm_rootUser
connections and only apply Nat pings to those connections
instead of examining the security state of the connection.
Change-Id: I978501972509d1e58b08b630e1ff046b404e59d8
Reviewed-on: http://gerrit.openafs.org/6208
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2495d02951fa1a9f6f48cc2a5bc7750f310dae75
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 3 17:46:41 2011 -0500
Windows: track cm_rootUser connections
Add CM_UCELLFLAG_ROOTUSER flag to cm_ucell_t for the purpose
of tracking which connections belong to the cm_rootUser.
Change-Id: Icd809631637d4fc6c2bb1bd93e7cab74f2fb5c2b
Reviewed-on: http://gerrit.openafs.org/6207
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f37df60763a306fb70f791f7dcba9cec2ec27c7e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Dec 3 15:45:53 2011 -0500
rx: rx_conn/rx_peer refCount signed
Can't trace reference count underflows with rxi_LowConnRefCount
and rxi_LowPeerRefCount if they cannot become negative.
Change-Id: I429da00a8e711c2e562378ec5d6601093293a55b
Reviewed-on: http://gerrit.openafs.org/6205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5c6640bf0b2b365d4871051db7a1be6075d44666
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Dec 3 21:10:43 2011 +0000
rx: Some kernels have no reschedule function
If RXK_TIMEDSLEEP_ENV isn't set, then Unix kernel cache managers
call rxevent_Init without a reschedule function. Check for this so
we don't end up calling a NULL function in these situations.
Change-Id: I5e89f5247aeffc4c27d3f81c0ccabe4979232846
Reviewed-on: http://gerrit.openafs.org/6206
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: Benjamin Kaduk <kaduk@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0fb7d852845effce50d896416cf8b4ba3c19d6e1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 23:38:01 2011 -0500
Windows: npdll connected query returns no usage
In response to a NPEnumResources CONNECTED scope query, the usage
field is always set to zero. If the CONNECTABLE flag is set,
mpr.dll will filter the entry out of the result list.
Change-Id: If939f9f168fe2e02a1a8287c661ec2e1cda5eb8f
Reviewed-on: http://gerrit.openafs.org/6195
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b34a2df4c706838e680bdcd15528862c49b5ba6c
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Dec 3 11:20:57 2011 +0000
Windows: Use roken's min and max
roken provides min() and max() macros. Use these, rather than our own
MIN() and MAX()
Change-Id: I82456c061cb274490e2ef2966a7075c2bde1f016
Reviewed-on: http://gerrit.openafs.org/6196
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3328770612b7205abb92df5b5f4737eb3349c910
Author: Edward Z. Yang <ezyang@mit.edu>
Date: Sun Nov 20 15:48:33 2011 -0500
Add OpenAFS to the dependencies of remote-fs.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Change-Id: Icd1fd34dc3a5c849a2b698c1da08eb4003e6efa1
Reviewed-on: http://gerrit.openafs.org/6093
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c22aa6c121bfbc71d5d6d4b628ee4585f4e134cf
Author: Ben Kaduk <kaduk@mit.edu>
Date: Fri Dec 2 20:24:04 2011 -0500
Remove dead code from rxi_FindIfnet()
There is a separate implementation for DARWIN and XBSD above, so
having a check for DARWIN here is pointless.
Change-Id: I66741dd1d8dbddc19809fd6e6fcd0897f047f222
Reviewed-on: http://gerrit.openafs.org/6193
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1c4cd446605706e55e415cec15841acf8b1572e1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 20 16:29:55 2011 +0000
rx: Refactor MaxMTU error checking
The error checking on the rxMaxMTU parameter was done individually by
every server that sets it, using "internal" RX #defines to do so.
Instead, do the error checking within the function that actually sets
the MTU, reducing both the amount of code duplication, and the amount
of RX knowledge held within the servers.
Change-Id: Ic2cdd9425d5344a5137f76f66f711f4dee91a7b6
Reviewed-on: http://gerrit.openafs.org/6091
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit ae227049fca2519e1f5ae1e8b68efbff10ebb665
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Dec 2 14:36:59 2011 -0600
salvager: Create link table with volume group id
The link table needs to be created with the VG id or RW vol id, not
the non-RW vol id. Unlike other special inodes, this goes for both the
'parent' and 'volume' volume ids, not just the 'parent' id, since
there is only one link table per VG.
Without this, the salvager can generate invalid linktable special
inodes if it encounters a VG with no inodes for the RW vol.
Change-Id: I10725c514ef1b8a5b09a506e42596b51b74af5a2
Reviewed-on: http://gerrit.openafs.org/6179
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 53230846a202a50f6c3a61b38d62ccba8876f89d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 30 17:41:53 2011 -0600
DAFS: Ensure logging on attach2 errors
The attach2 error path transitions a volume to VOL_STATE_ERROR, in
case whatever got us to that error path did not already put the volume
in an appropriate state. Log when we do this, to make sure we do not
end up with a volume in VOL_STATE_ERROR state silently.
Change-Id: I02c842b64882d96e707e867ee0f7730a2bebd405
Reviewed-on: http://gerrit.openafs.org/6168
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d5d2d00a47cf53054bd18d7404be26bea34cba6f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 30 17:35:56 2011 -0600
DAFS: Avoid unnecessary preattach on FSYNC_VOL_ON
FSYNC_VOL_ON/FSYNC_VOL_ATTACH can be called to "online" a volume that
was actually kept online for the duration of the volume operation.
Avoid calling VPreAttachVolumeByVp_r for such a volume if it's already
attached, in order to avoid an unnecessary log message and to save a
tiny bit of processing.
Change-Id: I7776b933599ec0488941ccbd9a8e1279f5a552f4
Reviewed-on: http://gerrit.openafs.org/6167
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4fd8347e842af61681c1718e456500b92c5b6ea9
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 30 17:21:32 2011 -0600
DAFS: Log more for VPreAttachVolumeByVp odd states
When we encounter "odd" states in VPreAttachVolumeByVp_r, say what the
actual state we encountered was, along with the attach flags, so we
have a better idea of what's going on.
Change-Id: Ic5d07d249db7b51301b3ac903ba987cfa21922ee
Reviewed-on: http://gerrit.openafs.org/6166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f59312c0aee1a5376b29262efc6e6ea71264305a
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 30 17:08:57 2011 -0600
DAFS: Ensure GetVolume errors on ERROR volumes
In GetVolume, after we call VAttachVolumeByVp_r, there is no explicit
check to see if vp is in VOL_STATE_ERROR state. Make sure we don't try
to use such a volume, or blindly transition the volume away from that
state.
Change-Id: Ib2c975ac215eeff28b4ff5f5bb0a387298d7aab9
Reviewed-on: http://gerrit.openafs.org/6165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5fc2365f5dff7f193781093ecb886b4c7391d5a3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 30 14:36:06 2011 -0600
DAFS: Do not transition to ERROR on trivial errors
attach2 can result in many different errors; some indicate that the
volume is in an inconsistent state, but many others just indicate that
the volume cannot be attached for benign reasons (such as VNOVOL if
the volume doesn't exist, or VOFFLINE if the volume is being used by a
volume utility). Currently, for DAFS, attach2 transitions the relevant
volume to the VOL_STATE_ERROR state for almost all errors encountered,
even the benign ones. Instead, skip the error state transition for
error handling paths that do not reflect a "broken" volume.
Change-Id: I07754f715920c4ee30fb156fb2412d1e1a7e2597
Reviewed-on: http://gerrit.openafs.org/6164
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9de84a1e67cb3570dedef4ac4552901210b19e5f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 18:49:23 2011 -0500
Windows: GetInfoTip really set return to NULL
When we are not returning an info-tip string from the shell
extension the string output parameter must be set to NULL.
Change-Id: I63cd9bbe078edd01e62d4b0c810a513dfbf205ae
Reviewed-on: http://gerrit.openafs.org/6183
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3fce5b3541d118bc452fe236e557acde57587462
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 13:41:38 2011 -0500
Windows: memset in RDR_RequestFileExtentsAsync
The logic in RDR_RequestFileExtentsAsync() made it possible
for memset() to be called multiple times on a buffer that
is already known to be up to date. Restructure the code to
make things faster.
Change-Id: Iea09b01f126a6d8915e6bf3dd3978ad4b482eb03
Reviewed-on: http://gerrit.openafs.org/6178
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a60594ef54c1458f6778d0b16d870803e1594d41
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 13:36:01 2011 -0500
Windows: cm_MergeStatus redirector invalidation
The redirector maintains its own cached status information which
must be updated when a DV change occurs that is not the result
of a redirector initiated data change.
If the current old DV is BAD, send a DV change notification.
If the DV has changed and request was not initiated by the
redirector, send a DV change notification.
If the request was initiated by the redirector, send a notification
for store and directory operations that result in a DV change greater
than the number of active RPCs or any other operation that results
in an unexpected DV change such as FetchStatus.
Change-Id: I6dd4c9d450901e4b5d4c8d67841e3b833cebbe1f
Reviewed-on: http://gerrit.openafs.org/6177
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2a2ae16511bae032025ffcfbbe4e78b2de1f8eff
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 13:31:15 2011 -0500
Windows: cm_MergeStatus use new DV to purge buffers
When deciding whether or not to purge buffers on a DV change
it is the new DV that matters not the old DV. If the new DV
is 0, there should be no purging because there are no buffers
to purge.
Change-Id: Ie505348dbbf8173e477645e5022410ddd3028240
Reviewed-on: http://gerrit.openafs.org/6176
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6ee14eef3679fbcdecfe6b1d7879309c9360bb61
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 13:21:24 2011 -0500
Windows: use interlocked increment on cm_buf_t refcnt
For consistency use interlocked increment when setting the
cm_buf_t refCnt to 1 even though it is protected by a lock.
Change-Id: I91fbb1469715ee6b7d6f94f416c59ebcd1645336
Reviewed-on: http://gerrit.openafs.org/6175
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 500ffccfd66123c74a0d32c04801e5906f58e58a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 11:21:46 2011 -0500
Windows: buf_GetNewLocked should use cleaned cm_buf
buf_GetNewLocked() searches the free buffer list for a buffer
that has a 0 refcnt, is not in the chunk that is being populated,
is not actively having I/O performed on it and is not dirty.
If it comes across a dirty buffer, it calls buf_Clean() with
the assumption that buf_CleanAsync() (as it was previously called)
was in fact asynchronous and would return immediately. Instead
buf_Clean() is synchronous and when it completes the buffer will
in most cases be clean. buf_GetNewLocked() should use the newly
cleaned buffer if it is still available and not continue the
search from the next entry in the free buffer list.
Change-Id: Iae629df57b9d27a813f7f4c6740be23bd33fe039
Reviewed-on: http://gerrit.openafs.org/6174
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7dccf17840a53e96b21f8c092910f3e4d7628b71
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 11:19:13 2011 -0500
Windows: fix buf_Recycle() comment
buf_Recycle() does not return with a reference count to the
cm_buf_t object held. Correct the comment.
Change-Id: Ic6acde3178afe59181436d9c10d4ddfb05340372
Reviewed-on: http://gerrit.openafs.org/6173
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c712403f192bd9932f3ec1dce5fb23461d3d0349
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 11:14:11 2011 -0500
Windows: buf_CleanAsync is not async; rename it
buf_CleanAsync() calls cm_BufWrite() which stores the dirty
buffers synchronously. There is nothing asynchronous about
buf_CleanAsync() so rename it to buf_Clean() and buf_CleanAsyncLocked()
to buf_CleanLocked(). Update the comments to remove the references
to the asynchronous processing which doesn't exist.
That is not to say that the call to buf_Clean() in buf_GetNewLocked()
should not be asynchronous; it should. There is no such functionality
at the moment. One approach would be to modify buf_IncrSyncer to
trigger on an event set by buf_GetNewLocked() instead of the call
to buf_Clean(). Another approach would be registering a background
store event. In any case, that is for another patchset.
Change-Id: I4c6d08d2a81b36f3cc43ada96acfa0ff9db23845
Reviewed-on: http://gerrit.openafs.org/6172
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b26161284fef682e570377e70c7ebe5b6e8902fb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Dec 2 11:11:59 2011 -0500
Windows: convert buf_IncrSyncer to pthreads
buf_IncrSyncer() calls rx therefore it should be a pthread
thread so as not to count against the 63 native thread count
limit.
Change-Id: If00eeb7d26bfbf7d0f35addb05290f3704d11a89
Reviewed-on: http://gerrit.openafs.org/6171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2aeb041bb0f5de94d553bc3fb6b2d39c82750952
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 30 23:29:56 2011 -0500
Windows: invalidate rdr for CM_SCACHE_VERSION_BAD
If the cm_scache_t.dataVersion is set to CM_SCACHE_VERSION_BAD,
invalidate the redirector notion of status so that we do not
leak info to users that do not have permission.
If the dataVersion is CM_SCACHE_VERSION_BAD and is updated
with real status info, invalidate the redirector so it attempts
to read the directory contents.
Change-Id: Iaa15b37f7f1863169ffe93ae9bc3d24086a3b734
Reviewed-on: http://gerrit.openafs.org/6159
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 79833cbc64c8ccd051060782a381af1ad0cc8d50
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 30 23:28:46 2011 -0500
Windows: do not set CM_SCACHEFLAG_EACCES twice
correct a merge error.
Change-Id: Iaf57703403a5c7555da730be0907bd31c9dfb34f
Reviewed-on: http://gerrit.openafs.org/6158
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0ee7fcc0a49494ad66778012b7808f80ee3af8d3
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Dec 1 11:20:41 2011 -0600
SOLARIS: Define BSD_COMP for non-UKERNEL on 5.11
We were defining BSD_COMP twice for UKERNEL. Move one of the #define's
up to the !UKERNEL section.
Change-Id: I91b90d666ab83a2037549c3f66ea038234a42e11
Reviewed-on: http://gerrit.openafs.org/6162
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit a9007cf81cb8cb390cbd2e5a93e47b1d231819e8
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Dec 1 12:34:38 2011 -0500
afsd.fuse: link libopr
needed for rbtrees. linktest does so; we also need to
Change-Id: Ic5c8aaa0727a979212ed4f089d915b106c00fac8
Reviewed-on: http://gerrit.openafs.org/6163
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 25672ad8cdda42231b15937f0d390bea5b9e3b17
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Nov 30 16:20:23 2011 -0500
remove CopyOnWrite2 and unused vars
unused static functions make grumpy compilers grumpy.
Change-Id: I2a48e2993193a615bffe331f19948bfc46fba16b
Reviewed-on: http://gerrit.openafs.org/6157
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cdc26d92ed2022d7a424ca0fffb96bba5e9ea503
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Nov 27 11:23:29 2011 -0500
viced: disable accelerated copyonwrite
don't do multistage CoW
FIXES 130295
Change-Id: Iec35619b970d87a72ed497d4bbec0b9415c9ddf7
Reviewed-on: http://gerrit.openafs.org/6135
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 0c01c36245c53db93ec6418b2b7ff7f679181765
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 29 15:02:12 2011 -0500
Windows: AFSRDFSProvider log to file
For when logging via OutputDebugString() is insufficient, add
a cheap method of logging to a fixed file: c:\temp\AFSRDFSProvider.log.
Set AFSRedirector\NetworkProvider "Debug" to 0x2.
Change-Id: I419bfbe251b8ef58d7c1b7921badde19d72c34e6
Reviewed-on: http://gerrit.openafs.org/6142
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7ba9129141387e7c24a695a94fb602df368e3917
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 29 15:01:00 2011 -0500
Windows: NPEnumResources no Printer support
The AFS Redirector does not support printer shares. If the
query is for printers only (or any other query that does not
permit disk shares as a response) return no more entries.
Change-Id: Ide9fc58489bed7f4a9cf50da24a98a9b2477b72d
Reviewed-on: http://gerrit.openafs.org/6141
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 31d80e64683a6e7ce33ab714759e74a18454110d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 29 14:59:24 2011 -0500
Windows: NPGetConnectionCommon buffer too small
If the specified buffer size is too small, say so. Do not
attempt to copy data in that won't fit. Do not walk beyond
the end of the allocated memory.
Change-Id: Id4a75273d8ec9e9cc8471a963bc32f6cad59163e
Reviewed-on: http://gerrit.openafs.org/6140
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9fa28d7df3034600026aacbfb902a4f92446253b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 29 14:55:55 2011 -0500
Windows: no drive subst for NPCancelConnection
NPCancelConnection() must use the results of a Get Connection
ioctl to the afs redirector and not the result of Drive Letter
Substitution queries via DosQueryDevice(). Rename NPGetConnection()
to NPGetConnectionCommon() and add a new parameter to indicate
whether drive substitution is ok.
Change-Id: I42cd4488038f128ae90356a41bc538966d9cebed
Reviewed-on: http://gerrit.openafs.org/6139
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit abfa8f00293780fd751ba8de3ee4ce6cbdb00e90
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 29 14:54:24 2011 -0500
Windows: refactor NPCancelConnection
refactor NPCancelConnection to consolidate some conditional
blocks to improve readability.
Change-Id: Ic3aaaac10809caeaab10fdb6c759be8d55d1f75c
Reviewed-on: http://gerrit.openafs.org/6138
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d6900a7cd1722648f4107f82d0d74d01f6da1810
Author: Chris Orsi <corsi617@yahoo.com>
Date: Sat Nov 26 17:26:10 2011 -0500
Windows: Mount Point and Symlink Overlay Icons
Change-Id: I34b8166664f54878eb58a0dcc3e1241cb977aa5f
Reviewed-on: http://gerrit.openafs.org/6137
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit bd7cecb3277b2980a880c68e70a7ca761285347c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 28 18:42:21 2011 -0500
Windows: Wix disable integrated logon by default
One of the significant differences between the NSIS and Wix
installer packages is that NSIS does not activate integrated
logon by default whereas the Wix installer does. Enabling
integrated logon without configuring the cell, CellServDB,
installing Kerberos v5 and configuring krb5.conf can result
in a very long wait at logon. Now that NSIS is no longer
being supported and cannot be supported as a native 64-bit
installer mechanism we must disable integrated logon by
default to prevent more bad end user experiences like
@Lotterleben described on Twitter.
Change-Id: I10be4185177f94e53295a7641dd387feb295eaa5
Reviewed-on: http://gerrit.openafs.org/6132
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 043c31bf8d81f5aba968f69c613b639e1d0e3ee7
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 21:21:39 2011 +0100
rx: Use a red black tree for the event stack
Instead of the current event stack, which uses a sorted linked
list, use a red/black tree to maintain the timer stack. This
dramatically improves event insertion times, at the expense of
some additional implementation complexity.
This change also adds reference counting to the rxevent
structure. We've always had a race between an event being
fired, and that event being simultaneously cancelled by
the user thread. Reference counting avoids that race resulting
in the structure appearing twice in the free list.
Change-Id: Icbef6e04e01f3eef5b888bc3cb77b7a3d1be26ae
Reviewed-on: http://gerrit.openafs.org/5841
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a9682775fcb047e4bcd3994d582ada430d28e264
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Fri Nov 11 09:33:31 2011 +0000
Unix CM: Build rbtrees in kernel
Build the new opr rbtree code in the Unix kernel module
Change-Id: I8271b209c8c17c4c651f2499cd8f60e44818a828
Reviewed-on: http://gerrit.openafs.org/5842
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 073edd3fbdf442249920acea8f3ee90b6346bf23
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 29 12:07:49 2011 -0600
udebug: Fix endianness when fudging lastYesHost
hostAddr is in NBO, lastYesHost is in HBO.
Change-Id: Id11046426512c79b8e760841e1e13cf91deb0b4c
Reviewed-on: http://gerrit.openafs.org/6136
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 82809787d5addcec4a64ce71bb5b7d389ee4623b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 28 19:15:33 2011 -0500
Windows: FSync not CleanVnode during Cleanup
cm_FSync() is buf_CleanVnode() plus a sync of metadata which
is required during last handle close.
FIXES 130351
Change-Id: I25635e3c9768dbf7d9501178b99cdd64a5be7789
Reviewed-on: http://gerrit.openafs.org/6134
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit bf4f9f33dc55150d991d9eec4ea95d78208f6949
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 28 18:45:55 2011 -0500
Windows: Wix cell names can be greater than 120 chars
Increase the permitted length in the UI to 255 characters.
Change-Id: I33d3f546da8b38f89bb88352abcb908879728771
Reviewed-on: http://gerrit.openafs.org/6133
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 006815ca2f4df1ed5236fc377da2647895853b0a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 28 15:13:43 2011 -0500
Windows: cache format version change
With the change to the size of the osi_mutex_t and osi_rwlock_t
structures the CM_CONFIG_DATA_VERSION must change to force a
reconstruction of the cache file.
Change-Id: I0aadd2f7c699a5daaa87acf749957ff65d51fe6e
Reviewed-on: http://gerrit.openafs.org/6131
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a07338f4ccc5062e224405ccda0c9ed41e666f5e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 26 17:26:50 2011 -0500
Windows: osi_mutex / osi_rwlock changes
Reorganize the osi_mutex and osi_rwlock structure so
that all counters are 32-bit and pointers are
aligned. This requires adding padding fields.
Move lock validation checks within the critical section.
Include additional assertions checking the ownership
state and protecting against under/overflows.
Increase the size of the rwlock tid array to support
a larger number of simultaneous readers.
Change-Id: Ia46684c601a1a589a210a36862ae6ad6448a435e
Reviewed-on: http://gerrit.openafs.org/6130
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5d7adc6b67dedf0dc888196812e66b131cf91bbc
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 26 10:55:27 2011 -0500
Windows: convert daemons threads to pthreads
The daemon threads make calls to Rx and therefore need to
be created with the pthread package to prevent the threads
from being tracked as 'native' threads by the pthread_thread_shutdown
thread which can only track up to 63 native threads.
Change-Id: I8d096be9398a0a541bb59eb245cd7b3fe6f3843c
Reviewed-on: http://gerrit.openafs.org/6119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8e14168c9c77850ce0603d56f8aa280f73cb3114
Author: Ben Kaduk <kaduk@mit.edu>
Date: Sun Nov 13 13:12:50 2011 -0500
FBSD: cleanup dvp locking for ISDOTDOT
This is a more correct version of
c2ed2577f9c16df3088158fb593d7aab6e8690d0, which was reverted since
it caused build issues on some versions and kernel panics on others.
We do want to always unlock dvp before calling over the network
in the ISDOTDOT case, but be sure to use the proper spelling
for this operation (as the syntax has changed between FreeBSD versions).
This requires not unlocking dvp right after the afs_lookup() call if
it succeeds, letting us just lock the "child" vp (which is actually
the parent starting from '/') first, and then re-lock dvp.
The error case of afs_lookup() was already handled correctly in
this logic, which is to say that it was incorrect before this change,
attempting to recursively lock dvp which causes a panic.
Change-Id: Ide29e47991413dadc3a2b5948f0f6c5bfa2911c4
Reviewed-on: http://gerrit.openafs.org/6127
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 730832073a1e87654f28bfff054e24d4170c01dc
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Nov 27 10:42:59 2011 -0500
namei: force-close fd on read or write error
if we errored, just reallyclose so we'll get a new fd
Change-Id: I55de45a96dc7fab481a49c10c68f2ebc0d4ea27c
Reviewed-on: http://gerrit.openafs.org/6126
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 0f9214164ad56bfe74d0f2cec8775a312f5128dd
Author: Edward Z. Yang <ezyang@mit.edu>
Date: Sat Nov 26 19:32:51 2011 -0500
Linux: 3: Update specfile to know about 3.* kernels.
Update spec file to be consistent with acinclude.m4 with regards to
sysnames. We don't bother updating the code inside the legacy kernel
build section, as it doesn't get triggered for 3.* kernels (it should
probably get cleaned up at some point.)
Also, fix a bug in error message printing of unrecognized kernel.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Change-Id: Ife6046db0bec981be59aa053f63ae71458da7167
Reviewed-on: http://gerrit.openafs.org/6120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2373547a86c12f72261072971b8d47e6b7cdd4e6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Nov 23 16:30:55 2011 +0000
Unix CM: Fix PutVolume in afs_BlackListOnce
It isn't safe to keep accessing a structure once we have Put our
reference to it.
Change-Id: I6f23a054c3ccde21aa17e07d06dd3c6e7761c098
Reviewed-on: http://gerrit.openafs.org/6117
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 53d55cf35327ec08c2f2ed5dea4138cdc2d46de7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 22 09:31:45 2011 -0500
Windows: add trace logging to Pioctl File Info Query
Change-Id: I357518a341dd97aa94c30ae9c0defa56a97eb920
Reviewed-on: http://gerrit.openafs.org/6110
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 030157166795628bbfa81e8b4b7ede35dfead8d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 22 16:36:18 2011 -0500
Windows: _._AFS_IOCTL_._ size is zero
When replying to a FileStandardInformation query on the pioctl
special file, the size of the file is 0. Failure to return 0
can result in an anti-virus program attempting to read the file
via a paging request which will fail.
Change-Id: I83f2f40cca99c04a5fe06546f19bdf96dfbb4951
Reviewed-on: http://gerrit.openafs.org/6109
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 039ffe2a036217e7d23c7466c77b69df50a603f7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 21 21:47:38 2011 -0500
Windows: RDR_InvalidateObject do not hold locks
Do not hold any locks when calling the afs redirector. Holding
a lock can cause a deadlock.
Change-Id: I5fb493d68e3cf3a8e58024b3b9f54349928f84c3
Reviewed-on: http://gerrit.openafs.org/6105
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d42db13152fb8fa374db6531020da6effca51ab4
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 21 13:14:40 2011 -0500
Windows: cm_GetSCache do not release unheld lock
if cm_GetNewSCache() fails, an attempt would be made to
release cm_scacheLock which is not held. However, it should
be noted that cm_GetNewSCache() cannot fail without itself
triggering a panic.
Change-Id: I316e33712440c2bd816294ad788ad125ab7b4a73
Reviewed-on: http://gerrit.openafs.org/6103
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 887791bacf8a1b39a610734e5c27c55f88513750
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 21 08:42:13 2011 -0500
Windows: Use Jenkins' Hash
Replace the non-string hash functions with Jenkins' Hash
derived hash values.
Bump the cache version value because the hash function has
changed.
Change-Id: I9de789a48abab38ceb16e928bfc0c10e2a88747e
Reviewed-on: http://gerrit.openafs.org/6102
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 20448059f02d07eccf7f81fdb55b80e566acfecc
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Nov 20 23:40:51 2011 +0000
opr: Add Bob Jenkins's hash functions
This imports a small subset of Bob Jenkins lookup3.c hash functions
into the opr library. At present we only import the subset of this
that deals with aligned arrays of integers, as this addresses our
immediate need.
It seems likely that if we're interested in a hash function for string
arrays (or other arbitrary data), that more recent functions such like
SpookyHash (from Bob Jenkins, again) or CityHash (from Google) may be
a better solution.
The immediate use case for this is removing the use of the '%' operator
when indexing speed critical hash tables, as well as ensuring fairer
distribution of entries across these tables.
A short set of test cases is also provided
Change-Id: I0ae26382e77da02204a30a95747f7d6de8c4f24a
Reviewed-on: http://gerrit.openafs.org/6095
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f1dd2d696fb9ab71b4192b156042e0c63019c58a
Author: Anders Kaseorg <andersk@mit.edu>
Date: Sun Nov 20 19:00:00 2011 -0500
Linux: 3.2: Use set_nlink to update i_nlink
As of v3.2-rc1~84^2~1, struct inode.i_nlink is now const to prevent
direct modification.
Change-Id: If0a38ffb7f9964e23f5e64c900ae92f56fb77def
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/6096
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e14dec55e6600edb60ce5184b4ab1f646c68947b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 15 13:18:48 2011 -0600
afs: Leave cellnum alone for explicit mtpt cell
When a mountpoint is given an explicit cell, don't alter cellnum.
Cellnum represents the cell for the parent, and is used for
determining whether or not we're crossing a cell boundary.
Previously, this code forced the mount point to always be treated as
foreign (for a mountpoint prefixed with a cell name), or to always be
treated as local (for a mountpoint prefixed with a cell number).
Change-Id: I7b98ccc94bf61dc3d7be0b7d6b54019cd797e884
Reviewed-on: http://gerrit.openafs.org/6051
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 51f71e533b20cd875eec8adda71edea044a606da
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 11 11:00:47 2011 -0500
namei: tweak getlinkbyte error handling
in the event of a pread error, add the same error exit path
trigger that we have elsewhere
Change-Id: Id7a371f3fd710f3c6dad21bccb0662cf8562d99f
Reviewed-on: http://gerrit.openafs.org/5843
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 0e3bfa033ed230fcb46ad8e3c26c8b7aae6e00af
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Oct 27 17:53:47 2011 -0400
auth: avoid excessive stat of cellservdb
The modified time resolution is one second, so only
stat the cellservdb file at most only once per second.
Change-Id: I7d9a58f9af72b8c36b50374e49c07b4db85285e0
Reviewed-on: http://gerrit.openafs.org/5743
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 639ca379e47fbe550d090fff9e635ad24e8e34f0
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Nov 3 17:09:28 2011 -0400
vol: rate-limit volume usage updates
Add threshold and time rate-limit parameters for volume usage
updates to disk. This reduces the amount of i/o needed for
volume usage statistics on very busy fileservers. Set the
default to limit updates to one every 5 seconds per volume.
Change-Id: I6b4274476ef6b8f9e4288b109d5a3edbdea6e91c
Reviewed-on: http://gerrit.openafs.org/5803
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8ce811e34379615f942e9ca73d1ba78bfe742042
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 18 09:54:43 2011 -0500
Windows: RDR_RequestFileExtentsAsync unheld lock
commit 55f5f356af2ef884413bd656f100055741ae871b forgot to remove
a lock_ReleaseWrite(&scp->rw) in RDR_RequestFileExtentsAsync().
Change-Id: I787ceddcada3659c7b2fae9bb90aa005a71d2ceb
Reviewed-on: http://gerrit.openafs.org/6075
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ac1251ead12434a12fb8e7d6787845f534565039
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 18 00:39:24 2011 -0500
Windows: must obtain and release an actual lock
Change-Id: I2bb490ba3c1db05c4dc7660ca7319d7d96d16c0f
Reviewed-on: http://gerrit.openafs.org/6072
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1379fb6de4d2134160fcc95cbbee4bd6048eaeaa
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 17 00:30:24 2011 -0500
Windows: non-release only worker threads can release
There are two classes of worker threads created by the service
and donated to the afsredir as part of the reverse ioctl processing
model. Normal workers can process any kind of ioctl and Release
Only workers that can only process release extent events.
Use a KeWaitForMultipleEvents in the normal worker case to permit
processing any type of event. The previous implementation excluded
release extent ioctls from the normal workers.
Change-Id: I05e86f62c08e322cf7aa9bdd2fd325919bcbfe8f
Reviewed-on: http://gerrit.openafs.org/6071
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 833d076e04ac09270a203a9ff449ae2af8bdad7e
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 16 00:29:34 2011 -0500
auth: initKeys before first error exit path
In afsconf_OpenInternal() _afsconf_InitKeys() must be called
before the first opportunity to call afsconf_CloseInternal()
or a crash can occur if the CellServDB file cannot be parsed.
Change-Id: I5b2487056a24d0c4ad78921d85df755758c7679e
Reviewed-on: http://gerrit.openafs.org/6059
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1c97c04add6639a11e88d412e369771bf6f0f281
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 16 10:33:41 2011 -0500
Windows: Do not install IBM AFS HLP files
The IBM AFS HLP files are so out of date at this point
that they are simply confusing. They reference tools and screens
that no longer exist and claim the product is "IBM AFS". Incorrect
documentation is worse than no documentation.
The HLP files cannot be updated since we do not have the sources.
HLP file format is no longer supported on Windows Vista or 7.
The afs-nt.hlp file will continue to be installed conditionally
when afscreds.exe is installed but the shortcut to it in the
Start menu is being removed. afscreds.exe is not installed by
default.
Change-Id: I3443a5c4ca65472a16cbf7ae1d52da39e917136a
Reviewed-on: http://gerrit.openafs.org/6065
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit fd42e08bf1882a02c3200e1c33a101e644aa046a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 15 18:35:26 2011 -0500
Windows: buf_CleanAsyncLocked dirty range only
buf_CleanAsyncLocked() should not instruct cm_BufWrite() to
write a full chunk if the current buffer is the only one that
is dirty. cm_BufWrite() will determine if it is appropriate
to fill a full chunk when storing. Instructing it to check
a full chunk forces it to do more work than necessary.
Change-Id: Ie140d405147d700196532b72f04885a301a2550f
Reviewed-on: http://gerrit.openafs.org/6054
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 55f5f356af2ef884413bd656f100055741ae871b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 15 18:23:46 2011 -0500
Windows: create scache->redirMx to reduce contention
Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue*
results in a large amount of contention between processing extent
requests and releases from the afs redirector and the threads attempting
to read from or write data to the file server. There is no reason why
the same lock must be used. Allocate a dedicated mutex to protect the
queue.
By placing the new mutex after the buf_globalLock in the locking
hierarchy it permits the lock acquisition logic for extent processing
to be simplified further reducing cm_scache_t.rw lock transitions.
Change-Id: Id2ded86c1f3757a2f1071c8cf39f2fbc6bcfcfaa
Reviewed-on: http://gerrit.openafs.org/6053
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 042f6c08e3be0af3ef1cc4a0bfc4688c3e2ef7d0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 15 19:03:14 2011 -0500
Windows: Increase default number of daemon threads
With the SMB interface there was little benefit to having
a large background daemon worker pool since it was so rarely
used. Now that the redirector does everything in the background
daemon workers, increase the default from 4 to 16 threads.
Change-Id: I319182e4c539c14d06fe62dde2b41a159e4edea6
Reviewed-on: http://gerrit.openafs.org/6058
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 320c7292e6ae014e44e89b0da736bcc04ef42b2b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 15 19:00:05 2011 -0500
Windows: cm_SetupStoreBIOD use firstModOffset chunk
When cm_SetupStoreBIOD attempts to store a chunk to the file
server it should not use *inOffsetp as the start of the range.
There is no guarantee that the buffer at *inOffsetp is dirty.
Instead use firstModOffset which refers to the first known
dirty buffer in the range specified by the caller. Attempt
to fill a chunk of consecutive dirty buffers from that point.
Change-Id: I468e896b046192461d6fe0dc3669e5feeb7886ba
Reviewed-on: http://gerrit.openafs.org/6057
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c904d9a3889b7dd8c8795feaa9e5e4979f681f53
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 15 18:40:21 2011 -0500
Windows: Fairness for background operations
The background daemon worker pool is responsible for processing
background Store and Fetch operations. With the SMB interface
primary store and fetch operations are performed in the SMB worker
thread which makes sense since those operations must be synchronous
to the incoming request.
With the AFS redirector interface almost all of the work is performed
by the background daemon worker pool. It is therefore critical that
the workers not get stuck in a state that starves applications.
For example, copy of a file that is larger than the cache to \\AFS
will result in a background store request for each chunk size of
the file. If each worker thread grabs one to process, only one will
make progress and the rest will block. If a cleanup operation
(aka handle close) occurs the entire file will be flushed to the
server synchronously in the redirector worker thread. That thread
will cause of the background daemon threads to block.
Any subsequent fetch data requests that get queued behind the list
of stores will in turn block until they clear. This behavior is not
fair.
This patchset adds a new test to the cm_BkgDaemon() request
selection loop, cm_RequestWillBlock(). If a request will block it
is skipped. If there are no requests to process that would not have
blocked, the worker will sleep for 25ms instead of the usual 1s.
For BkgStore operations, the CM_SCACHEFLAG_DATASTORING flag is
used to indicating a blocking state.
For BkgFetch and PreFetch operations, the CM_BUF_WRITING and
CM_BUF_READING flags on the first cm_buf_t of the range is used
to indicate a blocking state.
Change-Id: I95d9d1f14dbe0c7d717e6a7253ccfb10a9fac851
Reviewed-on: http://gerrit.openafs.org/6056
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d113c0eb8ac4717cafd7747a78c5aa3b649b8e68
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 15 11:53:12 2011 -0600
vlserver: Avoid atoi for vol ids
Change-Id: I27c30f9320ea6d2093846148ad455eda71b0b713
Reviewed-on: http://gerrit.openafs.org/6050
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit a1871449eec8d9fc1152319bc63e29db7f9ae231
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Nov 15 09:03:59 2011 -0500
Windows: Create default Security Descriptor
A misplaced #endif prevented the allocation of a default
security descriptor. This results in STATUS_INSUFFICIENT_RESOURCES
errors.
FIXES 130284
Change-Id: I9c1d67368a1b5d770a4c9a981bdb4a24f8ad3c8e
Reviewed-on: http://gerrit.openafs.org/6048
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c4d19e5d4271a31fd29c111fb27d145dc83b83b7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Nov 14 17:49:45 2011 -0500
Windows: interlocked refCount increment in cm_GetSCache
Failure to use interlocked operations in cm_GetSCache can
result in an under count
Change-Id: I370bcb9ac8b40f1c1b7ea3b7647fc76e3a554e2c
Reviewed-on: http://gerrit.openafs.org/6046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e55d1774b1b5b27a3617467b5e2a24ee2be3a38c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Nov 13 12:06:18 2011 -0500
Windows: netidmgr krb5_cc_get_principal can fail
Do not dereference a NULL pointer if krb5_cc_get_principal fails.
Change-Id: Ic213f0c41249931441bcedaf551acaa160ff7f0f
Reviewed-on: http://gerrit.openafs.org/6016
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 38fbf93fcc21aaecbf9a7e27d19131b9de4c3839
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 12 18:33:18 2011 -0500
Windows: smb_ReceiveNTCreateX create smb_fid earlier
smb_ReceiveNTCreateX() calls cm_CheckNTOpen() which now
requires the smb_fid_t allocated fid value for use in share
mode locking. Move the allocation of the smb_fid earlier
in the function and apply necessary cleanup in error paths.
Change-Id: Iee0e39cdf393bfd245829bdfb42ddfba63908451
Reviewed-on: http://gerrit.openafs.org/6004
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 5c59d1b500ae4ba5223184fbfe18837891ea30c3
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 12 17:32:06 2011 -0500
Windows: cm_GetSCache avoid holding cm_scacheLock
cm_GetSCache used to hold cm_scacheLock write-locked from
start to finish except that it didn't. There were several
places where cm_scacheLock was dropped and reacquired due
to lock ordering requirements. Unfortunately, this has
two problems. First, the function isn't very fast in the
most common case since cm_scacheLock is write-locked for
the search for an existing FID. Second, there is a race
that results when cm_GetNewSCache() drops the cm_scacheLock.
To make things faster, use a read-lock for the common case.
To avoid the race, if the FID cannot be located, call
cm_GetNewSCache() first and then obtain the cell and volume
information. Then perform a second lookup for the FID while
holding cm_scacheLock write-locked. If we lost the race or
there was an error obtaining the cell and volume info, put
the new cm_scache_t back onto the end of the LRU queue.
Change-Id: Idb94275d23c160ee0a2dc8fdcfd0f09506ecb2d3
Reviewed-on: http://gerrit.openafs.org/6003
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit eb3c9f783b9488181c57ef949e3feddcb02d381a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 12 17:24:12 2011 -0500
Windows: avoid null ptr in RDR_RequestFileExtentsAsync
If the cm_scache_t cannot be obtained, do not dereference it
while returning an error to the redirector.
Change-Id: Ia8aaa33ca4ab410dc1b0100ea5668d5660d90b75
Reviewed-on: http://gerrit.openafs.org/6002
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 090f6279c5496f648893606d298c698f376c7ae0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 12 13:45:08 2011 -0500
Windows: Track active RPCs per scache_t
It has been noticed that multiple RPCs can be active on
a cm_scache_t object at the same time. This is especially
true of directory objects with the redirector. Track the
number of active RPCs and use that number in cm_MergeStatus
when deciding whether or not to discard the cached data for
the object.
Change-Id: If291bb4c0e48d0ec087c3a7c2640e4598e7fd419
Reviewed-on: http://gerrit.openafs.org/6001
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2fc9edc6e34ebef60413fad9a2af2aa73ea1681f
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 12 13:41:30 2011 -0500
Windows: fix locking hierarchy in service
The smb username lock and the daemon global lock can be requested
while the scache dirlock is held if there are no free buffers
and the service is forced to claw back extents from the redirector.
Adjust the locking hierarchy accordingly.
Change-Id: I85387a16ca580d678af45f3931aa5e81fe0a0f2c
Reviewed-on: http://gerrit.openafs.org/6000
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f199ac666195771a02e3ebb040c6e5fe47c58c58
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 2 16:55:49 2011 -0500
afs: Do not use separate array for srvAddrs
The array of srvAddr structs we use in afs_LoopServers have indices
unrelated to the indices of conns, rxconns, etc. Several places were
assuming that addr[i] corresponded to conn[i], which is not
necessarily true. So instead, do not use the separate addr array
(except when populating the conn and rxconn arrays), and just get the
srvAddr structure by going through the relevant conn[i].
Change-Id: Ib60126811f51943bfc81ab7c48d7f247f00f1cad
Reviewed-on: http://gerrit.openafs.org/5790
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a7d569c857234626191514e2780368e1b85a6dae
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 22 16:37:04 2011 +0100
rx: Turn the rxevent_Cancel macro into a function
Turn rxevent_Cancel into a function rather than a macro which modifies
its argument as a side effect. rxevent_Cancel now checks whether the
event being cancelled is already NULL, as well as NULLifying the event
when it is actually cancelled.
Update all of the callers to reflect this new API, and so they no
longer do unecessary work.
Change-Id: I75b68f1c8f1a3023edd6113600663fe2b60d6097
Reviewed-on: http://gerrit.openafs.org/5840
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit be8db58f5a44ce2ee4208de09a5ca1faf6f0f91f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 22 16:22:36 2011 +0100
rx: New signature for rx event functions
For a while now, we've had both new and old-style rx event callback
functions. Modify all of our event handlers, and the functions that
install them, to use only new style functions, and get rid of the
old-style function prototypes.
Change-Id: Ic7c568df9d191edb082fb41fb7705c54ca93cf48
Reviewed-on: http://gerrit.openafs.org/5839
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5574ff814f02078b709cbc0a6c94201ca6fe2eca
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 22 11:22:51 2011 +0100
opr: Add a red/black tree implementation
Add an implementation of red/black trees to our runtime library.
This is originally derived from the FreeBSD macro-based rbtree
implementation, but is heavily reworked to not use macros, to improve
legibility, and to favour speed over structure compactness.
A test suite is provided in tests/opr/
Change-Id: I123209d3f89b5f8c1b85d1e5cd7d1d650ccc68ed
Reviewed-on: http://gerrit.openafs.org/5838
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 43766833ab64564770228566d8459900280c1146
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 22 11:10:53 2011 +0100
rx: Add a helper function for delayed acks
The code to schedule a new delayed ack event is distributed throughout
the RX code. Consolidate this into a single helper function.
Change-Id: If54e36b5648f8caffe64cc2203dc0041fd06b8b3
Reviewed-on: http://gerrit.openafs.org/5837
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1a056d24a79242db09963dd0b0c2193c5034b61b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 22 09:45:10 2011 +0100
opr: Add opr_containerof
Add the opr_containerof macro, which can be used to find the base
address of a structure which contains a member whose location is known.
This formulation is heavily used throughout OpenAFS to determine the
base address of structures containing queue pointers - this provides
a central definition, rather than coding it from scratch each time.
Change-Id: I2a32a214252ad304238f740ad92579e5bb7287be
Reviewed-on: http://gerrit.openafs.org/5836
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b15b4b15822bee87720bb0d78c2ce54051180339
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Nov 5 04:10:42 2011 -0400
Windows: Add Vista/Win7 Firewall Configuration
Make use of the INetFwPolicy2 COM interface to configure
the Vista/Win7 firewall for all network profile types.
Change-Id: Id96d98f6e166f3529a117997f5a3c35b0051d1a4
Reviewed-on: http://gerrit.openafs.org/5812
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b78b8f64a69481e59e957ebe09315fc5b8b60c17
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Oct 5 03:36:48 2011 -0400
Windows: Enforce Share Access
Use file server locks to enforce file share access modes
via the afs redirector interface. The approach taken
integrates share mode enforcement with the file server
lock tracking code in the service. The share mode
enforcement mimics that of the SMB Server interface.
This patchset includes two functional changes to
the previous locking and share mode processing:
1. The cm_scache_t fsLockCount field is used to
determine if the desired lock can be granted
by the file server. If not, the RXAFS_SetLock()
request is skipped and the request is failed
locally.
2. cm_CheckNTOpen() now accepts the desired and
and share access modes. The share access mode
is used to determine if a test lock should be
obtained at all. If the share mode is FILE_SHARE_WRITE
then no lock is requested. This change permits
Microsoft Office applications to offer the user
the ability to open the file in read-only mode
and notify the user when the document can be
opened in read-write mode.
Developed with Peter Scott <pscott@kerneldrivers.com>
FIXES 130239
Change-Id: If9b4beb74586296d4feae52dd06c03f0b8b595cd
Reviewed-on: http://gerrit.openafs.org/5823
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c6a22d67ff9787ace2249d528eb9db99c5b19427
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 10 15:18:41 2011 -0600
SOLARIS: Do not build x86 kernel module on 5.11
Oracle Solaris 11 no longer supports x86 (amd64 is required). If we
try to build the x86 module, /usr/include/sys/kobj.h complains that
the ISA is unsupported, and refuses to go on. So, just remove
MODLOAD32 from the libafs directories to build on sunx86_511.
Change-Id: Ic18936d1a0f53ed290d885617d313347aa6ce87a
Reviewed-on: http://gerrit.openafs.org/5835
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b41e30a55c8aeb6d7f42d74f9eb090232032057f
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 10 11:58:12 2011 -0600
namei: Remove extraneous rmdir
We just unlinked the file, so we know we won't be able to rmdir() the
same thing. Give a path one level higher to
namei_RemoveDataDirectories, so we start rmdir()ing at the parent dir.
Change-Id: Ifa54d1cc07ed2d277416d09eabc45aa1e1c3803a
Reviewed-on: http://gerrit.openafs.org/5833
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4c679e380f697760de777d35fe057229bf2bf762
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 10 11:05:28 2011 -0600
vol: Remove O_EXCL|O_TRUNC combinations
A few places were specifying both O_EXCL and O_TRUNC to open().
O_TRUNC does not make any sense with O_EXCL, and doesn't do anything,
so remove O_TRUNC from these instances to make the code more clear.
Change-Id: Ie8d9d7b9912a96683ef34f762607e75468b5ac78
Reviewed-on: http://gerrit.openafs.org/5832
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit f27480aa2f8a26da3bd7634ff7072c1faac0f448
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 9 22:52:37 2011 -0500
Windows: FSCTL_SET_REPARSE_POINT not yet implemented
Since FSCTL_SET_REPARSE_POINT is not yet implemented
return STATUS_INVALID_PARAMETER to all requests that
do not fail validity tests.
Change-Id: I53d4b4fc9d957daa70b16d37a529778ed8bbfa5e
Reviewed-on: http://gerrit.openafs.org/5829
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 72e5bd1434a6a2238f28f11a149192f44d0b82d1
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 9 22:47:55 2011 -0500
Windows: FSCTL_SET_REPARSE_POINT error
According to MS_FSCC 2.3.54 if the input buffer length is less than the size
of a REPARSE_DATA_BUFFER structure, or the input buffer length is greater
than 16,384, or a REPARSE_DATA_BUFFER structure has been specified for a
third party reparse tag, or the GUID specified for a third party reparse tag
does not match the GUID known by the operating system for this reparse
point, or the reparse tag is 0 or 1, then the return status shall be
STATUS_IO_REPARSE_DATA_INVALID.
Change-Id: I0072902afc8bc354af8f9b84b1021b37191dc23a
Reviewed-on: http://gerrit.openafs.org/5828
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 733aa6a63d8f15dcfe31f24ce31b67b746a2934a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 9 22:45:07 2011 -0500
Windows: FSCTL_IS_PATHNAME_VALID return success
Windows NT, Windows 2000, Windows XP, Windows Server 2003, Windows Vista,
Windows Server 2008, Windows 7, and Windows Server 2008 R2 support the
FSCTL_IS_PATHNAME_VALID Request (section 2.3.21) and return STATUS_SUCCESS
whenever this request is invoked. We will do the same.
Change-Id: I432c8a41e1102648faaa3d8c0f3b8c36ea89bfc8
Reviewed-on: http://gerrit.openafs.org/5827
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3c6e5681245ad4ee267d7e5ca260b38655633a96
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 9 22:42:54 2011 -0500
Windows: these fsctl cmds are not implemented
Return STATUS_NOT_IMPLEMENTED since the following
FSCTL_ operations are not:
FSCTL_LOCK_VOLUME
FSCTL_UNLOCK_VOLUME
FSCTL_DISMOUNT_VOLUME
FSCTL_MARK_VOLUME_DIRTY
FSCTL_IS_VOLUME_DIRTY
FSCTL_IS_VOLUME_MOUNTED
Change-Id: Idfe26a4b71538defd1919be575d62b32dd415a06
Reviewed-on: http://gerrit.openafs.org/5826
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ff7d3a19f032c5d4917cc04eeff9cf92733f1fae
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 9 22:33:11 2011 -0500
Windows: Additional trace logging
Add additional trace logging to the redirector to assist
with debugging reparse point processing.
Change-Id: I89d7a26d7d10ba5fff001d91f5e67baa224f4179
Reviewed-on: http://gerrit.openafs.org/5825
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit b947adbacb5db4ce5e380ea28e1d734fdadd5cdf
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 9 20:05:05 2011 -0500
Windows: service must set reparse point attribute
When populating the directory entry information for the
redirector the service must set the reparse point attribute.
Change-Id: I26db0b822f850f0a19606eeed3c29e0e72562e2f
Reviewed-on: http://gerrit.openafs.org/5824
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d810870ec1a2ad1cb438d776236db3340081fe74
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Thu Nov 10 13:34:53 2011 -0700
Windows: Correctly increment PIOCtl DE
When performing a directory enumeraiton, correctly increment ref count on
the PIOCtl DE structures
Change-Id: I44de6ab2d804378723e31887089aca4890d15fa6
Reviewed-on: http://gerrit.openafs.org/5834
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2c0f857bc8d17d8e02f515d510f9530bc47866d4
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Thu Nov 10 09:06:53 2011 -0700
Windows: FileNetworkPhysicalNameInfo implementation
Handle this File information query
Change-Id: Id16c22396cbb7e22b8958bc0438e58da048f4f70
Reviewed-on: http://gerrit.openafs.org/5830
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit deedf97416e4eaaea79479711ad3c84020fdd1e0
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Oct 30 23:52:00 2011 -0400
Windows: improve store data parallelism
The file server will set the rx call status bit (0x1)
when the rpc is in process and all of the locks are held.
At this point it is not possible for another store data rpc
to begin on the vnode prior to the completion of the current
rpc. Once this status bit is detected as set, the exclusive
store data synchronization on the cm_scache_t can be dropped.
This permits the next store data rpc to perform its biod
construction.
Change-Id: Ic856769650781b4f5f4ab4ac86df4946496bd655
Reviewed-on: http://gerrit.openafs.org/5741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9ba891676a15512fa58915662cf599ea73eac430
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 9 17:04:09 2011 -0600
volser: Preserve needsSalvaged during restore
Some of the routines during a volume restore may set needsSalvaged, if
an inconsistency is detected while writing the given volume data.
However, after the data is read, we set the volume header information
to what was found in the dump stream, ignoring any needsSalvaged that
may have been set.
To ensure that inconsistent volumes in this situation actually get
demand-salvaged (for DAFS) or offlined (non-DAFS), keep the value of
needsSalvaged in the header, if it was set.
Change-Id: I575d14d84120be0fbbeb185ed2726f1285e6f2ce
Reviewed-on: http://gerrit.openafs.org/5822
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit a1669f3e37299c11bf29a458212e03d1bdb22334
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Nov 9 10:34:10 2011 -0500
viced: avoid bogus handle in rename
because fileptr's handle can be reset during CopyOnWrite
we need to SetDirHandle after that call
FIXES 130215
Change-Id: I8578d30da42bdd9be2c552cdac4d2c526c22ee45
Reviewed-on: http://gerrit.openafs.org/5818
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6d519cf1234d54630dcfe48f6ecd393e2dfe71dd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 8 12:52:50 2011 -0600
regen: Fail on failures
If something fails, don't ignore the error.
Change-Id: I3ae90009f0a0f61f269a05b39e9bfe478ccf256f
Reviewed-on: http://gerrit.openafs.org/5817
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 49cb0d00909693b85f52d87a26d5df69a829d9d5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Apr 13 13:15:57 2011 -0500
Add "pretty" build option
Add the capability to do a "pretty" build, where we output something
like " CC /path/to/foo.o" to build foo.o, instead of the entire
compiler invocation, similarly to how the Linux kernel build appears.
Add the "pretty" building for CC and LD rules.
This also prints out some helpful information when a command fails,
which can sometimes otherwise be annoying to figure out post-mortem.
To enable the pretty building, make with V=0. To output everything
that is actually run with V=0, make with 'V=0 Q=' .
Note that this does not work with all makes, since not all makes will
propagate command-line-specified variables to sub-makes without -e.
Non-working makes include /usr/ccs/bin/make on HP-UX and Solaris.
However, GNU make will work, as will /usr/xpg4/bin/make on Solaris.
Change-Id: Idce0afffe7d5be88b0743ec3f926a52efb1a6a74
Reviewed-on: http://gerrit.openafs.org/4486
Reviewed-by: Russ Allbery <rra@stanford.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5c64df8628e60f2e4c55aaf3e53fb01c140b42ed
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Nov 8 12:29:39 2011 -0600
Specify pattern rules in addition to suffix rules
A few makefiles specify an old-style suffix rule, such as:
.c.o:
$(AFS_CCRULE) $<
Not all makes seem to interpret these rules correctly (such as Solaris
/usr/xpg4/bin/make). Since it is easy to do so, specify pattern-based
rules along with these, like so:
%.o: %.c
$(AFS_CCRULE) $<
Change-Id: I052f1156d1a7e29beedb0fb59390073c2521459e
Reviewed-on: http://gerrit.openafs.org/5819
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 70e8451acd0426024c152073e53bc6606e0189e1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 3 13:40:37 2011 -0500
Add setenv/unsetenv to roken
Add the replacement setenv and unsetenv functions to roken, for use on
(at least) HP-UX and older Solaris.
Change-Id: Id05137b6e6c88eb6648bd6a6e649f9ef311e32a4
Reviewed-on: http://gerrit.openafs.org/5801
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 00beae8c4e3b390637f20584e676cf86c817dadd
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Nov 6 16:28:27 2011 -0500
dafs: avoid null deref getting volume header
we don't assign hd before dereferencing. stop dereferencing
and just use the queue cursor.
Change-Id: I023fd959c5d49575dbdf89fd4dab77341c5c52d0
Reviewed-on: http://gerrit.openafs.org/5814
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7fee28bae30c5a65898a2e3fd7149f07e8ca0df6
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 3 13:17:33 2011 -0500
salvager: Implement AskDAFS via SYNC flags
Instead of probing the DAFS-ness of the fileserver by probing which
FSSYNC opcodes it supports, detect DAFS-ness by looking at the SYNC
response header flags, which explicitly state whether or not the
endpoint is DAFS. This avoids unnecessary "protocol mismatch" log
messages when the endpoint is not DAFS.
Change-Id: Ie05a587951d6d5f69ae03cf3749f8c53e1eb6b62
Reviewed-on: http://gerrit.openafs.org/5800
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 47b010d1e1d0e8bdbbcad73d5aedc19719d5d96a
Author: Derrick Brashear <shadow@dementix.org>
Date: Sat Nov 5 11:24:43 2011 -0400
redhat: make rpms build on pre-f15 again
we don't have systemd everywhere. don't assume it
Change-Id: I4038bc1e1aff804e685d1987e368f2be1af35b05
Reviewed-on: http://gerrit.openafs.org/5813
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b06c700ee40ca70ef08259af819e2a6084137457
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Nov 4 11:43:01 2011 -0400
ukernel: handle pioctl errors properly in ktc
the straight return from call_syscall isn't what we want. munge so
e.g. EDOM handling for ktc_GetToken does the right thing.
Change-Id: I3fbba799e0156bad29b27c74a1c7709ee8c50c34
Reviewed-on: http://gerrit.openafs.org/5807
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit c96d3429f2d4ad2ec7ac45a83c1111dc60a0d5c1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Nov 4 16:12:03 2011 -0500
libafsauthent: Remove obsolete HP-UX workaround
This workaround is no longer relevant. It is also error-prone and
there are far better ways to achieve a similar result, so get rid of
it.
Change-Id: If77f0cd95c8c608913d0c8717729a05c1ad67df9
Reviewed-on: http://gerrit.openafs.org/5811
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2a1251c5d0c1b0fd4024d7b3282187a838b551fd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Nov 4 17:19:28 2011 -0500
volser: Remove debugging log messages
While the -log option to volserver is supposed to print additional log
information, it shouldn't spam the log with useless data. Remove some
of the log lines that are really more "debug" information, so we log
the same amount of information as in the 1.4 series.
Change-Id: I1fd93344a7ebe11c6d5ad507dad87babe517785a
Reviewed-on: http://gerrit.openafs.org/5810
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 025a7aee0b86c7d8a7299c85c88615eb8cd6b07f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Thu Nov 3 10:10:23 2011 +0000
Unix CM: Fix dir buffer leak in afs_readdir
Resolve a buffer leak in afs_readdir that was visible on all non-Linux
platforms (Linux has an independent readdir implementation)
Change-Id: Ia5106f0e5c57430d3483b6add5b1629ff3fbc7b3
Reviewed-on: http://gerrit.openafs.org/5794
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c2ee7b00ddfe8b1b8c296a99f0244eb33c726e8e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Nov 4 12:42:33 2011 -0500
DAFS: Deal with exclusive-state volume headers
GetVolumeHeader assumes that headers on the LRU are not associated
with a volume in an exclusive state. This is known to not be true for
some cases when salvage requests are received over FSSYNC, and may be
true in other scenarios. It's easy to just skip such headers, so skip
them.
Change-Id: I343d2e4f7af1c753641767be322420f38873c217
Reviewed-on: http://gerrit.openafs.org/5808
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit da00d719a77607d8873067902f5db5bff02d0e99
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 4 09:34:53 2011 -0400
Windows: NPCancelConnection set correct length
The RemoteNameLength passed in the IOCTL_AFS_CANCEL_CONNECTION call
must not include the trailing NUL. NPGetConnection() returns the
size of the buffer used which does include the trailing NUL.
Change-Id: Ic5eae51aade91db4a799bea83d898af6fbc37504
Reviewed-on: http://gerrit.openafs.org/5806
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 3acd9b854e05748578f8291200fad8c6650e9b14
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Nov 4 08:40:03 2011 -0400
Windows: do not leak resource in AFSQueryDirectory
Track whether or not the pFcb->NPFcb->Resource is held so
it can be released in all error paths.
Change-Id: I8c8bfb912329e8c11ac7857086412d85aa64fea6
Reviewed-on: http://gerrit.openafs.org/5804
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8d0910be59975ef0e19c5d89fef4419700224bde
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 3 16:39:18 2011 -0400
Windows: KFW_AFS should use API: ccache
During the Heimdal transition that default ccache type
was changed to FILE. Restore the use of API: ccaches.
Change-Id: Idd8dfb46fc9167d8c1eb44466b76906a152eef9d
Reviewed-on: http://gerrit.openafs.org/5802
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 100144f28bf166d59bfd6c58ede3bbf1923e5532
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Nov 3 14:14:52 2011 -0400
Windows: Simplify KFW_AFS_klog
Reduce the complexity of KFW_AFS_klog. Introduce
KFW_AFS_continue_aklog_processing_after_krb5_error() and
combine the input realm and realm_of_cell cases making
use of the RealmName variable.
Change-Id: I363544548652bc892f50dce00865e13e7d42de7f
Reviewed-on: http://gerrit.openafs.org/5799
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f7adbd3d3977a328612c0f527d764566846593da
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Fri Nov 4 07:31:57 2011 -0600
Windows: Failed to release correct lock
For cross-directory renames, the correct parent lock was not being tracked
Change-Id: Ib50aad63f56cde638ff3bf1595d4495338c15f91
Reviewed-on: http://gerrit.openafs.org/5805
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c59c07132ef17589ad3466ded418c1370539b7af
Author: Ken Dreyer <ktdreyer@ktdreyer.com>
Date: Mon Oct 31 08:27:16 2011 -0600
doc: limitations of addsite on different partitions
A user on the openafs-info mailing list noted that the Admin Guide is
unclear about creating read-only replicas on different partitions on
the same fileserver. Clarify the rules here.
Change-Id: I8229b4fba36c128772bb8198e6b8310a51206c03
Reviewed-on: http://gerrit.openafs.org/5745
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c0961b8d4103fab37c360461bcde30c56d24f483
Author: Heimdal Developers <heimdal-discuss@sics.se>
Date: Thu Nov 3 12:37:36 2011 -0500
Import of code from heimdal
This commit updates the code imported from heimdal to
ee7340860a22f81fb869cc431efc1fd4e5c77d34 (switch-from-svn-to-git-2542-gee73408)
Upstream changes are:
Jeffrey Altman (2):
Windows: fallback to PROV_RNG if no PROV_RSA_FULL
roken: posix errnos for windows
Love Hornquist Astrand (3):
drop __restrict to please old compilers
add krb5_is_enctype_weak
Don't export tests from library, reported in bug from Tom Payeire
New files are:
roken/setenv.c
roken/unsetenv.c
Change-Id: I7e3b3db2a58eaaae9de91431565176921d79af3b
Reviewed-on: http://gerrit.openafs.org/5798
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 5eba97a8960c49aeea957dc94408368e1324eff0
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 2 11:35:42 2011 -0500
Solaris: Specify ARCHFLAGS in CFLAGS
Various autoconf tests which use the C compiler may yield different
results depending on whether or not we are compiling for x86 or amd64
on Solaris (different libraries are available, structures may be
different, et al). So, set CFLAGS depending on which arch we are
targeting, so the autoconf results are more consistent with the actual
compilation during the build.
Change-Id: I99ddefaabc3bb2e80abe698366b348238d51408d
Reviewed-on: http://gerrit.openafs.org/5786
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 353aa7ef2c172f574998480d6d051b3f4e95ae7b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 2 11:32:56 2011 -0500
Do OPENAFS_OSCONF before compiler autoconf tests
OPENAFS_OSCONF can set the C compiler we use, as well as changing
various compiler flags. These changes can alter autoconf tests, so
allow OPENAFS_OSCONF to change these before various autoconf tests are
performed which require the C compiler.
Change-Id: I8da7d10b227f230d1467c77845c0dbd4b48fa966
Reviewed-on: http://gerrit.openafs.org/5785
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 1d9888be486198868983048eeffabdfef5afa94b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Nov 2 10:43:54 2011 -0500
Remove -settime/RXAFS_GetTime client support
Remove the -settime option from afsd, and any code for making
RXAFS_GetTime calls in libafs. Server probes have been replaced by
calls to RXAFS_GetCapabilities, and the actual functionality of
synchronizing the system clock has been superseded by other systems
like NTP. Issue a warning for all code paths that try to enable
-settime support.
Historical note: the code that this commit is removing contains bugs.
Do not simply revert this commit to turn on -settime support again.
Change-Id: Id291f5f88b1ad84594706f2a1a02a933dddd0cb9
Reviewed-on: http://gerrit.openafs.org/5787
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9c130285d8f17a5e09bbe0b3c3b886ec3145bae9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Aug 18 17:04:14 2011 -0400
opr: queue swap
Add inline function to pivot two queues.
Implementation by Simon Wilkinson.
Change-Id: I704a1ff3e0d6314e2bfe47c870226cb6ffd44b1b
Reviewed-on: http://gerrit.openafs.org/5742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fbf68f12592419a315f56585f9b8bb3a822bbc9b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 3 12:33:55 2011 -0500
external: trigger git commit-msg hooks on import
When we import commits, the new commit does not have a Change-Id in
the commit message. Usually a git commit-msg hook will be installed to
automatically insert a Change-Id into the commit message if one does
not already exist, so trigger the hook by performing a no-op 'git
commit --amend'.
Change-Id: Ie5e83c529b83c9f3d269df6742a59e965dbc6407
Reviewed-on: http://gerrit.openafs.org/5797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7ef5aeb608a390b6ac88d7e6748c5a1b4a65e0c5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 3 12:27:22 2011 -0500
external: commit imports with --no-verify
Currently, importing external commits with import-external-git.pl may
fail if the current repository checks for whitespace errors, and the
external commits contain whitespace errors. So run the commit with
--no-verify, so we can make the commit before fixing up the whitespace
errors immediately afterwards.
Change-Id: I8c9c39550e118956aa847e0ec5c5b1181f42e6cb
Reviewed-on: http://gerrit.openafs.org/5796
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 95038fde9a23b4550cbba38460f4668ca25b4f85
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Nov 3 12:17:07 2011 -0500
Import setenv.c and unsetenv.c from roken
Import the roken implementation of setenv and unsetenv, which are
required on HP-UX.
Change-Id: Ia91f407d696f3add27796bf9e2f5998717f4c825
Reviewed-on: http://gerrit.openafs.org/5795
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ed9bf9b55976c78cf24b43580d1752e81fe697b1
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Nov 2 19:29:00 2011 -0400
Windows: fix deadlock in symlink Attrib retrieval
Commit df22620f66f5ce92776177d4d800fc7f4ae4ae99 introduced a
deadlock when retrieving file attributes for symlink objects.
To correct the deadlock, do not hold the Fcb locks during the
AFSRetrieveFileAttributes() call.
Change-Id: I8d3d2c5f54d4e5c97f690fd1fd6db62128317cf2
Reviewed-on: http://gerrit.openafs.org/5792
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d8f357b9838509c5a5cfa22a85dffcd962804025
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 2 19:27:42 2011 -0400
Windows: always set reparse point attrib for symlink
Make sure that we always set the reparse point attribute
for symlinks in directory enumerations and attribute queries.
Change-Id: Ie7520cef64793e3385f229934189fc56a3edb584
Reviewed-on: http://gerrit.openafs.org/5793
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e39e8bb5b2f08281bc1d91c9209a1a3f1b463af2
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Nov 2 19:25:36 2011 -0400
Windows: remember when a reparse point is opened
If the mount point or symlink is opened as a reparse point
we must remember that in the Ccb so that later reparse point
processing can be implemented properly. For now remember
with the CCB_FLAG_MASK_OPENED_REPARSE_POINT flag.
Change-Id: I32997a85701a95a5be1402cdcd3335a938395760
Reviewed-on: http://gerrit.openafs.org/5791
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c7e2d8450117a947cb858bfdb4aedd668bd56bfd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Nov 2 10:35:14 2011 -0400
Windows: Mount points are always directories
Set the directory file attribute for all mount points
since a mount point target is always represented as
a directory.
Change-Id: I57a8e44d1382093311e8263c18d55f22f2f745ea
Reviewed-on: http://gerrit.openafs.org/5784
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Peter Scott <pscott.kd@gmail.com>
Tested-by: Peter Scott <pscott.kd@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit df22620f66f5ce92776177d4d800fc7f4ae4ae99
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Nov 2 10:23:48 2011 -0400
Windows: Retrieve file attributes on symlinks
When a component is a symlink, correctly retrieve file
attributes during a query file information request.
FIXES 130283
Change-Id: I0e9a576ca57acf9c65a5dc0eac8c9d65ddf6ab6f
Reviewed-on: http://gerrit.openafs.org/5782
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit cddb3baa13b1c941533bee5cdf0873ca4563c9c1
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Wed Nov 2 10:18:09 2011 -0400
Windows: add AFSRetrieveParentPath()
Change-Id: Ic3da7f09f12f0e089b9561a542b2cf04ff61c98d
Reviewed-on: http://gerrit.openafs.org/5783
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 6fe9a1ea0f22ef31ede5a9a8bb052b4ee71e7be0
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Tue Oct 11 12:56:08 2011 -0500
kdump-build: don't install when it hasn't been built for *bsd*
Change-Id: Iac9df9eb199433127941590d24633dfe9bbc6815
Reviewed-on: http://gerrit.openafs.org/5596
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3a9a5783cd1fd73902655f0876e2069b42688c94
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 14 08:10:19 2011 -0500
klog.krb5: enforce DES for rxkad
0. Always request a TGT regardless of the state of
writeTicketFile.
1. request des-cbc-crc when requesting a ticket for an
rxkad service principal
2. check the returned key length to ensure that it matches
the permitted length of an rxkad key. If not, generate
an error instead of overwriting memory and continuing.
FIXES 130278
Change-Id: Ib7d27acc60c1b38dab4e2a56f83643477afb9721
Reviewed-on: http://gerrit.openafs.org/5619
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4f4b805ae9107482aa39f2c3c0c4327e8466e2ac
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Tue Nov 1 08:55:37 2011 -0600
Windows: DE Reference count added during create
A reference count is added under lock to a newly created DE to
ensure it is not removed through deletion while in flight.
Change-Id: If0955c4a6c4cf197a4e071f9c6022875aabb70bb
Reviewed-on: http://gerrit.openafs.org/5775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 96e313de3e040efffbb9b933b0b2ae15c9fd540c
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Oct 31 18:10:07 2011 -0400
Windows: change AFSProcessUserFsRequest default
Default the return code for AFSProcessUserFsRequest() to
STATUS_INVALID_DEVICE_REQUEST instead of STATUS_INVALID_PARAMETER.
Change-Id: Ie7fb260a19617635c11c92e2daf5947cef73c9be
Reviewed-on: http://gerrit.openafs.org/5774
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ee8b6d34fa7d562f94469e2b8098ccc0507d5876
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Oct 31 18:07:23 2011 -0400
Windows: correct ordering of reparse point tests
Test for whether an object is a reparse point before testing
whether the provided buffer is large enough to hold the result
if it is.
FSCTL_GET_REPARSE_POINT
FSCTL_SET_REPARSE_POINT
FSCTL_DELETE_REPARSE_POINT
Change-Id: If6c1b9b6e5853d7759f169943310321d408190e0
Reviewed-on: http://gerrit.openafs.org/5748
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 94e9fceaa7ec343717b3fdc8610381832f532ebf
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Oct 31 18:05:31 2011 -0400
Windows: log FSCTL_CSC_INTERNAL requests
FSCTL_CSC_INTERNAL requests are not supported and will
return STATUS_INVALID_DEVICE_REQUEST. However, log them
for easier debugging.
FSCTL_CSC_INTERNAL is defined in ntifs.h only for
Vista and above. Since afsredir is built for XP
and above its value must be conditionally defined
by us.
Change-Id: I39cf1f9d068d28ab6c9267c302d49feece6af700
Reviewed-on: http://gerrit.openafs.org/5773
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 22f4e2945d3fa5b7802b7321ddaa35ef34b04a45
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Mon Oct 31 17:59:51 2011 -0400
Windows: add braces to case statements
A number of case statements did not have braces protecting
the block. Add them.
Change-Id: I313462ca0c7490931e7c994ec45e39be071e782b
Reviewed-on: http://gerrit.openafs.org/5772
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit af3dbb34a1ff226ac693c143f8e9d94ced4114c9
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Sat Oct 29 13:55:46 2011 -0400
Windows: Directory Entry Processing
Memory corruption was detected due to improper handling
of directory entries and the short name b-tree during
directory revalidation and tear down. The problem
resulted in a BSOD most frequently when roaming profiles
were written back to the file server or when multiple
clients were actively modifying the contents of a directory
simultaneously.
This patchset makes a number of changes:
. rename processing no longer handles collisions locally.
the file server replaces a target atomicly when there
is a collision.
. directory validation is no longer delayed until
a handle is closed
. data version numbers are checked for implied
invalidation
Change-Id: Ib4b281bfb5da4b5a5ce735e85d85c50e15fbcde1
Reviewed-on: http://gerrit.openafs.org/5736
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit dac012a84b1fec9f2a5003e8cf45a7bdb8cb004a
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Sat Oct 29 13:29:55 2011 -0400
Windows: additional trace logging for afsredirlib
A large number of addition trace log entries were added
to assist in diagnosing problems in the dir entry processing.
Change-Id: I85cab4d66680eb5b9c00843c49c33a81acb18bc2
Reviewed-on: http://gerrit.openafs.org/5739
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 15d9654d7242e56a6bab9f8d61afa87b58c1c55f
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Sat Oct 29 11:34:07 2011 -0400
Windows: Reimplement AFSGenerateCRC()
Replace the home grown CRC generation with a call to
RtlHashUnicodeString() which is present on Windows XP
and above.
Change-Id: Id98a1223e0aad54b3c43a16653ab888ac883639f
Reviewed-on: http://gerrit.openafs.org/5738
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4952df3f0359531e4a660c99c94c51eb0b169f59
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Oct 29 19:23:07 2011 -0400
Linux: 3.1: update RCU path walking detection in permission i_op
The permission() inode operation changed again with kernel 3.1,
back to the form it had before 2.6.38. This compiles fine,
but is missing the new way of detecting when we get called in
RCU path walking mode, resulting in system hangs.
Change-Id: I9a9a0c13aa3b35d8fe2bd592e2bca8187eacacc5
Reviewed-on: http://gerrit.openafs.org/5740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d603e2a95252200f02ad8465815c5bac0b23b1e1
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Tue Jun 21 18:32:02 2011 +0100
rx: Remove the ADAPT_WINDOW code
RX still has the remnants of an old mechanism for doing RTT and
congestion window detection. This code is #ifdef'd out using
the ADAPT_WINDOW define, but is pretty much unservicable these days,
as it collides with the TCP style implementation (with ADAPT_WINDOW
enabled, both will attempt to manipulate a connections RTT and
window size)
As the current TCP-style RTT and window calculation seem to work
much better in deployment, and there isn't much hope for us being
able to maintain two different congestion mechanisms, just remove
ADAPT_WINDOW. It is in git, if we ever want it back (not that I
think we ever would).
Change-Id: I4a22354e362fde8021f7d8b19e099a0f7b4fba3b
Reviewed-on: http://gerrit.openafs.org/5737
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 7a426424b7fb45659f6000a564e8c71a9108a33c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 28 17:43:24 2011 -0400
Windows: cm_Rename break in 9cf7a628c2ff178b2fa236d2c0a41ca9be315036
9cf7a628c2ff178b2fa236d2c0a41ca9be315036 broke renaming of
a file to a name that does not exist. Put back the code that
makes that possible with a comment.
Change-Id: I6c13c0150d2366c9578502d0c8f6188bdc40a9c8
Reviewed-on: http://gerrit.openafs.org/5735
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1dad690fc34fdd8d9df8a3be6d580441b7cae8bb
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 28 11:36:10 2011 -0400
Windows: out of date version not in current chunk
In buf_GetNewLocked(), the comparision to decide whether a
cm_buf_t is a member of the current chunk must take the data
version into account. If the data version is out of date, it
is not part of the current chunk and is an object that can be
safely recycled.
Change-Id: Id8ca0a897a0a65efc1cabbe39107ca210b48bd4e
Reviewed-on: http://gerrit.openafs.org/5734
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 286ffa0d7c4d594ff107b70f9e930271c027a79e
Author: Edward Z. Yang <ezyang@mit.edu>
Date: Mon Oct 17 23:16:15 2011 -0400
linux: Update Packaging to build OpenAFS services for Fedora's systemd
Fedora 15 now uses systemd (see http://fedoraproject.org/wiki/Systemd)
for the OS init system. While it currently has backwards
compatibility with older SysV-style init scripts, future versions of
Fedora may no longer support it, and OS startup tends to be faster
with the systemd service units. Also, systemd runs all the service's
processes within a linux kernel cgroup.
(see http://www.kernel.org/doc/Documentation/cgroups/cgroups.txt)
This change includes an openafs-client.service and
openafs-server.service unit files for the client and server packages
respectively.
Client
- Loading the openafs module was moved into
/etc/sysconfig/modules/openafs-client.modules. This causes the OS to
load the module on boot. This is the preferred way for modules to be
loaded with Fedora. (See
http://docs.fedoraproject.org/en-US/Fedora/15/html/Deployment_Guide/sec-Persistent_Module_Loading.html
for more details)
- The CellServDB file is generated with sed rather than cat.
This change was made because Systemd doesn't execute as a shell
script, but rather executes processes directly. Rather than invoking
a shell to concatenate the CellServDB.* files, they're written to the
CellServDB file using a sed oneliner.
- Do all of the proper kernel module loading and unloading.
Server
- Since systemd uses cgroups, when the service is shut down, all
processes in the openafs-server.service cgroup will be terminated.
The other changes are standard as per:
http://fedoraproject.org/wiki/Packaging:ScriptletSnippets#Systemd
Original version by Jonathan Billings <jsbillin@umich.edu>.
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Change-Id: Ifb41790ffe107b319097b9750273aecfe82c3349
Reviewed-on: http://gerrit.openafs.org/5637
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alex Chernyakhovsky <achernya@mit.edu>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 9743f5729d1a55513e861bb1334599a8e597de6b
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 27 17:57:25 2011 -0400
Windows: only flush buffers on shutdown if running
If a service shutdown message is received prior to the
service entering the running state, do not attempt to
buf_CleanAndReset() because the required data structures
and locks are not initialized.
Change-Id: I29f20dbe91230f078334ca58e8791d2422cdecfd
Reviewed-on: http://gerrit.openafs.org/5733
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9cf7a628c2ff178b2fa236d2c0a41ca9be315036
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 25 15:32:11 2011 -0400
Windows: Do not EEXIST exact match during rename
AFS Rename operations on the file server will delete a
target file if it exists. Do not prevent renames because
an exact match of the target name exists in the target
directory.
Change-Id: I680f8886575a9276a8df05965d14bbe7f24fba5d
Reviewed-on: http://gerrit.openafs.org/5731
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 8fce3848d94f9717323bbd5dc51a9d18956fa2b5
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 25 15:42:44 2011 -0400
opr: build on Windows after queue.h move
55efff93fe2762b58dc70cdd20aaf97e39825929 broke Windows.
update the NTMakefile in src/util and src/opr to correspond
to the move of queue.h.
Change-Id: I3379c131ee39758a36cf8574aff5766f79497236
Reviewed-on: http://gerrit.openafs.org/5732
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 241d3d54cebfc661cfaec6d21de091d906df3d08
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Sat Oct 22 16:46:26 2011 +0100
Windows: Look for 8.3 name when doing a rename
If we are doing a destructive rename we need to find whether the
target file exists. This is done in the usual way (case sensitive
case insensitive), but the short name is not looked for.
This means that the rename of a file to a short name will not
supersede correctly; rather the service refuses the rename since
the target existed already.
This patch looks the target name up in the shortname tree if the
target name is short and all else has failed.
Change-Id: Ie054516a378edf52938d3465143a16107a99c0f6
Reviewed-on: http://gerrit.openafs.org/5652
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 159003395a6183266ad9672f12482b1cba6ba0ff
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Thu Oct 20 14:39:31 2011 -0400
Windows: New Trace for DirEntry tracking problem
Incuded in this patch is additional trace for logging how
directory entries are added, modified and deleted throughout
the redirector
Change-Id: I7ea80331ca24d543579603986f4eb6bcdd0bf072
Reviewed-on: http://gerrit.openafs.org/5640
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit f0cc4c5dd0c03e4074fc70583215e590623e2414
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 17 09:29:37 2011 -0400
Windows: Free work item memory with tag value
For consistency throughout the source module, free all work
item memory allocations with ExFreePoolWithTag.
Change-Id: I4e9b275bb8b92a81884d36ce4c8ed754d281bbf8
Reviewed-on: http://gerrit.openafs.org/5627
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit d5a6a895e3b004666b0d6aaa9fe4313b0a831dbd
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 17 09:28:11 2011 -0400
Windows: free pointer after last reference
This is a superficial change but is being done for readability.
If given the choice of freeing memory and then testing the pointer
value or vice-versa, test the pointer value first.
Change-Id: I189851c265a257d433df111622837db1d706c054
Reviewed-on: http://gerrit.openafs.org/5626
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit ada5908ca1ed8cfa7bfc42890ac5edc73769ae4c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 17 09:26:13 2011 -0400
Windows: AFSInitPIOCtlDirectoryCB free in try_exit
Process all conditional release of allocated memory on
failure within the try_exit on failure.
Change-Id: I4a29f6e9d2506c00713558849c49c377a74d607a
Reviewed-on: http://gerrit.openafs.org/5625
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 782fba58db1210e998ef9c6a50803262ac256812
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 25 13:30:19 2011 -0400
Windows: close leak in AFSPrimaryVolumeWorkerThread
Prevent a leak of the non-paged pool and a Resource by freeing all
allocations within the Specific.Directory.PIOCtlDirectoryCB object.
Use AFSExFreePool() instead of ExFreePool() because the objects
are allocated from the AFSRedir.sys driver allocator.
FIXES 130280
Change-Id: I3b1c8fa838cfdf434bf7c08bb8935999cf328357
Reviewed-on: http://gerrit.openafs.org/5730
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 61b04b19ad4bf2c62ec4309efeba4f442a54d8f2
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 24 21:14:59 2011 -0400
Windows: afsredir only wants shortName if not 8.3
When performing a directory enumeration for the afs redirector
only specify a shortname if the name is not valid 8.3.
Change-Id: I650be75b9ea8e41721272cd8bd426f1989ca01fb
Reviewed-on: http://gerrit.openafs.org/5727
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 219624206ddee454e6bcbac7da7fe2fe632e39a7
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 20 14:06:47 2011 -0400
Windows: Use SetFlag macro when setting flag
Change-Id: Ibda7ac5e30a623dc26f031831e75380fdf700a88
Reviewed-on: http://gerrit.openafs.org/5642
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit e21a063217f99ac441bb65c7e1f628de2a0fbb68
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Oct 20 14:05:59 2011 -0400
Windows: minor type in trace output
Change-Id: I72b348dea83547260575c0bd2aca327ea4f72532
Reviewed-on: http://gerrit.openafs.org/5641
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 81bfacca545e7394a13baa569a6b7c894fc36bde
Author: Peter Scott <pscott@kerneldrivers.com>
Date: Tue Oct 18 10:04:48 2011 -0400
Windows: AFSRemoveCaseInsensitiveDirEntry corrections
If there is a fLink but no parentLink for the DirEntry being
removed, return the fLink as the new value for *RootNode.
This patch set also includes two changes that improve readability
but do not alter the behavior.
Change-Id: I112265798df9d46c83ffacddc7d97ad0f6fce5bf
Reviewed-on: http://gerrit.openafs.org/5638
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Peter Scott <pscott.kd@gmail.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 46a96ee06582178eb88e8ca1c7fbb33fae79b403
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 17 09:22:53 2011 -0400
Windows: AFSEvaluateTargetByName free buffer if no return
For consistency with other functions in AFSCommSupport
modify AFSEvaluateTargetByName to free the DirEntry on
completion if the caller has not provided an out parameter
to accept it.
Change-Id: Ic5b6cc655fd47b95493e6aadb7b23481d0187d5c
Reviewed-on: http://gerrit.openafs.org/5624
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit c780a9bc2849e25e3ac84f9f674348b8cdd942ff
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 17 09:19:33 2011 -0400
Windows: remove unused code block
A small bit of dead code in the redirector.
Change-Id: Ieeea58e7681e8b0bd043794f1aa51c112c212497
Reviewed-on: http://gerrit.openafs.org/5623
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9c723e7a514ee4f809348ec79e2124cf3a38d895
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Oct 17 09:10:17 2011 -0400
Windows: re-indent afsredir log message params
convert tabs to spaces for consistent indentation
make use of braces be consistent
Change-Id: I76e2c6427c02cb50f1eb4e6ab57e484a4bfa3c65
Reviewed-on: http://gerrit.openafs.org/5621
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 2a7795aa565dfa4e371f806b799ce6a01a2db6c9
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Sat Oct 22 15:00:03 2011 +0100
Windows: Defer deref of a directoryEntry
During the handling of SL_OPEN_TARGET opens (usually associated
with a rename) a directory entry was deferenced prior to its
contents being used (to set up a seconding inforation field).
This change just holds on to the reference until after that processing.
Change-Id: I26dbd4bfb6595863109e549893f2367f71ad6404
Reviewed-on: http://gerrit.openafs.org/5651
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 9824a53aea25a150f770e6b37536aa5fd7eb87df
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Oct 21 16:57:02 2011 +0100
Windows: Set new file index correctly during rename
Directory entries are required to have a file index which is used during
directory enumeration. When inserting into a new directory we have to
update this from the target directory.
This code fixes a bug whereby it was being set from the source FCB, rather
than the target one. On failure we now also reset the value to its old value.
Change-Id: I726dd2e7ecc84e4a8b28f1f551c89fc6e815d853
Reviewed-on: http://gerrit.openafs.org/5646
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 83c41c69411ece7ac1dd0a7b15d4ee9746edcf23
Author: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Date: Tue Jul 19 15:01:26 2011 -0700
allow cloning of any volume to any volume with same parent ID
remove checks to disallow cloning of ro volumes to rw volumes,
which allows cloning of any volume within the same parent ID
grouping, including allowing destruction of newer version of the
volumes.
Change-Id: I13f600c33934b9af8237f049225d6bacfbbb5690
Reviewed-on: http://gerrit.openafs.org/5049
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4e1a65ba7edec519acc67f0dcf2237a0f26e92aa
Author: Jacob Thebault-Spieker <summatusmentis@gmail.com>
Date: Tue Jul 19 09:02:49 2011 -0700
remove check for disallowing clones of backup or ro volumes
removes the if-statement ensuring that the volume being cloned is
not a backup volume, nor a read-only volume. This allows clones
from any type of volume to a given volume. Parent volume meta-data
is maintained, only the cloneId value changes.
Change-Id: If8444fcabc9b9106db7db7df881ae07e8d287915
Reviewed-on: http://gerrit.openafs.org/5046
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ac88af748e25a40d062c888396aab8670ff8426a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Oct 6 08:33:37 2011 -0400
bozo: build notifier sample program
Build the smail-notifier sample program.
Change-Id: Ida2fd16e486934c984b2431c95c3a24966b3b2b7
Reviewed-on: http://gerrit.openafs.org/5555
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e7302bcc9c4aa6f1e6a1ae8e5b498bcb0540aac9
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Oct 6 07:55:21 2011 -0400
bozo: test program update
Add -file option to test program to simulate program crashes.
Change-Id: I1ba14152438e2f857fdf5d181023266b3ab64fa3
Reviewed-on: http://gerrit.openafs.org/5533
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4552dc552687267fce3c7a6a9c7f4a1e9395c8e5
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Aug 29 17:41:31 2011 -0500
DAFS: Remove VOL_SALVAGE_INVALIDATE_HEADER
Currently VRequestSalvage_r takes a flag,
VOL_SALVAGE_INVALIDATE_HEADER, which causes the header for the
specified volume to be freed (via FreeVolumeHeader). This is almost
never safe to do, since there may be other users of the specified
volume that can be accessing the volume header at the same time.
There is also no reason to invalidate the header at the time of the
VRequestSalvage_r call, since the header must be invalidated when we
detach the volume (other utilities may change header information). So,
if there are any problems in the future because we do not invalidate
the header at the time of VRequestSalvage_r, it is the fault of the
detachment/offlining logic.
So, remove VOL_SALVAGE_INVALIDATE_HEADER and all of its users. Take
this opportunity to correctly document the VRequestSalvage_r headers
in the VRequestSalvage_r comment, as it was previously missing the
VOL_SALVAGE_NO_OFFLINE flag.
Change-Id: I65c4cc0e81171aafa7b78ae9e1f503edb2f3f2c3
Reviewed-on: http://gerrit.openafs.org/5319
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit d171a5e059566cc99c5dd980039dd56233f91a67
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Oct 13 12:23:35 2011 -0400
DAFS: fssync online requires a partition name argument
fssync-debug online silently fails when run without a partition name.
Check for the required partition name on the server side and the client
side. Report errors back to the client when the server side fails to
pre-attach the volume.
Change-Id: I454b202ac83893b1ee54d586a46d891773090a64
Reviewed-on: http://gerrit.openafs.org/5615
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 87f969f82d12c8200ede3fd30a151e09ab0bf6ad
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Oct 11 10:51:14 2011 -0500
volser: Remove ExtractVolId
volser was using its own function to extract a volume ID from a
filename string, and was using atol to do so. The ato* family of
functions can have problems with larger volume IDs, not to mention a
lack of error checking, so don't use it. Since we already have the
function VolumeNumber in the vol package to do the very same thing,
just use that instead.
Change-Id: I40953d3533454503583685eb3adeb0079137c8a1
Reviewed-on: http://gerrit.openafs.org/5594
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b5a153fb75bb6642490e9856dc6212244a590301
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Oct 3 13:10:44 2011 -0500
viced: Check for HOSTDELETED in stillborn check
h_FindClient_r checks the connection rock for a client object twice.
First it sees if we already have a client object, and if we don't, we
effectively create one (or find a suitable one). Then we check again,
to see if someone else set the rock while we were creating a client
structure.
Currently, the first check checks if client->host->hostFlags has
HOSTDELETED set, but the second check does not. So, if the host
associated with the client has been deleted by someone else, currently
we will unnecessarily log a "stillborn client" message, and we will
continue to use the deleted host. If the host continues to be held by
someone, we will run into the same situation repeatedly on future
requests until all of the host references go away.
To fix this, also ignore HOSTDELETED clients when performing the
stillborn race check.
Change-Id: Id72e83cb55b99a686d4179905116592e80eb9ac7
Reviewed-on: http://gerrit.openafs.org/5614
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 13a4642458254e6bdbfa6fd8e165c270f567a1aa
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 13 11:45:58 2011 -0500
vlserver: Log to VLLog by default, not PtLog
Change-Id: I25c13a4461fc5a6ba2809b6937cbc18ed9c6ed53
Reviewed-on: http://gerrit.openafs.org/5616
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 8c7202fb9ea9cf5e5c888000ec84fd9b7478068d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Oct 14 11:32:34 2011 -0500
vos offline: Bring volume back online for -busy
vos offline is supposed to bring a volume back online from "busy"
status before exiting, as volumes should not be in "busy" status for
extended periods of time. This was being enforced by required that
-sleep be specified; however, -sleep only results in the volume being
brought back online if a non-zero sleep time was specified. So, make
sure the volume is brought back online if -busy was specified.
Change-Id: I6e605771fcfcabbb09f6dcfd0576c062f64ad93f
Reviewed-on: http://gerrit.openafs.org/5620
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 547d94edd3affb5f377cd1b3db39c46ca0cf5aec
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sat Oct 22 09:32:33 2011 -0400
cache bypass: don't define iovecp for UKERNEL
iovecp is defined but not used for UKERNEL. Define it conditionally
to avoid gcc warnings and --enable-checking failure.
Change-Id: I109ada36d0ab75e8a477498900dfaf85589e20e2
Reviewed-on: http://gerrit.openafs.org/5650
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit f715ebaee4188300ecee57109512609c7c84cf98
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Sat Oct 22 14:27:41 2011 +0100
Windows: Remove unused cleanup flag
In AFSOpenTargetDirectory the flag bRemoveShare was initialized
FALSE and never set TRUE. In teardown after failure some code
did listen to the flag, but the operation (IoRemoveShareAccess)
was not protected by the FCB mainlock which it should have been.
Rather than get the locking correct, just remove the flag entirely.
Change-Id: I097f15bb0903f3c0889b62427d2169cf84aa04a0
Reviewed-on: http://gerrit.openafs.org/5649
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 4b817cbb520872e69b01e5675f9037d8948d0ade
Author: Derrick Brashear <shadow@dementix.org>
Date: Sun Oct 23 19:15:16 2011 -0400
bypasscache: allow arbitrary sized iovecs
instead of binding outselves to PAGE_SIZE, just fill any size
Change-Id: I01385df372ac2bda6d8ea24381bf38102c12615f
Reviewed-on: http://gerrit.openafs.org/5658
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 28a159b2bfff7ad450dce612601a0286d4f91df5
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Oct 6 04:04:36 2011 -0400
bypasscache: do errors correctly
do set errors when we bomb out early
do not unlock and return early when we happen to do a correct zero
length read
do set errors the kernel can deal with if we're feeding a page routine
Change-Id: I1dca1f9e3b0f3d24da3e4f55b473775a737370b4
Reviewed-on: http://gerrit.openafs.org/5554
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 6f59c71988d75f76750c46adb11cda7e9189d5f3
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Oct 11 15:37:57 2011 -0400
ukernel: get an ip address even when dns and hosts suck
gethostname plus gethostbyname being useless make things fun
make things less fun
Change-Id: I5595698b0b7f2448b8c86448bedd8b16ab088510
Reviewed-on: http://gerrit.openafs.org/5600
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7829e7152361c38a22a7ba4c11e4f614e4392d60
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Sun Oct 23 22:45:21 2011 -0400
dir: add missing return in DRead
A missing return in the kernel version of DRead causes the code to
think that no entry exists for a dir and proceed to allocate a new
one, if the entry is the third one in the hash chain.
If the existing entry is dirty, its contents are never written back,
and the pending changes to the directory are not seen by the client.
Change-Id: I8b0f86b04d6ac8f75720933308a0983810974ff4
Reviewed-on: http://gerrit.openafs.org/5666
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 2aaa540276f5b5a0c368e44d8fd04b32c4632c3f
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 17:41:27 2011 +0100
tests: volser doesn't need rxgk yet
An rxgk dependency has crept in to the volser tests. Remove it for
now.
Change-Id: I0439ab5cf6deb335ebe76fb5a6736c9905312eec
Reviewed-on: http://gerrit.openafs.org/5665
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fd5174d918a5d75f64b122c8433a3c431cb8e454
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 17:40:20 2011 +0100
tests: Add opr library for ktime test
The ktime tests need libopr for the lcstring routines. Add the
dependency.
Change-Id: I6902537236fbf35a654a3a4d70fa8f2df89e2a92
Reviewed-on: http://gerrit.openafs.org/5664
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c2ada637b9410f18b3d4f3a96b5347a4f71b4851
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 19:09:32 2011 -0400
rpm: Add new libraries
Add the new libopr.a and libubik_pthread.a libraries
Change-Id: Ia91c67d72f1ac98060af60b6535db008911d3b1a
Reviewed-on: http://gerrit.openafs.org/5663
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 1de23d1fe5d64c8f5e8f24579c0926fabdaace92
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 19:07:33 2011 -0400
rpm: Turn on debugging
Now that we build with a blank CFLAGS line, we need to make sure and
actually turn on debugging in the build system, so that our debuginfo
files are vaguely useful
Change-Id: Ic2ebd0ebe866d511c4b0aef15845a85d95bacb5b
Reviewed-on: http://gerrit.openafs.org/5662
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d88682e803912451880c3a9c2b07a01abaebe984
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 17:49:08 2011 -0400
roken: Add *progname() to shared library exports
Add rk_getprogname and rk_setprogname to the set of shared
library exports in libroken
Change-Id: I1fd26c59b26a256b2070bfdc14dfaa5f82fb8002
Reviewed-on: http://gerrit.openafs.org/5661
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 5743c96bdea2e9aafeeeec3a1b4377d8860ef437
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 21:23:34 2011 +0100
rx: Define afs_kmutex_t for LWP too
afs_kmutex_t is used for lock definitions in the kernel, and in
pthreaded builds. LWP doesn't have any equivalent, and all structure
members using this type have to be protected with RX_ENABLE_LOCKS, which
starts to become untidy.
Just make afs_kmutex_t an int for LWP, so that we can simplify our
headers, at the expense of some additional storage on LWP builds (which
are going away at some point, anyway)
Change-Id: Iaa5683bdfd932c78a9a5d35b8a4530cecf5bdb37
Reviewed-on: http://gerrit.openafs.org/5660
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3f938315adc08936024eb86678745dd85d2a092d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Oct 23 16:38:13 2011 +0100
dir: Don't leak a buffer on a failed Enumerate
If, for some reasons, Enumerate encounters a hash object with a NULL
buffer pointer, that's no reason to leak the hash object. Make sure
that we DRelease it before failing
Change-Id: I9ba6c69ca524937a6068d33a0ec0a90eef5b88ea
Reviewed-on: http://gerrit.openafs.org/5659
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit a9924ba433f81bfbfc2c0e726f2be06d460e4d56
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 12 09:50:18 2011 -0400
rx: ackall handling
If we ACKALL a stream, then we're sending a hard ACK for all of the
packets in the stream. We shouldn't send that hard ACK, and then a
load of soft ACKs for packets that don't actually exist.
Change-Id: Ibe0c76b4e92c5baa8801cfd12f961fabce223039
Reviewed-on: http://gerrit.openafs.org/5604
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 6cb6bcc208a0ebb57325522ed764c7bf4bf6104e
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Oct 21 15:05:06 2011 -0500
LINUX: Fix afs_linux_pag_to_groups signature
"new" is a struct group_info**, not a struct group_info*
Change-Id: I606afce74be6820b99b151b6077cf23d06e8e2d6
Reviewed-on: http://gerrit.openafs.org/5648
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit ee2fbffb04bb8b5098354646e262afa90c1b6f59
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Aug 12 14:50:26 2011 -0500
LINUX: Revert group changes on keyring failure
On Linux kernels that support keyrings, when we setpag we try to add
the PAG to the session keyring and to the supplemental group list.
Currently, if we fail to add the PAG to the keyring (which may happen
due to key quotas, or possibly other reasons), we return failure but
the group list is still modified with the new PAG in it.
Therefore, if the keyring-based approach fails, the new PAG may still
be in use, but there are no keyring keys associated with that PAG, so
the PAG may never get destroyed. This can cause a large number of PAGs
to accumulate over time, causing performance problems.
So, change this so that, in the event that keyring installation fails,
we revert the group list back to what it was before we touched it.
Also mark all unixusers with the new PAG as expired, in case one got
created during processing. Thus, the new PAG never gets used.
Change-Id: I61993edf705209e1a5d8dee638a9003690017c35
Reviewed-on: http://gerrit.openafs.org/5238
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit dd831c09602f1ef16cc7dece84aeff638cce7272
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Oct 20 16:57:14 2011 -0500
viced: Do not swallow errors on StoreData recovery
When we encounter any error in the StoreData fetch/store loop, we
reset the disk usage to ensure it remains correct, even in the face of
unexpected errors. However, when we do so, we use the errorCode from
VAdjustDiskUsage as our return value; if it is 0, we return success,
ignoring the error that got us in this code path in the first place.
Instead, keep track of a temporary errorCode for the disk usage
adjustment, and do not override our return value if there was no error
in the disk usage numbers.
Change-Id: Ifbe2377f2750b508d48e535215be3583d1d78e65
Reviewed-on: http://gerrit.openafs.org/5645
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 55efff93fe2762b58dc70cdd20aaf97e39825929
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sat Oct 22 09:43:41 2011 +0100
opr: Move queue header out of util
Move the header which is installed as opr/queues.h out of util/ and
into the new, top level, opr/ directory. Similarly move the tests out
of the util/ test suite, and into the opr/ tests
Change-Id: I81af487f09e1f0f4b25654a1f64c5ac75fd5a95b
Reviewed-on: http://gerrit.openafs.org/5656
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
commit ab866c821a705d7911e0ff8ac987249efdc63435
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Oct 10 19:01:26 2011 -0500
dir: Remove double release in FindBlobs
When DRead() fails, we DRelease the entrybuf, then break. However,
this break takes us to the end of the function, where we promptly
DRelease again, causing a double free
Change-Id: I5a0293990e01376525d8adae25477c64e2cc93ad
Reviewed-on: http://gerrit.openafs.org/5655
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 69f54d474827548375c0bd39a87ac7ec376b6d9b
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 12 09:44:37 2011 -0400
linux: makesrpm should cope with releases with letters
don't just deal with numbered releases.
Change-Id: Iab97e4a7bebebf97d367243501aaf2a0b4b0476c
Reviewed-on: http://gerrit.openafs.org/5602
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 488c7c97854a4bd0ec67bcfe17df93b3fd025f88
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Oct 12 14:34:55 2011 -0400
afs: don't try GetDownD if nothing to get
if we "need" negative slots or caches, don't run. also,
don't stay "too full"
Change-Id: I29ef8d5fd9844a878d0c804d06aed5862a2d0df4
Reviewed-on: http://gerrit.openafs.org/5612
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 796de9fb43857acccbd51e2af7c8d67eea90fdc5
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 12 15:26:23 2011 -0400
ukernel: don't define rdwr env on linux
We're not vm rdwr env in ukernel. Don't claim we are, otherwise we
will never push chunks out to the fileserver when our cache is full
Change-Id: I1c52ef502d42a4a2b63e786471fa487b88712e9d
Reviewed-on: http://gerrit.openafs.org/5613
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 7ae1921b76750ef28258777cf1b233c4917663d7
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Oct 12 13:09:42 2011 -0400
ukernel: set pthread stacksize to an integer multiple of 8k
because some pthread stacks require this to be in units of page size,
guess that page sizes will be 4k or 8k, and use the larger as a divisor
Change-Id: I9f89f7e32e2a70e12f1ed7a7fb86cab171b61e07
Reviewed-on: http://gerrit.openafs.org/5606
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit eead07418f13cd87a90770f03ea5118c546d8f1a
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 12 13:04:28 2011 -0400
ukernel: add morepackets check in listener
Make the listener loop actually check for more packets needed,
like kernel, pthreads and lwp. Only checking for new packets every
20 seconds isn't sufficient on today's networks!
Change-Id: I80319cfd9d540c9a56b0dd8d948a380665426409
Reviewed-on: http://gerrit.openafs.org/5605
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 9f68e0dd31ddb7bf69ea8ac13b3afe371dd6b7cb
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Oct 11 15:21:12 2011 -0400
afs: on uuid init fail, don't leave garbage behind
make sure we zero the uuid if we failed
Change-Id: I9d21e003b68eff0ce9bea4634c601c4663a0c078
Reviewed-on: http://gerrit.openafs.org/5599
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 87dcfc872c11fdb13ebf0448abe91150aaa86859
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Oct 11 14:32:04 2011 -0400
ukernel: set close-on-exec on our socket
if the process we are in execs a child, it doesn't get our socket
Change-Id: Iaf1831866e0dcda0449e75d89c576557c61090dd
Reviewed-on: http://gerrit.openafs.org/5598
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit f722a75fe21963d64217375f1f7bbb0eb14befb4
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Wed Oct 12 09:47:14 2011 -0400
rx: Don't clear the receive queue when out of packets
We can end up discarding a receive queue that's been soft acked,
effectively taking back soft acks we sent. Whilst the RX
documentation says that a client can drop soft acked packets at
will, our RX implementation assumes that if the final packet in
a call has been soft acked, we won't clear the queue. If a client
clears the queue in this situation, the call will hang.
What *should* happen is that we should take necessary locks,
confirm that we have not soft-acked all of the packets in a flow,
and then discard, or, if we're just going to discard, error the
call.
Change-Id: Ic8e358b8648c1a6f0154009093468531a9e3cf74
Reviewed-on: http://gerrit.openafs.org/5603
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 735873d51512bc31134856c06345bb7caf9d8144
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 14 15:36:50 2011 -0500
auth: Get correct viceid in legacy GetToken
When ktc_GetTokenEx needs to get tokens via the legacy ktc_GetToken
interface, it was not extracting the viceid. Make it set the viceid so
the caller gets the correct id.
Normally this would require parsing the given client name. To reduce
the amount of times we store and extract the viced from the "AFS ID
%d" string, create a helper GetToken function that can store the
viceid directly, without storing it in a string.
Change-Id: Ib03a419aee6eaed3b253c4d5d575d4dd8d3b8ddc
Reviewed-on: http://gerrit.openafs.org/4482
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 59b47fba3fa7cf13ef82463c5112851f7bdaf2ec
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 14 15:05:37 2011 -0500
auth: Force correct evenness on rxkad tokens
Rxkad tokens historically have forced odd lifetimes when the given
viceid is actually an AFS ID, and even lifetimes when it is not. Force
this when the new token-handling functions are used (so the viceid is
correctly interpreted by users of the old token format), by creating
rxkad tokens with token_importRxkadViceId.
Slightly reworked by Simon Wilkinson to provide a generic token
destructor function.
Change-Id: I9f6aa518b8ae51a3772b69a0722a28bff6b47128
Reviewed-on: http://gerrit.openafs.org/4481
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c37a14697df291f641b4fa5a32826054d92210b0
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Oct 10 17:19:13 2011 -0500
docs: Refer to dafs binaries by their real names
(Most of) the dafs binaries are called da(something). Update the
example in the dafileserver documentation so that we call the binaries
by the names that they are actually installed with on the system.
Change-Id: I05906758aa2b00ea7bc7f9be10414c8ad1a5a11a
Reviewed-on: http://gerrit.openafs.org/5654
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 7a4498850814ea524f55de0b84d6b0ae0b4834bb
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Mon Oct 10 22:09:40 2011 +0100
ptserver: Don't check for noauth before rebuilding
The ptserver database building scripts would check to see if the server
was running from a bosserver with the noauth flag set before performing
a database rebuild.
This means that you can't start ptserver normally, and then configure
the database using pts -localauth, which is the preferred method for
configuring new cells.
Remove the check for noauth. This is slightly risky, as it means that a
corrupt database could be completely erased upon restart. However, we
already check that the dbheader (65k) is entirely blank - which will
protect us against any single page corruption errors.
Change-Id: I45dbb53d7f80b0b307f88941cb1e061967fcac81
Reviewed-on: http://gerrit.openafs.org/5653
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit ca8ba7e7a41e61cc943b34196872b72a190432e3
Author: Ben Kaduk <kaduk@mit.edu>
Date: Sun Oct 23 11:22:07 2011 -0400
FBSD: typo fix
Gerrit/5572 added conditionals on __FreeBSD_version >= 900044, which
is (approximately) when a bunch of kernel API renames happened.
(There has since been a dedicated version bump to 900045 a month
or two post-facto, but 900044 should be fine for now.)
However, 900044 is not 90004.
Change-Id: I566186a7b53fd3b605a0f531e241eaf54a96bba3
Reviewed-on: http://gerrit.openafs.org/5657
Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
commit 1b32b4800b1dd8985c1554453354e683a66c9ab5
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Wed Oct 12 11:04:33 2011 +0100
Windows AFSRDR: Log before decrementing refcount
The library support package keeps count of the number of times
the library code is active. When this goes to zero this means
that unload of the library can continue.
Although I cannot see it in the code it seems reasonable to assume
that at that stage the device object might go away so (and if it
doesn't do now it may in the future). This potentially renders it
unsafe to do anything after InflightLibraryEvent has been signalled.
This patch moves the logging up to above the decrement of the refcount.
Change-Id: I9493d970cec4a025ca9e4c5542e2d838c87f7817
Reviewed-on: http://gerrit.openafs.org/5601
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit da9044cff966736bc064166a7136c94c0bfc1e5f
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Oct 11 14:03:29 2011 -0400
ukernel: don't enforce thread lockers in remove vop
we enforce locking by pid. when we are ukernel, MyPidXX is stupid.
don't bother.
Change-Id: Iddefd5d63edd6cc35a3c8112cb2cfbf3d47031aa
Reviewed-on: http://gerrit.openafs.org/5597
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 75179d50eae3258e8baa0a4c9f069fcd11d08260
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Oct 10 17:56:20 2011 -0400
ukernel: install our sysincludes to root.perf
otherwise, we can't actually include sysincludes from something
linking libuafs
Change-Id: Ia6565dda8390ef6510aa2170e36ff12ddb19fc9b
Reviewed-on: http://gerrit.openafs.org/5593
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3eb60908a1f9b3f2783ec3f7755b242bff3d573d
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Oct 10 16:35:45 2011 -0400
ukernel: add uafs_access
we don't have an access vop. add one.
Change-Id: I813fb941608b5e49a0f23730414854602630fdee
Reviewed-on: http://gerrit.openafs.org/5589
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 0676dc9e0c59e8aee3db5e0a7b4acf7229da7b88
Author: Derrick Brashear <shadow@dementix.org>
Date: Mon Oct 10 16:57:35 2011 -0400
volinfo: fix bad format string
we need a format string; currently here we have none, which is no good
Change-Id: Ib097100383dba9d56056b96c5322734abb765f9d
Reviewed-on: http://gerrit.openafs.org/5591
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 3df03f0abe3e706eaba57e4d9d8c46f2f4d7414c
Author: Hartmut Reuter <reuter@rzg.mpg.de>
Date: Wed Oct 5 10:06:05 2011 -0400
vol_split: avoid using stale open directory vnodes
we could in case of multiple splits end up using a stale open
vnode for a directory; attempt to close and thus force-reopen
any fdhandles backing ihandles.
Change-Id: I50ff39873b523b05287c7a183d84e6f16eb7cd90
Reviewed-on: http://gerrit.openafs.org/5553
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4a1d319177ea0e58c9046c3c173bb7d2877d1bc3
Author: Ben Kaduk <kaduk@mit.edu>
Date: Sat Oct 8 17:16:26 2011 -0400
FBSD: deal with kernel API rename
Upstream decided to rename the kernel functions that implement
syscalls to have a sys_prefix (including afs3_syscall!).
We use a couple of them, so we need to conditionalize accordingly.
Unfortunately, __FreeBSD_version was not bumped with the change,
so we use something close to it and hope it's close enough.
Change-Id: I228805a813af70b30f94f659e4da602210a6d6df
Reviewed-on: http://gerrit.openafs.org/5572
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 26253df896a7709847cda041db1dc187f1dbf83e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Oct 6 06:03:07 2011 -0400
bozo: bosserver man page updates
Add the new -pidfiles option to the man page. Add a few other missing
options as well.
Change-Id: I2d72ec9948edb4dce4c6b6d974915d4ac7560b0b
Reviewed-on: http://gerrit.openafs.org/5587
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit bd1fbd8f4c0696a73e6211ded89e8c1105db1bfe
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Oct 7 11:23:57 2011 -0400
Windows: correct use of krb5_init_context in aklog
A zero return code is success. Apply ! to obtain proper
conditional test.
Change-Id: Idd60fd2476a36ec36f7b5e250e9f8b8531c80611
Reviewed-on: http://gerrit.openafs.org/5570
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit a453f2152145f242c7412c947aaebdd135cb9022
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Oct 8 10:01:07 2011 +0200
Correct Heimdal conversion of libadmin/adminutil
Patchset 4251e386aa25bb3fc02fa255e92327fffc8b954d converts to
using Heimdal. The conversion undid the introduction of the
abstraction function fetch_krb5_error_message() which is
implemented in src/util. Restore the use of fetch_krb5_error_message()
and modify src/util/krb5_nt.c to use the Kerberos Compat SDK
interface.
Change-Id: I67fe7a309727f67a1da3705e1e485e64747c325c
Reviewed-on: http://gerrit.openafs.org/5571
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit df3e4145e758de3530a21bb1e75cd48a4a7f61ec
Author: Derrick Brashear <shadow@dementix.org>
Date: Fri Oct 7 08:11:34 2011 -0400
bypasscache: free in order
we need to free this, but while the pointer is still good
Change-Id: I5afa3505b764c5bf72811f60f63e29c80a29c5af
Reviewed-on: http://gerrit.openafs.org/5562
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit f2cba414c1390d5ed46b6c57f5682bfbcf53774e
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Oct 7 05:50:37 2011 -0400
doc: fileserver synopsis typo
Fix a fileserver synopsis typo noticed during Derrick's EACK2011
debugging session.
Change-Id: I73ed6bd93f644689acbdeeb4293a22b3b6752ba6
Reviewed-on: http://gerrit.openafs.org/5558
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit d84c91788e0f61a9b2837f9b6ba2492072df33da
Author: Andrew Deason <adeason@sinenomine.net>
Date: Fri Oct 7 04:04:03 2011 -0400
RedHat: Add xstat_*_test commands to RPMs
Install the xstat_*_test commands in the 'openafs' RPM.
Change-Id: Idec42e133dd3f27c72f06c5411dd12acc163ef93
Reviewed-on: http://gerrit.openafs.org/5557
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit d1cf14d54e380014851fb850b65263a66a8a4443
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Sep 21 15:02:40 2011 -0400
bypasscache for ukernel
simple (read) bypasscache for ukernel.
does not bother trying any buffercache stuff.
Change-Id: Ie75572da7efdb871a4ce807f02fbbb5bd7744c66
Reviewed-on: http://gerrit.openafs.org/5484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 65bdade6d5a6c4301444f288cf20430241cbdc5d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 4 19:01:50 2011 -0400
Windows: Explorer shell GetUnixModeBits()
actually append the unix mode string elements to the
respective strings.
Change-Id: I32d69f824f01e8cfacbf811a4bb14e01e3b6b9a3
Reviewed-on: http://gerrit.openafs.org/5552
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 4e02cb72be034ddad019d2ee70e8009ee762d9ed
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Oct 4 17:29:26 2011 -0400
Windows: char* is not a Unicode string
Do not treat the output of NetbiosName() as a wide_t when
it is a char*.
Change-Id: Iba4f1f30f1de4a9c3ded2f1e440ca9e4bc014379
Reviewed-on: http://gerrit.openafs.org/5549
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 07f771e6657f159998893b860f2ac1098fef5afc
Author: Andrew Deason <adeason@sinenomine.net>
Date: Tue Apr 12 17:47:51 2011 -0500
tsm41: Add options for uidpag and localuid
Add runtime options to aklog_dynamic_auth. Commit
3a541eb11d1bc7bd05b85635315214218d3b5d6f changed the behavior of
aklog_dynamic_auth to be more friendly to the CDE screenlocker, but
forced the use of UID-based PAGs.
Since some users like to use real PAGs and don't care about the CDE
screenlocker, made this behavior a runtime decision instead.
Change-Id: I28264e2e80258f962d02ed9a6a40c4d789179c06
Reviewed-on: http://gerrit.openafs.org/4484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 40eebd37a295c77615950858e08282447a8c28ca
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Apr 14 11:29:26 2011 -0500
aklog_dynamic_auth: Support new SetToken pioctl
Make aklog_dynamic_auth use the new SetTokenEx method of storing
tokens.
Change-Id: I843ecd206ef4673ff9e5df5419daa9ee5b31f060
Reviewed-on: http://gerrit.openafs.org/4483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 59169e0ac73fe44ddd7d28f3985cfc5549938cb8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Oct 1 14:05:31 2011 -0400
Windows: Explorer Shell Extension enhancements
Redesign the AFS Volume Tab to report:
. Volume name
. Volume ID
. Cell
. Server
. Availability
. Quota
. Partition Info
. Replica Server List
Properly handle multiple selections to report the volume info
of the parent object and not the actively selected object.
When a mount point is selected, display the volume information
for the target volume.
Remove file server from AFS tab.
Modify the AFS tab to better handle multiple selections including
mount points.
Extend many gui2fs functions to implement a poor man's "follow"
option. This really should be done with the pioctl 'literal'
capability but this is an improvement. The pioctl modifications
will require a major redesign of gui2fs.c and all of the dialogs.
Change-Id: Ib009beb81d841fb3bbbd35b1eb0faec2c40eaf4e
Reviewed-on: http://gerrit.openafs.org/5531
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 0ca1d92952cc81483e7b949f2982033cf0b9f3db
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 29 12:14:15 2011 -0500
Remove a few extra trailing backslashes
In a few different places, moving libutil before libafshcrypto_lwp
caused a variable definition to have a trailing \ on the last line of
the definition. This can confuse make (at least, the HP-UX make) to
think the next following definition is also part of the current
definition. Remove the trailing "\"s.
Change-Id: I235f95813e303bc3805b5d9fc8d7861e812613e2
Reviewed-on: http://gerrit.openafs.org/5523
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 82481c6f4464ad978ea56c687205bdfcd3eebffd
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Sep 28 15:02:48 2011 -0500
vol: Only check "logging" on vice partitions
We don't care about non-vicepX partitions, so move part of the UFS
"logging" check into VCheckPartition. This API should probably redone
so the "am I a vicepX partition" check is done completely separately,
but for now, this will do.
Change-Id: Ib2df2079a392d7ed1a8c2aded34f2a7265215ecd
Reviewed-on: http://gerrit.openafs.org/5514
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit b4f96eb78d9403799b97a39b9659070cf1114cd1
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Thu Sep 29 15:34:48 2011 +0100
FSSYNC-Client: Consistent use of partition name
Over time the FSSYNC code has collected examples where the partition
path is passed rather than the partition name. In Unix this is the
same (/vicepX), but on windows the path is the DOS device (C:).
This checkin changes FSSYNC client code to always use the partition
name.
This checkin does not address FSSYNC server or SALVSYNC.
Change-Id: I3c5b63103ab0cbd6c2c6c73b9dc737eca22b7d4c
Reviewed-on: http://gerrit.openafs.org/5521
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
commit 0d76ca3c5b17caa2c8106a75ee6ca1332deae603
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Fri Sep 30 03:43:24 2011 -0400
Windows: register Shell Ext handlers
Add registry keys and values to enable use of the overlay
handlers for symlinks and mount points.
Add registry keys and values to enable use of the property
sheet handlers.
Correct registry keys for the Folder background context menu
handler.
Change-Id: Icac560fc6ffcec6bcc41f64adeae3ee2e5884fdb
Reviewed-on: http://gerrit.openafs.org/5530
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 9dd9cfa0e1536e0e75628c84605b3d5b8486d69c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 27 13:49:52 2011 -0400
Do not call krb5_get_error_message with NULL context
MIT's krb5_get_error_message() ignores the context and can
be called with a NULL context. Heimdal's version does not.
Change-Id: I31801b0e0044e5e724298404645517e4425b0f09
Reviewed-on: http://gerrit.openafs.org/5508
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 39d5bb10b0c90f021a096b44a65abc525ef7e2e8
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Tue Sep 20 23:54:08 2011 -0400
kauth: permit kauth/test to build on Windows (again)
Change-Id: I28f7bc93e189a2fcf3651552e00b4214bb6ec799
Reviewed-on: http://gerrit.openafs.org/5473
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 85831245154afc19da31bb86d21e64376ec11f94
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Sep 24 11:12:09 2011 -0400
Windows: add krb5_enctype_enable(DES) calls
Heimdal disables DES by default. Enable DES-CBC-CRC by
calling krb5_enctype_enable() so that the active profile
does not require
[libdefaults]
allow_weak_enctypes = 1
Change-Id: I75d7b6bd7269081c7b1fcaafe05074dcdcc9a7e0
Reviewed-on: http://gerrit.openafs.org/5501
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 4251e386aa25bb3fc02fa255e92327fffc8b954d
Author: Asanka C. Herath <asanka@secure-endpoints.com>
Date: Fri Oct 8 17:46:02 2010 -0400
Windows: Build against KerbCompatSDK instead of KFW
Build OpenAFS for Windows against the Secure Endpoints
Kerberos Compatibility SDK instead of the in tree
Kerberos for Windows SDK.
The compatibility layer is available from:
http://github.com/secure-endpoints/heimdal-krbcompat
The SDK location must be specified with the
KERBEROSCOMPATSDKROOT environment variable.
The benefits of building against the Kerberos Compatibility
SDK are:
* Heimdal 1.5.1 or later assemblies will be used
if available
* MIT KFW 3.2.x will be searched for if Heimdal 1.5.1
is not installed
Version 1.0 of the SDK is supported.
Change-Id: I393e20d8bfb9ee1ca749cc54ecc1341927abaf82
Reviewed-on: http://gerrit.openafs.org/2867
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
commit 5c6bd04211d587efde4b0915a62273aafb2d306b
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 29 14:49:53 2011 -0500
DAFS: Do not serialize state for invalid hosts
When we serialize host information for DAFS during shutdown, we have
no guarantee that the host is in a valid state when we look at it.
This can result in a host being saved to disk when we are waiting for
the host to respond to an RPC, and so the information about the host
is invalid. For example, we can save a host that has the
HWHO_INPROGRESS flag set, and when it is restored later, this can
cause odd behavior since the flag is set but no thread is actually
waiting for the host to respond.
So instead, during state serialization, try to determine if a host may
be in an invalid state, and simply skip the host if it may.
Change-Id: I755640ea4ce607245ae98cc7455472ef781271e7
Reviewed-on: http://gerrit.openafs.org/5528
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6e7b31ef0a69b8ea39e8acc474a7aab48f828d3d
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 29 16:04:54 2011 -0500
DAFS: Skip hosts with invalid flags on restore
Host entries with HWHO_INPROGRESS set or ALTADDR unset do not have
valid state, since those flags indicate that the fileserver was in the
middle of identifying the host when the host struct was serialized.
Skip entries from the on-disk host data that have such invalid flags
set when restoring state, so we do not load invalid data.
Change-Id: I26b88256679f4596598e6e3e6b68af7e8e5e387d
Reviewed-on: http://gerrit.openafs.org/5527
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d54a9994d362ce3f287fe786839ec72f6d94806c
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 29 15:22:35 2011 -0500
DAFS: Add explicit 'valid' field for index maps
The CB, FE, and host serialization structures were just using the
relevant indices to determine whether or not an entry mapping and old
index to a new index was populated with actual data. For host
structures, this really isn't sufficient, since our index can be 0,
and the structure is calloc'd, so the index in the structure could
also be 0.
Add a flag explicitly stating whether or not the structure has been
filled in, to make this unambiguous.
Change-Id: Ia69e25fa73e10dc10cf3ddf08bb4feb2c9958674
Reviewed-on: http://gerrit.openafs.org/5526
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit d43438bb914f267f1c65d81e23efbab6874ae426
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 29 18:36:07 2011 -0500
viced: Assert valid statistics indices
Make sure we are passed valid statistic index numbers, so passing in a
bad index doesn't result in writing over random memory.
Change-Id: I29ed03b59df937e6f95fba44209a03db23613a8d
Reviewed-on: http://gerrit.openafs.org/5525
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 22d94407ea06a3213b7f0f6d57edd48d1977b2e1
Author: Andrew Deason <adeason@sinenomine.net>
Date: Thu Sep 29 18:31:37 2011 -0500
viced: Use xfer indices for xfer data
Use the xfer indices for the xfer-related data, not the op indices, so
we don't try to fill in data beyond the actual storage for the stats.
Change-Id: I075d4eb9439d9bd603489f0aa90b3c18c3959de3
Reviewed-on: http://gerrit.openafs.org/5524
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5587bbfc0bc70de234e5655faf7676cf2b9b9715
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 28 21:15:32 2011 -0400
rx: add post RPC procedure capability
Add the ability to specify a procedure that will be called after
the end of each RPC for a service. This is similar to the
existing afterProc, except that it gets called after the RPC
has ended (after EndCall).
rx_SetPostProc and rx_GetPostProc are provided to set and retrieve
a postProc for a specified service.
Change-Id: I52e70323c5d35c9c0d70d9b9bbb05ff56a6edcad
Reviewed-on: http://gerrit.openafs.org/5529
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
commit 2fd66404d9deeb292e1eadb23f5e0f287f9bf8f9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Thu Sep 29 09:35:51 2011 -0400
Fix typo in windows release notes
Reported by Jeff Blaine.
FIXES 132233
Change-Id: I0a311e75d1da4c753cd902fd964587a62ef7abf1
Reviewed-on: http://gerrit.openafs.org/5519
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit b977e52a441c70ec9ea97c7d0ebaaed17e530116
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 28 21:46:48 2011 -0400
Windows: Fixup errors in AFS ACL Property Sheet
Unlike the afs_set_acl_dlg the PropACL sheet only uses a single
ComboList to maintain both the positive and negative ACEs but
uses two CStringArrays to separately store the positive and
negative ACEs. Two entries in each array are used to store
an ACE. The %2==0 entry is the pts name and the %2==1 entry is
the permission list. This needs to be taken into account when
manipulating the negative entries since the array count for the
normal entries is twice the number of ACEs.
Negative entries were prefixed with '=' instead of '-'.
The Remove button was not hooked up and was not enabled or disabled
under all appropriate conditions.
Change-Id: I3bbfd9e82c8796554482b876d31ec53d8f9ac91f
Reviewed-on: http://gerrit.openafs.org/5518
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 5ba6a6223c42abf104c02d59f8c95d1760bd9030
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 28 19:59:03 2011 -0400
Windows: add resource info to afshcrypto.dll
The afshcrypto.rc file was provided but it was never compiled
nor linked to the dll.
Change-Id: I41138c53a5b53417d880ae748c7f8e8248daedce
Reviewed-on: http://gerrit.openafs.org/5517
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 0c6bc6c78ade956978652dfe62bcc27140695b8a
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 28 19:58:07 2011 -0400
Windows: Add resource info to afsroken.dll
The afsroken.rc file was provided but it was never compiled
or linked to the dll.
Change-Id: Id64ccd06b85c444f2009ef21f1fc65fb14f1bf01
Reviewed-on: http://gerrit.openafs.org/5516
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 11a6fc948983c0a9f1fb41c58b9559750763440b
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 28 18:39:55 2011 -0400
viced: remove duplicate declaration
viced_uclient_key is declared twice, remove one of the
declarations.
Change-Id: I6f5cfef56512c660be75958e99d35ee86e6718ef
Reviewed-on: http://gerrit.openafs.org/5515
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 60a6454d80c760aa8768ba64f7c5bab24f897c7b
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Wed Sep 28 16:46:00 2011 +0100
Windows: Remove spurious use of CRTL
Checkins b71a2daa and 5247fa38a moved us from using a FILE*
to using an FDi_t. However, lurking inside the dump code we
see a use of _filelength() which is a MS-Crtl API.
This checkin replaces this call with one to the WIN32 API
GetFileSizeEx.
Change-Id: I6ecc25a52d083f918bd8d92670b05f12e58e4015
Reviewed-on: http://gerrit.openafs.org/5511
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
commit c7dc0180c7c424c6cb58d1493759caf82ef280f2
Author: Andrew Deason <adeason@sinenomine.net>
Date: Wed Sep 28 15:41:38 2011 -0500
Remove references to afs_assert.h
The header afs_assert.h no longer exists after commit
cac74242728ad97e3ce9cef0a949d58c237250f6. Remove all remaining
references to afs_assert.h in the tree.
Change-Id: I708a399d4389d2f96d93ce3caf9c8b96e38bdf64
Reviewed-on: http://gerrit.openafs.org/5513
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 955bab670d0aed714fc940b5be7e2b75896a63d0
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Sep 28 10:23:19 2011 -0400
ukernel: output dataversion in stat struct if possible
we already have this data; if we can output it, do so.
Change-Id: Ibc445a152e4e1e61be50003dd8683d2a4b32d190
Reviewed-on: http://gerrit.openafs.org/5510
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 80943970b8cfcdf3fc630b25804aebaea228bd73
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Sep 28 10:11:16 2011 -0400
ukernel: make web enhancements the default
none of the web enhancements break base functionality,
and they are strictly more functionality; just turn them on everywhere
Change-Id: I462d3571d055f1d8ec19bdd0132b935bacd435c0
Reviewed-on: http://gerrit.openafs.org/5509
Tested-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 5b579b83abc57d6bb9212b599aae96af9ac71832
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Wed Sep 28 17:34:54 2011 +0100
Windows: Fix comment about DiskPartition64
There is significant confusion between the partition name (/vicepX)
and the containing volume (C:) in the windows code. A review of
the uses in FSYNCH found a downright wrong comment (as checked in
the debugger).
Change-Id: I9cf6e965c9efee18b608a622b83639f25e410ce5
Reviewed-on: http://gerrit.openafs.org/5512
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 5e8c4b7c8a69e20ba35bd12950b95c8650cf4012
Author: Ben Kaduk <kaduk@mit.edu>
Date: Mon Sep 26 20:21:49 2011 -0400
FBSD: allow exclusion of kernel symbols
Gerrit/5503 added support for kernel module symbols in the
bsd.kmod.mk world; however, the inclusion of symbols is conditoinal
on the DEBUG_FLAGS make variable being *set*, as opposed to nonempty.
So we must use an intermediate variable to store the AC_SUBST
result and conditionalize assignment to DEBUG_FLAGS on whether
or not it is empty.
Change-Id: I7f86fd08d6dcf1ac7116680db98db13f5f31be7b
Reviewed-on: http://gerrit.openafs.org/5507
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 9133aa6ed3a7fe2ae55b2d3242366ae277c7f726
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Sep 22 09:13:18 2011 -0400
bozo: report bosserver -rxbind address
Create a file on bosserver startup called bosserver.rxbind in the
server local directory which contains an address local scripts may
use to contact the bosserver.
When bosserver is started with the -rxbind option, write the address
selected from the intersection of the interfaces, NetInfo, and
NetRestrict configuration to the bosserver.rxbind file, otherwise
write the loopback address 127.0.0.1.
Update the RedHat init script to use the new bosserver.rxbind file.
Change-Id: I00a4249ae7445f872625ec46f960e778483d1f9f
Reviewed-on: http://gerrit.openafs.org/5488
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4a0d8cc24e687f271fcf44bab765691bd782d78d
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 26 12:28:49 2011 -0400
Windows: do not install afs_assert.h
commit cac74242728ad97e3ce9cef0a949d58c237250f6 removed afs_assert.h
from the build tree. It can no longer be installed.
Change-Id: I9a5c9f679a3cd8755b0a290ac91be6c651242e22
Reviewed-on: http://gerrit.openafs.org/5505
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 48e326372d89b0d778420f268dbe59236758eba8
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Sep 26 11:59:55 2011 -0400
bozo: fix overrun from -rxbind on restart
Fix buffer overrun in bosctlsrv introduced
by commit 544ff1b295a57b50afefa6146094434db7608355
Change-Id: Icb39b5107113e2819a643537b042b20504c783f3
Reviewed-on: http://gerrit.openafs.org/5504
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 11f54962f638c8ae48d5193f6b695c252fbb9937
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Mon Jul 25 09:21:34 2011 -0400
volinfo: refactor vnode handling
At program startup, register procedures to be called
when scanning vnodes.
Change-Id: I8dda202f1ea61b538278eacc8f86c323728cf191
Reviewed-on: http://gerrit.openafs.org/5100
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 4aa72b4308bae8e1d789682e7ead83bcadded862
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Sat Jul 23 14:55:57 2011 -0400
volinfo: release volume header ihandles when done
After scanning the volume, release the header ihandles
for the volume.
Change-Id: I689a33b321fc68d0dc480369e6cbdfd41c1dbfc9
Reviewed-on: http://gerrit.openafs.org/5099
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b99ab0371a66803fdffafe848cb324595eb9de61
Author: Jonathan A. Kollasch <jakllsch@kollasch.net>
Date: Fri Sep 23 19:14:47 2011 +0000
correct omission of AFS_NBSD60_ENV from nbsd60 param file
Change-Id: I6b72ab5d9e3e5000c9138e6470e80491d85328b1
Reviewed-on: http://gerrit.openafs.org/5499
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cac74242728ad97e3ce9cef0a949d58c237250f6
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Jul 10 13:46:11 2011 +0100
Clean up assertion
The AFS code has multiple different assertion implementations in
userspace. This patchset is the start of bringing some sanity to them.
In rx, we have osi_Assert, a user/kernel assertion macro. This is only
available to libraries which have RX dependencies
In util, we redefine the standard 'assert()' macro to provide a
cross-platform assertion solution.
Because util has an RX dependency, neither of these provide an
assertion solution for libraries which should be independent of rx.
So, pull the assertion code out of util, and put it into opr, as a new
opr_Assert() macro. Implement the userspace osi_Assert in terms of this
macro, leaving the kernel variant untouched.
Update callers to the new macro and header file names.
Change-Id: I780b30ec1ea1207daa17127df4d5fbf9a94481b6
Reviewed-on: http://gerrit.openafs.org/5394
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 0a8f21e6a44d59a3333c0b4fee572fe6d94aae3d
Author: Simon Wilkinson <sxw@your-file-system.com>
Date: Sun Sep 11 21:44:23 2011 +0100
Move abort() into opr
We need our own abort function, because the behaviour of the Windows
abort() implementation isn't sufficiently flexible for us.
Because we're replacing an operating system function, reather than
implementing a missing function, this doesn't belong in roken.
So, provide an alternative opr_abort() implementation in our portable
runtime layer, which is a synonym for abort() on Unix, and implements
the required DebugBreak() functionality on Windows.
Remove lwp_abort() which was just creating another, unnecessary, layer
of abstraction.
Change-Id: Ice226d70d2791beaba011f42e39fde60242f6cc3
Reviewed-on: http://gerrit.openafs.org/4428
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit bdf86d245fd55c5c7ac7ea81e3d6b6bafdbe1783
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Nov 23 20:21:50 2010 -0500
bozo: bosserver -pidfiles option
Add an option to bosserver to create pidfiles for long running
processes for simple, fs, and dafs bnode types, as well as the
bosserver process. The pidfiles are located in the server local
directory by default, or in the path specifed by the -pidfiles
command-line option.
Change-Id: I3e85b027dc6f630965f84b18b7f849ac481dabe2
Reviewed-on: http://gerrit.openafs.org/5497
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 3e191dfd99087ac9408eff5f7f73cc10beb90f79
Author: Ben Kaduk <kaduk@mit.edu>
Date: Sat Sep 24 18:05:09 2011 -0400
FBSD: bsd.kmod.mk fallout for debug symbols
Now that we no longer control the installation of libafs.ko,
debug symbols are always getting stripped.
If the user requested kernel debug symbols, define DEBUG_FLAGS
for the libafs build and install, so that bsd.kmod.mk will
install the .symbols file alongside the kernel module.
Change-Id: I0e7f3736666c96c6aaed18c0add98dea37349b83
Reviewed-on: http://gerrit.openafs.org/5503
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b6e04fa78ed5793d52caccafe2f5fc46be6a6af9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sat Sep 24 11:42:50 2011 -0400
Windows: update ntbuild.bat
Add references to:
. new APPVER and _WIN32_IE values
. new AFSVER_CL values
. additional code signing variables
. variables for symbol store support
. WiX Installer Toolkit location
. Cygwin Install Directory
. ActivePerl Install Directory
. SignTool path
Change-Id: Ie9465102977aee628d8f129de9c5c9c14fa5d97c
Reviewed-on: http://gerrit.openafs.org/5500
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit fab921de67fe2bfbf6967c2e1cbf27230aad8bb2
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 23 11:28:05 2011 -0400
bozo: remove duplicate prototype
Remove duplicate function prototype.
Change-Id: I84a30c27edabd82272f99711285eb043122f66a0
Reviewed-on: http://gerrit.openafs.org/5496
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c2f7627a89e50713dc963ece2ef086cd991c15aa
Author: Rod Widdowson <rdw@steadingsoftware.com>
Date: Fri Sep 23 16:37:43 2011 +0100
Fix buffer leak in dir/buffers.c
Checkin 0284e65f97861e888d95576f22a93cd681813c39 accidently
threw in a trailing semicolon after an if statement.
Since the next line was a break this had several unfortunate
side effects, the most obvious being that we leaked a buffer
in certain cases.
Change-Id: I4f1043426cac22c70b64731c98ac858d82e2f11e
Reviewed-on: http://gerrit.openafs.org/5498
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit a020c572d372f2e86807dc4c75ec50ff14ef2fba
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Thu Sep 22 19:09:52 2011 -0400
viced: fix incorrect error message
The error message was obviously copied from another location in the
code (after the pr_Initialize call) and is misleading. Adapt it for
vl_Initialize failure.
Change-Id: I4fc65fd82b92df3298227abf3f6bcc24184ebfe8
Reviewed-on: http://gerrit.openafs.org/5490
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 544ff1b295a57b50afefa6146094434db7608355
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Thu Sep 22 11:28:17 2011 -0400
bozo: pass -rxbind on restart
Pass the -rxbind on restarts when bosserver is initially started
with the -rxbind option.
Change-Id: Ic6e884c87fcd0e8b3808a2f362d8c32177e9e2a0
Reviewed-on: http://gerrit.openafs.org/5487
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit cb4d6e5e7e1a112782be5d892f9706b1a9da439b
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Sep 22 13:00:08 2011 -0400
darwin: ukernel is 64-bit able
update ukernel settings for darwin
Change-Id: Ifd72d0d5affa1bfbea04da2c95e8011fb055e59f
Reviewed-on: http://gerrit.openafs.org/5489
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 649d3a0957eef0c607a63b47f11bd4a0ca8655ca
Author: Marc Dionne <marc.c.dionne@gmail.com>
Date: Wed Sep 21 20:31:33 2011 -0400
fs: fix setserverprefs where long is larger than afs_int32
Make the fscanf and scanf format specifiers match the type of the
target variable. This prevents trying to store a long int into an
afs_int32 variable which may be smaller, and overwriting neighbouring
data on the stack.
The effect on a 64-bit Linux system was that the high bits of "rank"
would overwrite the first 4 bytes of the scanned host name, causing
setserverprefs to fail with:
: couldn't resolve name.
Change-Id: I2100e7fe77a137257eb308ad127c151de84756bc
Reviewed-on: http://gerrit.openafs.org/5486
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
commit 6fb2e92422abdaca6175f2556b24ba681af72fd6
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Wed Sep 21 01:46:52 2011 -0400
Windows: Disable OACR by default for AFSRDR build
When building the AFS redirector with WDK7600 the Microsoft Auto
Code Review process is started by default. This is a problem for
buildbot. Disable OACR by default if the _RunOacr environment
variable is not set to TRUE.
Change-Id: I7e8f9f978e5f6b8a33fe0ff6174b9ddbe2a86ec7
Reviewed-on: http://gerrit.openafs.org/5479
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit c208b13fa024295c9064364520ef790b093e292c
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Sep 21 12:55:39 2011 -0400
afscp: enable debugging support in the volume portion
readd the missing code when we are compiled for debug
Change-Id: Ia4f0bcf2868e2f87bf8f7b6c01f3842e1a2eed50
Reviewed-on: http://gerrit.openafs.org/5483
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit fb1d7491fbe2e90300b23284f213cac2bdcd56ac
Author: Derrick Brashear <shadow@dementix.org>
Date: Wed Sep 21 02:03:30 2011 -0400
afscp: allow listing of bare root.cell dirs in dynroot mode
don't assume that /afs/cell.name (as opposed to /afs/cell.name/)
is bogus. if there's text, at least try
Change-Id: I9566efe60c942533cd0415a03528953cb90310c9
Reviewed-on: http://gerrit.openafs.org/5480
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 97004b7b0970bfc2744df49d540521a41177cac8
Author: Derrick Brashear <shadow@dementix.org>
Date: Tue Sep 20 23:26:25 2011 -0400
afscp: add confdir override
allow an alternate config dir
Change-Id: I454d63199dcfadc46ba957ddae0685efee6acf26
Reviewed-on: http://gerrit.openafs.org/5476
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 76e0b97eaa64088b8d8381a80b6ada0a080f0cbd
Author: Terry Long <trl@andrew.cmu.edu>
Date: Tue Sep 20 21:21:12 2011 -0400
Fix AFSPreference compile error on Mac OS 10.7
Lion llvm/clang complains about main returning void instead of int.
Fixed main to return int in DARWIN/AFSPreference/afshlp.m.
Resubmitted patch to origin/master.
Change-Id: I2f4e88ded2d98688901cc18d60abac8172942bbd
Reviewed-on: http://gerrit.openafs.org/5475
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit c8f64e04b8cfb1085a2f3227785492d5e3f487ff
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Sep 18 13:13:18 2011 -0400
Windows: install control panel only if afs_config
Add the AFS control panel to the AFS Configuration Tool
component so that it is installed only if afs_config.exe
is going to be installed.
Change-Id: I9016ad70f3b201bbe440ec39e9987c6209cae0cc
Reviewed-on: http://gerrit.openafs.org/5462
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 25254adeeea5f41820f140ce812bdacae34d24c9
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Sep 18 13:14:39 2011 -0400
Windows: Disable Control Panel button in NIM
Since afs_config.exe is no longer installed, remove the
OpenAFS control panel button from the Network Identity Manager
provider.
Change-Id: I4b3d7a091a6c833d8bf4a24110ee6deb00c6baa0
Reviewed-on: http://gerrit.openafs.org/5463
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 1d6dfa5806b171c6f306508396a06302d3d9c42a
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Tue Sep 20 16:21:50 2011 -0400
salvager: fix filesystem path truncation
Fix filesystem path truncation for vice partitions beyond /vicepz.
Commit 3d7388b7 moved the filesystem path to a fixed size buffer,
however the path of the filesystem to be salvaged is truncated for
partitions with two character ids (e.g. /vicepaa), in which case
the salvager will salvager the wrong partition, or abort if the
truncated path is not present.
Change-Id: Iadf45268514ef5045a4481950f213abecbb20b33
Reviewed-on: http://gerrit.openafs.org/5469
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
commit 0cb10104f5af73614e6b7673d3711ddbc3f3a866
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Fri Sep 16 11:23:18 2011 -0400
solaris: libafs depends on fs/ufs
The solaris afs module depends on symbols exported by fs/ufs.
Set this dependency in the afs module so the kernel loader
will automatically load the fs/ufs driver if is not already
loaded, such on zfs only systems.
Change-Id: I87ae2c326ac0c895cca37cf30e4c11d0decbe6d1
Reviewed-on: http://gerrit.openafs.org/5456
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit b33deb765ea8984d811ce0140716086338c3c10f
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 14 17:22:25 2011 -0400
solaris: build 64-bit binaries for sunx86_51x by default
Build 64-bit binaries on solaris x86 version 10 or better
build systems running in 64-bit mode.
Builders may set the the ARCHFLAGS environment variable
to "-m32" before running configure to build 32-bit binaries
on a 64-bit build host.
Change-Id: I27558a2c7fe9872cf30889ca57e778985a3ff461
Reviewed-on: http://gerrit.openafs.org/5450
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit e69714739f64475d71633fd4cb3523bc1ae143bb
Author: Andrew Deason <adeason@sinenomine.net>
Date: Mon Sep 19 11:05:59 2011 -0400
ntohs ubik header size
The 'size' field in the ubik header is only 16-bits wide, so we should
be using ntohs to read it, not ntohl. The database checking utilities
for the prdb and kadb were still using ntohl (vldb was fixed by
591f9b6de9ab3dc5c17ad41af0241527f7f04b31).
Change-Id: Ic3894f5ae78ff05279e87b364841c5f6dfdf803c
Reviewed-on: http://gerrit.openafs.org/5466
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 4d4cd3cd0874f4574989f57201bd3a3999764d6c
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Sun Sep 18 14:18:24 2011 -0400
dir: remove unnecessary cast from malloc
Change-Id: I2b91c9ad2983ba08e5e1bc49c3790e018951be31
Reviewed-on: http://gerrit.openafs.org/5464
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 552d59186b135af55eeaa6136a9cbb8965dd2f04
Author: Jeffrey Altman <jaltman@your-file-system.com>
Date: Mon Sep 19 10:35:11 2011 -0400
Fix input size computation in SetSPrefs pioctl
Patchset 718f85a8b69a78ac77beb5c8471af20657be2a53 contained
a small typo that prevents the SetSPrefs pioctl processing from
functioning in all cases. fs setserverprefs continues to work
for non-DB preference lists because fs.c pokeServers() attempts
to try the old SetSPrefs33 pioctl in the non-DB server case.
Change-Id: I2e06dccb51c53ba312418fb5f51be3d621a2004c
Reviewed-on: http://gerrit.openafs.org/5465
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
commit 624c5d09e2f46403f8754567b387987488c5446c
Author: Michael Meffie <mmeffie@sinenomine.net>
Date: Wed Sep 14 10:48:08 2011 -0400
solaris: fix afs_event build error
Fix build error on solaris introduced with commit
dc077b83c9b1f107efbc3483743f44117748f23c.
Change-Id: Id41a0d7cf6400769dde5d2626854e2190cd6bd2e
Reviewed-on: http://gerrit.openafs.org/5419
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
commit 6196abf3c864f8cc6ab1efc6e5625a5cc68158bd
Author: Derrick Brashear <shadow@dementix.org>
Date: Thu Sep 15 13:48:31 2011 -0400
rx: arrange for Finalize to really stop running calls
previously rxi_ServerProc would happily error a call once
rx_tranquil was set, but keep calling ExecuteRequest.
Reorder code so kernel shutdown attempts are processed first;
then arrange if we are tranquil to not process the call further.
Issue discovered by Chaskiel Grundman.
Change-Id: I545960fb0eb0d5151baa7e06e2758cdeaf0885da
Reviewed-on: http://gerrit.openafs.org/5447
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
-----------------------------------------------------------------------
--
OpenAFS Master Repository