Commit Graph

282 Commits

Author SHA1 Message Date
Jeffrey Altman
6d6390338c Improve Windows Build System By Using MT-safe Versions of Libraries
For many years the Windows Build System has incorrectly mixed
some Pthread and LWP code.  One of the side effects of this
mixing was the need for the EXT2 extern macro definition in
src/rx/rx_globals.h which permitted the LWP compiled routines
to link with the Pthreaded afsrpc library.

This commit creates or modifies multi-threaded versions of various
libraries including mtafsubik.lib, mtafsutil.lib, mtafsvldb.lib,
and mtafsvol.lib.

All of the threaded servers now make use of these libraries.
This reduces the number of times that many source files were
recompiled for each server directory.

util_GetInt32 was defined in both src/util/volparse.c and
src/WINNT/afsd/fs_utils.c.  Now that mtafsutil.lib is being
used within src/WINNT/afsd there is no need to maintain the
duplicate copy.

The export list for afsauthent.def now includes all of the
ubik_PR_xxxx function variants and afsrpc.def now include
rxi_CallError as it is linked to outside the rx library.

The top-level NTMakefile has been modified to permit the
tree to build with the new header and library dependencies.

The threaded volserver which never built before now does.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/77
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Verified-by: Asanka Herath <asanka@secure-endpoints.com>
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-14 21:46:56 -06:00
Simon Wilkinson
86cfd23020 Remove unused variables in vol
Remove some unused variables and isolate items that are demand attach only

Reviewed-on: http://gerrit.openafs.org/71
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-13 11:46:06 -06:00
Simon Wilkinson
d58dc56d99 Add system headers
There are a number of places in the tree which are missing system
headers such as <unistd.h> <ctype.h> and <dirent.h>. Add these.

Reviewed-on: http://gerrit.openafs.org/62
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-12 17:49:32 -06:00
Marc Dionne
d46713d4bd Parallel make fixes
Fixes several problems with parallel makes in the current source:
- Add '+' prefix to many top-level Makefile commands. This informs make that
the following command should be treated as a sub-make and propagates the -jN
flag.
- Add a few missing dependencies
- Tweak some Makefiles that work with generated header files to prevent cases
where we attempt to use the file while it's being generated
- For the Linux kernel build, eliminate duplicated effort between COMPDIRS
and INSTDIRS, which also prevents conflict between the two in a
parallel situation.

FIXES 125031

Reviewed-on: http://gerrit.openafs.org/3
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-11 08:07:11 -06:00
Derrick Brashear
df87d886bb Update IRIX build issues
Refer to srcdir, not SYS, for syscall.s
Don't build fc_test for all (libsys doesn't exist yet)
Include needed header for Fd_t in xfs_size_check

Reviewed-on: http://gerrit.openafs.org/41
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-11 07:40:46 -06:00
Simon Wilkinson
ac3e0ed031 Rename printf cast helpers and clean up format string warnings
Some confusion had ensued about the usage of our printf cast helper
functions. Rename these to attempt to allay that confusion, and restore
the functions themselves to their original definitions.

Essentially, afs_printable_int32_ld() and friends are helpers to go
from afs specifc types to things that can be emitted by printf without
causing compiler warnings.

Also clean up some additional warnings from type mismatches between
escapes in printf format strings and the variables being printed.

Reviewed-on: http://gerrit.openafs.org/50
Verified-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Russ Allbery <rra@stanford.edu>
2009-07-10 18:28:02 -06:00
Jeffrey Altman
73cef96bb3 afs/vol_prototypes.h is a new public header file.
Add afs/vol_prototypes.h to src/vol/NTMakefile so
it will be installed in the public include directory.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/42
Verified-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-07-10 14:14:07 -06:00
Russ Allbery
8978e035ba Clean up uses of strcpy and strcat in src/vol/namei_ops.c
Replace all uses of strcpy and strcat in src/vol/namei_ops.c with either
strlcpy/strlcat or afs_snprintf as appropriate.

Reviewed-on: http://gerrit.openafs.org/29
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Verified-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 13:49:17 -06:00
Simon Wilkinson
6c6f9dce24 Tidy the vol directory
- Remove some further warnings from the vol directory
- Add volutil_PartitionName2_r to afsutil_prototypes.h
- Export vol_prototypes.h so it can be used elsewhere in the tree

Reviewed-on: http://gerrit.openafs.org/17
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Verified-by: Derrick Brashear <shadow@dementia.org>
2009-07-10 08:45:27 -06:00
Simon Wilkinson
3bb5fa5f1b Remove the RCSID macro
The move to git means that we can no longer populate the RCSID
macro in the way that it was used with CVS. This patch simply
removes the macro from every file, except where it contains
information from upstream (and it's in a comment).

Reviewed-on: http://gerrit.openafs.org/14
Verified-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-07-09 22:58:37 -06:00
Simon Wilkinson
d5081f264d Remove CVS ignore files
Now we're in git we don't need any cvsignore files any more...

Reviewed-on: http://gerrit.openafs.org/1
Verified-by: Derrick Brashear <shadow@gmail.com>
Reviewed-by: Derrick Brashear <shadow@gmail.com>
2009-07-06 11:03:16 -06:00
Simon Wilkinson
c41a467741 gitignore-20090615
LICENSE IPL10

make gitignore files
2009-06-15 23:29:29 +00:00
Derrick Brashear
a7f9ce9ce1 vnode-disk-object-name-hi-length-field-20090611
LICENSE IPL10

reserved6 is used for the high portion of the 64 bit length. make the
structure reflect it.
2009-06-11 20:39:53 +00:00
Andrew Deason
27cbb188bd dafs-create-volumes-online-20090611
LICENSE IPL10
FIXES 124492

newly created volumes were not marked "not in use" by the volserver, so the
fileserver would not take them. fix it.
2009-06-11 15:25:15 +00:00
Derrick Brashear
12e85227c5 background-fsync-consistency-issues-20090522
LICENSE IPL10
FIXES 124359

avoid either reopening closed vnodes and leaving cached descriptors around,
or discarding a reference we're not holding; instead, sync changes when the
fd is closed, and note such has been done; otherwise, no changes from older
code.
2009-05-22 17:00:26 +00:00
Mike Meffie
5958aa0c4b dafs-vol-offline-20090428
LICENSE IPL10
FIXES 124582

fix a logic error in the dafs vos offline support
2009-04-28 15:37:39 +00:00
Simon Wilkinson
4ced67ca98 vol-proto-do-not-break-dafs-20090326
LICENSE IPL10
FIXES 12540

Reenable prototype of VolumeExternalName_r for dafs
2009-03-26 23:42:03 +00:00
Hartmut Reuter
ba742892e2 volserver-split-volume-functionality-20090324
LICENSE IPL10
FIXES 124520

implement the server side of vos split
2009-03-24 13:36:23 +00:00
Derrick Brashear
71a73608b1 fssync-enum-syntax-20090324
LICENSE IPL10

no trailing comma
2009-03-24 12:43:05 +00:00
Derrick Brashear
63b0d495cf fd-t-definition-fun-20090323
LICENSE IPL10

make FD_t be defined everywhere we need it
2009-03-24 04:31:13 +00:00
Jeffrey Altman
a209012f1a vol-lock-fd-type-20090323
LICENSE IPL10

the lock_fd field of DiskPartition[64] is a file descriptor.
On Windows this is a HANDLE and on *nix platforms an int.
OpenAFS uses the FD_t type to provide platform specific type
info for file descriptors.  Use it for the lock_fd field and
the salvageLock in ObtainsSalvageLock().

Finally, the on the wire diskPartition[64] struct in volser/volint.xg
also contains a lock_fd field.  This is an on the wire field and
must be left at a fixed width of 32-bits.  Since a file descriptor
is not portable across machines we truncate the 64-bit HANDLE value
to fit in the 32-bit lock_fd field when necessary.
2009-03-23 22:47:36 +00:00
Jeffrey Altman
aa8d735b87 vol-fssync-server-socket-20090323
LICENSE IPL10

GetHandler() sets up a fdset and returns the max socket fd
which is used with select().  Windows ignores the numfd param
(first param) of select() and therefore computing the max fd
value is meaningless.  We can avoid a number of casts by
not attempting to treat this value as osi_socket.
2009-03-23 22:42:48 +00:00
Jeffrey Altman
c39d016155 volid-unsigned-int32-20090323
LICENSE IPL10
FIXES 124510

assume volume ids are always unsigned 32 bit values
2009-03-23 18:18:44 +00:00
Jeffrey Altman
73a57e8013 vol-fssync-server-socket-20090320
LICENSE IPL10

another location where we need osi_socket
2009-03-20 17:25:21 +00:00
Jeffrey Altman
0cd43484be vol-fssync-socket-20090320
LICENSE IPL10

the argument to the function parameter is a socket.  fix the type
to be osi_socket.
2009-03-20 12:15:01 +00:00
Derrick Brashear
57326151f5 prototyping-fallout-20090317
LICENSE IPL10

clean up to make prototyping code build everywhere
2009-03-17 15:10:23 +00:00
Jeffrey Altman
9fa77320ca vol-socket-abstraction-20090317
LICENSE IPL10

windows needs the abstraction for sockets
2009-03-17 04:49:35 +00:00
Derrick Brashear
3eec407510 fssync-abstract-fd-type-20090316
LICENSE IPL10

apparently 64 bit windows has 64 bit fds
2009-03-16 16:09:34 +00:00
Derrick Brashear
92cd63b0b7 vol-no-cast-macro-20090316
LICENSE IPL10

afs_cast_uint32 doesn't exist, not sure we need it
2009-03-16 14:41:22 +00:00
Simon Wilkinson
f28659bd82 vol-prototypes-20090316
LICENSE IPL10
FIXES 124252

prototype the vol directory
2009-03-16 13:11:42 +00:00
Simon Wilkinson
5bd86a09eb windows-64bit-printf-sanity-20090218
LICENSE IPL10
FIXES 124265

don't assume %lld works for 64 bit ints on windows
2009-02-18 17:48:39 +00:00
Jeffrey Altman
b9816e12f7 vclosevnodefiles-ihandle-leak-20090216
LICENSE IPL10
FIXES 124359

don't leak ihandles on close. this isn't a complete fix for the issue
2009-02-17 04:37:27 +00:00
Tom Keiser
ff795a12c5 dafs-vnode-close-race-20090129
LICENSE IPL10
FIXES 124223

address race between VCloseVnodeFiles_r and VGetFreeVnode_r
2009-01-29 17:06:41 +00:00
Mike Meffie
72d502be69 dafs-vol-offline-race-20090127
LICENSE IPL10
FIXES 124215

avoid race when taking volumes offline in dafs
2009-01-27 14:24:23 +00:00
Derrick Brashear
92cf4d996f volserver-manage-inuse-better-20090122
LICENSE IPL10
FIXES 124142

V_PEEK/V_SECRETLY should not change inUse. servertype based inUse should not
leak past giving back a volume.
2009-01-22 19:12:40 +00:00
Marc Dionne
f11480748c salvager-sensible-chdirlessness-20090122
LICENSE IPL10
FIXES 124154

make salvager look for and create headers in the right place.
2009-01-22 14:28:27 +00:00
Derrick Brashear
1f9467f9b7 eliminate-cplusplus-style-comments-20081209
LICENSE IPL10

aix compiler hates // style comments
2008-12-09 17:04:45 +00:00
Simon Wilkinson
deb20d02fb standard-header-includes-20081129
LICENSE IPL10

add missing standard headers
2008-11-29 18:15:40 +00:00
Steve McIntosh
0ac956b338 salvager-no-chdir-20081108
LICENSE IPL10
FIXES 123577

make sure salvager cores don't get left in vice partitions
2008-11-08 15:58:06 +00:00
Simon Wilkinson
fc78255c1d initialize-variables-to-avoid-logic-issues-20081027
LICENSE IPL10

make sure any variable whose value is used will be initialized before that
value is used. (these aren't just warnings)
2008-10-27 23:53:23 +00:00
Simon Wilkinson
f27165f137 kill-uninitialized-variable-warnings-20081026
LICENSE IPL10

kill lots of compiler warnings
2008-10-27 23:41:02 +00:00
Jeffrey Hutzelman
8b1b390713 volser-dumpstuff-log-errors-20081010
LICENSE IPL10
FIXES 121040

return sensible (ENOSPC) errors when out of tags or vnodes. don't perror. log
instead.
2008-10-10 15:42:10 +00:00
Steven Jenkins
1659861640 dafs-drop-volheaders-20080925
LICENSE IPL10
FIXES 117470

Under certain demand salvage scenarios, it is possible for a stale header
to remain cached with the needsSalvaged flag asserted. Although this will
not affect clients accessing the volume over afsint, it is an issue for
volser clients. VAttachVolumeByName in volser will always attempt to pull
the header over FSSYNC before doing a disk read, under the assumption that
a cached entry in the fileserver will be more current than what is on
disk. This patch causes the fileserver to aggresively invalidate disk
header cache entries when a salvage is in-progress.
2008-09-25 08:50:01 +00:00
Simon Wilkinson
af4d05c3a4 generic-inline-20080924
LICENSE IPL10

move static_inline macro to generic location
2008-09-24 22:34:19 +00:00
Dragos Tatulea
433afd4779 disconnected-rw-20080922
LICENSE IPL10
FIXES 114605 114606 114607

add read-write disconnected support
2008-09-22 14:36:16 +00:00
Rainer Toebbicke
e5bf9b91ea salvager-dont-corrupt-dir-lengths-20080812
LICENSE IPL10
FIXES 111585

make the int64 macros work when the "64 bit" number to fill isn't.
use the correct variable type for length in salvager
2008-08-14 00:44:16 +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
Tom Keiser
f52f152236 dafs-update-exclusive-states-20080710
LICENSE IPL10

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
2008-07-10 19:14:40 +00:00
Jeffrey Altman
65bf7cdb6d windows-code-signing-20080702
LICENSE MIT

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.
2008-07-02 13:41:07 +00:00
Tom Keiser
a7b33b55bb dafs-updates-20080612
LICENSE IPL10

pending changes from tom to avoid a deadlock issue
2008-06-12 20:12:06 +00:00