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>
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>
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>
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>
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>
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>
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>
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 0e3bfa033e
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>