Commit Graph

6281 Commits

Author SHA1 Message Date
Derrick Brashear
ea78369ab6 afs_FindService should handle iana portnames
right now we compare against /etc/services, and a hardcoded array.
but since there's no guarantee /etc/services will be useful, this
can mean inconsistent behavior. hardcode the iana names in the table,
and take the internal structure used private at the same time.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/577
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-06 11:23:06 -07:00
Hartmut Reuter
e5cf14ba04 New option '-cmd' for 'fs listacl'
prints 'fs setacl' commands necessary to create the current
ACLs. This is useful for backup scripts using TSM (or others)
to save the ACLs into a file to allow for later restore.

Reviewed-on: http://gerrit.openafs.org/556
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-06 05:29:36 -07:00
Simon Wilkinson
f7d601eefa Use standard Linux paths for all headers
As we're being built by the standard Linux module build system, we
can use the normal #include <linux/blah.h> convention from including
kernel headers.

Reviewed-on: http://gerrit.openafs.org/582
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-05 13:22:31 -07:00
Claudio Bisegni
f8cf2a44ab OSX Launchd Startup Manage with Preference Pane
OpenAFS preference pane has been updated to manage the new launchd startup mode. Has been delete the custom startup and shutdown file now is user the /Library/OpenAFS/Tools/root.client/usr/vice/etc/afs.rc

OpenAFS.postinstall has been modified to remove the old existing /Library/StartupItems/OpenAFS directory
OpenAFS.pre_upgrade has been modified to shutdown daemon, if it is runnig, and remove the old preference pane to permit the one to be installed

Reviewed-on: http://gerrit.openafs.org/578
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-05 05:04:55 -07:00
Hartmut Reuter
4e3d3d5049 afsio is a command to pipe data into or out of afs files
afsio bypasses the cache manager to achieve higher throughput.
However, it uses the cache manager to stat or create files over the
AFS path.

Besides 'apropos' and 'help' there are 3 subcommands:

'write'	pipes data into a new or empty AFS file

'append' pipes data at the end of an existing AFS file

'read' pipes data out of an AFS file

for 'write' there is an option '-md5' which calculates on the fly
the md5 chscksum and prints it to stdout. (Useful when you create
long time archives to keep it separately for later ...)

for 'write' there is also an option '-synthesize <size>' to do just
performance tests. It creates a file which contains at the
begin of each 4 KB block the offset printed in ascii.

for all subcommands exists a '-verbose' option which writes to
stderr data rate and timing information.

All three subcommands may also be used prefixed with 'fid' accepting
then a Fid instead of an AFS path. With the 'fid' prefix also a '-cell'
option is allowed.

Reviewed-on: http://gerrit.openafs.org/555
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-05 02:14:34 -07:00
Marc Dionne
db23268f68 Linux: 2.6.32 - Adapt to writeback changes
Adapt to the writeback changes in kernel 2.6.32
- Since we define our own backing_dev, it needs to be registered with
the writeback code and attached to the super_block.  Otherwise it
might get ignored when writeback is needed.
- Each backing_dev now gets its own kernel thread.  The name of the
thread is based on the registered name - the openafs one will appear
as "flush-afs".

Reviewed-on: http://gerrit.openafs.org/574
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-04 11:34:01 -07:00
Marc Dionne
fa8766d220 rxfs_storePadd: return 0 on success
On success, storePadd should return 0, not the number of bytes
written by the last rx_Write call.  In some cases this return
value would leak all the way out to the close() system call,
causing it to fail.

Reviewed-on: http://gerrit.openafs.org/573
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-04 11:29:55 -07:00
Simon Wilkinson
6d9ad2e4d0 Refactor linux readpage support
The readpage call on Linux was becoming horribly complex.

This patch refactors it into three main components - a function which
fills a locked page (without unlocking it), a function which triggers
a cache bypass operation on a page, and a function which does
conditional prefetch, based on the properties of the page that was just
read.

In addition, we abstract out the cache bypass code further, and provide
static inline variants which are simply stubbed out when cache bypass is
disabled.

Reviewed-on: http://gerrit.openafs.org/569
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-03 16:19:21 -07:00
Simon Wilkinson
3e164335af Rationalise some #ifdefs in the LINUX osi layer
Introduce osi_compat.h, a place to hide compatibility #ifdefs. Make
a start on using this by purging #ifdefs from osi_vnodeops, and pushing
changes into inline compatibility functions.

The general idea here is to create a single location where we can do our
multiple version compatibility magic, and by doing so reduce the
complexity of the rest of the code. The approach is that where the
kernel introduces a new interface, we should switch to using it in the
rest of the code, and add a compatibility function (in osi_compat.h)
which implements the new interface in terms of the old one, suitably
protected by #ifdefs.

Where an interface changes signature, but not name, we should implement
an afs_<blah> version of the function which has the signature of the
newest version, and within that call out to the real kernel versions,
mapping between the different parameters as appropriate.

Reviewed-on: http://gerrit.openafs.org/568
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-03 16:18:42 -07:00
Simon Wilkinson
109927bf6f Remove pre-Linux 2.6 support
This change removes support for kernels before Linux 2.6.0 from
src/afs/LINUX. Older kernels should be supported by the src/afs/LINUX24
code.

Reviewed-on: http://gerrit.openafs.org/567
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-03 16:18:07 -07:00
Derrick Brashear
b7cc8bf285 create LINUX24 directory
shadow src/afs/LINUX into .../LINUX24, removing 2.6 code from it
same for rx/LINUX

cheat and simply modify MKAFS_OSTYPE in MakefileProto.LINUX.in

Reviewed-on: http://gerrit.openafs.org/565
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-03 16:17:49 -07:00
Simon Wilkinson
2ea379b9f9 There can be only one ... MD5
The cache manager has two implementations of md5 - one in afs_md5.c
(used by afs_NewCell) and one in afs_util.c - used by Linux's MD5-inode
code.

Remove the one in afs_util.c in favour of using the common
implementation in afs_md5.c

Reviewed-on: http://gerrit.openafs.org/572
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-03 16:17:28 -07:00
Derrick Brashear
69290ffe94 launchdaemon support for MacOS
the changes needed to switch from a StartupItem to a LaunchDaemon for
the MacOS OpenAFS client

Reviewed-on: http://gerrit.openafs.org/564
Tested-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Claudio Bisegni <Claudio.Bisegni@lnf.infn.it>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-02 22:36:20 -07:00
Simon Wilkinson
d192fec670 Remove page past end of file optimisations
The kernel checks itself for read() calls which attempt to fetch
pages past the current file extents. Remove ours.

Reviewed-on: http://gerrit.openafs.org/566
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-01 13:39:30 -07:00
Andrew Deason
031f5eb528 DAFS: Wait until preattach to service FSSYNC reqs
Make FSYNC_sync wait until VInit == 2 before serving FSSYNC requests.
This follows the existing similar behavior of waiting until after volume
preattachment is completed before serving RPC requests in DAFS. This
prevents FSSYNC clients from being denied requests simply due to a
volume not having been preattached yet, at the small cost of delaying
how soon we can serve FSSYNC requests.

This does not alter the behavior of non-DAFS, which still only waits
until VInit == 1, since volume attachment takes significantly longer
than preattachment.

Reviewed-on: http://gerrit.openafs.org/563
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-01 01:49:53 -07:00
Andrew Deason
d88c03492d DAFS: Avoid volserver segfault in GetVolInfo
It is possible for GetVolObject to return success, but result in a NULL
fs_tv. In particular, when the fileserver responds with FSYNC_WRONG_PART
or FSYNC_UNKNOWN_VOLID. It is possible, though difficult, for the
fileserver to respond with FSYNC_UNKNOWN_VOLID if the requested volume
hasn't been preattached on the fileserver yet.

So, in GetVolInfo, also check fs_tv, so we don't try to dereference it
later.

Reviewed-on: http://gerrit.openafs.org/562
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-30 15:08:12 -07:00
Jeffrey Altman
b5c4dbf861 Windows version 1.5.65
Reviewed-on: http://gerrit.openafs.org/560
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-30 14:35:46 -07:00
Derrick Brashear
1937eadfda openafs 1.5.65
make openafs 1.5.65 for unix

Reviewed-on: http://gerrit.openafs.org/561
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-30 14:35:21 -07:00
Jeffrey Altman
75dbaa82cd Windows: change log for 1.5.65
LICENSE: MIT
Reviewed-on: http://gerrit.openafs.org/559
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-30 14:35:03 -07:00
Simon Wilkinson
d5b40d99a9 Add configure test for pagevec_lru_add_file
pagevec_lru_add_file isn't available on all Linux kernels.
Fallback to using pagevec_lru_add where necessary.

Reviewed-on: http://gerrit.openafs.org/558
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-30 10:38:23 -07:00
Tom Keiser
2f270a3e92 make VOL_STATE_VLRU_ADD exclusive
VLRU_Add_r() places a volume into VOL_STATE_VLRU_ADD before
calling VLRU_Wait_r(), which drops VOL_LOCK while waiting
for the required VLRU queue to quiesce.  Thus, it is essential
that state VOL_STATE_VLRU_ADD be marked exclusive so that
another thread cannot mutate state until the VLRU generation
add transaction completes.

Reviewed-on: http://gerrit.openafs.org/554
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-30 02:43:32 -07:00
Jeffrey Altman
06520711cb Windows: short circuit background volume checks for shutdown
If the service is shutting down or the machine is entering
a suspend state, short circuit the background volume checks
to permit faster shutdown.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/552
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Asanka Herath <asanka@secure-endpoints.com>
Tested-by: Asanka Herath <asanka@secure-endpoints.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-29 14:18:30 -07:00
Simon Wilkinson
af9c9d905a Add support for background page copies
LICENSE BSD

This patch adds support for backgrounding the page copies which are
caused by a call to readpages() In theory, this should improve the
throughput of the AFS kernel module as it permits processes to start
work whilst data is still being read into the page cache for later
pages.

Reviewed-on: http://gerrit.openafs.org/537
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:13:04 -07:00
Simon Wilkinson
f75d84c404 Add support for blocking readahead
This patchset adds support for the readpages() system call, and enables
readahead on Linux. At the moment each page read causes readpages to
block, so the client won't see much benefit from readahead, beyond the
reduction in call overhead.

Reviewed-on: http://gerrit.openafs.org/536
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:12:26 -07:00
Simon Wilkinson
f5c55d23a2 Demand attach warning fixes
Fix a whole host of warnings in the demand attach code.

Make a broken tvolser build stop the build, rather than carrying on
regardless.

Reviewed-on: http://gerrit.openafs.org/551
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:11:37 -07:00
Simon Wilkinson
36700b51b3 Don't use volatile when it makes no sense
The demand attach code defines volume pointers as volatile in
a number of places, despite the fact that the values in question
aren't being shared between multiple threads. It then also passes
these volatile pointers into functions which don't treat them as
volatile (and even to some which assign them to registers).

This patch simply removes the use of volatile in this situation.

Reviewed-on: http://gerrit.openafs.org/550
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:10:45 -07:00
Derrick Brashear
ca8890245b intptr fallout
some kernels don't have e.g. uintptr_t; revert this hunk for now.
also, autoconf as recent as what's in rhel5 has no macros. provide
some.

Reviewed-on: http://gerrit.openafs.org/553
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:10:08 -07:00
Simon Wilkinson
88a037585d Use readpage, not read for fastpath access
Modify the fast path case so that it uses readpage(), rather than read()
to access data in the cache. This removes a lot of the hidden, uncessary
work that the kernel was doing behind the scenes, and takes advantage of
the fact that we know a page read will always result in a page read
against the backing cache.

Reviewed-on: http://gerrit.openafs.org/535
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:09:32 -07:00
Derrick Brashear
c4bffd7efb irix compile fixes
fix compilation for irix (and warning for solaris) for icreate
as well as more stdint.h fixes

Reviewed-on: http://gerrit.openafs.org/548
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 12:07:59 -07:00
Jeffrey Altman
e0bbecf269 Windows: Trace log smb_FindFID errors
To assist with debugging, add consistent trace log messages for
smb operations that generate an error because smb_FindFID failed.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/545
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-29 05:29:06 -07:00
Claudio Bisegni
d9d3902894 OS Preference pane clean for final version
Has been removed from license file the reference to menucracker for hack NSMenuExtra, that is no more needed.

Reviewed-on: http://gerrit.openafs.org/547
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-29 01:14:40 -07:00
Jeffrey Altman
45e98a4455 Windows: cm_GetBuffer does not need to contact file server when extended a file
If cm_GetBuffer is being called in order to obtain a buffer to store
data beyond the end of the existing file as known to the file server
there is no reason to contact the file server.  Instead use the cached
status info in order to allocate a new buffer zero initialized.

This logic avoids triggering the FetchData bug in all file servers
older than 1.4.12 and 1.5.65 in which the file server returns a
large negative number (filesize - requested_offset) when a FetchData
is received where the requested_offset is larger than the filesize.
It also avoids unnecessary work.

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/542
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-28 10:30:27 -07:00
Jeffrey Altman
50e98677ca Windows: Directories do not have a default stream
When enumerating streams for objects, do not offer a default stream
for directory objects (including mount points).

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/544
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-09-28 10:30:04 -07:00
Andrew Deason
fee0efedc1 Formatting typo in vos_setfields manpage
The POD formatting code for bold is B, not b.

Reviewed-on: http://gerrit.openafs.org/546
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 08:25:25 -07:00
Simon Wilkinson
1580434163 Don't try to print the thread ID
pthread_t is defined as being opaque - there's no way to portably
print it on a way that makes sense on all platforms. Remove this output.

Reviewed-on: http://gerrit.openafs.org/541
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 08:12:32 -07:00
Simon Wilkinson
4f65bec3fc Fix warnings in new dumptag code
3f2dd80697 contained a number of
new warnings. This patch fixes them.

It also adds the AFS_UNUSED_FUNCTION macro which can be used to
portably mark functions as unused.

Reviewed-on: http://gerrit.openafs.org/543
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 07:52:35 -07:00
Simon Wilkinson
6d628bbb7c Squash more viced warnings
Get rid of more warnings in viced
  - Cast fids that we pass into the Dir package to avoid type warnings
  - Add ()s to a && b || c, to clarify its meaning - (a && b ) || c
  - Don't use %ld to print ints
  - Prototype another function from the host package

Reviewed-on: http://gerrit.openafs.org/539
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 07:10:46 -07:00
Derrick Brashear
e287f72e4e irix UCRED is already a struct
just like everywhere else. move the one last
struct UCRED to UCRED like everywhere else

Reviewed-on: http://gerrit.openafs.org/538
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 06:56:01 -07:00
Simon Wilkinson
0ec76649b6 Minimise crref() and add a fastpath for cache hits
Reduce the number of times we cref() unnecessarily, and add a fastpath
at the beginning of readpage() to handle the cache hit case.

Refactor the Linux implementation of afs_open to provide a directly
callable version that bypasses the OSI layer.

Add a non-blocking variant of ObtainReadLock()

Reviewed-on: http://gerrit.openafs.org/534
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 06:43:37 -07:00
Derrick Brashear
be34175e0f macos 10.6 warning fixes
due to 32/64 and a newer compiler, macos 10.6 finds more warnings.
these are fixes for some of them.

Reviewed-on: http://gerrit.openafs.org/533
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 06:39:20 -07:00
Derrick Brashear
f63a8662a7 kauth should use static_inline for irix et al
"static inline" doesn't work on various still-supported systems.
use the workaround macro

Reviewed-on: http://gerrit.openafs.org/532
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 05:11:50 -07:00
Simon Wilkinson
efe8258a92 Use configured compiler for libuafs on Darwin
There's no need to hardcode 'cc' for libuafs builds on Darwin. Let
the user specify the compiler to use, in the same way as for the
rest of the tree.

Reviewed-on: http://gerrit.openafs.org/531
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 05:00:26 -07:00
Simon Wilkinson
6d51ebd6c8 Add support for warning checked builds
This patch adds a '--enable-checking' configuration option. When this
option is supplied, and gcc is in use, the compiler will treat any
warnings as errors. This will hopefully help stop new warnings from
creeping into the tree.

In order to still be able to build, all of the currently existing
warnings are accepted (these are documented in README.WARNINGS). With
this set of warning inhibitions, the tree is known to build on 32bit
Leopard - other systems may vary. Warning inhibition may be disabled
by supplying --enable-checking=all - in this case the tree will
definitely not build!

If --enabled-checking is not specified, the existing compilation
behaviour is maintained, so there is no user-visible change.

Gcc 4.2, or later, is required to use the pragma sets contained within
this patch. Again, they are not visible unless --enable-checking is
given.

Reviewed-on: http://gerrit.openafs.org/526
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 05:00:04 -07:00
Derrick Brashear
5afd2c3469 conditionalize stdint.h inclusion in lwp
Irix has no stdint.h; wrap in ifdefs so we don't include
when we don't have it.

Reviewed-on: http://gerrit.openafs.org/530
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 04:55:24 -07:00
Derrick Brashear
5d3400f4e1 afsmonitor warnings fix
again, add missing format strings to *printf to
eliminate warnings

Reviewed-on: http://gerrit.openafs.org/529
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 04:55:11 -07:00
Derrick Brashear
9ee76d8a8f kill cnvldb warnings
previously we used fprintf without a format string in some cases. now we don't

Reviewed-on: http://gerrit.openafs.org/528
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 04:36:13 -07:00
Hartmut Reuter
3f2dd80697 Implementation of new dump tag and length standard
The implementation follows the specification from October 2007.

All old tags are accecpted as before.
New tags 0x06-0x60 (capital letters) are followed by a 1 byte length
field which may contain directly the length (up to 127) or the length
of the then following length field (max 8) ored with 0x80.
New tags 0x61-0x77a are directly followed by 4 bytes building a 32bit
integer.
0x7b-0xf are single-byte tags, 0x7e meaning next tag is critical.

On this basis unknown tags can be skipped unless they were marked
critical. In this case the restore is aborted.

in dump.h tags following the new standard are marked by an asterisk

Last update: added parameter types for HandleUnknownTag.

Reviewed-on: http://gerrit.openafs.org/191
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 02:59:14 -07:00
Simon Wilkinson
9a82cdae42 Avoid redefinition errors for AFS_NONFSTRANS
Some parts of the build provide -DAFS_NONFSTRANS on the command line.
This causes an error when the 'param' file redefines it. Fix this
by #undef ing the token before defining it.

Reviewed-on: http://gerrit.openafs.org/510
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 02:57:44 -07:00
Marc Dionne
d7b00d5f19 Use intptr_t and uintptr_t for integer/pointer conversions
Use intptr_t and uintptr_t casts to appease the compiler when
values are converted between 32-bit integers and pointers.
This generates many warnings (currently ~170 on linux amd64)
when pointers are 64-bit.

These types are normally defined in stdint.h, and get defined
by autoconf if that's not the case.

In a few places, NULL is simply replaced with 0 where compared
with an integer.

Reviewed-on: http://gerrit.openafs.org/474
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 02:40:48 -07:00
Simon Wilkinson
01aa705514 Make butc logging use va_args
Change the logging functions in butc so that they use va_args. This
means that we can prototype the logging functions, and kill a bunch
more compiler warnings.

Reviewed-on: http://gerrit.openafs.org/509
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-09-28 01:59:25 -07:00