Commit Graph

5331 Commits

Author SHA1 Message Date
Jeffrey Altman
a021b79556 windows-ioctl-make-submount-20080802
LICENSE MIT
FIXES 109951

Restore the ascii version of cm_NormalizeAfsPathAscii() so that it
can be used by cm_IoctlMakeSubmount().
2008-08-03 04:28:32 +00:00
Jeffrey Altman
1fbbaaa878 windows-afsconfig-header-20080802
LICENSE MIT

Enable Bos Restricted mode for Windows
2008-08-02 20:46:14 +00:00
Jeffrey Altman
cc8e39872e windows-smb-dir-search-20080802
LICENSE MIT

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.
2008-08-05 15:29:14 +00:00
Jeffrey Altman
b9e0ab9f5b windows-smb-dir-search-20080801
LICENSE MIT

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
2008-08-02 05:56:57 +00:00
Jeffrey Altman
807a9aa7b2 windows-scache-deadlock-20080801
LICENSE MIT

do not recycle a deleted scache object unless the refcount is 0
2008-08-01 22:35:06 +00:00
Jeffrey Altman
0c0b89e046 windows-smb-dumpvars-20080801
LICENSE MIT

When dumping the smb data structs, report flags in hex and
paths are now wchar_t strings.
2008-08-01 22:01:49 +00:00
Jeffrey Altman
005077a7e4 windows-smb-warnings-20080801
LICENSE MIT

cast away a number of compile time data size warnings
2008-08-01 14:36:54 +00:00
Jeffrey Altman
1f7ab13b6f windows-smb-vc-refcount-debugging-20080801
LICENSE MIT

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.
2008-08-01 14:30:21 +00:00
Jeffrey Altman
ebf66eff4b windows-smb-dead-vc-gc-on-head-20080801
LICENSE MIT

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.)
2008-08-01 14:14:50 +00:00
Jeffrey Altman
c38036761e windows-osilog-20080731
LICENSE MIT

increase the number of parms from 4 to 5 for osi_Log
2008-08-01 05:22:08 +00:00
Jeffrey Altman
91d1501be5 windows-ioctl-create-mount-point-validate-volume-20080731
LICENSE MIT

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".
2008-07-31 18:01:12 +00:00
Jeffrey Altman
14e516f1d5 windows-wix-custom-20080731
LICENSE MIT

in c++, arrays allocated with new[] must be deallocated with delete[]
2008-07-31 13:43:00 +00:00
Jeffrey Altman
a46b1879dc windows-handle-vl_badname-20080731
LICENSE MIT

Process VL_BADNAME so that when a user creates an mount point with
an invalid volume name we will do something sane.
2008-07-31 13:37:29 +00:00
Jeffrey Altman
b61ac7dc6f windows-volume-recycling-race-condition-20080731
LICENSE MIT

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.
2008-07-31 05:45:44 +00:00
Jeffrey Altman
aa24715f06 windows-buf-clean-error-handling-20080731
LICENSE MIT

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.
2008-07-31 05:39:29 +00:00
Jeffrey Altman
24fd571c52 windows-remove-unnecessary-malloc-include-20080731
LICENSE MIT

remove unnecessary #include <malloc.h>
2008-07-31 05:32:57 +00:00
Jeffrey Altman
8c22d2388a windows-stat-resource-files-20080730
LICENSE MIT

Add version resource info to xstat_cm_test.exe and xstat_fs_test.exe
2008-07-30 23:16:24 +00:00
Jeffrey Altman
34923419b3 viced-write-perm-grants-read-lock-20080730
LICENSE MIT

Remove extra return(EACCES) added by delta
viced-write-perm-grants-read-lock-20070423 on head and 1.5 branch.
2008-07-30 21:00:21 +00:00
Jeffrey Altman
8cce5d2a61 windows-buf-overquota-20080728
LICENSE MIT

propagate overquota errors through buf_Write() and cm_FSync().
2008-07-29 03:54:34 +00:00
Jeffrey Altman
b45b059ed9 windows-large-files-20080728
LICENSE MIT

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.
2008-07-28 23:57:24 +00:00
Hartmut Reuter
674e94b29c salvager-avoid-directory-issues-and-mark-volumes-busy-20080728
LICENSE IPL10
FIXES 107767

avoid corrupting length in vnodeds when salvaging directories.
avoid tag reuse leaving data behind (not verified)
avoid not marking something busy during salvage
2008-07-28 13:58:30 +00:00
Jeffrey Altman
eb1ff11bf1 windows-ioctl-prefix-data-20080726
LICENSE MIT

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.
2008-07-27 03:43:14 +00:00
Jeffrey Altman
61d1578324 windows-build-20080725
LICENSE MIT

update README-NT and src/ntbuild.bat build instructions.
2008-07-25 21:25:55 +00:00
Jeffrey Altman
ba846eb829 windows-nsis-vc-runtime-install-20080725
LICENSE MIT

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.
2008-07-25 20:43:36 +00:00
Jeffrey Altman
c10b26ca35 windows-buf-setdirty-20080724
LICENSE MIT

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.
2008-07-24 20:32:58 +00:00
Jeffrey Altman
0ca9a136a7 windows-cm-makedir-20080724
LICENSE MIT

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.
2008-07-24 18:54:53 +00:00
Jeffrey Altman
70bfb2c59b windows-cm-req-smb-20080723
LICENSE MIT

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.
2008-07-23 22:40:34 +00:00
Jeffrey Altman
8f75470349 windows-cm-rename-debugging-20080723
LICENSE MIT

Add some trace log statements to cm_Rename() that can be used for
debugging.
2008-07-23 22:24:51 +00:00
Jeffrey Altman
a9c00f2638 windows-btree-enum-20080723
LICENSE MIT

Fix next enum to return an invalid param error when beyond the end
of the list.
2008-07-23 22:19:19 +00:00
Jeffrey Altman
2ed0ee573c windows-volume-deadlock-20080722
LICENSE MIT

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.
2008-07-23 05:55:36 +00:00
Jeffrey Altman
5db162c8dc windows-build-system-20080722
LICENSE MIT

Move the man-pages build out of the 'install' step.
2008-07-22 16:01:22 +00:00
Jeffrey Altman
4437971563 windows-volume-vlgetaddrs-deadlock-20080721
LICENSE MIT

A missing tilde makes a huge difference.
2008-07-22 07:42:20 +00:00
Jeffrey Altman
b7398a8a50 windows-more-rxconnp-20080721
LICENSE MIT

convert additional 'connp' instances to 'rxconnp'

in cm_volume.c, make sure that we hold a reference to the rxconnp
whenever we use it to perform an RPC.
2008-07-21 21:55:06 +00:00
Jeffrey Altman
0172a6aa26 windows-cm_conn-20080721
LICENSE MIT

callp -> rxconnp
2008-07-21 19:34:05 +00:00
Jeffrey Altman
a92cd4ec76 windows-callp-to-rxcallp-20080721
LICENSE MIT

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.
2008-07-21 17:18:41 +00:00
Jeffrey Altman
ab1ddbe803 windows-smb-ioctl-setacl-20080721
LICENSE MIT

setacl does not support the options structure.  just call parse ioctl path.
bug introduced during ioctl refactoring.
2008-07-21 10:19:26 +00:00
Jeffrey Altman
ff0f4a5965 windows-volume-vlgetaddrs-deadlock-20080719
LICENSE MIT

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.
2008-07-19 15:47:40 +00:00
Russ Allbery
af5e519e8e always-wrap-vos-ctime-20080718
LICENSE MIT

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.
2008-07-19 07:41:06 +00:00
Russ Allbery
9682d4c107 kill-ubik-pthread-env-20080718
LICENSE BSD

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.
2008-07-19 07:11:05 +00:00
Jeffrey Altman
c797e08443 windows-volume-vlgetaddrs-deadlock-20080718
LICENSE MIT

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.
2008-07-19 06:58:02 +00:00
Russ Allbery
d3900e4f35 suppress-cellconfig-warnings-20080718
LICENSE BSD

Add a forward declaration for struct ktc_encryptionKey to suppress warnings
from cellconfig.h about declaring a struct in a prototype.
2008-07-19 06:44:49 +00:00
Russ Allbery
227f7e8eda more-no-unconditional-pthreaded-ubik-20080718
LICENSE BSD

More directories should be conditional on pthreaded ubik.
2008-07-19 06:42:23 +00:00
Russ Allbery
d811361ce9 no-unconditional-pthreaded-ubik-20080718
LICENSE BSD

Don't compile pthreaded Ubik by default and instead actually require the
--enable-pthreaded-ubik flag.
2008-07-19 04:27:33 +00:00
Simon Wilkinson
5bbdc3fb69 discon-prototype-correction-20080718
LICENSE IPL10

correct prototype for disconnected afs
2008-07-18 15:54:22 +00:00
Russ Allbery
8009b045aa man-page-fileserver-long-line-20080717
LICENSE BSD

Fix long line in the SYNOPSIS for the fileserver man page.
2008-07-18 07:14:12 +00:00
Russ Allbery
a8e8287b75 demand-attach-vos-install-location-20080717
LICENSE IPL10

In the tvolser case, install vos in ${afssrvsbindir}/vos, not
${afssrvlibexecdir}/vos.
2008-07-18 01:21:44 +00:00
Asanka Herath
24ac19c606 windows-nls-zero-length-input-20080716
LICENSE MIT

If the input to the string conversion files is zero length
return nul string instead of NULL.

Pass in -1 instead of computing the strlen.
2008-07-16 16:22:31 +00:00
Jeffrey Altman
6a749b71f7 windows-set-rx-dead-time-20080715
LICENSE MIT

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.
2008-07-16 05:43:06 +00:00
Derrick Brashear
4d7cfa1293 softsig-structure-handling-20080716
LICENSE IPL10

this is sort of a dumb ifdef. harmless, but fix it to be what it's supposed to
2008-07-16 05:25:09 +00:00
Derrick Brashear
b4ce530d36 volser-reclone-bring-online-before-giveback-20080716
LICENSE IPL10
FIXES 107258

when giving back a volume after reclone, make it inService to avoid a race
between callers and the SetFlags RPC
2008-07-16 05:15:44 +00:00