Commit Graph

9042 Commits

Author SHA1 Message Date
Simon Wilkinson
cd8ebb14e5 libafs: Remove support for length optimisation
At one point afs_StoreAllSegments had an optimisation to speed up
stores. However, that optimistation used the chunkLength without
taking appropriate locks, and was disabled. The variable assignments
which still exist from this code cause errors with gcc 4.6.0, so just
remove them.

Change-Id: I86547d94280d7f07214fbf6ef5b3db61c9781e59
Reviewed-on: http://gerrit.openafs.org/4991
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 10:35:11 -07:00
Simon Wilkinson
6a03341df6 libafs: Fix warnings in PPrefetchFromTape
The PrefetchFromTape pioctl had a number of set-but-unused variable
warnings. Tidy up the code to remove these warnings.

Change-Id: I358f7e31ab8e9f03447675be40dc8571650dbe72
Reviewed-on: http://gerrit.openafs.org/4990
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 09:56:45 -07:00
Simon Wilkinson
4e9a49c58a libafs: Fix statistics for PrefetchFromTape pioctl
The PrefetchFromTape pioctl was overloading SetAcl's statistics. Give
it a slot of its own.

Change-Id: I5698f8861af1b5e9771d138ca93a28f676df349b
Reviewed-on: http://gerrit.openafs.org/4989
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 09:56:36 -07:00
Simon Wilkinson
beaf9a4e3e libafs: Remove unused DNLC LRU code
The LRU code in osi_dnlc_lookup has never been enabled in OpenAFS,
and causes compilation errors with gcc 4.6.0 - just remove the unused
code and its associated variables.

Change-Id: Ifc09bbb857406b9bfcbf436c35e36289567f65cf
Reviewed-on: http://gerrit.openafs.org/4988
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 09:56:21 -07:00
Simon Wilkinson
37f41897fb libafs: Remove unused NAT markeddown code
Remove unused code which used to retry once when a server was
marked down due to a bad NAT. This code has never been enabled
in OpenAFS, and causes compile errors with gcc 4.6.0

Change-Id: Idc978a68e81ccb761117c97200607e30c98627dc
Reviewed-on: http://gerrit.openafs.org/4987
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 09:56:08 -07:00
Garrett Wollman
8adf4cd0b0 util: introduce a common interface for setting thread names
A previous change added support for setting thread names/titles to
viced; this change moves the #ifdef spaghetti to src/util in
preparation for calling it from other places where it would be
useful.  Two functions are defined, one for setting an arbitrary
thread's name (as might be done by the spawning thread) and one
for setting the current thread's name; the latter is also defined as
a macro for non-pthreads compilations so that it can be called
unconditionally (the interface does not reference any
pthread-specific data types).  Note that some platforms, Mac OS X
in particular, do not allow setting the name of a different thread.

The two functions are defined as no-ops for Windows as our pthreads
emulation layer for Windows does not provide the needed mechanism.

Make viced use the new interface.

Change-Id: I58c65a28772d8d188c03d6ff3a6f052889362fb7
Reviewed-on: http://gerrit.openafs.org/4966
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 09:55:22 -07:00
Simon Wilkinson
470bab9d56 Add PERLUAFS to libuafs's git ignore
Change-Id: I0067ba4c9b4f2b57ded862bc5cfe33a2c419d108
Reviewed-on: http://gerrit.openafs.org/5004
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 07:10:00 -07:00
Simon Wilkinson
f775c0fb6f Add make dist and make srpm targets
Add targets to generate distribution tarballs, and srpms, from a tree.
These will generate packages for whatever the current HEAD of the tree
is - if the HEAD is a release tag, then the packages will be named for
that release, if the HEAD is between releases, then git describe will
be used to create an appropriate version identifier.

The tarballs are generated from the current git repository contents,
anything not checked in will not be included.

Change-Id: Ic5cde2382f973a004406e0ef0f09708d0ba0ad5f
Reviewed-on: http://gerrit.openafs.org/4984
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 06:29:53 -07:00
Simon Wilkinson
6a27e228ba rpms: Use git version information
Use the git version information when building RPMS, rather than hard
coding it into configure.ac.

Change-Id: I477629b4102f48a9669ff67aae429c08862a5afc
Reviewed-on: http://gerrit.openafs.org/4983
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-13 06:27:35 -07:00
Derrick Brashear
4470d849ec macos: note additional vfs features
currently we have inode numbers which do not change. note it.
additionally, we support large files. note it.

Change-Id: I77090d3ccc3ba9952e14f2be13946ef2e91a6af7
Reviewed-on: http://gerrit.openafs.org/4973
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 13:23:14 -07:00
Ken Dreyer
8bface302c Red Hat: update build script for newer Fedora versions
Remove old Fedora versions and add the currently-supported ones.

Change-Id: Ib514328cf944ea601028fb99273046cb2f5ea828
Reviewed-on: http://gerrit.openafs.org/4925
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 11:58:31 -07:00
Antoine Verheijen
2d794a5e5d Remove pre-existing assert macro in hcrypto header.
The config.h header for hcrypto defines an assert macro for
use by RX. OpenBSD already has an assert macro definition so
this new one causes screaming by the compiler about
re-definition. This patch adds the directives to remove any
pre-existing definition of assert, if one exists, prior to
defining the new one.

Change-Id: I01d5a1f26617fecfd0ffcc3930a7c7881beb8183
Reviewed-on: http://gerrit.openafs.org/4958
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 11:15:31 -07:00
Michael Meffie
02aa30893f salvager: do not redefine SalvageVolumeGroup
Do not use the c preprocessor to redefine the SalvageVolumeGroup()
function name.

Change-Id: I3d48ee28dc03be702d0427d74725ff1e99ec6411
Reviewed-on: http://gerrit.openafs.org/4965
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 11:14:05 -07:00
Derrick Brashear
5ec998a016 macos: fix shlib link list
link shared libs from the right place, lib not etc

Change-Id: I3d58d1f65b479b7c23c1bb0978eacea99b114541
Reviewed-on: http://gerrit.openafs.org/4971
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 11:05:46 -07:00
Simon Wilkinson
84a3c4714f rpms: Fix handling of x86 architectures
Once upon a time, our specfile would assume that if you were
building for i386 you were building userspace, and that i586 or i686
implied doing a kernel only build. This is no longer the case, and
now everything on modern Fedora is built for i686, so we should adapt
the spec file for this.

Change-Id: Ia56b9b15d0b28672a8411417d38937ed45ee93a1
Reviewed-on: http://gerrit.openafs.org/4970
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 11:05:05 -07:00
Simon Wilkinson
15c073887b rpms: Fix our %version handling
When we're doing version requirements in -devel package Requires:
lines, we should be using %{version}-%{release}, not just %{version}

FIXES 130137

Change-Id: I2d10c6fa362d3cbfa786c270996fa8ae75b9db20
Reviewed-on: http://gerrit.openafs.org/4969
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 11:04:35 -07:00
Michael Meffie
82e772bed0 salvager: check namei linktable header magic
Recreate the namei linktable file if the header magic
is bad.

Change-Id: I1e8c2d101cf1dd1d375a965684d95f6708e8c601
Reviewed-on: http://gerrit.openafs.org/4968
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-12 09:32:48 -07:00
Jeffrey Altman
27af8b4b53 Windows: always open dscp in smb_ReceiveNTTranCreate
There were two code paths in smb_ReceiveNTTranCreate that included
asserts in case the directory cm_scache_t object had not been
evaluated.  RT129299 contains a report that at least one of
them had been tripped in production.  There is no reason to avoid
evaluating the directory scp.  It must exist in the cache and
obtaining a reference in all cases simplifies the logic of this
overly complex function.

FIXES 129299

Change-Id: I7b32c81f11c3fef53f8a21a44f3594d5cd9e1552
Reviewed-on: http://gerrit.openafs.org/4967
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-12 09:32:27 -07:00
Garrett Wollman
ee05a1b086 viced: If platform supports setting a thread title, do so
Some pthread libraries support setting a name or title for individual
threads (analogous to setproctitle() for processes).  This can be useful
for debugging and is sometimes published for use by utilities like ps
(again like setproctitle() for processes).  The two most common variants
of this have the same signature with slightly different function names.
If either one is present, use it in viced (which already assigns a thread
name when compiled for LWP but ignores it in pthreads compilations).

Change-Id: I5486aa6a21dbc3c8885b94ad52c2b1a66baae81f
Reviewed-on: http://gerrit.openafs.org/4950
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-11 11:32:11 -07:00
Jeffrey Altman
52fee71403 Windows: Move file server lock releases to daemon
Create a new lock daemon thread which performs regular
cm_LockCheck() calls.  If a lock is deleted check the cm_scache_t
to see if the matching file server lock should be dropped.   If yes,
drop it.

This effectively caches file server locks for two seconds after
they are released to provide a chance for subsequent local lock
requests on the same file to avoid a file server RPC.  It also
ensures that windows processes do not thrash the file server and
force callback breaks.

Change-Id: I1c452e231ff282d9b45026aed1b02ab0c5932a77
Reviewed-on: http://gerrit.openafs.org/4964
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-11 00:57:08 -07:00
Ken Dreyer
1accef4e77 Red Hat: use repoquery to find kernels in build script
Remove the custom yum Python code in favor of repoquery.

Change-Id: Ifb185297666e5365974c342814ed3c2d2a54092e
Reviewed-on: http://gerrit.openafs.org/4926
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-10 06:58:04 -07:00
Antoine Verheijen
3559e5c8ed OpenBSD: Add <sys/queue.h> header for <sys/lockf.h>
On OpenBSD, the <sys/lockf.h> header requires the TAILQ_* macros
which are defined in <sys/queue.h>. The latter is not automatically
included by <sys/lockf.h> . This patch makes sure that it is
available by putting it into the OpenBSD-specific param.h files
(so as not to impact any other OS).

Change-Id: I8281b085eed2a6dec1f096ad9a6e96078c1e4af0
Reviewed-on: http://gerrit.openafs.org/4956
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-10 06:55:04 -07:00
Garrett Wollman
53434c828d viced: indent nested preprocessor directives
Make viced.c look more like other source files by indenting nested
preprocessor directives.  In a few case it made more sense to
eliminate the nesting.  This should otherwise be a whitespace-only
chnage.

Change-Id: I895ea2f754f90a15daa73cea24d3da9576fff9c9
Reviewed-on: http://gerrit.openafs.org/4959
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-10 06:50:59 -07:00
Jeffrey Altman
99b43273c0 rx: prevent connection channel assignment race
When rx was converted to use pthreads, the code that allocates
a call to a connection channel in rxi_ReceivePacket() was not
made thread safe.  The code prior to this patchset permitted a race
in the server connection case.  The rx_connection channel assignment
in rxi_ReceivePacket() and the call destruction in rxi_FreeCall()
and rxi_DestroyConnectionNoLock() did not consistently protect the
rx_connection channel array using the conn_call_lock.

This race could result in rxi_ReceivePacket() operating on a
rx_call which was disconnected from the previously assigned
rx_connection.

In addition, the code in rxi_ReceivePacket() that was intended
to protect the allocation of a call using rxi_NewCall() to the
connection channel array was racy with itself.

This patchset consistently applies the conn_call_lock to protect
the allocation / deallocation of calls to the connection channel
array and in the process simplifies the logic in rxi_ReceivePacket()
as it is no longer necessary to protect against a null call pointer
since the race can no longer be lost.

Change-Id: Id61b55b4d1d57a2b9b35ea942545ef4bdc8d33f3
Reviewed-on: http://gerrit.openafs.org/4963
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-10 06:50:29 -07:00
Jeffrey Altman
88b4e2e527 windows: include cmp_Cmd_Ref_3_en_US component
when building installers actually include the html 3 man pages

Change-Id: I03e47d24fa79c888dc49a9dba7e0388dafe6ce59
Reviewed-on: http://gerrit.openafs.org/4961
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-09 07:35:35 -07:00
Jeffrey Altman
da6c97678f Windows: out of order lock smb v3 locking
Do not obtain the smb_rctLock after holding the cm_scache_t->rw
lock.

At most one hold is required in case of lock failure.  Obtain
it as the start of processing and drop it at the end if not required.

Change-Id: I370321b087df480336c833d68e348d7f62d227b3
Reviewed-on: http://gerrit.openafs.org/4955
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-09 05:14:45 -07:00
Andrew Deason
3505c444f6 Add AFS::ukernel libuafs perl bindings
Add the SWIG-generated AFS::ukernel perl module, which provides perl
bindings to libuafs calls.

Change-Id: I5ce480944a8c97cbca72c80e79fc40c0edb0962f
Reviewed-on: http://gerrit.openafs.org/2048
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-08 22:20:06 -07:00
Andrew Deason
bbd505a8e1 Add afsload
Add afsload, a set of scripts used to synchronize the activity of
numerous libuafs cache managers for testing/simulation purposes.

Change-Id: I6f797d5968ea4ba3c29c1b13251f743c7d02d60d
Reviewed-on: http://gerrit.openafs.org/4906
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-08 22:16:28 -07:00
Andrew Deason
21edc432dc doc: Add support for section 3 man pages
Generate and install man pages (and their HTML versions) for library
reference documentation in section 3.

Change-Id: I500818097c6880e0412794661393351ab14461dc
Reviewed-on: http://gerrit.openafs.org/3898
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-08 22:16:10 -07:00
Andrew Deason
6548cedbee Add documentation for AFS::ukernel
Add some documentation explaining some of the minor quirks in
AFS::ukernel; specifically how some functions look a bit different
than in plain libuafs.

Change-Id: Ib8b18720c3fa6087de98d58ba8381f1ae4fb2f10
Reviewed-on: http://gerrit.openafs.org/3902
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-08 22:13:08 -07:00
Jeffrey Altman
21854e03eb Windows: Improve logging for StoreMini and cm_BufWrite
Add trace logging to cm_StoreMini which never had it before.

Improve the logging of cm_BufWrite by adding the trucPos value
which is the new length of the file that is being reported to
the file server.

Remove cm_buf_t data references when cm_BufWrite is performing
operations using rx_Writev and iovec structures.

Change-Id: I28798eb2232e739f665eb51499305a7a1898f824
Reviewed-on: http://gerrit.openafs.org/4924
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-07 14:20:57 -07:00
Jeffrey Altman
1ac219f537 Windows: Refactor cm_Unlock*() to avoid code duplication
cm_Unlock() and cm_UnlockByKey() duplicate a significant amount
of code.  Refactor it into a new static function, cm_IntUnlock()
which handles the process of downgrading or releasing a file
server lock depending upon the lock state of the cm_scache_t
object.

Change-Id: Ic5db7b3928fc0477f155183326321717ea04ace0
Reviewed-on: http://gerrit.openafs.org/4923
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-07 14:17:33 -07:00
Jeffrey Altman
1a56229910 Windows: Do not probe new servers from cm_UpdateVolumeLocation
cm_NewServer() can result in a call to cm_UpdateVolumeLocation()
if a server probe is performed.   In order to avoid recursive
calls to cm_UpdateVolumeLocation() do not probe new servers from
within cm_UpdateVolumeLocation().

Change-Id: Icdb8efe030ae3e1f714ca72ad741bd38c692697f
Reviewed-on: http://gerrit.openafs.org/4922
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-07-07 12:46:17 -07:00
Andrew Deason
e1e0083386 afs: Use 64-bit inode numbers
When we have a 64-bit ino_t, use the full 64 bits, instead of always
limiting ourselves to 32 bits.

Change-Id: I8f9f552b230e1723c8b77bfe92213ca43816240c
Reviewed-on: http://gerrit.openafs.org/4921
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-07 05:24:38 -07:00
Andrew Deason
2dc7ee2757 afs: Consolidate afs_calc_inum
Instead of having two separate afs_calc_inum functions, just have one
afs_calc_inum, and split off the md5 inode code into its own function
under a LINUX20 ifdef.

Change-Id: I400d2e70403905da40055238ffc2bb785659e9e0
Reviewed-on: http://gerrit.openafs.org/4920
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-06 22:51:10 -07:00
Andrew Deason
3a33ce4a33 afs: Use afs_calc_inum everywhere
The algorithm for calculating inode numbers was copied in several
places in libafs. Make them all use afs_calc_inum instead.

Change-Id: Ie835a0b92bf940b78090fd7ca4e36aace1df9767
Reviewed-on: http://gerrit.openafs.org/4919
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-06 22:50:41 -07:00
Andrew Deason
42943aead4 afs: Use cell for md5 inode numbers
When calculating the inode number for a file with md5 inodes, include
the cell number in the calculation, in order to reduce collisions
between cells.

Change-Id: I4b939042dd993419f785a78e87e68cf346b56e26
Reviewed-on: http://gerrit.openafs.org/4902
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-07-06 22:50:14 -07:00
Andrew Deason
0a51946f7c uss: Suppress more warnings from lex.yy.c
Specify -Wold-style-definition when compiling lex.yy.c. This allows us
to compile when --enable-checking is specified and our lex generates
code with old-style function definitions.

Change-Id: I09c87fd6274b5850952a8aaf63f0e3358100d567
Reviewed-on: http://gerrit.openafs.org/4905
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-06 13:42:33 -07:00
Andrew Deason
39083fe1ed afs: Ensure afs_calc_inum yields nonzero ino
afs_calc_inum can currently yield an inode of 0 if MD5-based inode
numbers are turned on. Some userspace applications (and for some
platforms, maybe even the kernel) make certain assumptions about the
inode number for a file; in particular for example, 'ls' will not
display a file with inode 0 in a normal directory listing.

So, read the md5 digest until we get a non-zero result. Fall back to
the non-md5 calculation if we still somehow end up with a 0.

While this case may at first glance seem to be extremely rare, in
practice it can occur, as the current calculation for volume
538313506, vnode 26178 does actually yield a 0.

Change-Id: Iee1ef4cc2ad66269f2c677e29d586ef0964d7c70
Reviewed-on: http://gerrit.openafs.org/4901
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-07-06 13:41:46 -07:00
Anders Kaseorg
34bdd979fc Treat Linux 3 as Linux 2.6
Linux 3.0 is just a rebranded Linux 2.6.40, so we can use the same
sysname and the same code.

Change-Id: I154334dc5b73980a0d9b8abd9fd6645994f63829
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/4843
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-07-06 11:52:03 -07:00
Andrew Deason
cdd9f78f05 Add a few missing .gitignore entries
Change-Id: Ibe1498c504defc0e1779b8764c091a98576a588a
Reviewed-on: http://gerrit.openafs.org/4904
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-07-06 11:08:17 -07:00
Andrew Deason
78e39417af vol: Don't always FDH_REALLYCLOSE on linktable ops
If we dec a linktable entry or get a free tag from the link table,
there is no reason to FDH_REALLYCLOSE the linktable fd handle.
FDH_REALLYCLOSE is the same as FDH_CLOSE, except that it tells the
ihandle package that the file handle will not be used again soon. If
we dec a linktable entry or get a free tag, there is no reason to
think that, so just FDH_CLOSE the handle instead.

Change-Id: I5f48a78528a75b984201f9ee0563b142ef59baf9
Reviewed-on: http://gerrit.openafs.org/4903
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-01 20:18:29 -07:00
Andrew Deason
1ecac71e50 DAFS: Do not clear salv state on fssync salvage
When a volume is put into an error state via the FSYNC_VOL_FORCE_ERROR
command, we clear the salvage state informaton on it, since we're
forcing it offline and thus inaccessible. However, if we are forcing
it to an error state because the volume needs salvaging, we just
salvage it. In this case, do not clear the salvage state, since we
need to know if we've already requested or scheduled a salvage so we
can correctly keep track of the number of salvages performed.

Change-Id: Ic4efd7a78bfb1b99a5308f0c67e81f4779dfe545
Reviewed-on: http://gerrit.openafs.org/4900
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-01 20:17:37 -07:00
chas williams - CONTRACTOR
9929d1c6fc doc: epub and mobi support
.epub is generated using dbtoepub which is still considered alpha
software apparently and installed in a non-standard place.  for now,
use the docbook stylesheet location to find it.  .mobi is generated
using kindlegen from the .epub in order to have a real toc.

there is some preprocessing with a custom stylesheet to make
things "look right".  see mobi-fixup.xsl.in

Change-Id: Ice92e701e2f921e70c0f98683b5e9ab44a347e3b
Reviewed-on: http://gerrit.openafs.org/4887
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-07-01 06:46:30 -07:00
Andrew Deason
31a001f60e SOLARIS: Granular multiPage detection
Currently, a struct vcache has a multiPage counter, indicating how
many afs_getpage requests are in-flight for that vcache that involve
retrieving multiple pages. Any dcache associated with such vcaches are
then avoided when choosing dcache entries to evict from the cache,
since we may deadlock when trying to evict a dcache entry from one of
the earlier afs_GetOnePage calls in a particular afs_getpage request.

This behavior can cause the client to become unusable if the cache
becomes full, and the only items in the cache are dcache entries in a
file that has an in-flight multi-page afs_getpage request. Since, in
that case, we cannot kick out any entries from the cache, and so we
wait forever to wait for the cache utilization to go down.

To prevent this from occurring, record exactly which ranges in the
file have in-flight multi-page afs_getpage requests, and just avoid
dcache entries in those ranges. This way afs_GetDownD can evict dcache
entries in the same file, but still avoid entries that would cause a
deadlock.

Also add some comments explaining this situation a bit more.

Change-Id: Idb305c8b7511065301739542772d16d4fe8cd574
Reviewed-on: http://gerrit.openafs.org/4896
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-06-30 07:28:05 -07:00
Andrew Deason
8017773587 Remove nonsensical bozon-lock defines
Currently there are two preprocessor defines related to bozon locks:
AFS_BOZONLOCK_ENV, and AFS_NOBOZO_LOCK. The former creates the pvnLock
member of a struct vcache, and controls calls to e.g. afs_BozonLock in
cross-platform code. The latter, if defined, turns calls to e.g.
afs_BozonLock into no-ops.

It doesn't make any sense to have both of these, since if
AFS_BOZONLOCK_ENV and AFS_NOBOZO_LOCK are defined, the pvnLock member
exists but is never used, since afs_BozonLock &co are no-ops. On
Solaris, the only platform where AFS_NOBOZO_LOCK is currently defined
(DUX used to define it before DUX was dropped), this is the case.

So to make things a bit more clear, get rid of the AFS_NOBOZO_LOCK
define, and just use AFS_BOZONLOCK_ENV to dictate whether we do
anything with bozon locks (ppc_darwin_80 appears to be the only
platform at this time).

Remove AFS_BOZONLOCK_ENV from Solaris param files, since it doesn't
use bozon locks. Remove all references to pvnLock in Solaris-specific
code.

Change-Id: Id72c14ec5485d35b853d38e2ea1a944a385f2b5b
Reviewed-on: http://gerrit.openafs.org/4889
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-30 07:27:52 -07:00
Andrew Deason
e4c2810f41 Remove support for Solaris pre-8
Remove support for all Solaris and SunOS platforms prior to Solaris 8,
since Solaris 7 reached end-of-life in August of 2008. Remove all
non-documentation references to sunx86_57 and earlier, sun4x_57 and
earlier, and AFS_SUN57_ENV and earlier.

References to AFS_SUN58_ENV have been changed to AFS_SUN5_ENV where
appropriate, and AFS_SUN5_ENV now implies Solaris 8.
AFS_SUN57_64BIT_ENV has been renamed to AFS_SUN5_64BIT_ENV.

Change-Id: Ia64ce7da7bfc685fa28a5119c51ec740625456e3
Reviewed-on: http://gerrit.openafs.org/4888
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2011-06-30 07:27:39 -07:00
Jeff Blaine
a4e3c3be69 Change wiki ref to wiki.openafs.org from stanford.edu
Change wiki ref to wiki.openafs.org from stanford.edu

Change-Id: I2bb70d79da529aee7a810264542aa3b381dcb972
Reviewed-on: http://gerrit.openafs.org/4897
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-30 06:13:05 -07:00
Jeff Blaine
f0774acd73 Introduce TAP tests of man pages for command_subcommand
Introduces the first batch of man page testing as part of
the TAP tests.  We would like to fail, for example, when
someone has added a new command to vos but not AHEM documented
it.

For now, the tests consist of checking to ensure that for
every subcommand listed in the output of "command help"
(e.g. vos help), fail the test if there is not a man page
for those (e.g. vos_delentry.1 etc).

Copy any of the -man-t tests and edit to make a new one

All tests make use of a simple new Perl library stored
in tests-lib/perl5 (a new area, not just named 'lib'
because I didn't want it to be confused with a s test
for a 'lib' in the src).

Change-Id: I1e07adafe718c4549f1855c5e5b0d10dd9ab5f00
Reviewed-on: http://gerrit.openafs.org/4846
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-28 12:52:28 -07:00
Jeff Blaine
73aadede03 Styling tweak for generated HTML man pages
Prefer "Georgia" as a typeface over the less readable
Times New Roman, but with Times New Roman then "serif"
as fallbacks.  Georgia is available everywhere.

Provide 10px top/bottom and 30px left/right margin on
the main body for readability.  Margins are good.

For review:

Old:
http://docs.openafs.org/Reference/8/kas_apropos.html
New:
http://kickflop.net/openafs-man-20110617/kas_apropos.html

Change-Id: I687b2007ef56019c5b683a43ac3811426ec825b0
Reviewed-on: http://gerrit.openafs.org/4850
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-28 12:52:17 -07:00