Commit Graph

11614 Commits

Author SHA1 Message Date
Michael Meffie
341f2af796 fix linux build error in osi_probe
Fix a build error for older versions of linux, introduced by
commit 7694f536d3
(scsi_command_size became scsi_command_size_tbl)

Fixes a build error on RHEL/CentOS 5.9; 2.6.18-348.3.1.el5.

Change-Id: I7e6f08e7f7cbba47034701e6137eb91fa567dbda
Reviewed-on: http://gerrit.openafs.org/10282
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-30 06:33:50 -07:00
Christof Hanke
1a42219e63 vos: complain if no fields are passed
to vos "setfields". It might be a misleading if it exists
sucessfully when clearly invoked wrongly.

Change-Id: Ic92f4e17fde0a0dfc182f9713350800c72fa165e
Reviewed-on: http://gerrit.openafs.org/10271
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-30 06:33:23 -07:00
Michael Meffie
8fc86de33e doc: state klog.krb is obsolete
State upfront that klog and klog.krb (v4) are obsolete.

Update the klog.krb description and remove some redundant
text.

Change-Id: I6ede8084aebbd49c5a27aa427ef9782d99a347aa
Reviewed-on: http://gerrit.openafs.org/10270
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-09-30 06:31:56 -07:00
Ben Kaduk
897e970dbe Catch up to FreeBSD VM object read/write locks
Upstream r248084 changed the vm_object mutex to be a rwlock,
allowing for future optimizations.  This is a KPI change, so
introduce conditionals to be compatible with both versions of the KPI.

Change-Id: I6e3101bc80262480035dee4c5b2d1b9cbc44b57b
Reviewed-on: http://gerrit.openafs.org/10295
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-30 06:31:35 -07:00
Michael Meffie
dbf68229c6 build: compile_et rules for parallel make
Change all makefile rules which run compile_et in order support parallel
make.  The compile_et generates two outputs, so special care must be
taken in rules which run compile_et.

All the rules for compile_et have been changed to the form:

    foo.c foo.h: foo.et
        compile_et foo.et -h foo
    foo.h: foo.c

The above rules are equivalent to:

    foo.c: foo.et
        compile_et foo.et -h foo

    foo.h: foo.et foo.c
        compile_et foo.et -h foo

therefore a parallel make will serialize the builds of foo.c and foo.h,
and should detect that the second is no longer needed once the first is
over.  This form works since foo.et is not a phony target, and does not
depend on a phony target.

Previously, the rules for compile_et were of the one of the two forms:

    a)  foo.c foo.h: foo.et
            compile_et foo.et -h foo

or

    b)  foo.h: foo.c
        foo.c: foo.et
            compile_et foo.et -h foo

Form a) is problematic for parallel makes, since it is equivalent to:

        foo.c:
            compile_et foo.et -h foo
        foo.h:
            compile_et foo.et -h foo

In a parallel make, compile_et will be run concurrently, clobbering
each other's output files.

Form b) is better, but is problematic when foo.h is removed, since foo.h
will not be updated.

Thanks to Russ Allbery for pointing out the automake documentation which
describes issues with commands that produce multiple outputs, and
portable solutions.

http://www.gnu.org/software/automake/manual/automake.html#Multiple-Outputs

Change-Id: I14c056606084f80270e05592d3d09a600f804e24
Reviewed-on: http://gerrit.openafs.org/10237
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-09-30 06:31:02 -07:00
Jeffrey Altman
d477118fbd Windows: fix libafscp build directory
NTMakefile specifed the directory as libacl not libafscp

Change-Id: I12af68a19155d0764967f9cd2e8eb2d8795530d5
Reviewed-on: http://gerrit.openafs.org/10299
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-09-27 19:22:09 -07:00
Jeffrey Altman
9132b7e474 Windows: Freelance Do not chase mount points
When adding mount points or symlinks do not chase mount points
when attempting to determine the FID of the added object.

Change-Id: Ic4e070d687cc56407a19c41f185f3e28db7671bd
Reviewed-on: http://gerrit.openafs.org/10298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-09-27 19:21:51 -07:00
Jeffrey Altman
4f266f14c0 Windows: cm_MergeStatus avoid lock recursion
It is possible for cm_MergeStatus() to be called while the
cm_buf_t.mx is already held.  If it is a panic occurs.  Test for
refcount == 0 before acquiring the lock in addition to afterwards.
If the refcount is not zero, then we do not need to acquire the
lock in any case.

Change-Id: I1b73a03f4745e524d7fdf8f9b231b420895ff0fa
Reviewed-on: http://gerrit.openafs.org/10297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-09-27 19:21:31 -07:00
Jeffrey Altman
7efd785390 Windows: AFSCreate avoid race leading to NULL dereference
If a test for NULL is performed ahead of an assignment and then
use of the assigned value, there is a race which can result in
the assigned value being NULL if the value being assigned is
altered by another thread.

Perform the assignment first then test based upon that.

Change-Id: I6d50619dab168c2aa12542b14217779f1be08ee9
Reviewed-on: http://gerrit.openafs.org/10296
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-09-27 19:21:15 -07:00
Andrew Deason
8e32b11be6 Probe directly for com_err.h
com_err.h can be in com_err.h, et/com_err.h, or krb5/com_err.h (for
netbsd 6.1 and possibly other netbsd). aklog currently only includes
either com_err.h or et/com_err.h, depending on autoconf probes
performed by the krb5.m4 macros.

So, also look for krb5/com_err.h. The krb5.m4 macros currently only
look for com_err.h at all if certain other libkrb5 tests return
certain results, so just look for all of them directly in some of our
openafs-specific krb5 probing logic in configure.ac.

Also remove the duplicate check for et/com_err.h in acinclude.m4 while
we're here. We only use et/com_err.h if krb5 support is enabled, so
only check for it in the second of krb5 probes.

FIXES 131716

Change-Id: Ic454b9bf7043f91654dcd1c262ab3790bf2ad272
Reviewed-on: http://gerrit.openafs.org/10244
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-09-25 10:25:52 -07:00
Andrew Deason
4212c7e604 Whine if single-DES keys are in use
If we are using single-DES keys in our KeyFile, yell at the
administrator, so they have a chance at realizing that they should
migrate to stronger crypto.

Change-Id: Ic37d9e1cea7ee7e12594be0dec02000f11efc896
Reviewed-on: http://gerrit.openafs.org/10273
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2013-09-25 06:54:42 -07:00
Andrew Deason
d83c1231cf vol: Nuke parent vol special inodes
When we "nuke" a volume, we delete all inodes we can find that are for
the given volume id. This currently means that if we nuke an RW volume
id, we delete all of the inodes for file data for the entire volume
group (since they're all stored in the VG id), but we do not delete
the special inodes for any non-RW volumes in that volume group. Those
special inodes left behind are not very useful, since we just deleted
all of the actual file data.

Currently this means that on namei, it's impossible to nuke the
special inodes for non-RW volumes, since the namei nuke will only look
in the subdir for the given volume id. If you give it the RW volume
id, it won't delete the special inodes as menioned above; if you give
it the RO volume id, it will only look in the RO subdir, and won't
find the RO special inodes in the RW subdir.

If a volume group is damaged in such a way that the salvager cannot
fix it (due to a bug), this means that it is impossible to get rid of
that volume group completely from the partition on namei without
manually running "rm -rf" on the relevant AFSIDat directory. Normally
we have a failsafe of running 'vos zap -force', but that doesn't work
for non-RW special inodes, as mentioned above.

So, in order to allow this 'vos zap -force' failsafe to work in
hopefully all situations, also delete the special inodes for the
parent volume. Use similar logic as exists in the salvager's
OnlyOneVolume function.

Change-Id: Id29da48a548c70b2b9ada1dd09f41cb59452bd11
Reviewed-on: http://gerrit.openafs.org/10256
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-23 11:17:19 -07:00
Chaskiel Grundman
d14ecfc39a rxgen: cast bool properly
The C type for xdr's bool is bool_t. When casting, use the correct type

Change-Id: I562ee1e48eeffa8fece66176cf13013630d157aa
Reviewed-on: http://gerrit.openafs.org/10261
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-23 04:40:50 -07:00
Michael Meffie
21c8f4809e bozo: cap retry delay
Cap the retry delay to a reasonable amount of time instead
of just doubling the delay until it reaches 16 hours.

Change-Id: Ibc7dd75670a9b02f34050842b6e54df4f5a7c315
Reviewed-on: http://gerrit.openafs.org/10148
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2013-09-22 19:17:25 -07:00
Jonathan A. Kollasch
1c2dcda92b rx_multi: free the quantity of memory we allocated
Change-Id: I3a666bb5c3b8b9ab222d1170095e46116fac4229
Reviewed-on: http://gerrit.openafs.org/10266
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-22 19:16:46 -07:00
Chaskiel Grundman
33154874bf tkt_MakeTicket5: Use correct bitmask operator
tkt_MakeTicket5 tries to avoid returning heimdal asn1 error codes,
but uses an incorrect expression that's almost always true. Use
bitwise & instead of logical && to fix.

Change-Id: I59bffe8c9b98c6f32b967bc37a7989c98c5720b6
Reviewed-on: http://gerrit.openafs.org/10264
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-22 19:13:55 -07:00
Chaskiel Grundman
3d2b8aec7c Add missing clean rules
do libtool cleanup in src/afsd, src/kauth, and src/venus
remove ordinary objects in src/opr

Change-Id: Iddf6bb017a38e20e971b9faf576ee2f9e39625c0
Reviewed-on: http://gerrit.openafs.org/10262
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2013-09-22 19:12:39 -07:00
Jonathan A. Kollasch
43bdcaa855 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>
2013-09-22 19:12:06 -07:00
Andrew Deason
2aa26fcb4e 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>
2013-09-22 19:11:20 -07:00
Jonathan A. Kollasch
f785b7f662 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>
2013-09-18 18:44:37 -07:00
Derrick Brashear
13165c0583 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>
2013-09-13 10:00:07 -07:00
Christof Hanke
fb623d5da3 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>
2013-09-13 06:10:56 -07:00
Christof Hanke
9db8b123e4 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>
2013-09-13 06:10:16 -07:00
Christof Hanke
9fea1a29df 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>
2013-09-13 06:10:02 -07:00
Derrick Brashear
286065f6d2 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>
2013-09-12 08:32:00 -07:00
Derrick Brashear
ebcbe8f3fa 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>
2013-09-12 08:31:53 -07:00
Derrick Brashear
a541cd929c 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>
2013-09-12 08:31:45 -07:00
Christof Hanke
db1de98ecf 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>
2013-09-12 08:28:11 -07:00
Michael Meffie
73ae85bd59 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 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>
2013-09-12 08:27:43 -07:00
Derrick Brashear
e6af2ffc86 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>
2013-09-12 08:27:24 -07:00
Christof Hanke
c7f5a21202 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>
2013-09-11 07:27:23 -07:00
Marc Dionne
1f577e41b6 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>
2013-09-09 13:59:51 -07:00
Ken Dreyer
d9db6fbd17 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>
2013-09-07 07:40:44 -07:00
Jeffrey Altman
28de757a65 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>
2013-09-03 12:20:38 -07:00
Jeffrey Altman
2a1035a49b 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>
2013-09-03 12:20:29 -07:00
Jeffrey Altman
7c8eb2f228 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>
2013-09-03 12:20:20 -07:00
Jeffrey Altman
6de822d647 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>
2013-09-03 12:20:09 -07:00
Jeffrey Altman
27311ca420 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>
2013-08-30 12:12:34 -07:00
Rod Widdowson
22d7c8461b 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>
2013-08-30 12:12:20 -07:00
Rod Widdowson
40d93cb9df 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>
2013-08-30 12:12:04 -07:00
Rod Widdowson
1dc051294c 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>
2013-08-30 12:11:48 -07:00
Jeffrey Altman
cb53d414bb 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>
2013-08-30 12:11:33 -07:00
Jeffrey Altman
b2713d121e 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>
2013-08-30 12:11:18 -07:00
Jeffrey Altman
e8226a2aec 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>
2013-08-30 12:11:04 -07:00
Jeffrey Altman
c7e8b75353 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>
2013-08-30 12:10:51 -07:00
Jeffrey Altman
3f797fc711 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>
2013-08-30 12:10:35 -07:00
Jeffrey Altman
26276e6020 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>
2013-08-30 12:10:15 -07:00
Jeffrey Altman
7f706e6b59 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>
2013-08-30 12:10:00 -07:00
Jeffrey Altman
b4a996b815 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>
2013-08-30 12:09:40 -07:00
Jeffrey Altman
cd07888265 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>
2013-08-30 12:09:18 -07:00