8926 Commits

Author SHA1 Message Date
Simon Wilkinson
1426bccc05 src/tests: Fix a couple of build issues
Fix a couple of build problems with the old src/tests directory.
Firstly, now that we're using asnprintf in libauth, we need to include
libroken as a dependency here too.
Secondly, the build rule for dumptool is wrong. Fix it.

Change-Id: I2d9e2db169c617a323c71ac837045d2f36331321
Reviewed-on: http://gerrit.openafs.org/4805
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-05 19:55:30 -07:00
Simon Wilkinson
51f079e178 rx: Make private things private
Make rxi_* functions that are only used within the file that they're
defined in actually be private, rather than sharing them with the world.

Change-Id: I67b9a36e8ce3fa0d3258842a8d7a5fed31c787ce
Reviewed-on: http://gerrit.openafs.org/4804
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-05 18:50:03 -07:00
Simon Wilkinson
80b3648e6d rxperf: -S takes an argument
The -S option to rxperf (which permits the maximum number of server
threads to be set) takes a parameter. Update the getopt string so
that we can give it one.

Change-Id: I7effc276743d7007f8a376534b4de1650f731b64
Reviewed-on: http://gerrit.openafs.org/4801
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-05 16:17:04 -07:00
Simon Wilkinson
cc119d6363 rxperf: Build again
Bring the rxperf up to date with the current library requirements of
the rest of the tree.

Change-Id: If35ba0668163d5176cf9a3df1635b4cffbc10ff2
Reviewed-on: http://gerrit.openafs.org/4800
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-05 16:05:03 -07:00
Simon Wilkinson
af64a0e471 volinfo: Use new form of cmd_AddParamWithOffset
cmd_AddParmWithOffset was recently modified to change the order of
its arguments to something clearer. Modify vol-info to use this new
argument order

Change-Id: Id94badfffb4c41cc13abd727e5674c18c58311fb
Reviewed-on: http://gerrit.openafs.org/4802
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 14:16:13 -07:00
Simon Wilkinson
5fbea6da21 viced: Rationalise FS_STATS_DETAILED logging
Every RPC handler in the fileserver contained a copy of an identical
code block to handle starting, stopping, and recording detailed logging
statistics. Replace all of this with a structure and 4 helper functions,
which will make maintenance much easier.

Change-Id: Ie2b0fa13fcc3e261ba435f1560e7ab5adf477afb
Reviewed-on: http://gerrit.openafs.org/4765
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:32:03 -07:00
Simon Wilkinson
69a3ffa323 usd: Move to using real 64bit quantities
Move the usd library over to using afs_int64, rather than afs_hyper_t
now that everything in userspace is assumed to be 64bit capable.

Change-Id: I9ffc0996e1696d016dae96c0a2245cf5121c49a1
Reviewed-on: http://gerrit.openafs.org/4768
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:28:40 -07:00
Simon Wilkinson
faaf36c32b viced: Remove old /vice/file/parms config file
This commit removes support for overriding command line options with
the contents of /vice/file/parms. This option has never been documented,
and only supports setting at most 15 command options. Replace the old
function with one which checks for the existence of this file, and
outputs a warning if it is found.

Change-Id: I933475c0eb31e78dbc8a9d31b2486aa14f57bfb0
Reviewed-on: http://gerrit.openafs.org/4716
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:27:56 -07:00
Simon Wilkinson
f64e190579 usd: Make test program build again
Make the USD test program build again. Note that this isn't much use
unless you have a tape device connected to your machine.

Change-Id: I01bae4035ef3db966d9f79fb5796e3608efa2cfd
Reviewed-on: http://gerrit.openafs.org/4767
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:27:45 -07:00
Jeff Blaine
07f461e8e3 kvno invocation correction, language cleanup, afs/cell principal preferred
Properly show kvno command syntax, add information about preferring
'afs/cell' for the principal over 'afs', and changed "noted this down"
to "made note of"

Change-Id: I56fca2e34ce18634a155c8eb3b21760f2ee990c6
Reviewed-on: http://gerrit.openafs.org/4740
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:18:24 -07:00
Simon Wilkinson
23e433f104 vos: print_addrs never receives multi-homed addrs
The magic address that tells the vlserver that a host is multi-homed,
and to look up the multi-homed address structure is an internal
implementation feature, which shouldn't be exposed to clients.

print_addrs is only ever called with the results of VL_GetAddrsU, which
has already converted any multi-homed pointers, so it doesn't need the
logic to handle them itself.

Change-Id: If8b6fd6fc433f413c3f3037160979e10c9a45a39
Reviewed-on: http://gerrit.openafs.org/4757
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:16:25 -07:00
Chas Williams (CONTRACTOR)
cc2bc3e17f doc: let configure find the XML tools if possible
configure should attempt to find the XML tools we need to process
the documentation.  if it can't, it should provide a safe default.
still allow the user to override via command line.

Change-Id: Ifaf3a5b090e93858c3d3c88363760c508030db90
Change-Id: Ib9558c37b04a4533e91b172a2a62039e4ed06d6f
Reviewed-on: http://gerrit.openafs.org/4766
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:15:55 -07:00
Michael Meffie
c0a55111d7 xstat: cope with different size timeval structures
In xstat_fs_test and afsmonitor, try to display the xstat data
from the fileserver even if the fileserver has differently sized
timeval structures, or different word ordering, as the xstat
client program.

Change-Id: I16f32b25f0017cdcf5e41e583eeb129469c3aeb0
Reviewed-on: http://gerrit.openafs.org/2986
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:14:45 -07:00
Simon Wilkinson
8c2e83bab1 Linux CM: Update wait code
Update the wait code to use the more modern wait_event_freezable()
macros. If those macros are not available, fall back to the older
wait_event_interruptible macro, and build our own
wait_event_freezable on top of this.

These changes should simplify our interactions with the wait queue
and refrigerator bits of the kernel, as we're now using more standard
interfaces to them.

Change-Id: I5218c8a1b5b33f10355ef298008c53e416b267f9
Reviewed-on: http://gerrit.openafs.org/4753
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:10:41 -07:00
Simon Wilkinson
7a70c2907b Linux CM: Use kernel allocator directly
In another few locations within the Linux portion of the cache
manager, directly use the kernel allocator. We can do so here
because we can guarantee that the amount of memory being allocated
is less than the page size, and there is a kfree() in all of the
exit paths, so we don't need the magic freeing behaviour, either.

Change-Id: I9c9f3a0b8243b66cb081cd2b35f0d27aaa378934
Reviewed-on: http://gerrit.openafs.org/4752
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 08:08:36 -07:00
Simon Wilkinson
45071f4bc0 Linux CM: Use kernel allocator directly for events
When allocating memory for our events system, use the kernel
allocator directly, rather than going via our shim. This is much
more efficient, but has the drawback that we are now responsible
for freeing our own memory, rather than it all being magically
given back upon shutdown.

Change-Id: I9cb31e4c6b5b4ff2497b627e7ab87716e6da6fa9
Reviewed-on: http://gerrit.openafs.org/4751
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:39:36 -07:00
Simon Wilkinson
11407737f7 Linux CM: Files don't need a page
We were using osi_AllocLargeSpace to allocate our files. This gives
a page to every struct osi_file we create, which seems a little bit
excessive. Just use kmalloc directly instead, and let the kernel's
allocator deal with the slabbing.

Change-Id: I40d32ad0d7090e2b3b60be983d4f441968dc69dc
Reviewed-on: http://gerrit.openafs.org/4750
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:39:14 -07:00
Simon Wilkinson
a41dee0916 libafs: Tidy up iovec allocation and trimming
Tidy up the way that we perform iovec allocation and trimming by
making the rest of the world look a little bit more like Darwin.

This relies upon a struct uio, followed by 16 iovecs, being able
to fit into a SmallSpace sized block. On the majority of 32 bit
systems, such a block is 256 bytes long (on AIX and HPUX it is
152 bytes). With a 32bit size_t, an iovec is 8 bytes, so 16 of
them is 128 bytes, and a struct uio is 24 bytes, giving a grand
total of 152.

Change-Id: I5243f034bcb4e1f5fa319c4f522229bd96eaae3d
Reviewed-on: http://gerrit.openafs.org/4749
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:38:47 -07:00
Simon Wilkinson
ca465e432d Tidy up uio_t meaning
On IRIX, uio_t is typedef'd to "struct uio".
On Darwin, uio_t is typedef'd to "struct uio *".

Reduce the confusion by just not using "uio_t" in places where it
isn't being defined for us, and avoiding it completely in cross-platform
code.

Change-Id: I0cee370e25d10b1ca4627832097a9a9f1e83b4c2
Reviewed-on: http://gerrit.openafs.org/4748
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:36:20 -07:00
Jonathan Billings
b3232b2cb4 linux: rpm: Fix SELinux attributes on /afs when installing openafs-client package
Since the directory /afs isn't included in the package manifest, but
rather created in a script in the openafs-client package, it never
gets the appropriate SELinux attributes that are required to mount a
volume (mnt_t).

This change fixes the problem by running '/sbin/restorecon' (if it is
an executable that exists) on the /afs directory after the
openafs-client package is installed, right after the directory is
created.

Change-Id: I3905cf8da8f7414e410acfa8df51b35abe057cd7
Reviewed-on: http://gerrit.openafs.org/4763
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:30:43 -07:00
Michael Meffie
1a4262253e volinfo: accept -sizeonly for -sizeOnly
For consistency, allow -sizeonly (all lowercase letters) to
request the size summary. The old option name, -sizeOnly is
available as an alias.

Define the command line option parameter positions and use
those to set and look up the options.

Change-Id: Ie6a780e02bfa35cd5399364bab614b260c391abc
Reviewed-on: http://gerrit.openafs.org/4741
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:27:28 -07:00
Michael Meffie
8fc3d6dfe1 volinfo: accept vice partition id for -part option
Accept a partition id for the -part option. For example, -part a
is the same as -part /vicepa.

Change-Id: I59d9cb71a49bbfc631c7975a859ebc3e5eccdf1a
Reviewed-on: http://gerrit.openafs.org/4739
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:27:02 -07:00
Michael Meffie
6b0ad5786d volinfo: comments
Add doxygen style comment headers.

Change-Id: Id8e18a102e8aa5fbb0a0e0f3c58983d93bf2bb50
Reviewed-on: http://gerrit.openafs.org/4738
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:22:56 -07:00
Michael Meffie
8eddff4b78 volinfo: fix file size data type
Use afs_sfsize_t for file size instead of int.

Change-Id: If68fca11183cd7b3ecd3750609f1b989af7445f5
Reviewed-on: http://gerrit.openafs.org/4737
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:22:10 -07:00
Michael Meffie
59a1c40efb volinfo: avoid exit on errors
Instead of exiting on errors, try to carry on.

Change-Id: Ia8da9403c57c19ac25a3ef4dac36c3e71bd1be25
Reviewed-on: http://gerrit.openafs.org/4736
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:20:57 -07:00
Michael Meffie
277a8ad658 volinfo: refactor mode variables
Untangle the various global mode variables, which became muddled when dsizeOnly
and saveinodes were introduced. DumpInfo now indicates the default mode and
DumpVnodes means print the vnode entries, not scan but sometimes print.  Remove
unused globals.

Change-Id: I9d331a19afede864ad1d23477f5e3948e59558ec
Reviewed-on: http://gerrit.openafs.org/4735
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:20:27 -07:00
Michael Meffie
56714e9a4d volinfo: refactor volume and vnode handling code
Refactor volume and vnode handling code for better
maintainability.  Move the code invoked by -saveinodes to a new
function. Remove an unneeded else clause in HandleVolumes.

Change-Id: I02d9392ce065f78e5e84b902668b5d84242d7f5a
Reviewed-on: http://gerrit.openafs.org/4734
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:18:33 -07:00
Michael Meffie
4e97b2e5f8 volinfo: refactor size counters
Put the volume, partition, and server size counters into structures.

Change-Id: I3bb7a25b39e191b7717dc725604fe5fe1be8045c
Reviewed-on: http://gerrit.openafs.org/4733
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:15:23 -07:00
Michael Meffie
70145b4f4a volinfo: refactor -sizeOnly printing
Refactor the -sizeOnly output processing to reduce code
duplication and coupling with -saveinodes.

Change-Id: I4d1c53678732afebba83813be676a292e2d8e62c
Reviewed-on: http://gerrit.openafs.org/4732
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:13:43 -07:00
Ben Kaduk
55a41d0005 Enable gencat for i386_fbsd_*
The machines certainly have a /usr/bin/gencat, and I see nothing
in history to indicate a reason for this prevention.
Allow the 32-bit machines to build afszcm.cat and make packaging
more uniform between architectures.

Change-Id: If1017d28cc804d58cfb29019158ad5b3d70da9ac
Reviewed-on: http://gerrit.openafs.org/4760
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:08:31 -07:00
Simon Wilkinson
bcdcf5cf38 vlserver: Add flags to extent address entries
Add a "flags" field to the extent address entry so that we can store
per server bit flag information. Rename the header flags feel (and
corresponding macro) so that it's explicitly a header flag. Take
this opportunity to also fix this comment to clarify that the header
flags are not a copy of anything from the vlentry, but that they
must be at the same structure offset as the vlentry flags field (so
that something accessing an extent block as if it was a vlentry can
see what it is from the flags)

Change-Id: If8a4816418d9400fb971679c08b4777e7d83c983
Reviewed-on: http://gerrit.openafs.org/4776
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:07:40 -07:00
Simon Wilkinson
a082c4eeae vlserver: Make space in extent block explicit
The address entry side of the union within the extent addr block
actually has a significant amount of free space. It looks as though
the original author assumed that a UUID required 16 32-bit words,
rather than 16 octets, and sized the structure to match.

Make the free space within the structure explicit, so that it can
be used for future expansion

Verified with
  gdb vlserver
    (gdb) print sizeof(struct extentaddr)
    $1 = 128

Change-Id: If67f669fb298763f054ce82447a4513c59ef7526
Reviewed-on: http://gerrit.openafs.org/4775
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:06:12 -07:00
Simon Wilkinson
a9bd64f994 vlserver: Rationalise multi homed host processing
The same code for getting extent structures for multi homed hosts
was scattered throughout vlprocs.c, sometimes with error handling,
and sometimes without. Rationalise all of this into a pair of
static inline functions, which do all of the hard work.

Change-Id: Ib0f55e5b5f455b07753409ebff2a5cd0ca188cda
Reviewed-on: http://gerrit.openafs.org/4774
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:02:38 -07:00
Simon Wilkinson
90507fcb10 vlserver: Use correct memsets in vlentry convertor
The various vlentry_to_<blah> conversion functions have obviously
been copy and pasted from each other. However, the size of the
structure which is being zeroed has not been updated when we are
zeroing different structures. Fix this, so that we always clear all
of the structure that we are filling.

Change-Id: Ic822e1d2b17494574074c332c7680e94d4701c66
Reviewed-on: http://gerrit.openafs.org/4773
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 07:00:32 -07:00
Simon Wilkinson
41dc2509ba vlserver: Clean up abort logic
Clean up the failure logic in the server RPC handlers so that there
is always a single exit point upon aborts. This should make it much
easier to fix the various problems with cleaning up memory when
RPCs fail.

Change-Id: Ia5f8e97c37bf4aca1c8f2597a21eb54d1ba094fb
Reviewed-on: http://gerrit.openafs.org/4772
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:59:37 -07:00
Simon Wilkinson
a180b0c5d8 vlserver: Use correct base value when replacing
When we're removing existing address entries the code calculates
a base and index value for each entry that we're removing an address
from. However, it then _uses_ a previously calculated base value,
with the new index. This works fine if the old base and the new base
match, but if they don't, chaos will ensue.

Fix to always use matched base and index pairs.

Change-Id: Ia592abdc1c58b5cf5776bb24e67aee708275a9b0
Reviewed-on: http://gerrit.openafs.org/4771
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:55:18 -07:00
Simon Wilkinson
e7f457469f vlserver: Rename errorcode to code
The convention in the OpenAFS code is to use 'code' or 'ret' for
return values from functions. Rename 'errorcode' in vlprocs.c to
be in keeping with this convention.

Change-Id: Idffd6eccdd820cb602e5c7cd66ebaa4fbd37c6b5
Reviewed-on: http://gerrit.openafs.org/4770
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:54:46 -07:00
Simon Wilkinson
a14e791541 vlserver: Tidy up request counting
Tidy up the counting of requests and aborts in the vlserver. Don't
hide a variable allocation within a macro, convert macros to inline
functions, and make it possible to not count particular operations
by passing in an opcode of 0.

Change-Id: Ifd26027ebb97a6039b6f7f7289ffbe166627390b
Reviewed-on: http://gerrit.openafs.org/4769
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:53:03 -07:00
Simon Wilkinson
4c9134a995 Build system: Move install definitions to include
Move the definitions of the INSTALL_* variables out to
Makefile.config rather than replicating them in each file.

Change-Id: I5f74dcbf544a93716994418bee3be2c51a2a82d0
Reviewed-on: http://gerrit.openafs.org/4781
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:50:52 -07:00
Simon Wilkinson
1841860f62 aklog: Remove Windows specific code from header
When commit 3f54c934b9c933d5f34644a096c821375db17d97 removed all of
the Windows code from aklog, it missed the stuff in aklog.h. Get
rid of this too, for clarity.

Change-Id: I6d408ffc313d18fd512fa03494a15ec628f1e292
Reviewed-on: http://gerrit.openafs.org/4782
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-05 06:50:05 -07:00
Simon Wilkinson
cc72cb1e81 ubik: Initialise global version lock before use
Commit e4ac552ab79be21d90397079eaf6be7050497752 introduced a global
version lock to ubik, but doesn't initialise this lock before make use
of it. On platforms which require that pthread mutexes are initialsed,
this causes an assertion failure.

Initialise this lock at the same time as we MUTEX_INIT all of our other
locks.

Change-Id: Ib5ef75d443101a823738fba55c0760cb1848dbcf
Reviewed-on: http://gerrit.openafs.org/4780
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-05 06:00:28 -07:00
Michael Meffie
64b255327d cmd: Reorder cmd_AddParmAtOffset arguments
Reorder the arguments of this recently introduced function to
make client code more readable.

Change-Id: I37f662f849bd96176230f75783e2a1c62d94b8c9
Reviewed-on: http://gerrit.openafs.org/4755
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-04 19:32:29 -07:00
Michael Meffie
13aeb1dcae xstat: print collection values in debug mode
Print the values of the integers returned in the collection data
when the -debug option is given to xstat_fs_test and xstat_cm_test
test programs. This allows us to at least see what the unformatted
values are when there is a mismatch in timeval sizes between the
host and client (aka the 32/64 bit xstat bug). This change could
break scripts which call the xstat test programs with the debug
option. New debug output are prepended with 'debug:' to be
easily ignored.

Change-Id: I12d8d27306c50fb9f35ade2a080b3bc20542b63f
Reviewed-on: http://gerrit.openafs.org/2878
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-04 11:10:59 -07:00
Rainer Strunz
7d76a5b4f9 fs: add support for relative ACL changes
This change permits "fs setacl" to change ACLs in a relative
manner, rather than just setting rights absolutely as it is
done now.

If a single plus (+) or minus (-) character is appended to
the rights' letters argument, the new rights are computed
relatively to the existing ones.

A few examples should make clear that behaviour:

old rights: rights set: new rights:
-----------------------------------------------
rl a+ rla
rlid idwa- rl
rla write- a
rl write- [none] (ie. entry deleted)
[any] read= rl

As shown in the last example, a '=' character got implemented
also (and for free) as an alternative writing of the current
and default behaviour of just setting an ACL.

FIXES 123962

Change-Id: If15a4ab3c69ec44a42c8746a0b93f5e8b785d61e
Reviewed-on: http://gerrit.openafs.org/4496
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2011-06-04 10:43:29 -07:00
Simon Wilkinson
5ad1e6cb90 dir: Prototype and function name cleanup
Tidy up typing in the dir package, so that we have a specific type
for a directory file handle.

Also rename all of the functions to afs_dir_* globablly, rather than
just renaming for kernel code.

Change-Id: I6750a8eb9f0606d5debf9d677a92b9c8a63dbcf3
Reviewed-on: http://gerrit.openafs.org/4745
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-06-02 07:38:14 -07:00
Simon Wilkinson
0284e65f97 dir: Explicitly state buffer locations for data
DNew and DRead always returned directory page aligned pointers,
however the directory code further manipulates those pointers,
requiring the DRelease be able to fill a page when passed a pointer
to any address within that page. This is relatively straightforward
in the userspace implementation, but much more complex in the kernel,
where all of the directory pages are not necessarily contiguous.

Resolve this issue by making DNew, DRead and DRelease all return a
new structure, struct DirBuffer. This structure contains both a
pointer to the data, and an implementation specific private
pointer to data describing the page containing the address. The
directory code is free to play with the data pointer as it wishes,
as long as the private pointer to the page is passed through intact.

DRelease (and DVOffset) can then simply use the private pointer for
their operations, without having to walk page lists.

This new behaviour also requires changes to the directory functions
GetBlob, FindItem and FindFid which all return pointers to directory
data.

Change-Id: I8b8b003b789976b593a7c752969f47d55f4ee707
Reviewed-on: http://gerrit.openafs.org/4744
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-02 07:37:59 -07:00
Simon Wilkinson
b3ea4fa4ff doc: bos != vos
As it says on the tin

Change-Id: I2c03f51303d01ccc772c1fc0b2ed1dd0b176892d
Reviewed-on: http://gerrit.openafs.org/4764
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-02 06:54:50 -07:00
Simon Wilkinson
b6add117ad vos: Don't leak/overflow bulkaddrs
The vos listaddrs command repeatedly reuses a bulkaddrs array. It
zeros it once (without freeing the allocated memory), and then
repeatedly uses it without zeroing in a loop. This means that the XDR
library assumes that a sufficiently large block is already allocated,
doesn't reallocate for the incoming data, or check limits.

This means that if the first call to VL_GetAddrsU returns a set of
addresses smaller than subsequent calls, we'll write past the end
of the array, causing memory corruption.

Fix this by freeing the arrays correctly with each pass of the call.

Change-Id: I540d369c1529ec3574548f42cbd48b6c2b38cebd
Reviewed-on: http://gerrit.openafs.org/4756
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-01 06:13:42 -07:00
Christof Hanke
6af6a6a7cb libafscp: fix install/dest in sep. Objectdir
When compiling libafscp in separate objdir,
make dest and make install fail, because of wrong
pathes. Fix it.

Change-Id: Id2b672bce308609d99b343322babe890ec8d6a38
Reviewed-on: http://gerrit.openafs.org/4761
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2011-06-01 06:12:16 -07:00
Jonathan A. Kollasch
750b865928 Port cache manager to NetBSD-5 and NetBSD-current
Change-Id: I3d1aa0b22bb8533718f48bd4424743299d5de019
Reviewed-on: http://gerrit.openafs.org/4661
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2011-05-31 05:35:32 -07:00