Commit Graph

10878 Commits

Author SHA1 Message Date
Jeffrey Altman
7b1115d470 Windows: AFSInitFcb assign pFcb->ObjectInformation
In AFSInitFcb() assign pFcb->ObjectInformation before the
InterlockedExchangePointer call and not afterwards.  Assigning
it afterwards leaves a small race where the ObjectInformation
value will be invalid.

Change-Id: Ie79587e0b2f161b7ff612fc4fb283135bafd1085
Reviewed-on: http://gerrit.openafs.org/8222
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-19 02:47:34 -07:00
Jeffrey Altman
7fd9890162 Windows: OpenTargetDirectory AFSInitFcb Reparse Test
In AFSOpenTargetDirectory the test to determine if AFSInitFcb
allocated a FCB or returned an existing one (STATUS_REPARSE)
was reversed.  If AFSInitFcb was called and AFSOpenTargetDirectory
eventually failed, an in use FCB would be freed.

Change-Id: Ie5974fee5202685575f286fe4fef43dfdc0698cb
Reviewed-on: http://gerrit.openafs.org/8244
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-19 02:46:55 -07:00
Jeffrey Altman
ae10a40c5c Windows: ObjectInformationCB indentation
Fix indentation within ObjectInformationCB structure

Change-Id: I004ca5a16fceb63522e3f244177e60e4459e507b
Reviewed-on: http://gerrit.openafs.org/8219
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-19 02:43:57 -07:00
Jeffrey Altman
1335eefeff Windows: Do not call buf_ClearRDRFlag unlink/rmdir
When processing unlink and remdir operations initiated by the
SMB stack do not call  buf_ClearRDRFlag.  The redirector upon
receiving the AFS_INVALIDATE_DELETE call will cancel outstanding
extent operations, mark the FCB deleted, and tear down any held
extents.

Change-Id: I5203dbe5489fcfd0a1c871c3e7aa6aa1a7d65e9a
Reviewed-on: http://gerrit.openafs.org/8218
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-19 02:43:40 -07:00
Jeffrey Altman
816776215d Windows: Correct alloc size SetFileExtents result
AFSFileExtentCB objects not AFSSetFileExtentsCB objects.
The latter are too large.  Just wastes memory.

Change-Id: I2ffd1bfd639acc37e2d06bc61749d4ac93376668
Reviewed-on: http://gerrit.openafs.org/8217
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-19 02:42:58 -07:00
Jeffrey Altman
c53220c179 Windows: AFS_INVALIDATE_DELETE must cancel IO
When processing an AFS_INVALIDATE_DELETE the redirector
must cancel any outstanding extent requests on the file
prior to tearing down the extents.

This code path is triggered either when VNOVNODE is received
from a file server or when an alternate cache manager interface
(SMB) unlinks the file.

Change-Id: I16c08c2469228b33ae4ece0e45a9890a057ab257
Reviewed-on: http://gerrit.openafs.org/8206
Reviewed-by: Rod Widdowson <rdw@steadingsoftware.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-19 02:42:41 -07:00
Derrick Brashear
611e80ee12 salvager: fix formatting in the rest of the Log messages
right now some not-commonly-defined code fails to compile with warnings.
fix it so it uses a format string like everything else.

Change-Id: Ib35445db9800444f3ee74a43f17aeb6f2959645a
Reviewed-on: http://gerrit.openafs.org/8236
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-18 04:47:00 -07:00
Simon Wilkinson
170dbb3ce3 rx: Use opr queues
Modify RX so that it uses opr queues throughout, rather than the older,
non-type-safe rx_queue structure and macros. Attempt to clarify which
items in a structure are queue headers, and which are linkage pointers.

This has the knock on effect that including an RX header doesn't
automatically give you rx_queue.h in your application's namespace.

Change-Id: I1b3fbcd8c03f8153a557bd4532710bcebfe45818
Reviewed-on: http://gerrit.openafs.org/8232
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 04:30:07 -07:00
Simon Wilkinson
eca07c108c rx: Move server queue entry structure out of rx.h
Hide the server queue management structure in its own header file,
rather than exposing it globally in rx.h. This structure has always
been private - applications have no business knowing about it!

Change-Id: I97ac31e0e77dbe1c10b2804f33901d933a8f0627
Reviewed-on: http://gerrit.openafs.org/8231
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 03:52:46 -07:00
Marc Dionne
a7828d50a8 libafs: Fix second pass in ShakeLooseVCaches
Commit 3105c7ff introduced a two phase process for reclaiming
vcache entries.  First go through the list and do what's possible
without sleeping (skipping aliased dentries on Linux), then do
a second pass only if necessary, allowing sleeping.

Unfortunately the test for the end of the VLRU scan is incorrect
and can never trigger, so this second pass was effectively disabled
and any code that is conditional on defersleep=1 was never
exercised.  The code to start the second scan also has issues.

Fix the end of VLRU test, and also correctly set the variables
needed to restart the scan.

Change-Id: I8034cd3b79aab4f2976ab2559c13c102126480d7
Reviewed-on: http://gerrit.openafs.org/8234
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:54:35 -07:00
Marc Dionne
fa3116567e Linux 3.7: putname is no longer exported
putname is unexported in kernel 3.7.  Add a compatibility inline
afs_putname function and open code it if necessary.

Change-Id: I5416067566f6332d77e5d91ce2b9cf7bc0c96dce
Reviewed-on: http://gerrit.openafs.org/8237
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:53:15 -07:00
Simon Wilkinson
1571e9b9f6 rxperf: Use libtool RX library
Use the libtool built liboafs_rx.la, rather than using libafsrpc
for OpenAFS

Change-Id: Iffc32e512b6f8dd2a89bbc9774b0477236087b0c
Reviewed-on: http://gerrit.openafs.org/8243
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-18 00:52:36 -07:00
Simon Wilkinson
df3b4ff842 rx: Export some more functions
Export some symbols that are required by rxperf

Change-Id: I12d99a9ed1c025c838a4f80ecd61aadd19d20c4c
Reviewed-on: http://gerrit.openafs.org/8245
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:52:30 -07:00
Andrew Deason
a287736804 rx: Skip rxi_CheckPeerDead if we are DALLY
DALLY connections don't need to be marked dead, so just skip the whole
function if we are DALLY.

Change-Id: I8a70c93edb54be28cfda499bc8ce3b7b5b7db600
Reviewed-on: http://gerrit.openafs.org/8120
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:52:03 -07:00
Andrew Deason
4532e96bb9 LINUX: Ignore 'offender' in error queue processing
The 'offender' is who generated the error, possibly who sent us an
icmp packet (the given 'port' will be 0). What we want is the peer
that is actually unavailable, which is already in the 'addr' variable
we received from the recvmsg itself.

Change-Id: I930293ca14f0e13ba09ee94b5a5d9cdc0f321743
Reviewed-on: http://gerrit.openafs.org/8119
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:51:51 -07:00
Andrew Deason
083ec556af rx: Check for peer deadness in rxi_Resend
If we need to resend something, the peer we're sending to may be dead.
Check if the peer is dead in rxi_Resend, so we don't have to wait
(possibly several seconds) for the next rxi_CheckCall.

Change-Id: I0ecc0b1fc23bb4194ebadcea97dd58c938af8154
Reviewed-on: http://gerrit.openafs.org/8118
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:51:10 -07:00
Andrew Deason
0ac9fe184a rx: Process all errors received
When we receive a buffer of errors from the error queue, loop through
all of them, and do not stop at the first applicable one we find.

Change-Id: Iad928e0489041b360fe705ac397836650b30091e
Reviewed-on: http://gerrit.openafs.org/8116
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-18 00:50:56 -07:00
Derrick Brashear
c172d469dd linux: always define do_handlesocketerror
even if we are not handling socket errors, have a stub function

Change-Id: I1f3c1631c5ddcf10e74612e13aafbae833bd5eaa
Reviewed-on: http://gerrit.openafs.org/8240
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-18 00:50:45 -07:00
Derrick Brashear
37ef85d44a rx: pthread sendmsg should return success, not a bytecount
thanks to Marc Dionne for noticing the error

Change-Id: I6e5d8b6e3aa30cb0722aff1a9e538f23f40de441
Reviewed-on: http://gerrit.openafs.org/8246
Tested-by: Derrick Brashear <shadow@your-file-system.com>
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>
2012-10-18 00:50:34 -07:00
Andrew Deason
7c0484413d LINUX: Allocate error queue buffer once
We call osi_HandleSocketError in a loop, so make sure we process all
of the errors. We were allocating a buffer to process the errors in
osi_HandleSocketError itself, but we can reuse the same buffer on
subsequent invocations, to reduce allocation/free pressure if we need
to call osi_HandleSocketError more than once. So, do that.

Change-Id: Idca2b9d21a48a868574ce6cfc5efe2efba3570a1
Reviewed-on: http://gerrit.openafs.org/8115
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-16 01:48:16 -07:00
Andrew Deason
cddd859d2a rx: Process error queue after noticing errors
If errors exist in the socket error queue, we will notice by a sendmsg
or recvmsg returning an error. If we never get an error, we don't need
to check the error queue. So, only call osi_HandleSocketError after
such an error has been returned, so we can avoid unnecessarily
checking the error queue when there are no errors.

Change-Id: I7c8aaaac42728dac7fb0634538b8cc317f0e7212
Reviewed-on: http://gerrit.openafs.org/8114
Reviewed-by: Chas Williams - CONTRACTOR <chas@cmf.nrl.navy.mil>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Simon Wilkinson <simonxwilkinson@gmail.com>
2012-10-16 01:47:48 -07:00
Andrew Deason
9c2612bd33 Turn on Linux rx error queue and PMTU handling
Change-Id: I17822e9463b5e34bd43e96926a168a19773b2b21
Reviewed-on: http://gerrit.openafs.org/7928
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-16 01:47:42 -07:00
Simon Wilkinson
a812d28bbf Revert "Add some basic tests to check out fuse"
This reverts commit 94bf003a72.

The fuse tests are fundamentally broken as they stand:

*) They rely on files that have not been committed to the tree. To
   function correctly the file fuse/conf/CellServDB must be present
*) They always run, regardless of whether the fuse helper binaries are
   installed on the developers system, or even on whether the tree was
   built with fuse support enabled.
*) They pass, even if fuse fails to start up
*) The file fuse.sh is committed, despite being unused. This is
   particularly confusing, as it looks like this is where the tests
   are performed from (its not, testing is done in dynroot-t)
*) fuse-log should be either cleaned up, or flagged as ignored in
   .gitignore

Revert the commit until such time as all these issues can be fixed

Change-Id: I5ff9a95f33c0a5d0614bb47c521a8770d92fe2eb
Reviewed-on: http://gerrit.openafs.org/8230
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-12 18:33:07 -07:00
Simon Wilkinson
f0a57e9de6 tests: Reformat loopback tests
Reformat the loopback tests to match our house style - 4 spaces for
first indent, a tab for the second, and so on, opening brace of a
function on a newline, spaces around assignments, and so on.

Change-Id: I54f168ca143e7ff46c9d82289331b8314849f848
Reviewed-on: http://gerrit.openafs.org/8229
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-12 18:32:25 -07:00
Simon Wilkinson
072828a1f5 tests: Tidy up loopback adapter tests
Remove the unused h_errno extern, which in turn removes the need
for disabling strict prototype warnings in the Makefile

Use roken.h, instead of hardcoding system libraries

Change-Id: Ie654c77ff60ed14fc3b659fa3eb527535be71164
Reviewed-on: http://gerrit.openafs.org/8228
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-12 18:32:17 -07:00
Marc Dionne
78ae01fb98 Linux: osi_vcache: Fix loop for the hlist case
An hlist is not circular, and the end is marked by a NULL next
pointer.

Change-Id: Iec7ad7e3e7ee989d548233b045aa8def1ebfb1dc
Reviewed-on: http://gerrit.openafs.org/8233
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-12 18:31:19 -07:00
Andrew Deason
3237543afa DAFS: VRS_r with VOL_SALVAGE_NO_OFFLINE in attach2
One caller of VRequestSalvage_r in attach2 was not passing the
VOL_SALVAGE_NO_OFFLINE flag. This really should be passed for every
place that manually sets vp->nUsers = 0, since then the VPutVolume_r
handlers will never fire.

Change-Id: I088d93a6c598a4d636224f4cf4c0d89454efcca8
Reviewed-on: http://gerrit.openafs.org/8203
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-07 06:04:02 -07:00
Andrew Deason
720ff46271 sys: Split up syscall.lo 'echo's
Currently we echo a string to syscall.lo to generate it. However,
'echo' is often a shell builtin, and some shells (such as bash) do not
interpret escape codes like \n unless the -e option is given. So, this
results in syscall.lo containing a single commented line, which
results in .libs/libafsrpc_sys.a not getting created, which later on
causes errors.

Instead, just split the syscall.lo generation into separate echo
invocations, to make sure we work everywhere.

Change-Id: I8a6ed42a0837086de604be0936d830f0f4558ebf
Reviewed-on: http://gerrit.openafs.org/8202
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-07 06:01:13 -07:00
Derrick Brashear
8a9f4244dc afsd: consolidate macos event handling code
in order that this can potentially be extracted entirely
to a platform-specific file, (and possibly dbus-equivalents
inserted also) consolidate the macos system events handling code

Change-Id: I8fc4a96dc2590778a13f27610b383ee35626871e
Reviewed-on: http://gerrit.openafs.org/8201
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-03 10:27:00 -07:00
Andrew Deason
0fc27471e7 afs: Avoid tracking file locks for RO volumes
Advisory file locks for RO volumes don't make a lot of sense, since
there are no possible writes to worry about. The fileserver already
does not track these, so don't even bother processing them in the
client.

Change-Id: Ie2a20d2f7af67799cfb8d30e72aa3e52a1ecc2d5
Reviewed-on: http://gerrit.openafs.org/8197
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-03 10:26:53 -07:00
Derrick Brashear
be7fca0653 comerr: no need to libl on macos
libl is obsolete on macos; stop linking it

Change-Id: If6e184b6a13ccd3f6b175e9dfbfae9a595322159
Reviewed-on: http://gerrit.openafs.org/8200
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-03 07:38:37 -07:00
Derrick Brashear
a28b5e645a configure: make use of native build assist tools possible
provide a way to run native rxgen, config and compile_et

Change-Id: I9d1a2b4a1d4100fdc4a042005586e8fc40f39f7b
Reviewed-on: http://gerrit.openafs.org/8199
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-03 07:38:06 -07:00
Troy Benjegerdes
94bf003a72 Add some basic tests to check out fuse
Update makefiles to have 'make test' and 'make check' use the
_nolibafs build version, since there are no tests that (currently)
require the AFS kernel module to be built.

Clean up fuse test copyright notice, Alphabetize configure.ac

Change-Id: Icc95dd3393cd66f0d04fa5f6e8f806db60ca031e
Reviewed-on: http://gerrit.openafs.org/8135
Reviewed-by: Troy Benjegerdes <hozer-gerrit@hozed.org>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-03 05:41:51 -07:00
Derrick Brashear
bb84ed0f56 config: make makefile builder be a config tool also
all of our helper tools should be configured in one place,
so a cross compile can override them

Change-Id: I35044832257fa3389504f79207aa423e39d1ad4a
Reviewed-on: http://gerrit.openafs.org/8198
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-02 21:36:57 -07:00
Andrew Deason
eae608d99a afs: Use common cleanup code for lockctl EINVAL
afs_lockctl has common cleanup code in the 'done' label. Use it here,
instead of trying to duplicate it.

Currently this code path appears to not be dropping the discon lock,
which this rectifies.

Change-Id: I136a78bc3235454db7e3d69bb79b0061cfcab265
Reviewed-on: http://gerrit.openafs.org/8196
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-02 20:13:25 -07:00
Chas Williams (CONTRACTOR)
5289b5bb81 bos: convert struct bnode to use opr
Convert struct bnode to use the common linked list code from opr.
bnode_Deactivate() was converted but is unused by the code and isn't
tested.

Change-Id: I0edec453f15cf19e82088e3d361483cc5833f897
Reviewed-on: http://gerrit.openafs.org/8168
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-02 13:19:34 -07:00
Chas Williams (CONTRACTOR)
549a5c04ee bos: convert struct bnode_proc to use opr
Convert struct bnode_proc to use the common linked list code from opr.

Change-Id: I30753ad10387b23509be0831d378772049f4be9d
Reviewed-on: http://gerrit.openafs.org/8167
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-02 13:19:28 -07:00
Chas Williams (CONTRACTOR)
fe32aec9d8 bos: convert struct bnode_type to use opr
Convert struct bnode_type to use the common linked list code from opr.

Change-Id: I21329aff81a91a79a1fcf525f4fdd3a22b33ec92
Reviewed-on: http://gerrit.openafs.org/8166
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-02 13:19:20 -07:00
Chas Williams (CONTRACTOR)
d3ed12ef49 bos: split part of bnode.p.h into bnode_internal.h
Move the bosserver specific parts of bnode.p.h into bnode_internal.h
so that inclusion of bnode.h doesn't expose bosserver's internals.

Change-Id: Id58714507211331a57c36eb71c1c3937fff0dd2a
Reviewed-on: http://gerrit.openafs.org/8169
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
2012-10-02 13:19:15 -07:00
Derrick Brashear
909639448e generated target updates
tweak what's needed to build helper binaries for cross-compile

Change-Id: Ib476716e1e32444f0b2aeb8cb8a1e91ab49471de
Reviewed-on: http://gerrit.openafs.org/8173
Tested-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
2012-10-02 06:32:15 -07:00
Jeffrey Altman
338014a231 Windows: File Info Query Symlinks
For Symlinks, always set the Reparse Point attribute and
set the Directory attribute if the target is a directory.
Do not return the file attributes of the target.

Change-Id: I72dcde912c998e1ab3eea45426d019314e10e740
Reviewed-on: http://gerrit.openafs.org/8171
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:23:53 -07:00
Jeffrey Altman
dd59f6f611 Windows: Dir Enum behavior for Symlinks / MPs
Comparisons of the behavior of cmd.exe, powershell.exe, and tcc.exe
with regards to directory enumeration show that when Symlink file
information is returned that the "reparse point" data should be
reported along with whether or not the target is a directory.

For mount points, the reparse point file information should always
be returned and the type should always be directory.

The target timestamps, file sizes, etc. should never be returned.

Change-Id: I0f899229061a282d0d218155407ffc4ab62ad377
Reviewed-on: http://gerrit.openafs.org/8170
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:22:49 -07:00
Jeffrey Altman
22d68eec6d Windows: Move afsredir process type check
The process type check in afsredir.sys was performed during the
Process Creation callback which is processed in the context of the
parent process which might not be the same type (32-bit or 64-bit)
as the process being created.

Change-Id: I6ae79a6dacf434a986c7bb0135b2238fcfeeb0cd
Reviewed-on: http://gerrit.openafs.org/8165
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:21:58 -07:00
Jeffrey Altman
137ea396db Windows: Fix memory leak SRXAFSCB_GetCellServ
In commit 19f1e0f7cf strdup()
was replaced by xdr_alloc() and memcpy().  Unfortunately,
the patch was wrong and the pointer to which the result of
xdr_alloc() was assigned was overwritten with zero.

Change-Id: I0a9e6c03d67e2a1c811e84808fbbdd39f782ba87
Reviewed-on: http://gerrit.openafs.org/8162
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:21:32 -07:00
Jeffrey Altman
ae8527269c Windows: duplicate ExtentsResource hold
All callers to AFSDoExtentsMapRegion() hold the ExtentsResource
so there is no need to obtain it again within the function.  Instead
add an ASSERT to confirm that the resource is held.

Change-Id: Id34a3d650062d6e519a66732d248c136a92e4be3
Reviewed-on: http://gerrit.openafs.org/8161
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:21:09 -07:00
Jeffrey Altman
5c348e5a9f Windows: make static RDR_ParseIoctlPath[Parent]
The RDR_ParseIoctlPath and RDR_ParseIoctlPathParent functions
are helper functions within RDRIoctl.cpp.   Make them static
and remove them from the header.

Change-Id: I5f3b68f87701e2d8423a01c236c7cb598c3ff743
Reviewed-on: http://gerrit.openafs.org/8160
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:20:33 -07:00
Jeffrey Altman
1df112db3c Windows: remove reqp param RDR_IoctlWrite/Read
The RDR_IoctlWrite and RDR_IoctlRead functions no longer
use the cm_req_t parameter so remove it.

Change-Id: I1c6f09da9e4a386f79dae1c15b0b2ccdce944d51
Reviewed-on: http://gerrit.openafs.org/8159
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:19:59 -07:00
Jeffrey Altman
63ded5bc45 Windows: add cm_req_t to RDR_ioctl_t
The cm_req_t structure flags store information related to
the source of the request and whether the process is WOW64 or not.
This information is required for proper pioctl processing.  Add
a cm_req_t structure to the RDR_ioctl_t structure and initialize
it in RDR_SetupIoctl() which is called from RDR_PioctlOpen().

Change-Id: I351101f036f63bbb1f0d7b19e9b092b18a3e070e
Reviewed-on: http://gerrit.openafs.org/8158
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:19:16 -07:00
Jeffrey Altman
ac97f8f5a6 Windows: Add bWow64 param to RDR_InitReq
Instead of using the pattern

  RDR_InitReq(&req);
  if (bWow64)
     req.flags |= CM_REQ_WOW64;

add bWow64 as a parameter to RDR_InitReq().

Change-Id: I2c02683ab857c6743b46e83dc3f9defa660263d0
Reviewed-on: http://gerrit.openafs.org/8157
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:18:04 -07:00
Jeffrey Altman
c2e4112ffe Windows: cm_ExpandSysName for 64-bit processes
on 64-bit Windows, only 32-bit processes have the WOW64 request
type flag set.   Reverse the conditional to permit proper evaluation
of the 64-bit sysname list.

Change-Id: I0bbad7b275b836ecaff73c69afdde08e17f310a7
Reviewed-on: http://gerrit.openafs.org/8147
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
2012-10-01 16:17:12 -07:00