5239 Commits

Author SHA1 Message Date
Jeffrey Altman
0cde0bfa80 KDFS-windows-vlserver-updates-20080924
LICENSE MIT

if a vlserver returns a ubik error, skip the server and retry


(cherry picked from commit dd05bd3ba7be90a6348b144eb1c0a6ac1c5f43ba)
2008-09-24 23:45:00 +00:00
Asanka Herath
ad54eca019 KDFS-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.


(cherry picked from commit 1f686941197c32734acd2531a911b8e5e43cc94e)
2008-09-16 12:52:57 +00:00
Asanka Herath
7785efe243 KDFS-windows-dir-search-star-dot-pattern-20080916
LICENSE MIT

Replicate the FAT and NTFS behavior that the "*." pattern should match
all files without an extension.


(cherry picked from commit c4117f6f07b92fcc3a135badb48099a01ba41fe2)
2008-09-16 12:36:32 +00:00
Jeffrey Altman
97b3694d91 KDFS-windows-lock-order-20080916
LICENSE MIT

do not violate lock order when freeing server reference lists


(cherry picked from commit 414312a72a9b1f0dd64ba3bfe97865dcc8cd80e3)
2008-09-16 12:30:28 +00:00
Jeffrey Altman
d9e9d25f8f KDFS-windows-afsd-20080909
LICENSE MIT

clear CM_BUF_REDIR flag implicitly when a file is deleted but only after
notifying the file system that the file has been deleted.

Add a Debug Output String for errors that were not mapped to an NTStatus
2008-09-13 16:13:49 +00:00
Jeffrey Altman
a483387dfd KDFS-windows-afsrdr-user-20080909
LICENSE MIT

If the async extents request fails return an error.  If it fails due to
out of memory, use a stack buffer.
2008-09-13 16:05:19 +00:00
Peter Scott
4b7d3c13ba KDFS-windows-afsrdr-kernel-20080909
LICENSE BSD

20080909 code drop
2008-09-13 16:03:11 +00:00
Jeffrey Altman
13319e51be KDFS-windows-afsrdr-common-20080909
LICENSE MIT

Add a ResultStatus field to the AFSSetFileExtentsCB structure
so that the service can report to the file system why an async
extents request failed.
2008-09-13 15:59:07 +00:00
Jeffrey Altman
4c83f34011 KDFS-windows-nsis-np-device-name-20080913
LICENSE MIT

Add missing device name for the redirector network provider
2008-09-13 15:11:38 +00:00
Jeffrey Altman
364973460e KDFS-windows-byte-range-locks-20080913
LICENSE MIT

Replace the int64 key with a struct because process ids on 64-bit
Windows can be 64-bit when obtained through the redirector interface.


(cherry picked from commit 2d709220d53fe9c5da23e2dbb32764fd3cbfea48)
2008-09-13 14:52:28 +00:00
Jeffrey Altman
eb962ac5c0 KDFS-windows-vnovol-20080912
LICENSE MIT

The cm_serverRef_t list reference counts were undercounting and
prematurely freeing the server lists for volumes that experienced
VNOVOL and VMOVED errors.  cm_Analyze() must release the server
list before forcibly updating the volume location info.  Otherwise,
the list that gets freed is the old one concatenated with the new
one.

Add more trace messages.


(cherry picked from commit 1456a67c5ca024c523e0fc3edcba720780d4be9e)
2008-09-13 05:21:30 +00:00
Jeffrey Altman
b12ae30ca9 KDFS-windows-service-procs-20080912
LICENSE MIT

if we are going to use hot threads it would be useful if there were
some additional server threads available to become listeners as
needed.


(cherry picked from commit fd55471b57bce441454d7b3c72c7be6a66aad65d)
2008-09-12 16:01:35 +00:00
Asanka Herath
6d06da11c2 KDFS-windows-dir-new-pages-20080911
LICENSE MIT

A small patch to permit the directory package to allocate additional
directory pages when adding new entries that do not fit in the pages
that were obtained from the file server.


(cherry picked from commit 7ae4174d95a9d90e16f0ddc66648741a119339d2)
2008-09-12 05:12:55 +00:00
Jeffrey Altman
d093c8de1a KDFS-windows-vnovol-20080911
LICENSE MIT

Modify MSG_SERVER_REPORTS_VNOVOL to mention that the volume may
have been moved or deleted.

In cm_Analyze(), do not call cm_ForceUpdateVolume() or force a retry
when processing CM_ERROR_NOSUCHVOLUME.  This CM error value is the
result of a VNOVOL already being processed which would have forced
the update.

When a VMOVED or VNOVOL error is received, remove the volume id from
the server's volume list.

If cm_ForceUpdateVolume() returns a failure, do not retry if a
VMOVED or VNOVOL error was received.

Make sure that if a cm_serverRef_t object is marked srv_deleted
that its references not be used.

Now that cm_ForceUpdateVolume() is being called only when processing
VMOVED and VNOVOL errors, permit it to call cm_UpdateVolumeLocation()
immediately.

Refactor cm_CheckOfflineVolume() to reduce code duplication.


(cherry picked from commit 5ea02ad1e2bdb98bea27e11c1372f90d1940de17)
2008-09-11 18:29:18 +00:00
Jeffrey Altman
86e2ee0463 KDFS-windows-flush-btrees-20080911
LICENSE MIT

fs flushall, fs flushvolume, and fs flush should tear down directory
B+ trees so that when the data buffers are re-read from the file server
with the same data version, the B+ trees will be rebuilt.


(cherry picked from commit 186f1e97d0c15ead6bddae8697161a47ce9a80e4)
2008-09-11 18:13:24 +00:00
Jeffrey Altman
ddced0d0b3 KDFS-windows-cell-list-validation-20080911
LICENSE MIT

correct cell list validation now that the free cell list exists


(cherry picked from commit d85bdb4c9f9ddf7d287072a3d12e65423e551f40)
2008-09-11 18:07:51 +00:00
Jeffrey Altman
52379fe220 KDFS-windows-rx-jumbo-20080911
LICENSE MIT

Disable rx jumbo by default.  Permit rx jumbo to be enabled with
registry value "RxJumbo" set to 1 or "RxNoJumbo" set to 0.

RxNoJumbo has priority.


(cherry picked from commit 8e1b48ad0ab7f3790729ea0feb25256b3a9da709)
2008-09-11 18:02:49 +00:00
Jeffrey Altman
85a510a940 KDFS-windows-multi-check-server-20080911
LICENSE MIT

Permit rx_multi check server to be toggled via a registry setting
at checked prior to each invocation.  "MultiCheckServers".
Default is on.

Remove volume status updates for vldb server status changes.


(cherry picked from commit 59c1c22747b8aaf1da31f97d8a3ea178a4f7adee)
2008-09-11 17:53:35 +00:00
Jeffrey Altman
8e13d5d1b8 KDFS-windows-vnovol-20080905
LICENSE MIT

force a volume location update upon receipt of a VNOVOL error
in case the volume was moved.  VMOVED is only returned by the file
server if the volume is in the process of being moved.  Once it has
been deleted the file server returns VNOVOL.


(cherry picked from commit 0860d5b5b17ef5f58592d739424a4cca8dd91bb5)
2008-09-06 05:30:53 +00:00
Jeffrey Altman
04eb1c2ba8 KDFS-windows-smb-volname-20080904
LICENSE MIT

Advertise the correct length for the volume name.  Do not include the NUL.

Add more create option values as #defines.


(cherry picked from commit beef54e70cc86672b9971288fe4034829186aa41)
2008-09-04 21:13:19 +00:00
Jeffrey Altman
aeebc770cb KDFS-windows-cell-locking-20080903
LICENSE MIT

fix a lock order issue and protect the timeout and flags field
of cm_cell_t with the mutex instead of the global lock.


(cherry picked from commit bbd713ad3f403c9137e01797f576f5dbd04a0f08)
2008-09-03 22:06:56 +00:00
Jeffrey Altman
dcf7778729 KDFS-windows-smb-lock-order-20080903
LICENSE MIT

another lock order violation to fix


(cherry picked from commit 441cc643e027ab98ed14ab486ec077bbbd0c0d4f)
2008-09-03 21:45:26 +00:00
Jeffrey Altman
8fcc711892 KDFS-windows-afsrdr-20080903
LICENSE MIT

Implement redirector notifications of network status, volume status,
and cm_scache_t status changes.
2008-09-03 20:40:02 +00:00
Jeffrey Altman
17d0edbe76 KDFS-rx-mutex-init-once-20080903
LICENSE IPL10
FIXES 114555

because rx_Finalize doesn't clean up, we end up reiniting mutexes. use
pthread_once when not in the kernel.
(kernel does not now call rx_Finalize, ever)


(cherry picked from commit 7f4e0dfc3ef1464c8d8b422bf00915fa4538090c)
2008-09-03 19:14:00 +00:00
Jeffrey Altman
a7d96c2414 KDFS-windows-afsd-dns-env-20080902
LICENSE MIT

Fix the conditionals so that the right thing happens if AFS_AFSDB_ENV
is not defined.


(cherry picked from commit 9803e84e63c28e87c76e6f4e77343fec4ef4dcf4)
2008-09-02 23:43:49 +00:00
Jeffrey Altman
68fecbaa38 KDFS-windows-fs-setcrypt-auth-20080902
LICENSE MIT

fix parsing and display of fs setcrypt auth


(cherry picked from commit 8bf17e7c813f9b2aa8a953a8d0251322ee970d2c)
2008-09-02 22:26:33 +00:00
Jeffrey Altman
59f5bea5eb KDFS-smb-string-conversion-20080902
LICENSE MIT

more cases where -1 should be passed in as opposed to the strlen value
when converting between char and wchar forms


(cherry picked from commit 84e10d582abdf65a5354b1c4b41d7e2ecad532f8)
2008-09-02 22:22:13 +00:00
Jeffrey Altman
f9f3f072ad KDFS-windows-rxkad-auth-20080902
LICENSE MIT

Add ability for users to select rxkad auth only mode.
"fs setcrypt auth".


(cherry picked from commit d94b9a78188357f87fa569ec7738d4e69ff05faa)
2008-09-02 22:16:54 +00:00
Jeffrey Altman
b5a9dc63e7 KDFS-windows-afsd-init-20080902
LICENSE MIT

report state of "Rx Jumbo" and "RxExtraPackets" more often


(cherry picked from commit 21abc0e0b51cd3fd014b06b187d497996058ffe4)
2008-09-02 22:09:53 +00:00
Jeffrey Altman
4565052ba6 KDFS-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.


(cherry picked from commit e31826d3331b8eb1893c627ac55eb299df88995b)
2008-09-02 21:19:07 +00:00
Jeffrey Altman
332654cfb8 KDFS-windows-cell-alloc-reversed-20080902
LICENSE MIT

The approach taken in windows-cell-alloc-20080902 won't work.


(cherry picked from commit 829ff4e54f055de1dc26a1508d2abf4a3c72ff75)
2008-09-02 17:35:13 +00:00
Jeffrey Altman
5882d41bb8 KDFS-windows-cell-alloc-20080902
LICENSE MIT

Perform the initial cm_SearchCellXXX call using a temporary cm_cell_t
object in case the search fails.


(cherry picked from commit ef64f50fb9f477a0acbe1223ee2b0c9981f9324e)
2008-09-02 16:22:26 +00:00
Jeffrey Altman
6a6d24495f KDFS-windows-smb-free-lsa-response-20080901
LICENSE MIT

Whether or not LsaCallAuthenticationPackage succeeds, it may return
a response buffer.  If it does, free it.


(cherry picked from commit a653057ff453a0d340c8153615aa44ae1679c892)
2008-09-01 13:40:52 +00:00
Jeffrey Altman
4a21c618c7 KDFS-windows-afsd-init-lock-order-validation-20080830
LICENSE MIT

Add TransarcAFSDaemon/Parameters key "LockOrderValidation" DWORD
to control lock order validation functionality.  Defaults to off
for release builds and on for checked builds.


(cherry picked from commit 83dadab93adde0812f9ae228667683cfcc761f67)
2008-08-30 15:17:14 +00:00
Jeffrey Altman
e0e7c3078e KDFS-windows-lock-order-validation-20080830
LICENSE MIT

Add osi_SetLockOrderValidation(int) to permit lock order validation
to be turned on and off.  Must be executed before the first lock
is obtained.


(cherry picked from commit a36596f10ff4d87d75a808cabe4e0e5ec661c5df)
2008-08-30 15:07:17 +00:00
Jeffrey Altman
e5e2d8614b KDFS-windows-afsd-shutdown-20080829
LICENSE MIT

reorganize the service shutdown order to permit dirty buffers to be
flushed to the file server without competition from incoming requests.


(cherry picked from commit 2da64d02a2707a3c9220951a30b5cea8464b9ef9)
2008-08-30 03:32:27 +00:00
Jeffrey Altman
4488005ad9 KDFS-windows-buf-shutdown-20080829
LICENSE MIT

During buf_Shutdown() all dirty buffers should be written to the file
server if they can be.


(cherry picked from commit ccdf50ade371de595abe20f5a6b0ff149ce9ae79)
2008-08-30 03:10:22 +00:00
Jeffrey Altman
5056f524de KDFS-windows-afsrdr-wix-20080829
LICENSE MIT

Add the afsrdr network provider DeviceName registry value that was
missing.
2008-08-29 23:29:45 +00:00
Jeffrey Altman
be3fd9fd8b KDFS-windows-nsis-20080829
LICENSE MIT

Clean up installer.  It now works to install and uninstall the
redirector client.
2008-08-29 22:50:02 +00:00
Jeffrey Altman
e202ffeb0d KDFS-windows-afsrdr-user-20080829
LICENSE MIT

RDR_EnumerateDirectory does not take a Parent FID it taks a Directory FID
2008-08-29 22:48:42 +00:00
Peter Scott
826b6c4f62 KDFS-windows-afsrdr-kernel-20080829
LICENSE BSD

Permit evaluation of symlinks to symlinks or mountpoints

More extent handling improvements

Support drive letter mappings to \\afs\all

Do not add network provider registry values from the .INF file
2008-08-29 22:47:07 +00:00
Jeffrey Altman
3eb4b63bee KDFS-windows-afsrdr-header-20080829
LICENSE MIT

Add shutdown ioctl
2008-08-29 22:43:41 +00:00
Jeffrey Altman
7c07230484 KDFS-windows-afsrdr-makefile-20080829
LICENSE MIT

change the logic for copying the .INF file into the build area
2008-08-29 22:43:16 +00:00
Jeffrey Altman
9e68ab390a KDFS-windows-20080829
LICENSE MIT

Reorganize the shutdown order.  make sure that incoming requests stop
before the backend stops processing.
2008-08-29 22:42:11 +00:00
Jeffrey Altman
cf3364946a KDFS-windows-check-servers-20080828
LICENSE MIT

if the server count is zero, don't both trying


(cherry picked from commit 00fee5efee68f1647fa810dffa7ad991235d01c5)
2008-08-28 10:51:24 +00:00
Jeffrey Altman
1a4d5f6f9b KDFS-windows-20080827
LICENSE MIT

Add lock order validation for RDR lock

Add processing of extent recovery

Add makefile support for test directory

====================
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

Unit tests for afsd

====================
LICENSE MIT

define new ioctls
  IOCTL_AFS_RELEASE_FILE_EXTENTS_DONE
  IOCTL_AFS_NETWORK_STATUS
  IOCTL_AFS_VOLUME_STATUS

Add ExtentCount to AFSCacheFileInfo

Make the use of FileId instead of FileID consist

Add HeldExtentCount to AFSReleaseFileExtentsCB

====================
LICENSE BSD

Kernel Drivers drop 2.1.0.2

====================
LICENSE BSD

Code drop 2.1.0.2
2008-08-28 06:53:35 +00:00
Jeffrey Altman
57d2f0adcb KDFS-windows-check-server-heap-overwrite2-20080827
LICENSE MIT

the incorporation of nconns into the foo incremental was a mistake


(cherry picked from commit 43eb87a916b87c6037841ea38cde616014d892a8)
2008-08-28 00:45:58 +00:00
Jeffrey Altman
cc7014faeb KDFS-windows-check-server-heap-overwrite-20080827
LICENSE MIT

Protect against a heap overwrite that could occur is the number of file
servers or vldb servers grows while the maximum number of connections
is computed and when the connection list is populated.


(cherry picked from commit e68255c12c444e36b7ca7f1864d964cd3a0bcda8)
2008-08-27 23:11:48 +00:00
Jeffrey Altman
7ed3fc2b30 KDFS-windows-callback-lock-order-20080827
LICENSE MIT

do not hold cm_server_t mutex when calling cm_FindVolumeByID because
the cm_volume_t lock must be obtained ahead of the cm_server_t mutex


(cherry picked from commit 0affa4b86a08c3be9cb4edc4c9f680ae02a2fcd8)
2008-08-27 23:05:25 +00:00
Jeffrey Altman
731ca21201 KDFS-windows-lock-order-20080827
LICENSE MIT

do not hold cm_scacheLock while obtaining cm_scache_t->rw


(cherry picked from commit c50857b05e6636bef864c9418b21d1bf3c63494a)
2008-08-27 13:22:10 +00:00