Windows: CM_CONFIG_DATA_VERSION 23 The cm_volume_t data structure changed. Increment the data version for the 1.7.24 release. Change-Id: I324525db34e644cf7ac915742e5da6895f351531 Reviewed-on: http://gerrit.openafs.org/9746 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com>
Windows: Do not double increment cm_data.currentCells During cm_cell generation the cm_data.currentCells value was incremented twice. As a result cm_currentCells did not equal the number of cm_cell objects allocated. Upon restart the AFSCache contents would be discarded. Change-Id: I2b62cb8268789e46f5ada4aa039e41c7ea8b47a5 Reviewed-on: http://gerrit.openafs.org/9090 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Windows: Restore "fs getcacheparms" used space buf_Init() adds all of the available buffers to the free queue at startup and cm_data.buf_freeCount tracks the number of items in the free queue. So it cannot be used as a method of reporting how much of the cache space has been used. Add a new buf_usedCount parameter to the cm_memmap data to track the number of cache blocks that have been used up to the total number of allocated blocks. buf_usedCount can then be used in cm_IoctlGetCacheParms to restore the original behavior. Change-Id: I3ecdfdbda1c423551b7e7691243696e0f1553edc Reviewed-on: http://gerrit.openafs.org/8578 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Windows: record mount point string data version The Windows cache manager stores the mount point or symlink target string in the cm_scache_t object. If the string is the empty string then the target needs to be resolved. Otherwise it is considered up to date. With this approach, care must be taken to ensure that the string is erased whenever the data version changes. This patchset records the data version of the mount point target string in the cm_scache_t object. Being up to date is determined by comparing the current data version of the object to the mount point string version. A match and the string is up to date. Change-Id: I4dfdc1af5894548afb35e84e77f7f607674bd7af Reviewed-on: http://gerrit.openafs.org/7745 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@your-file-system.com> Tested-by: Jeffrey Altman <jaltman@your-file-system.com>
Windows: Record callback issued time Save the time at which a callback was issued. This can be used in a later patchset to determine if a callback was issued after a negative access entry for a {fid,user} pair. Change-Id: Iab54eb729fd5f2a2daf4855b7e7e75245dc28051 Reviewed-on: http://gerrit.openafs.org/6995 Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Windows: cache format version change With the change to the size of the osi_mutex_t and osi_rwlock_t structures the CM_CONFIG_DATA_VERSION must change to force a reconstruction of the cache file. Change-Id: I0aadd2f7c699a5daaa87acf749957ff65d51fe6e Reviewed-on: http://gerrit.openafs.org/6131 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Windows: Use Jenkins' Hash Replace the non-string hash functions with Jenkins' Hash derived hash values. Bump the cache version value because the hash function has changed. Change-Id: I9de789a48abab38ceb16e928bfc0c10e2a88747e Reviewed-on: http://gerrit.openafs.org/6102 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Windows: create scache->redirMx to reduce contention Relying on the cm_scache_t.rw lock to protect the cm_scache_t.redirQueue* results in a large amount of contention between processing extent requests and releases from the afs redirector and the threads attempting to read from or write data to the file server. There is no reason why the same lock must be used. Allocate a dedicated mutex to protect the queue. By placing the new mutex after the buf_globalLock in the locking hierarchy it permits the lock acquisition logic for extent processing to be simplified further reducing cm_scache_t.rw lock transitions. Change-Id: Id2ded86c1f3757a2f1071c8cf39f2fbc6bcfcfaa Reviewed-on: http://gerrit.openafs.org/6053 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@secure-endpoints.com> Tested-by: Jeffrey Altman <jaltman@secure-endpoints.com>
Windows: Redirector interface for afsd_service.exe Over the last three years the afsd_service sources have been gradually separated into distinct layers for the SMB server and the AFS cache. The eventual goal of this work was to permit the addition of alternative interfaces to the cache manager in parallel. This patchset implements the first alternative interface, a reverse ioctl model that communicates with a native IFS redirector driver. The driver will be submitted in a subsequent patchset. Although it is possible to run afsd_service with both the SMB and RDR interfaces active at the same time. In practice it is somewhat impractical because it destroys the uniformity of the \\AFS name space. The RDR loads at boot time and claims all of \\AFS. The SMB interface if active at the same time must use the old \\%HOSTNAME%-AFS. As implemented, if the RDR interface is functional the SMB interface is not started. Only if the RDR interface fails will the SMB interface be activated. The afsd_service.exe maintains all of its primary responsibilities for communicating with the AFS servers, processing callbacks, enforcing permissions, handling afs path ioctls, Windows RPC service simulation, and object management. The biggest change is in the cm_buf_t management. Data is exchanged with the RDR by passing control over cm_buf_t->data buffers in the form of Windows File Extents. This avoids data copies across a communication channel which significantly improves performance at a substantial complexity cost. Credential management is switched from a Windows username binding to a GUID binding where the GUIDs represent authentication groups that are managed by the RDR. This patchset includes additional changes to support integrated logon in conjunction with the RDR. In particular, adding support for authentication groups. Change-Id: I7135489421c67a429ec3b2acd4c8ae08b8329f6d Reviewed-on: http://gerrit.openafs.org/5432 Tested-by: BuildBot <buildbot@rampaginggeek.com> Tested-by: Rod Widdowson <rdw@steadingsoftware.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
Windows: Freelance vnode,unique pairs The redirector maintains file object state after the afs service has shutdown in case it is restarted. It is critical that Freelance FIDs not be reused. Add cm_data.fakeDirVersion into the mix when generating unique values. Change-Id: I1cf480d3e0ec6e0b7eadf731a1ef867079c2dc44 Reviewed-on: http://gerrit.openafs.org/5357 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
Windows: non-persistent cache from pagefile->heap Change the non-persistent cache mode to use a heap allocated cache in place of a paging file allocated cache. With a heap cache the memory for the cache can be locked into physical memory so it won't be swapped out when running in virtual machines. This patch does not apply such memory locking. Change-Id: I85e6da1bba481d3d9bca84673b918b1d7cde71f9 Reviewed-on: http://gerrit.openafs.org/5343 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
Windows: lock protected fields must be 32-bit It is not safe to protect two 16-bit fields in a structure with different locks. Switch to using 32-bit fields. Increment the cm-memmap version number since the data structure sizes changed and the cache file must be invalidated. Change-Id: I867b4b85b4fd9fe0083ad9d0559311f1c287513f Reviewed-on: http://gerrit.openafs.org/4660 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
Windows: Correct cm_volume locking cm_volume_t flags was used for two categories of flags. The first protected by the cm_volume_t->rw lock. The second protected by the global cm_volumeLock. Separate the flags field into two afs_uint16 fields and break the flag space into FLAG and QFLAG. Add assertions to the volume LRU functions to ensure that they are always called with cm_volumeLock write-locked. Correct two locations where cm_AdjustVolumeLRU() was called read-locked instead of write-locked. Change-Id: I7991b995a3c981cd5d08d9cbba09badc81518a5a Reviewed-on: http://gerrit.openafs.org/3760 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
death to trailing whitespace if we're gonna clean up... Change-Id: I5ab03f29468577b62dacab41a67eadfd8c43f812 Reviewed-on: http://gerrit.openafs.org/2463 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org>
Windows: Increase the memory map version Since the cm_buf_t data structure changed, update the memory map version number so that the cache will not be reused. LICENSE MIT Change-Id: If01997ebd90c8f004d7cf4ba92f46fe4b9f570bf Reviewed-on: http://gerrit.openafs.org/1772 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
Windows: Correct lock error codes and log file server lockCount The error codes that should be returned when a lock request fails are: STATUS_LOCK_NOT_GRANTED for an explicit lock request STATUS_SHARING_VIOLATION when a CreateFile fails due to a previous lock Correct the service to ensure that these values are in fact returned. Also, add 'fsLockCount' field to cm_scache_t and dump its value as part of the "fs memdump" output. This permits some ability to identify what the file server thinks the lock count is. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/646 Reviewed-by: Jeffrey Altman <jaltman@openafs.org> Tested-by: Jeffrey Altman <jaltman@openafs.org>
windows-callback-server-tracking-for-readonly-vols-20090626 LICENSE MIT Readonly volume callbacks apply to every cm_scache_t from the same volume. We were already tracking the cbExpires time in the cm_volume_t. We need to also track the cbServerp in the cm_volume_t so that the cm_scache_t objects can be assigned the correct server from which the callback was issued. Add cbServerpRO field to the cm_volume_t. Bump the memory map version to force a rebuild of the cache data.
windows-local-dir-updates-20080916 LICENSE MIT When a local directory update occurs to the directory pages stored in the dcache, there is no guarrantee that the same modifications will be made to the cached pages as are being made by the file server. In the situation that one or more of the cached pages are recycled, it is not permissible to obtain the missing pages from the file server without first invalidating the rest of the cached pages. This is necessary to prevent mixing of incompatible data representations. Define a new flag CM_SCACHEFLAG_LOCAL which is used to indicate that dcache entries were locally modified even though they are not dirty. As the previous code could have corrupted the contents of the dcache, bump CM_CONFIG_DATA_VERSION in order to force the rebuilding of the cache. Add error CM_ERROR_NOTINCACHE to indicate that a requested directory page is not present in the cache and will not be created on the fly. Prefetch all dcache entries for directories and ensure that a consistent set is being used.
windows-cell-free-list-20080902 LICENSE MIT add a free list to the cm_cell_t structure. if during cm_GetCellGen() the cm_SearchCellXXX() calls fail, store the allocated cm_cell_t object on a free list so that it can be reused for the next request.
windows-cache-version-20080421 LICENSE MIT increase the cache version because the cm_volume_t data structure was modified.