5239 Commits

Author SHA1 Message Date
Jeffrey Altman
a6cbfae1f5 KDFS-windows-fs-path-in-afs-20090507
LICENSE MIT

Switch the PathInAfs test to use VIOCGETFID instead of VIOC_GET_CELL_NAME
so that the literal option can be used.


(cherry picked from commit fd0f1f49f27b5f92547a0d15e23efd3b2e46376d)
2009-05-07 16:03:21 +00:00
Jeffrey Altman
27f99fc550 KDFS-windows-shellext-path-in-afs-20090507
LICENSE MIT
FIXES 124742

Change the PathInAfs test to use VIOCGETFID instead of VIOC_GET_CELL_NAME.
VIOCGETFID permits a literal test of the specified object.   This is needed
for testing the validity of a symlink to a msdfs: or non-existent path.
Otherwise, the AFS Shell Extension context menu will not be displayed.


(cherry picked from commit 621719905806a5883be5a17ca1af0d1929b874e3)
2009-05-07 15:58:07 +00:00
Jeffrey Altman
78110d2fbf KDFS-windows-afsrdr-user-ioctl-20090322
LICENSE BSD

use parent fid instead of root fid as the starting point for
evaluating the remaining path.
2009-03-22 10:47:38 +00:00
Jeffrey Altman
cc5acbf85c KDFS-afsrdr-user-symlink-20090321
LICENSE BSD

Fix handling of absolute symlinks.
2009-03-21 21:27:12 +00:00
Jeffrey Altman
b4aed72d1f KDFS-windows-afsrdr-user-20090313
LICENSE BSD

Specify the AFS Fid of the global root.afs volume.

Do not return errors from PopulateCurrentEntry when evaluating targets.

symlink target processing is now performed within the file system
due to the ".." symlink issue.

Fix byte range lock deallocation.
2009-03-14 05:41:22 +00:00
Jeffrey Altman
04d4d6effa KDFS-windows-afsrdr-npdll-20090313
LICENSE BSD

update copyrights
2009-03-14 05:38:44 +00:00
Peter Scott
abfb23280b KDFS-windows-afsrdr-kernel-20090313
LICENSE BSD

with assistance from jaltman@secure-endpoints.com

Add GlobalFileId to the file system initialization arguments.  The file
system needs to be able to identify which volume is the global root
by fid in case the volume is mounted in multiple locations.

Reimplement all of the path parsing logic in order to be able to handle
symlinks that contain a ".." entry that crosses above a volume root.
The full starting path is now recorded in the Ccb as an array of component
names.  This is used as a stack pushing and popping components while
evaluating the contents of a symlink.

Permit directory enumeration to be performed asynchronously.

Correct spelling errors in comments.

Correct @sys processing.

When evaluating the target type for a symlink, do not evaluate the target
of the final component if that component is a mount point.

Initialize sysname resources.

Ensure that buffers are nul terminated before passing them to RtlRegQuery.

When processing the invalidation of a file deletion, delete the direntry
but not the fcb.  No longer assume that Fcb->DirEntry is always non-NULL
except during cleanup.
2009-03-14 05:37:32 +00:00
Jeffrey Altman
392188cf7b KDFS-windows-afsrdr-common-20090313
LICENSE BSD

add HOLD_FID / RELEASE_FID interfaces.  Used by the file system to obtain
a reference count on a cm_scache_t object to ensure that it is not recycled.

Add GlobalFileId to the file system initialization arguments.  The file
system needs to be able to identify which volume is the global root
by fid in case the volume is mounted in multiple locations.
2009-03-14 05:27:47 +00:00
Jeffrey Altman
409587ab60 KDFS-windows-afsd-buf-20090313
LICENSE MIT

Do not add a buffer to the free list if it is held by the file system.

Define buf_RDRBuffersExist()
2009-03-14 05:19:12 +00:00
Jeffrey Altman
55433b30b0 KDFS-windows-dnlc-20081015
LICENSE MIT
FIXES 116641

Do not use the DNLC if the name when converted from Unicode is NULL.


(cherry picked from commit e0298d5f09d7e791aeb0f98438e299ad1faf186a)
2009-03-14 05:16:28 +00:00
Jeffrey Altman
b8d94c6545 KDFS-windows-afsd-have-callback-20090313
LICENSE MIT

only call RDR_Invalidate if we have a valid callback
2009-03-14 05:15:13 +00:00
Jeffrey Altman
d001a9563f KDFS-windows-afsd-btree-20090313
LICENSE MIT

Change cm_BPlusDirEnumerate interface to include a 'FetchStatus'
parameter.  When set to 0, we do not fetch status for fids for
which we do not already have status info.  This avoids unnecessary
recycling of cm_scache_t objects.


(cherry picked from commit 15d4dd0f70925eaf2af333f2215235cb90637457)
2009-03-14 05:12:44 +00:00
Jeffrey Altman
0121257062 KDFS-windows-afsd-reset-acl-cache-20090312
LICENSE MIT

Modify the cm_ResetACLCache interface to accept an optional cm_cell_t *.
At the moment every time a token is set or cleared all of the acl info
for all cm_scache_t objects regardless of cell is reset.  This is both
a performance hit and unnecessary.  If we know the cell, only reset
the acl info for cm_scache_t objects in that cell.

If cell is not specified, reset for all cells.


(cherry picked from commit d0e4044cfeef3ce1c5d435251de9b584343225f5)
2009-03-14 05:11:22 +00:00
Jeffrey Altman
ea18a6fa87 KDFS-windows-afsd-unlock-20090312
LICENSE MIT

Modify the cm_Unlock() interface to support the ability to unlock all
locks within a range.  This is required for the redirector.


(cherry picked from commit 8e01e5a4dbcaaea03fc3af59bec5ef211d5b4684)
2009-03-14 04:55:23 +00:00
Jeffrey Altman
7e9b85950a KDFS-windows-freelance-20090312
LICENSE MIT

correct error in windows-freelance-20090223.  use cpath not filename
since that is why we allocated cpath in the first place.


(cherry picked from commit 7ca2785f53d391afa5e7200f2b4d40c79a857443)
2009-03-14 04:51:30 +00:00
Jeffrey Altman
f89d95bb61 KDFS-windows-afsd-callback-20090312
LICENSE MIT

use cm_HaveCallback() to check for a call back instead of explicit
checks on cbExpires and cbServerp.  cm_HaveCallback takes into account
Freelance mode and offline status.


(cherry picked from commit ef81e9395c171f9dcb8df120991ba65ec1ca5610)
2009-03-14 04:49:28 +00:00
Jeffrey Altman
36163d8d01 KDFS-windows-afsd-btree-20090228
LICENSE MIT

Change how BPlusDir enumerations behave with regards to bulk stat
operations.  If the number of entries in the enumeration is larger
than the number of cm_scache objects, then using the previous model
of cm_BPlusDirEnumBulkStat being called for the entire enumeration
list results in the early objects being recycled and the status
info discarded before the caller of cm_BPlusDirNextEnumEntry()
receives the name.

The revised model triggers bulk stat operations from within
NextEnumEntry() as objects requiring status fetching are about
to be returned to the caller.  This reduces the thrashing of the
stat cache.

We should consider adding a flag field to cm_BPlusDirEnumerate()
or cm_BPlusDirNextEnumEntry() to permit enumeration without
status fetching.


(cherry picked from commit a32971251670acc7944dcd4b1eade1ab161e587f)
2009-03-14 04:46:17 +00:00
Jeffrey Altman
370effe702 KDFS-windows-afsd-server-uuid-20090301
LICENSE MIT

Unlike the unix cache manager, on Windows the server uuid was not
recorded as part of the cm_server object.  This commit adds the uuid
and a flag to indicate if it is set or not.

A check is made in cm_UpdateVolumeLocation it confirm that the uuid
known to the CM is the same as the one being reported by the vl server.
If they differ, this is logged but no action is taken.

The contents of the cm_allServers list is now dumped in response to
"fs memdump" or a crash.  This includes the uuid, addr, type, flags,
downtime, caps, etc.

The server uuid is not useful at the moment because there is nothing
that the CM can use it for.  However, it might be useful for debugging
and it will be needed for extended callback support.


(cherry picked from commit 19ffc146fac828cd32b90c4d43d617de6c574556)
2009-03-02 04:45:49 +00:00
Jeffrey Altman
15a9b5f5e5 KDFS-window-afsd-bad-version-20090228
LICENSE MIT

create a new cpp symbol CM_SCACHE_VERSION_BAD to represent data version
values in cm_scache objects that are known to be invalid.

then consistently apply this value throughout the code.  Previously
some invalid values were set to 0 and others to -1 (0xFFFFFFFF:FFFFFFFF).

Also fix at least one location where CM_BUF_VERSION_BAD was not used.


(cherry picked from commit 5d147351263be2636ef547f22acb24c7816348c1)
2009-02-28 16:19:55 +00:00
Jeffrey Altman
0833cb35de KDFS-windows-afsd-error-map-20090227
LICENSE MIT

do not permit VNOSERVICE or VOFFLINE or VSALVAGE to leak and
be returned as an error code.  The resulting NTSTATUS is not valid.


(cherry picked from commit fbfaaf26890102dbe34315128183c27ce67f77a3)
2009-02-27 07:27:17 +00:00
Matt Benjamin
f22e259b13 KDFS-windows-afsd-findserverbyip-refcount-20081223
LICENSE BSD
FIXES 124054

reference count the server object returned by cm_FindServerByIP


(cherry picked from commit 411a63fb063cf24d6b9aedeb83df2eb58716e239)
2009-02-25 06:20:10 +00:00
Jeffrey Altman
4612eba9a9 KDFS-sync-rx-with-1_5-20090225
LICENSE IPL10

pullup all rx changes from 1_5 branch since the last sync.
2009-02-25 06:17:32 +00:00
Jeffrey Altman
cfa3cea985 KDFS-windows-freelance-20090223
LICENSE MIT

Fix another set of edge cases where adding a mountpoint or symlink
to the Freelance volume would result in the wrong fid being returned
to the request that made the addition.

When the Freelance directory is updated, invalidate the cm_scache_t object.
that is associated with it.

Actually use the data version when checking callback status.

The return value from Add Mount/Symlink is not negative on failure.
Its an actual error code.  Treat it that way.


(cherry picked from commit 3c1f85820853e9143cab076d735f7d7c27aeaf62)
2009-02-24 05:07:22 +00:00
Jeffrey Altman
6d9ffa6b78 KDFS-windows-vmoved-vnovol-failover-20090212
LICENSE MIT
FIXES 124276

A readonly volume with multiple instances was being marked alldown
when one of the instances resulted in VNOVOL because the vldb and
the indicated file server were out of sync. The cache manager would
then attempt to re-obtain the volume location info from the vldb
for the entire timeout period.

This patch:

adds trace logging to cm_Analyze indicating which server references
are being deleted and which remain in response to a VNOVOL/VMOVED error.

adds trace logging to cm_UpdateVolumeStatusInt showing how the
new volume status value is determined.

corrects cm_Analyze() so that it doesn't corrupt the server reference
list during cm_FreeServerList() calls; doesn't orphan the server reference
list by setting *serverpp to NULL; and only re-obtains the volume info
list once per request.


(cherry picked from commit 8bb35234aa8469ba93a2171fced503a875c2f1f6)
2009-02-12 21:35:06 +00:00
Jeffrey Altman
0f4c404cbe KDFS-windows-freelance-20090204
LICENSE MIT

set the correct fid vnode/unique values when adding new symlnks and
mount points.


(cherry picked from commit ffdc7c70889386dca37e207a91791d5d0728d2d7)
2009-02-05 00:25:03 +00:00
Jeffrey Altman
76c5cecf4e KDFS-windows-btree-dir-enum-20090126
LICENSE MIT

Modify the cm_BPlusDirEnum interface:

* add the cm_scache_t * of the directory being enumerated to the
  cm_direnum_t object

* remove the cm_scache_t * from the cm_BPlusDirEnumBulkStat call
  now that it is part of the cm_direnum_t object

* maintain a reference to the cm_scache_t for the life of the
  cm_direnum_t object.  This ensures that the object cannot be
  recycled while the enumeration is in use.


(cherry picked from commit e42a066da153750077b154e27249b5b4862724db)
2009-01-26 15:51:22 +00:00
Jeffrey Altman
ce6d1c8dbb KDFS-windows-afsrdr-user-symlink-target-20090109
LICENSE MIT

When populating the symlink, copy the target name after evaluation
not before.
2009-01-09 22:17:51 +00:00
Jeffrey Altman
8654739103 KDFS-windows-afsrdr-kernel-server-name-20090109
LICENSE BSD

When validating that a path is ours to process, make sure
that we do not treat the AFSServerName as a prefix.
A full match is required.
2009-01-09 22:15:53 +00:00
Jeffrey Altman
8be8c18d01 KDFS-windows-afsrdr-kernel-build-symlink-target-20090109
LICENSE BSD

When the target of a symlink is a volume root, we must return
the control block of the volume root and not the current fcb
which is still referring to the last symlink in the chain.

Be sure to hold the TreeLock while we perform the is volume
test in order to prevent the volume control block from being
torn down.
2009-01-09 22:14:08 +00:00
Jeffrey Altman
957cfdf9b9 KDFS-windows-afsrdr-kernel-symlink-target-20090107
LICENSE BSD

When evaluating the file type of a symlink target, use the fast evaluation
which does not follow mount points.   We need to know that the target
is a mount point so that the reparse attribute can be set.
2009-01-08 07:18:57 +00:00
Jeffrey Altman
fbfc8ff8b5 KDFS-windows-afsrdr-kernel-generic-20090107
LICENSE BSD

Remember to increment the Fcb OpenReferenceCount.  Otherwise,
an assertion will be triggered at shutdown due to the undercount.
2009-01-08 07:16:26 +00:00
Jeffrey Altman
51ba1cee88 KDFS-windows-afsd-freelance-20090105
LICENSE MIT

Bring a bit more sanity to the Freelance code:

1. Add functions cm_FreelanceFetchMountPointString and
   cm_FreelanceFetchFileType to cm_freelance.c.  These functions
   permit the MountPointString and FileType to be obtained within
   cm_GetSCache without requiring knowledge of data structures
   that should be private to cm_freelance.c

2. Enforce the rule that odd vnode values are directory objects.
   The root directory is 1 and everything else must be a multiple
   of two.

3. Use the unique field as an index into the localMountPoints
   array.

4. Fix cm_GetCallback to process freelance data refreshes on
   all objects in the freelance volume not just the root directory.
   If this is not done, an access to \\afs\foo prior to \\afs\all
   being evaluated will cause an unnecessary attempt to send a
   fetch status request to a file server and produce an alldown
   error.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE MIT

remove unnecessary conditional


(cherry picked from commit 8c4b06a5b62a07d4d6733b313ad404e1cb6abe8d)
2009-01-05 16:15:31 +00:00
Jeffrey Altman
4eae76dda3 KDFS-windows-afsd-virtual-cache-20090105
LICENSE MIT

If the NonPersistentCache option is activated there is no "AFSCache"
file to share with the file system.  Refuse to start the redirector
interface.
2009-01-05 16:00:02 +00:00
Jeffrey Altman
767f2dd758 KDFS-windows-afsrdr-user-virtual-cache-20090105
LICENSE MIT

If the NonPersistentCache option is activated there is no "AFSCache"
file to share with the file system.  Refuse to start the redirector
interface.

Instead of testing in RDRInit the service will not attempt to
initialize if the redirector cannot be used.
2009-01-05 15:53:30 +00:00
Jeffrey Altman
8b997cac41 KDFS-windows-afsrdr-kernel-20090104
LICENSE BSD

In order to evaluate the file attributes the fcb of the parent
is required.  For volume roots, the parent is the current fcb.
2009-01-05 05:24:44 +00:00
Jeffrey Altman
0e053ad11f KDFS-windows-afsrdr-user-virtual-cache-20090104
LICENSE MIT

If the NonPersistentCache option is activated there is no "AFSCache"
file to share with the file system.  Refuse to start the redirector
interface.
2009-01-04 16:57:24 +00:00
Jeffrey Altman
0407ff16de KDFS-src-makefile-20081230
LICENSE MIT

fix extra
2008-12-31 01:32:52 +00:00
Jeffrey Altman
4954d8601f KDFS-windows-afsrdr-makefile-20081230
LICENSE MIT

terminate the build on error

copy the built files to $(DESTDIR)\root.client\usr\vice\etc
2008-12-31 01:27:30 +00:00
Jeffrey Altman
a8b150c717 KDFS-windows-afsrdr-npdll-net-error-20081230
LICENSE BSD

when the redirector driver is not available or not ready, do not
return WN_NO_NETWORK as an error from the network provider.  doing
so results in the enumeration of all network providers to be halted
since what is the point if there is no network.

Instead return WN_NET_ERROR which indicates that something went
wrong for this provider.
2008-12-30 23:02:28 +00:00
Jeffrey Altman
808ed9cd9b KDFS-afsrdr-build-20081230
LICENSE BSD

if CODESIGN_KERNEL is not defined, do not output a signing command
to the cmd file.
2008-12-30 22:01:36 +00:00
Asanka Herath
b30e46dae5 KDFS-windows-install-wix-20081229
LICENSE MIT

Replace the default install with an IFS install and a SMB install.
The IFS install does not include the loopback adapter, afscreds, or
afs_config.

The SMB install does not include the file system driver or the
matching network provider.

Create new properties to permit a transform to easily select which
should be the default.  IFS is the default.

When generating the 32-bit tools installer, do not register the
network provider.   The configuration from the 64-bit install will
suffice for both versions.

====================
This delta was composed from multiple commits as part of the CVS->Git migration.
The checkin message with each commit was inconsistent.
The following are the additional commit messages.
====================
LICENSE MIT

remove references to IBM AFS release notes.
2008-12-29 18:29:08 +00:00
Asanka Herath
94b3d5318a KDFS-windows-release-notes-msi-deployment-20081229
LICENSE MIT

update the msi deployment section to describe the use of IFS vs SMB
installation.
2008-12-29 09:45:51 +00:00
Jeffrey Altman
dc68a3af42 KDFS-windows-release-notes-afsrdr-20081229
LICENSE MIT

additional notes on the differences between the smb vs native
interfaces.
2008-12-29 06:31:05 +00:00
Jeffrey Altman
2ffef8f89a KDFS-windows-release-notes-native-file-system-20081228
LICENSE MIT

Update the release notes to include references to the native file system.
Add new registry values to Appendix A.  Annotate as appropriate which
registry values and options are SMB only.
2008-12-28 13:50:09 +00:00
Jeffrey Altman
e0709e43dc KDFS-windows-release-notes-1_5_55-20081227
LICENSE MIT

copy release notes from 1.5.55
2008-12-28 04:34:30 +00:00
Jeffrey Altman
f4900ca1e4 KDFS-windows-release-notes-remove-ibm-20081227
LICENSE MIT

remove the ibm release notes from the kdfs branch
2008-12-28 02:14:56 +00:00
Jeffrey Altman
a33eee0418 KDFS-windows-pioctl-drive-subst-20081226
LICENSE MIT

GetDriveType() will return "REMOTE" for drive letters that are mapped
to network devices via the SUBST command.  Recursively check drive letters
for the final substitution before checking to see if the drive letter
is in fact an AFS device.


(cherry picked from commit 238ad07e13a85366bcf49a309e3735d26ff51ff2)
2008-12-26 21:20:09 +00:00
Jeffrey Altman
7f8144b11d KDFS-windows-doc-20081222
LICENSE BSD

Oct 9th revision of windows architecture document
2008-12-23 07:23:07 +00:00
Jeffrey Altman
fc9cdbcb61 KDFS-windows-afsrdr-kernel-mp-target-verify-20081222
LICENSE BSD

check to see if the target of a mount point requires verfication
and if so, verify it.
2008-12-23 07:08:55 +00:00
Jeffrey Altman
aa7adb232e KDFS-windows-afsrdr-npdll-20081222
LICENSE BSD

Add ..\AFSRedirector\NetworkProvider "Debug" registry value to
control the use of OutputDebugString debugging messages.
2008-12-23 07:07:33 +00:00