Ben Kaduk [Fri, 17 Dec 2010 06:16:30 +0000 (01:16 -0500)]
new files for FreeBSD packaging at 1.6.0pre3
Packaging for use with FreeBSD's Ports Collection.
The directory layout is flattened, and a couple of files that do not
make sense here are not included.
The afsd rc script lives in packaging/ as it is not runnable in
its committed form, it requires variable substitution that occurs
at install-time from the Ports Collection.
Ben Kaduk [Mon, 22 Nov 2010 04:32:37 +0000 (23:32 -0500)]
Remove outdated rc file for afsd on FBSD
The semantics of rc scripts have changed drastically since this
was written. It will need to be rewritten from scratch; the
new version will live in src/packaging/FreeBSD as afsd.in, as it
is included with the port packaging in that form.
Andrew Deason [Fri, 25 Mar 2011 20:54:01 +0000 (15:54 -0500)]
viced: REALLYCLOSE origfdP after CoW
In StoreData_RXStyle, we save a pointer to the original FdHandle_t if
we need to CopyOnWrite the target vnode, for the purposes of possibly
copying additional data later on.
After the CopyOnWrite call, this points to an inode that is not in the
current volume, and is thus less likely to be accessed. In CopyOnWrite
itself, the original file handle is FDH_REALLYCLOSE'd because of this,
so the handle does not remain in the cache. Do the same in
StoreData_RXStyle, so origfdP is always FDH_REALLYCLOSE'd after we
have called CopyOnWrite.
The only difference between FDH_CLOSE and FDH_REALLYCLOSE has to do
with ihandle cache behavior. FDH_REALLYCLOSE just indicates that the
reference we are closing is not likely to be used by other code, and
should be kicked out of the cache immediately (thus closing the file
descriptor). So, if there is another reference to that FdHandle_t, and
it issues an FDH_CLOSE, it thinks that the reference is likely to be
used again soon, and so the handle should not be kicked out of the
cache. Thus, the behavior before a50f4c8d was already correct.
Andrew Deason [Tue, 8 Mar 2011 22:59:32 +0000 (16:59 -0600)]
SOLARIS: Perform daemon syscalls as kernel threads
Add AFS_SUN5_ENV to the list of platforms where AFS_DAEMONOP_ENV is
defined. Implement the necessary functionality so we spawn kernel
threads when a daemon syscall is called. Remove the rxk_Listener
wrapper, since it will be called in a separate thread via the
afs_DaemonOp interface.
Andrew Deason [Tue, 8 Mar 2011 21:37:17 +0000 (15:37 -0600)]
libafs: Consolidate afs_DaemonOp code
Create the AFS_DAEMONOP_ENV define to simplify the logic of when we
perform afs_DaemonOp-y code paths. Also create the daemonOp_common
function, to perform common pre-fork operations that are common
between platforms.
Andrew Deason [Thu, 24 Mar 2011 15:22:52 +0000 (10:22 -0500)]
DAFS: Correct FSYNC_VOL_QUERY_VOP checks
Check that the given partition matches the vp partition, and ensure
the vp is not in an exclusive state when we check the state.
Otherwise, we may return pending vol ops for a volume on a different
partition, or we may incorrectly return that there is no pending vol
op when in fact the volume does not exist at all.
Russ Allbery [Thu, 24 Mar 2011 19:56:56 +0000 (12:56 -0700)]
Correctly document the AFS client setuid defaults
AFS no longer honors setuid status by default. Update the admin
guide documentation appropriately and add a warning recommending
against enabling setuid status given the limitations of the current
AFS protocol.
Reformat this section of the admin guide to make it easier to
maintain.
Jeffrey Altman [Wed, 16 Mar 2011 06:17:38 +0000 (02:17 -0400)]
Windows: avoid recursive cm_CheckOfflineVolume
Add a new cm_req_t flag CM_REQ_OFFLINE_VOL_CHK which is used
to prevent cm_Analyze() from performing recursive
cm_CheckOfflineVolume operations that will exhaust the stack.
Andrew Deason [Wed, 23 Mar 2011 22:25:03 +0000 (17:25 -0500)]
salvager: Give back volumes when exiting early
Sometimes the salvager exits a bit earlier than normal. For instance,
when no applicable inodes are found for a volume group, or if the
-inodes command line option was given. In these cases, we have already
checked out singleVolumeNumber from the fileserver (if we're salvaging
a single VG), so we need to give it back. So, give it back in those
instances.
Andrew Deason [Wed, 23 Mar 2011 21:46:47 +0000 (16:46 -0500)]
DAFS: Do not record vol ops for DELETED vols
When a volume is VOL_STATE_DELETED, it effectively does not exist, so
there is little point in recording a vp->pending_vol_op structure for
it. Just let callers checkout the volume as they would a nonexistent
volume: without recording anything about the operation.
This just reduces some edge cases and confusing debugging info, so we
don't have to worry about cleaning up pending_vol_op structures for
nonexistent volumes.
Andrew Deason [Wed, 23 Mar 2011 21:12:20 +0000 (16:12 -0500)]
salvager: Do not AskOnline nonexistent volumes
If singleVolumeNumber is not in our volume summary list, then the
singleVolumeNumber volume does not exist. So, don't try to bring it
back online. Still do try to make sure we don't have the volume
checked out, though, so issue an AskDelete, so ensure that it's not
checked out and that the fileserver does not think it exists.
Change AskDelete so we don't care if we tried to delete a volume that
the fileserver thinks already doesn't exist. Change the FSYNC_VOL_DONE
handler so it does not complain about already-deleted volumes.
Andrew Deason [Wed, 23 Mar 2011 20:19:03 +0000 (15:19 -0500)]
namei: Log ListViceInodes write failures
If we fail to write to the inodeFile given by ListViceInodes, we
should log the failure. Otherwise, no indication is given as to what
failed, when a salvage gathers the inode list.
Andrew Deason [Wed, 23 Mar 2011 19:30:18 +0000 (14:30 -0500)]
salvager: Fix conversion from stdio calls
Commit 5247fa38a4faebfdffba178ca01e5b419f034d5d converted some I/O
calls in the salvager from stdio to OS_OPEN/OS_WRITE/etc. Fix some of
the conversions, including:
- We need to pass O_CREAT to OS_OPEN calls, since we are creating
these files
- OS_WRITE returns the number of bytes written on success, not the
number of "elements" like in stdio
Andrew Deason [Tue, 22 Mar 2011 21:36:47 +0000 (16:36 -0500)]
ihandle: Ensure FDH_REALLYCLOSE really closes
If FDH_REALLYCLOSE is given an FdHandle_t that has more than one user,
currently it does effectively nothing. Ensure that the file descriptor
actually gets closed on a subsequent FDH_CLOSE, but setting the new
fd_needs_rclose field.
Andrew Deason [Wed, 23 Mar 2011 16:07:03 +0000 (11:07 -0500)]
DAFS: Do not VDeregisterVolOp_r while exclusive
We should wait for a volume to transition out of an exclusive state
before calling VDeregisterVolOp_r on a volume, since some code may be
examining the vol op outside of VOL_LOCK in an exclusive state. We
should be doing this anyway before performing volume state checks,
since we may be trying to e.g. attach the volume at the same time.
Simon Wilkinson [Wed, 23 Mar 2011 15:35:35 +0000 (15:35 +0000)]
rpm: Build srpms without %dist in their name
On RHEL6, %dist is set for all RPMS and SRPMS built on the system. This
leads to makesrpm.pl building SRPMS with .el6 in their release. As we
endeavour to use the same SRPM on all of our Fedora platforms, this is
less than ideal, so change makesrpm.pl to squash the setting of %dist
before building the RPM.
Change-Id: I5b5b9db7654ce21a269233e8950d4f4d1df81ad7
Reviewed-on: http://gerrit.openafs.org/4285 Reviewed-by: Alexander Ivan Redinger <aredinger@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
DAFS: allow salvager to detect whether FSYNC server is DAFS
in order to enable the right commands and print the right errors,
query for DAFS-only FSYNC op.
doesn't use bozo InstanceInfo as it's possible you can run fileserver
outside of bos.
Andrew Deason [Tue, 15 Mar 2011 19:24:01 +0000 (14:24 -0500)]
viced: Check vnode length on dir ops
The commit aadf69eabb1962496fa93745ab560a5b48cacd61 added checks on
vnode length whenever we read or write from a vnode. Add the same
check on directory vnodes when we modify the directory (whenever
entries are added or deleted).
Andrew Deason [Fri, 11 Mar 2011 00:37:44 +0000 (18:37 -0600)]
vol: Correct VolumeNumber for large volume IDs
VolumeNumber was using atoi to convert a volume header name to a
volume ID. This can return just -1 for volume IDs larger than 2^31-1,
though, so use strtoul instead.
Andrew Deason [Thu, 10 Mar 2011 23:59:39 +0000 (17:59 -0600)]
vol: Handle large volume IDs in VLockFile
VLockVolumeByIdNB currently cannot handle volume IDs larger than
2^31-1. Fix this by using struct flock64, F_SETLKW64, and F_SETLK64 in
the VLockFile functions where possible.
Thanks to Simon Wilkinson for pointing out F_SETLK64.
Andrew Deason [Thu, 10 Mar 2011 22:41:02 +0000 (16:41 -0600)]
vol: Make VLockFile arguments consistent
The Windows implementation of the VLockFile functions had the handle
incorrectly declared in a few places (they accepted a struct VLockFile
instead of an FD_t). Correct them, and make all VLockFile
implementation functions declare 'FD_t's instead of 'HANDLE's or
'int's.
Andrew Deason [Thu, 17 Mar 2011 21:32:00 +0000 (16:32 -0500)]
libafs: Do not osi_FlushPages for dirs
Directory contents are never mapped or stored in pages, so dealing
with page invalidation on directories is just overhead. So make
osi_FlushPages a no-op when we're given a directory, which can avoid a
lot of locks and other processing (particularly when we are called in
afs_getattr in BOZONLOCK_ENV).
Andrew Deason [Wed, 16 Mar 2011 16:48:08 +0000 (11:48 -0500)]
DAFS: DFlushVolume outside of vol glock
DFlushVolume may traverse a long list of directory objects, and can
even hit the disk, so we should drop the glock for it. This should be
safe in DAFS, since we already transition the volume to an exclusive
state before doing this, and DFlushVolume only deals with structures
internal to the directory package and maintains its own locking.
Simon Wilkinson [Sun, 20 Mar 2011 21:13:09 +0000 (21:13 +0000)]
util: Fix exec_alt
exec_alt was failing its tests on Mac OS X (but passing them on Linux).
It turns out that this is because it was failing to NULL terminate the
string that it creates in construct_alt(), which copies in the
characters from argv0, prefix and suffix, but never copies in a trailing
NULL.
Amend the code so that the trailing NULL from suffix is used to
terminate the string.
Andrew Deason [Wed, 16 Mar 2011 19:44:56 +0000 (14:44 -0500)]
salvager: Fix volume parsing on 64-bit
When an unsigned long is wider than an afs_uint32, comparing the
afs_uint32 vid to ULONG_MAX is always going to be false (which the
compiler can warn us about). Fix this by storing to an unsigned long,
and converting to a volume id after ensuring that the result is not
too large.
Simon Wilkinson [Wed, 16 Mar 2011 21:23:17 +0000 (21:23 +0000)]
util: Remove unnecessary uuid_mem* macros
Once upon a time, in a galaxy far far away, uuid used bcmp and bcpy
operations in kernel space. However, we changed that back in 2001, and
since then the uuid_memcpy and uuid_memcmp macros have been redundant.
Tidy up the code a little by removing them.
Simon Wilkinson [Wed, 16 Mar 2011 18:11:21 +0000 (18:11 +0000)]
dir: Make test utility build again
Make the 'dtest' test utility, which can be used to test the functioning
of the dir package, as well as to manipulate the directories that it
creates, build again.
Simon Wilkinson [Thu, 17 Mar 2011 19:28:23 +0000 (19:28 +0000)]
rpms: Make makesrpm.pl cater for new rpm names
Starting from 1.6.0, our specfile no longer adds a stray '1.' to the
start of the release field. makesrpm.pl was failing to deal with
these new-style names and therefore not actually making an rpm.
Fix this by conditionalising on the OpenAFS version when selecting
which rpm to copy.
Change-Id: I36b32ccc20baa167f46e5095eacb38a8e7d65e27 Cc: Alexander Redinger <aredinger@sinenomine.net>
Reviewed-on: http://gerrit.openafs.org/4258 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Simon Wilkinson [Wed, 16 Mar 2011 17:16:31 +0000 (17:16 +0000)]
util: Remove packages.h
packages.h is unused within our tree, and contains nothing of any
use to out of tree callers (it attempts to define bases for error
codes, which has been superceded by our use of comerr)
Andrew Deason [Thu, 17 Mar 2011 15:43:23 +0000 (10:43 -0500)]
viced: Actually print client CPS
Client CPS was not getting output on SIGXCPU like the rest of the
client information, since the conditional in the CPS loop was never
true. Fix this so we traverse the CPS entries correctly.
Simon Wilkinson [Wed, 16 Mar 2011 15:34:54 +0000 (15:34 +0000)]
util: Remove isathing
isathing.c only provided one function - util_isint, whose behaviour
can be far better provided by careful application of strtol.
Simplify our world a little by removing the file.
Simon Wilkinson [Wed, 16 Mar 2011 15:31:40 +0000 (15:31 +0000)]
kauth: Use strtol for integer argument handling
Use strtol, rather than a combination of util_isint and atoi to
handle integer arguments. This is much cleaner, far more portable,
and removes a dependency on an internal library function that this
file is the only user of.
Simon Wilkinson [Tue, 15 Mar 2011 00:45:45 +0000 (00:45 +0000)]
Linux: Fix return codes from setpag
Linux is a real stickler when it comes to error codes. Functions
which return positive error codes into the kernel tend to have
unfortunate effects. Because all AFS errors tend to be positive,
most of our kernel entry points negate errors before passing them
back to their caller.
This causes problems when internal functions themselves return
negative error codes. This was the case with the keyring functions,
which ended up returning a negative code to setpag(), this handed
that code ultimately up to the ioctl handler, which negated it (so
turning it positive) before throwing it up to the kernel.
The kernel sees this positive value as being a successful return,
and so passes it direct to userland, rather than assigning it to
errno. This led to the setpag() userspace function never being
aware of keyring errors that had occurred in the kernel.
Fix all this by making sure that all errors from the keyring code
are made positive before being passed upwards in the kernel module.
Sadly, this change fixed setpag(), but broke all of the pioctls. The
problem is actually a little more nuanced than we at first thought.
What's happening is yet another case of Linux's special handling of
negative return values. When an ioctl handler returns a negative
return code to the kernel, it does errno = -code, and sets the
return code to -1. If you pass it a postive return code, however,
it just returns that straight to the application.
The pioctl code gets this right. However, the setpag code doesn't,
and so tries to return postive values, which is why ioctl appears
to be returning the error code in the return value, not in the
errno.
Change-Id: I192ff45ad15b72a493a3c9c98546b026761dd95f
Reviewed-on: http://gerrit.openafs.org/4222 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com> Reviewed-by: Derrick Brashear <shadow@dementia.org>
Simon Wilkinson [Sun, 13 Mar 2011 17:13:49 +0000 (17:13 +0000)]
auth: Use the UserListFileName function more
The function UserListFileName exists to abstract the process of
producing a full pathname for the userlist. Modify the rest of
userok.c so that it uses it.
Simon Wilkinson [Sun, 13 Mar 2011 16:54:34 +0000 (16:54 +0000)]
auth: Refactor CellServDB path creation
Move all of the duplicated code that does CellServDB path creation
into a common function. Use asprintf(), rather than strcompose in
this function so we're using fewer fixed length buffers.
Simon Wilkinson [Sat, 5 Mar 2011 23:09:18 +0000 (23:09 +0000)]
auth: Rework afsconf_UpToDate to use CellServDB
Rework the afsconf_UpToDate check so that it uses the modifcation of
the CellServDB, and not the KeyFile to determine whether the
configuration information has been changed under us or not. afsconf
defines the CellServDB as being the single sentinel for a config
directory being changed, and our tools are careful to always touch
the CellServDB when updating anything else there.
Also, rework the _afsconf_Check() code so that it uses afsconf_UpToDate,
rather than including this logic twice.
Simon Wilkinson [Sun, 13 Mar 2011 15:47:36 +0000 (15:47 +0000)]
tests: Fix KeyFile test so it works from harness
The auth/keys test tries to find a file that's distributed as part
of the test suite. However, it currently only looks in the CWD to
find it. Modify the test so that if it's run from the test harness,
it will use the harnesses SOURCE environment variable to locate the
KeyFile
Simon Wilkinson [Sun, 13 Mar 2011 14:45:04 +0000 (14:45 +0000)]
pt_util: Initialise empty database correctly
Commit dc8f18d6f5003712bc9ef989363137a84953df07 broke pt_util's
initialisation of empty databases. This is because Initdb was changed
to call Initdb_check through the ubik_CheckCache wrapper. However, that
wrapper was defined as a no-op in pt_util's ubik-shim.
Modify pt_util's ubik_CheckCache so that it always calls into the
wrapper routine - this mimics the old behaviour.
Add a trival test for pt_util - check that we can build the database,
using the example from the manpage, and then that the built database
matches what we expect.
Simon Wilkinson [Fri, 4 Mar 2011 22:57:15 +0000 (22:57 +0000)]
ubik: Allow servers to have more than 3 seclayers
ubik has traditionally used the afsconf_ServerAuth function to
fill in a single field in a pre-allocated list of security classes.
This meant that we could never have a class with an index higher
than 2 (rxkad). Setting the function to call, and the rock to that
function was also accomplished by playing with global variables.
Rework this so that a new function is used to set the security
classes, which can allocate an arbitrary sized array of classes.
Move the setting of this function, and of the authentication check
function into ubik_SetServerSecurityProcs()
Simon Wilkinson [Fri, 4 Mar 2011 22:37:10 +0000 (22:37 +0000)]
afsconf: Rework security flags
BuildServerSecurityObjects takes a set of flags, which makes it
hard to use it as a callback function. Rework this so that the
security flags are part of the afsconf directory structure, and
so BuildServerSecurityObjects only takes a rock, and its return
parameters.
Update all of the callers for this new function, and add tests
for it to the test suite.
Simon Wilkinson [Fri, 4 Mar 2011 12:12:24 +0000 (12:12 +0000)]
ubik: Remove dependency on auth
When commit 8a09c220f4c5f881ea45be585b07b793038924d5 added support
for token error recovery to ubik, it introduced a dependency on
afsconf. This breaks the abstraction layer that had been in place, by
requiring that the SecurityRock be an afsconf_dir (if you use a
different rock, ubik will segfault)
This change reinstates the abstraction layer, by requiring Ubik
users who want token error checking to specify a procedure that can
be used to check whether tokens are up to date. Instead of yet
another global variable, we replace the existing CRXSecurity*
variables with a single function that can be used to set security proc,
token checking proc, and rock.
Andrew Deason [Thu, 10 Mar 2011 20:55:50 +0000 (14:55 -0600)]
salvager: Do not abort on large volume IDs
The salvager was parsing volume IDs just using atoi() and checking if
the result was negative. Since the result is a signed int, this fails
on any volume ID larger than 2^31-1. Change the parser to use strtoul
instead of atoi, and change the check.
While we're here, make a similar change to the DAFS salvageserver,
too.
Simon Wilkinson [Sun, 6 Mar 2011 17:22:14 +0000 (17:22 +0000)]
Don't use KERN_OPTMZ or KERN_DBG on Linux 2.6
With 2.6 Linux kernels, we just use the standard Kernel build system.
As this system pays no attention to our settings of KERN_OPTMZ or
KERN_DBG, don't bother setting values for these for 2.6 kernels.
Simon Wilkinson [Sun, 6 Mar 2011 17:15:05 +0000 (17:15 +0000)]
Remove -D_LARGEFILE64_SOURCE on Linux
Since 129b6954a6f491c6f3c3e417055bdc68d4726408, we've defined
GNU_SOURCE on all Linux builds. This definition automatically sets
_LARGEFILE64_SOURCE for us, so we don't need to explicitly set it
in the platform specific configuration.
Simon Wilkinson [Thu, 10 Mar 2011 00:20:26 +0000 (00:20 +0000)]
Remove redundant entries from MT_CFLAGS
Don't include XCFLAGS in MT_CFLAGS, as this is now done elsewhere in
the build process. Don't multiply specify -DAFS_PTHREAD_ENV, as all
pthreaded build rules must defined this, and just doing so in one
place is much cleaner.
Simon Wilkinson [Thu, 10 Mar 2011 10:41:57 +0000 (10:41 +0000)]
hcrypto: don't redefine key_type
Linux's keyring code uses "struct key_type", which is also used
internally by the hcrypto code. As, on some Linux variants,
afs/sysincludes.h ends up including the keyring definitions, we
need to rename our internal key_type definition to something
that doesn't clash.
This change didn't receive sufficient review before it was pushed.
It breaks builds on IRIX, and produces kernel modules that don't
load on a number of other Linux-based systems.
A correct fix for the underlying problem (that both Linux and
hcrypto want to use the "struct key_type" identifier) will follow
this patch.
Derrick Brashear [Thu, 17 Feb 2011 05:04:06 +0000 (00:04 -0500)]
linux: defer vcache evictions when sleep would be needed
because we're only willing to loop 100 times worth of "sleeps",
on a machine with heavy vcache demands we can end up just growing
the list huge. in the first pass, just clean up as many entries which
do not require sleeping as needed. if we need more entries, make
a second pass.
Jeffrey Altman [Wed, 9 Mar 2011 12:51:02 +0000 (07:51 -0500)]
Windows: handle rx busy call channel
Register an error code for rx busy call channel detection.
Force a retry whenever CM_RX_BUSY_CALL_CHANNEL is received
by cm_Analyze(). Log the event to both the internal trace
log and the Windows Event Log along with the server address.
Andrew Deason [Mon, 7 Mar 2011 17:08:26 +0000 (11:08 -0600)]
RX: Avoid timing out non-kernel busy channels
When we encounter a "busy" call channel (indicated by receiving
RX_PACKET_TYPE_BUSY packets), we can error out a call with
RX_CALL_TIMEOUT to try and get the application code to retry the call.
However, many RX applications are not aware of this, and will just
fail with an error upon receiving a single busy packet.
So instead, make this behavior optional, and only do it if the
application tells us what specific error it expects to receive when a
busy call channel is detected. Enable this behavior for the Unix cache
manager, as it can cope with receiving an RX_CALL_TIMEOUT error in
this scenario.
Andrew Deason [Wed, 16 Feb 2011 03:23:06 +0000 (21:23 -0600)]
aklog: Do not include XCFLAGS twice
In aklog, we set MODULE_CFLAGS to XCFLAGS and some other things.
However, when using AFS_LDRULE or AFS_CCRULE, CFLAGS will contain
MT_CFLAGS, which contains XCFLAGS. The end result is that the contents
of XCFLAGS appear twice in the compilation invocation, breaking some
platforms like HP-UX where the order of XCFLAGS relative to other
things is a bit fragile.
Fix this by removing XCFLAGS from the MODULE_CFLAGS definition.
Jeffrey Altman [Sat, 5 Mar 2011 19:34:05 +0000 (14:34 -0500)]
vol: FILE* to FD_t except logging and special ops
Replace all use of FILE* with FD_t. Switch from afs_open to OS_OPEN.
In the process:
afs_flush and afs_fsync -> OS_SYNC
afs_stat which is used to obtain the file size -> OS_SIZE
afs_close or close -> OS_CLOSE
Etc. While cleaning up, use afs_stat_st macro when declaring
a struct stat because the structure and function are not guaranteed
to be the same name on all platforms.
These changes permit Windows to build the vol package without
the use of the C runtime library.
Jeffrey Altman [Sat, 5 Mar 2011 19:25:34 +0000 (14:25 -0500)]
vol: consolide afs_xxxx macros in ihandle.h
Various definitions of afs_open, afs_stat, etc. were
scattered across the .c sources within the vol package.
Consolidate them all in ihandle.h which is included in
all of the files and contains the OS_xxxx macros which
will substitute for many afs_xxxx calls in future patchsets.
Simon Wilkinson [Fri, 11 Feb 2011 11:53:26 +0000 (11:53 +0000)]
Clarify the role of XCFLAGS and simplify MT_CFLAGS
Tidy up the build system by making it clear that XCFLAGS is included
for every build type. Also clean up MT_CFLAGS so that it doesn't
statically include XCFLAGS, and remove the common AFS_PTHREAD_ENV
define that's needed by every architecture.
This fixes the problem that we had where directories built with the
pthread or shared build rules weren't being compiled with checking
enabled, as well as hopefully making the tangle of defines easier to
understand.
Marc Dionne [Sat, 29 Jan 2011 17:48:02 +0000 (12:48 -0500)]
ubik: cleanup DB lock usage in SDISK_SendFile
Some failure paths can return from SDISK_SendFile with the
database lock still held. Other failure paths will cause
setlabel to be called without holding the lock.
Rework the failure paths so we always release the DB lock before
returning, and always hold it when calling setlabel.