openafs.git
10 years agoRemove AFS_NBSD40_ENV block within AFS_HPUX110_ENV block
Jonathan A. Kollasch [Sat, 21 Sep 2013 00:36:30 +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>

10 years agorx: Always call rxi_StartListener
Andrew Deason [Fri, 20 Sep 2013 20:13:43 +0000]
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>

10 years agoAdd config glue for amd64_nbsd70 and i386_nbsd70 sysnames
Jonathan A. Kollasch [Thu, 19 Sep 2013 00:37:32 +0000]
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>

10 years agolinux: core dump requires write fop
Derrick Brashear [Fri, 13 Sep 2013 15:13:05 +0000]
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>

10 years agoafsd: check if mountdir is an absolute path
Christof Hanke [Fri, 13 Sep 2013 09:47:08 +0000]
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>

10 years agoLINUX: Keyring deal with suse-specific key_type op
Christof Hanke [Thu, 12 Sep 2013 07:25:31 +0000]
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>

10 years agotabular output: fix segmentation fault
Christof Hanke [Wed, 4 Sep 2013 12:59:04 +0000]
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>

10 years agolibuafs: return error on symlink to self
Derrick Brashear [Tue, 10 Sep 2013 01:27:54 +0000]
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>

10 years agolibuafs: move code for uafs_LookupLink
Derrick Brashear [Tue, 10 Sep 2013 01:22:02 +0000]
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>

10 years agolibafs: update uio resid in bypasscache
Derrick Brashear [Sun, 8 Sep 2013 04:11:47 +0000]
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>

10 years agoclient: flag in cachemanager if rmtsys is enabled
Christof Hanke [Thu, 12 Sep 2013 11:34:04 +0000]
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>

10 years agoauth: fix cellservdb update check
Michael Meffie [Sat, 7 Sep 2013 03:58:39 +0000]
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>

10 years agolinux: provide read and write ops even when we have aio
Derrick Brashear [Thu, 12 Sep 2013 12:09:34 +0000]
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>

10 years agoLinux Keyring error handling
Christof Hanke [Wed, 28 Aug 2013 12:51:13 +0000]
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>

10 years agoLinux 3.11: Adapt to d_count changes
Marc Dionne [Tue, 3 Sep 2013 11:55:14 +0000]
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>

10 years agofix src tarball error text in make-release
Ken Dreyer [Fri, 6 Sep 2013 04:39:57 +0000]
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>

10 years agoWindows: Do not leak activeRPC count
Jeffrey Altman [Tue, 3 Sep 2013 12:42:50 +0000]
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>

10 years agoWindows: Adjust setting of VERIFY_DATA flag
Jeffrey Altman [Mon, 2 Sep 2013 18:38:41 +0000]
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>

10 years agoWindows: Add trace to track setting VERIFY flag
Jeffrey Altman [Mon, 2 Sep 2013 18:34:32 +0000]
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>

10 years agoWindows: Skip Extent operations if Direct IO
Jeffrey Altman [Mon, 2 Sep 2013 18:31:38 +0000]
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>

10 years agoWindows: Hold Fcb Resource across CcPurgeSection
Jeffrey Altman [Mon, 26 Aug 2013 00:07:44 +0000]
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>

10 years agoWindows: Strip out unused ModWriter Fastio code
Rod Widdowson [Sun, 25 Aug 2013 20:20:28 +0000]
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>

10 years agoWindows: Take FCB resource in presection create.
Rod Widdowson [Sun, 25 Aug 2013 19:25:55 +0000]
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>

10 years agoWindows: Pin the Cc FileObject during section create.
Rod Widdowson [Sun, 25 Aug 2013 16:16:39 +0000]
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>

10 years agoWindows: AFSPerformObjectInvalidate FILE processing
Jeffrey Altman [Mon, 26 Aug 2013 00:02:51 +0000]
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>

10 years agoWindows: AFSVerifyEntry get rid of bPurgeExtents
Jeffrey Altman [Sun, 25 Aug 2013 23:54:52 +0000]
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>

10 years agoWindows: Fix trace messages in AFSSetEndOfFileInfo
Jeffrey Altman [Sun, 25 Aug 2013 00:20:54 +0000]
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>

10 years agoWindows: AFSWrite comments
Jeffrey Altman [Fri, 23 Aug 2013 19:02:44 +0000]
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>

10 years agoWindows: Missing try..except in AFSCachedWrite
Jeffrey Altman [Fri, 23 Aug 2013 19:00:17 +0000]
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>

10 years agoWindows: Refactor AFSVerifyEntry AFSValidateEntry
Jeffrey Altman [Thu, 22 Aug 2013 21:50:39 +0000]
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>

10 years agoWindows: introduce Section Object Resource Trace Subsystem
Jeffrey Altman [Thu, 22 Aug 2013 21:46:19 +0000]
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>

10 years agoWindows: afsredirlib afscommonwrite trace msg error
Jeffrey Altman [Thu, 22 Aug 2013 21:43:20 +0000]
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>

10 years agoWindows: Call AFSExeceptionFilter for all exceptions
Jeffrey Altman [Wed, 21 Aug 2013 16:27:35 +0000]
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>

10 years agoviced: Clarify comment explaining cba sorting
Andrew Deason [Wed, 21 Aug 2013 22:07:14 +0000]
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>

10 years agoWindows: Delay MP Target evaluation until required
Jeffrey Altman [Sat, 17 Aug 2013 16:51:06 +0000]
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>

10 years agoWindows: modify PopulateCurrentEntry follow mp rules
Jeffrey Altman [Sat, 17 Aug 2013 15:35:39 +0000]
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>

10 years agoWindows: update GetFileVersionInformation fail msg
Jeffrey Altman [Sat, 17 Aug 2013 15:33:45 +0000]
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>

10 years agoWindows: Cap Cache Size on X86
Jeffrey Altman [Sat, 17 Aug 2013 14:18:53 +0000]
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>

10 years agoWindows: do not return STATUS_RETRY for rx timeouts
Jeffrey Altman [Sat, 17 Aug 2013 04:08:30 +0000]
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>

10 years agoWindows: np AddConnection error code
Jeffrey Altman [Sat, 10 Aug 2013 04:44:08 +0000]
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>

10 years agoWindows: Do not recycle deleted scache on refcnt 0
Jeffrey Altman [Fri, 16 Aug 2013 19:36:32 +0000]
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>

10 years agoWindows: Do not remove scp from hash table on deletion
Jeffrey Altman [Fri, 16 Aug 2013 16:01:55 +0000]
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>

10 years agoWindows: CM_SCACHEFLAG_DELETED use InterlockedOr
Jeffrey Altman [Fri, 16 Aug 2013 16:01:02 +0000]
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>

10 years agoWindows: buf_CleanLocked no callback for deleted file
Jeffrey Altman [Fri, 16 Aug 2013 15:58:18 +0000]
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>

10 years agovolser: repair volserver -udpsize and -sleep options
Mark Vitale [Tue, 16 Jul 2013 21:27:05 +0000]
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>

10 years agodo not ship uncompressed tarballs
Ken Dreyer [Wed, 31 Jul 2013 22:00:24 +0000]
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>

10 years agoCheck for over/underflow while allocating PTS ids
Ben Kaduk [Wed, 17 Jul 2013 00:39:56 +0000]
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>

10 years agoVerify, not Assert, for the (util) global mutex
Ben Kaduk [Wed, 17 Jul 2013 20:09:09 +0000]
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>

10 years agodoc: clarify setcrypt defaults
Ken Dreyer [Sat, 27 Jul 2013 15:22:56 +0000]
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>

10 years agoDo not use a non-literal format string
Ben Kaduk [Wed, 31 Jul 2013 00:17:01 +0000]
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>

10 years agobudb: Do not use garbage cellinfo
Andrew Deason [Wed, 31 Jul 2013 20:58:41 +0000]
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>

10 years agoenable Perl's strict and warnings in make-release
Ken Dreyer [Wed, 31 Jul 2013 22:16:16 +0000]
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>

10 years agoDAFS: Remove AFS_DEMAND_ATTACH_UTIL
Andrew Deason [Thu, 1 Aug 2013 19:06:52 +0000]
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>

10 years agoLinux: Remove extra "goto out" from tmpfs fix
Marc Dionne [Wed, 29 May 2013 14:33:44 +0000]
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>

10 years agovolume_inline.h: Down with assert, again
Anders Kaseorg [Tue, 23 Jul 2013 18:37:26 +0000]
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>

10 years agorxkad: remove warnings from der-protos.h
Jeffrey Altman [Tue, 9 Jul 2013 21:50:26 +0000]
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>

10 years agoWindows: fix cm_ServerFindByUUID
Jeffrey Altman [Wed, 17 Jul 2013 00:22:59 +0000]
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>

10 years agoaix: link afs_dynamic_kerbauth to rfc3961
Jeffrey Altman [Wed, 24 Jul 2013 21:54:13 +0000]
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>

10 years agoWindows: fix building of aklog
Jeffrey Altman [Wed, 24 Jul 2013 21:31:35 +0000]
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>

10 years agoWindows: fix cm_ServerEqual bug
Jeffrey Altman [Sun, 14 Jul 2013 01:29:19 +0000]
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>

10 years agoMerge branch 'rxkad-kdf-master' into HEAD
Simon Wilkinson [Wed, 24 Jul 2013 14:55:26 +0000]
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.

10 years agoUse -nofork when starting bosserver via systemd
Michael Laß [Sun, 14 Jul 2013 19:31:27 +0000]
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>

10 years agoFix typo
Ben Kaduk [Fri, 12 Jul 2013 17:38:08 +0000]
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>

10 years agoAdd support for deriving DES keys to klog.krb5
Ben Kaduk [Sat, 13 Jul 2013 09:49:27 +0000]
Add support for deriving DES keys to klog.krb5

Change-Id: I5b58585661f34ec501ad8db8f92b659f32919366

10 years agoUpdate the asetkey man page for rxkad-k5
Ben Kaduk [Fri, 12 Jul 2013 16:43:57 +0000]
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.

10 years agoUse the string form of key types in asetkey
Ben Kaduk [Fri, 12 Jul 2013 16:53:46 +0000]
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

10 years agoDerive DES/fcrypt session key from other key types
Chaskiel Grundman [Mon, 18 Mar 2013 01:58:47 +0000]
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

10 years agoKrb5 ticket support for server-to-server and localauth
Chaskiel Grundman [Sun, 28 Apr 2013 18:27:47 +0000]
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

10 years agoAsetkey now handles afsconf_rxkad_krb5 keys too
Chaskiel Grundman [Thu, 11 Apr 2013 04:12:36 +0000]
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

10 years agoUse rfc3961 library to decrypt kerberos 5 tickets
Chaskiel Grundman [Sat, 6 Apr 2013 17:42:23 +0000]
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

10 years agoUpdate the WiX installer to know about afsrfc3961.dll
Ben Kaduk [Wed, 29 May 2013 02:07:06 +0000]
Update the WiX installer to know about afsrfc3961.dll

10 years agolibafsrpc: link afsrpc.dll to afsrfc3961.lib
Chaskiel Grundman [Tue, 9 Jul 2013 23:02:00 +0000]
libafsrpc: link afsrpc.dll to afsrfc3961.lib

Change-Id: I5bf48ed29522c0cbdc43dda63487012f14d39bbf

10 years agoAllow some rfc3961 functionality to be disabled
Chaskiel Grundman [Sat, 6 Apr 2013 00:12:12 +0000]
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

10 years agohcrypto: Add exports for more crypto algorithms
Simon Wilkinson [Fri, 12 Apr 2013 13:57:44 +0000]
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

10 years agoscsi_command_size became scsi_command_size_tbl
Jeffrey Hutzelman [Mon, 28 Jun 2010 20:27:35 +0000]
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>

10 years agovolser: Use the new IH_CREATE_INIT function
Andrew Deason [Mon, 3 Jun 2013 21:28:44 +0000]
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>

10 years agoMake RXGEN_CPPCMD work on unix
Jeffrey Hutzelman [Mon, 28 Jun 2010 20:27:01 +0000]
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>

10 years agovos: incorrectly defined alias for -cell parm
Mark Vitale [Wed, 26 Jun 2013 15:18:01 +0000]
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>

10 years agolibafs/LINUX: update file pos in corrupt dir fix
Jeffrey Hutzelman [Tue, 20 Sep 2011 18:21:44 +0000]
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>

10 years agolibafs/LINUX: Report FID of corrupt directories
Jeffrey Hutzelman [Tue, 13 Sep 2011 22:37:24 +0000]
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>

10 years agolibafs/LINUX: avoid leaks due to corrupt dir
Jeffrey Hutzelman [Wed, 12 Jun 2013 20:22:36 +0000]
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>

10 years agoviced/callback.c: Don't ignore dump read errors
Jeffrey Hutzelman [Wed, 19 Jun 2013 03:12:46 +0000]
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>

10 years agoptserver: increase the max lwp threads
Michael Meffie [Thu, 4 Apr 2013 14:56:37 +0000]
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>

10 years agovlserver: increase the max lwp threads
Michael Meffie [Thu, 4 Apr 2013 14:53:00 +0000]
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>

10 years agoMake KeyFileExt comment match reality
Ben Kaduk [Tue, 25 Jun 2013 00:51:53 +0000]
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>

10 years agoDocument the prdb (ubik) file format
Ben Kaduk [Wed, 15 May 2013 15:38:53 +0000]
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>

10 years agobuild-sys: mark block begin and ends
Sami Kerola [Sat, 22 Jun 2013 18:34:13 +0000]
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>

10 years agobuild-sys: use AS_IF instead of shell if clause
Sami Kerola [Sat, 22 Jun 2013 17:01:44 +0000]
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>

10 years agobuild-sys: use m4 quoting consistantly
Sami Kerola [Sat, 22 Jun 2013 16:28:01 +0000]
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>

10 years agobuild-sys: do not check readme and news when automake runs
Sami Kerola [Sat, 22 Jun 2013 16:20:22 +0000]
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>

10 years agobuild-sys: add bug reporting address and home page to configure
Sami Kerola [Sat, 22 Jun 2013 16:17:04 +0000]
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>

10 years agoFix restorevol sanity check on afs_int32
Russ Allbery [Sat, 29 Jun 2013 21:29:06 +0000]
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>

10 years agoFix restorevol crash on corrupt nDumpTimes value
Russ Allbery [Sat, 29 Jun 2013 21:27:55 +0000]
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>

10 years agobosserver dir creation for non-transarc paths
Michael Meffie [Thu, 16 Jul 2009 21:50:53 +0000]
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>

10 years agoAdd a tool to find lock ID numbers
Jeffrey Hutzelman [Sun, 16 Jun 2013 23:16:05 +0000]
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>

10 years agolibafs: initialize hard mount last errors
Michael Meffie [Tue, 9 Apr 2013 08:00:16 +0000]
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>

10 years agoLinux 3.11: Convert from readdir to iterate file operation
Marc Dionne [Mon, 8 Jul 2013 14:53:00 +0000]
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>

10 years agoRedHat: support building on ELRepo kernels
Arne Wiebalck [Fri, 12 Jul 2013 09:39:53 +0000]
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>

10 years agoAlias "vos e" to "vos examine"
Ben Kaduk [Wed, 10 Jul 2013 03:12:43 +0000]
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>

10 years agoMake UKERNEL's panic() a real function, not a macro
Ben Kaduk [Wed, 8 May 2013 16:50:27 +0000]
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>