Do not permit GetAccessRights() to be called multiple times within
cm_SyncOp for the same rights check. If the GetAccessRights() succeeded
and in the next loop the rights check fails, the user simply doesn't
have the rights.
Move a call to cm_SyncOpDone(FETCHSTATUS) from GetBuffer() to MergeStatus().
Anytime an RPC completes successfully we get updated status info for
the object. Might as well allow threads waiting for status info to us
it.
Apply the bulk stat improvements to smb_ApplyDirListPatches() and
smb_ReceiveCoreSearchDir() for consistency even though
smb_ReceiveCoreSearchDir() is no longer called by any of the platforms
we support.
====================
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
Only return 50 items at a time to the caller.
Do not apply patches based on buffer boundaries. Instead
apply patches when AFSCBMAX entries are ready to be processed
in order to minimize the number of RPCs.
minimize the number of RPCs sent to the file server. only request
status for objects that we are actually reporting on and only if
we do not already have status for the object
and then make sure that we return as much as we can at once but
not so much that it exceeds the RDR timeout
define DEBUG_SMB_REFCOUNT in smb.h to activate refcount debugging
versions of the functions that log the file and line number as
well as object and refcount. This is for use in debugging refcount
leaks.
rename GetPacket and GetNCB to smb_GetPacket and smb_GetNCB, etc.,
to enforce the name space. Do not confuse with similar Win32 API
functions.
restructure some code that refers to smb_vc_t references in order
to clarify where the refcount is dropped.
deltas windows-smb-dead-vc-gc-20080627 and
windows-dead-vc-cleanup-take-two-20080703 attempted to
protect against an infinite recursion when cleaning up
dead smb virtual circuits. they failed to address the
incrementing of the vc refcount in smb_ReleaseVCInternal
when it is about to call smb_CleanupDeadVC. If the vc
is already being cleaned, then smb_ReleaseVCInternal
should not increment the refCount and should not call
smb_CleanupDeadVC.
(This commit was committed incorrectly to the 1-5
branch first. delta name on the head was modified
to avoid the delta name collision.)
validate the specified volume to make sure it exists before permitting
the mount point to be created. This will catch many instances in which
the user swaps the parameters to "fs mkmount".
When recycling cm_volume_t objects, avoid a race condition that could
result in the same cm_volume_t object being recycling simultaneously
in two threads. The end result would be a reference count miscount
and an undercount assertion being thrown.
When an error such as access denied, out of space, out of quota,
invalid fid, etc. is received while writing a dirty buffer to the
file server, apply that error code to all outstanding dirty buffers
immediately instead of attempting to write each buffer to the file
server only to obtain the same error.
as part of the restructuring of code to separate the smb layer
from the cm layer, large file support was broken. Define AFS_LARGEFILES
in the right place so that it will be used in the cm.
avoid corrupting length in vnodeds when salvaging directories.
avoid tag reuse leaving data behind (not verified)
avoid not marking something busy during salvage
The ioctl-prefix-data can be accessed either via a char_t or a wchar_t.
Copy the data buffer with memcpy() and not strcpy() because we need to
copy the entire string if it happens to be Unicode.
The NSIS installer was building a msi for the vc runtime that included
the Debug merge modules when the Retail merge modules should have been
used instead.
Everytime the CM_BUF_DIRTY flag is set on a cm_buf_t, the userp field
on the cm_buf_t must also be set. Add a cm_user_t parameter to buf_SetDirty()
so that each function that calls it doesn't have to manually set the
last write user. This improves code readability and the abstraction layering.
Extend the cm_MakeDir() function signature to permit the (optional)
return of the cm_scache_t object that was created by the operation
in the same way that cm_Create() does.
Make the return of the cm_scache_t by cm_Create() optional although
it is never used that way.
In both cm_Create() and cm_MakeDir() avoid releasing the cm_scache_t
object until we are actually finished with it.
Add smb_InitReq() calls cm_InitReq() and then sets the new
CM_REQ_SOURCE_SMB flag. When this flag is set, the source of the
request is known to be the SMB interface. This flag will not be
set on requests generated by the various background daemons.
When updating the volume location information, if a new server must
be allocated and the server is down, then it is possible for a deadlock
to occur on the cm_volume_t rw lock. Prevent that from happening.
There has been long time confusion in the windows cache manager because
there are cm_conn object ptrs call connp and rx_connection object ptrs
call connp and rx_call object ptrs called callp and rx_connection object
ptrs called callp.
From now on, rxconnp is a ptr to an rx_connection object;
rxcallp is a ptr to an rx_call object; and connp is a ptr to an
cm_conn object.
During cm_InitVolume() clear CM_VOLUMEFLAG_UPDATING_VL if we are reusing
the cache data just in case.
In cm_UpdateVolumeLocation() add trace logging to the sleeping, waking,
and awaking states; move the destruction of the old server list into
the region protected by the CM_VOLUMEFLAG_UPDATING_VL flag.
When calling ctime on an afs_int32, always use a wrapper that assigns the
variable to a time_t before passing it in rather than conditionally doing
so on hosts with a large time_t. This eliminates a configure test,
removes a bunch of warnings in vos.c on platforms with 32-bit time_t, and
will make no difference in generated code with any decent compiler.
Everywhere AFS_PTHREAD_ENV was defined, UBIK_PTHREAD_ENV was defined as
well, so don't make them separate. Building pthreaded Ubik is controlled
by deciding whether to build the t* versions of various directories, not
by the preprocessor directives. AFS_PTHREAD_ENV is only defined when
building in those directories.
This change eliminates UBIK_PTHREAD_ENV and uses AFS_PTHREAD_ENV to mean
the same thing.
As a side effect, fixes compiles on arm with --enable-pthreaded-ubik, since
arm never defined UBIK_PTHREAD_ENV.
If during volume location updating, the VL_GetAddrsU call fails for any
of the identified servers, return an error but do so without leaking
memory or deadlocking other threads that might be waiting.
No longer set the rx_SetConnDeadTime and rx_SetConnHardDeadTime to
the remaining request SMB RDR timeout within cm_ConnByMServers().
There are not per-call timeouts so simultaneous requests on the same
connection will race with each other either resulting in premature
timeouts or significantly extended timeouts.
The volume state is perfectly consistent. FSYNC_NEEDVOLUME (and the
other state in the pending_vol_op object) is perfectly normal -- it
simply means the volser has exclusive access to the volume for the
purposes of cloning. The bug is that during the DAFS development, I
changed the semantics of the VGetVolume interface without updating the
control logic in afsfileprocs accordingly:
In 1_4_x:
vp->specialstatus != 0 results in returning vp with nUsers incremented
and *ec = vp->sepcialstatus
In DAFS:
V_AttachState(vp) == VOL_STATE_UNATTACHED results in returning a NULL
vp. Since (vp->specialstatus != 0), *ec = vp->specialstatus.
The net result is we need to modify the VBUSY logic in CheckVnode().
Refactor cm_TryBulkStat() to permit BulkStat RPCs to be executed
for lists of entries obtained either from the cm_dir structures
or a btree enumeration. Add cm_BPlusDirEnumBulkStat() which
takes an enumeration object and performs a bulk status rpc on
every entry in the enumeration without advancing the enumeration
state.
- Add documentation of (nearly) all of the configure options.
- Update the platform list to reflect current reality.
- Update the HP-UX header download instructions for the current web site.
- Fiddle with formatting and wording in a few places.
Use AS_HELP_STRING for every AC_ARG_WITH invokation and add proper quoting
to all of them. Based heavily on a patch by Simon Wilkinson, but with
less indentation and more quoting.
Pod::Simple::Search ignores every POD file that doesn't "look right," which
means it skips files containing a period (like krb.conf.pod) unless you set
a search option. Pod::Simple::HTMLBatch has no way to set search options.
====================
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 BSD
FIXES 104110
remove discussion of max partition size now that 1.5 has a limit of 2^64 KB.
add discussion of techinical nature of fs minidump on windows.
====================
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 BSD
FIXES 86677
Ensure that the cm_req_t object is allocated and initialized at the
SMB layer for all incoming requests. This is done for two reasons:
1. ensure that request start time is consistent across the lifetime
of the request
2. permit the request object to be used to carry a flag indicating
the source of the request. This will permit different timeout
algorithms to be used for SMB vs RDR in the future.
Add support for dynamically determining which ddk include
path should be used. The NTDDKDIR variable used to be set
to the specific directory in which netcfgx.h was located.
Now it is set to the top-level of the DDK install tree.
The specific directory that contains netcfgx.h varies based
upon whether the DDK is 3790.1830 or 6000. Test for file
existence and specify the one that works.
VOL_STATE_SALVSYNC_REQ is a mutally exclusive state. don't allow other things
to attempt to trigger that state when an exclusive state is already present
Add code signing with signtool.exe to the build process.
If all three of the required CODESIGN_xxxx environment
variables are defined, signtool will be used to sign each
exe, dll, and installer as they are built.
The three environment variables are:
CODESIGN_DESC = <description of application>
CODESIGN_TIMESTAMP = <url of certificate authority timestamp server>
CODESIGN_URL = <end user help URL>
The default signing certificate is the one that will be used by
signtool. If these environment variables are not defined, code
signing will be skipped.
Add --with-linux-kernel-packaging configure flag which disables building
multiple kernels for different MP flavors, sets the kernel module name to
openafs.ko with no version, and installs the modules into the standard
Linux location.
Use PATH_CPP instead of CPP everywhere and always redirect the output
instead of assuming that it will write to a file. Hopefully this is the
least common denominator across all systems, although it still isn't
fully correct for systems that have no separate cpp binary.
- The exportfs code is updated for the new export ops. The changes are made
conditional on a new configure test that detects the new ops. fh_to_dentry()
basically replaces decode_fh and uses our own get_dentry function instead of the
now defunct find_exported_dentry.
- A check for fh_len=4 is removed - in testing this value is always 6, possibly
because of changes in the kernel code.
- The check for authtab in osi_nfssrv.c assumes that an undefined weak symbol is
0. On my system, an unresolved weak symbol in a loaded module gets the value
0xfffffffe (-2 or -ENOENT) - again, probably a change on the kernel side. Check
that the pointer is not an error constant using IS_ERR().
- In osi_vfsops.c, only use the export_ops bits if building the translator
afspag: the problem here was dealing with unresolved symbols
- afs_showflags is redefined in afs_pag_call.c so it's available for the afspag
module
- A new source file afs_warn.c gets the afs_warn* functions from afs_util.c.
This allows the afspag module to get the afs_warnuser function without dragging
in too many symbols. The new file is attached separately.
other:
- d_path() now takes a struct path argument - includes a new configure test
- osi_vfsmnt -> osi_vfsmount in osi_misc.c Looked like a typo?
- reorder the remove_proc_entry() calls - we need to remove the children before
the parent (introduced with my earlier patch)
When probing in configure for cpp, use the user's PATH first and then
the /lib and /usr/ccs/lib directories. Set PATH_CPP instead of CPP,
since the latter is just overwritten by Autoconf. Use PATH_CPP by
preference in rxgen and when pre-processing assembly, since otherwise
newer gcc will treat the input file as linker input and not do anything
with it. Don't assume that cpp writes to the second argument; gcc
apparently doesn't always do this. Instead, redirect standard output.
Fix a disconnected-mode merge conflict with an older import of disconnected
to HEAD that caused a duplicate definition of PDiscon. I believe this
problem was only on HEAD.
Use the correct subcommand name (fs getacl instead of fs_getacl) on the
HTML index page, even though we have to use the underscore in the NAME
section of the actual POD documentation.
Use undef in the arch-specific param file to override UCONTEXT rather
than adding a conditional in a generic file, making arm work the same
as 32-bit SPARC. Disable UCONTEXT on parisc as well; glibc doesn't
provide the ucontext functions on that architecture.