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)
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)
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.
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.
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.
LICENSE MIT
FIXES 116641
Do not use the DNLC if the name when converted from Unicode is NULL.
(cherry picked from commit e0298d5f09d7e791aeb0f98438e299ad1faf186a)
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)
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)
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)
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)
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)
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)
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)
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)
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)
LICENSE BSD
FIXES 124054
reference count the server object returned by cm_FindServerByIP
(cherry picked from commit 411a63fb063cf24d6b9aedeb83df2eb58716e239)
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)
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)
LICENSE MIT
set the correct fid vnode/unique values when adding new symlnks and
mount points.
(cherry picked from commit ffdc7c70889386dca37e207a91791d5d0728d2d7)
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)
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.
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.
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)
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.
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.
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.
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.
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.
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.
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)