Commit Graph

6450 Commits

Author SHA1 Message Date
Andrew Deason
549002c906 Remove warnings related to type-punning
cmd/cmd.c:
 - Just make dummy be a struct cmd_item instead of casting

rxdebug/rxdebug.c:
 - Access the stats packet through a union instead of casting and
   dereferencing

util/uuid.c:
 - Access the seed through a union and an array instead of that
   incrementing-pointer approach

Reviewed-on: http://gerrit.openafs.org/599
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 07:59:18 -07:00
Jeffrey Altman
7197d35ef1 Windows: use xdr_alloc to allocate memory for Callback data structs
xdr_alloc must be used instead of malloc in SRXAFSCB_GetLocalCell
and SRXAFSCB_GetCacheConfig

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/606
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 06:13:54 -07:00
Marc Dionne
7f7b4c9aad authclient.c: fix 64-bit specific warnings
Commit 36be36e034 introduced some casts
from an integer type to void *.  This generates warnings on a 64-bit
platform.
Use uintptr_t casts to make the compiler happy.

Reviewed-on: http://gerrit.openafs.org/605
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 06:12:59 -07:00
Jeffrey Altman
3ea144bde5 Add missing variable to afsio
Callback variable missing in WriteFile

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/604
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 04:37:38 -07:00
Jeffrey Altman
e249aace42 Permit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo
Permit DNS SRV record lookups to be used by the Windows afsconf_GetAfsdbInfo

As per the published DNS SRV internet draft for the AFS3 protocol,
DNS SRV records are to replace AFSDB records as the primary method
of looking up AFS3 service location information.

In order to make that happen for Windows:

1. afsconf_GetAfsdbInfo must be able to translate from internal service
names to IANA assigned service names.

2. The Windows getAFSServer() API must accept IANA service and protocol
parameters as well as the port number to use if AFSDB record fallback is
required.

3. The Windows cache manager must pay attention to the port number
stored within the sockaddr_in structure instead of using hard coded
values based upon the server type.
For afsconf_GetAfsdbInfo, in addition to searching for the requested
IANA service, if that service is prserver or kaserver fallback to
the vlserver record (if any).

LICENSE MIT

Reviewed-on: http://gerrit.openafs.org/593
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-10-08 04:07:08 -07:00
Andrew Deason
38ffa11119 xdrproc_t functions take a caddr_t, not caddr_t*
Callers of xdrproc_t functions give the function a foo* as the second
argument, not a foo**, and the xdrproc_t functions themselves expect
this. Make the xdrproc_t typedef accurately reflect that, thereby
ridding us of some warnings.

Reviewed-on: http://gerrit.openafs.org/603
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:52:26 -07:00
Andrew Deason
1d8118d3da Ignore libafsrpc warnings for shlibafsrpc also
Some warnings were ignored in libafsrpc, but not in shlibafsrpc. Ignore
them in both places.

Reviewed-on: http://gerrit.openafs.org/601
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:51:05 -07:00
Andrew Deason
8ef41263cf Fix warnings in lwp/process.c
-- The EP/ep function does not return anything; declare the function pointer
    accordingly

 -- Explicitly cast &stackvar to char* to avoid a warning

Reviewed-on: http://gerrit.openafs.org/598
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:46:16 -07:00
Andrew Deason
36be36e034 Fix warnings in kauth/authclient.c
-- In ka_Authenticate, explicitly cast 'start' and 'end' to void*,
    since kawrap_ubik_Call takes all arguments as void*s

 -- Fix kawrap_ubik_Call to not be an old-style declaration

 -- Only ignore strict prototypes and implicit function declaration
    warnings

Reviewed-on: http://gerrit.openafs.org/597
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:42:19 -07:00
Andrew Deason
f512597b0a Remove a pointer->integer warning in fstrace.c
Explicitly cast eparm to a long in afs_syscall when calling
proc_afs_syscall, to avoid a warning.

Reviewed-on: http://gerrit.openafs.org/596
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:41:11 -07:00
Andrew Deason
72c2473724 Prototype strcasestr in afsmonitor.c
If we HAVE_STRCASESTR, we lack the prototype for strcasestr in
afsmonitor.c unless we def _GNU_SOURCE before including string.h on GNU
systems. To avoid side-effects or pulling in extra stuff, just prototype
strcasestr ourselves for the time being (if we have it) instead of
def'ing _GNU_SOURCE.

Reviewed-on: http://gerrit.openafs.org/595
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-08 03:40:09 -07:00
Andrew Deason
db949b7fad Correct and use AFS_SIZET_FMT
On *nix, a size_t needs either %lu or %u to be interpolated in a string,
depending on if we're on an ILP32 arch or not. Define AFS_SIZET_FMT
accordingly, and actually use AFS_SIZET_FMT when we try to print a
size_t.

This removes numerous -Wformat warnings, at least when building on
i386_linux26.

Reviewed-on: http://gerrit.openafs.org/592
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-07 20:09:30 -07:00
Michael Meffie
6ef4627412 Allow gnu-style long options
New users are surprised when OpenAFS command options
cannot be prefixed with two dashes, as is common
with most modern tools.  Permit an extra dash for
common commands when more than one character is
given. For example vos listvol --server foo.bar.com is
equivalent to vos listvol -server foo.bar.com, but
vos listvol --s foo.bar.com is an error.

Reviewed-on: http://gerrit.openafs.org/216
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-07 14:42:21 -07:00
Hartmut Reuter
1793f454e4 pioctl with VIOC_FS_CMD removed
This should ease the ingtegration for Windows.
Instead RXAFS_FetchStatus is called.

Reviewed-on: http://gerrit.openafs.org/590
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-10-07 14:01:29 -07:00
Jeffrey Altman
811418887d Build afsio on Windows; remove many warnings
With this commit afsio builds on Windows.   It will not work
until the VIOC_FS_CMD OSD extension is implemented in the
Windows Cache Manager.

Required changes:

  * Export ugen_ClientInit from libafsauthent.dll

  * Fix util_GetInt64 and util_GetUInt64 to return afs_int32
    instead of afs_int64 since it is just returning success
    or error

  * Define VIOC_FS_CMD for Windows even though it isn't implemented

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/587
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-07 12:34:39 -07:00
Andrew Deason
906403c6d7 Make namei convertROtoRW'd volumes usable
Right now, if you convertROtoRW a volume on namei, the converted volume
appears to need a salvage before it is usable, and the header of the old
(now empty) RO volume is kept around. Fix this:

 -- Set inUse = 0 on the converted volume, so the fileserver will be
    able to attach the volume when we give it back

 -- Unlink the RO header file, instead of trying to unlink the
    VI_VOLINFO file twice

 -- Log the actual error code (errno) in the error message for the last
    unlink

Reviewed-on: http://gerrit.openafs.org/591
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
2009-10-07 12:31:18 -07:00
Simon Wilkinson
e3d1eaf0ca Use page_offset() on Linux
Since time began, Linux has provided page_offset() to turn a
page index into an offset into the corresponding file. Make us use
this everywhere we calculate a page offset, rather than doing our
own maths.

Reviewed-on: http://gerrit.openafs.org/581
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
2009-10-07 02:44:45 -07:00
Jeffrey Altman
5d7084fc5e Windows: fs listacl -cmd
Add the new functionality from the Unix fs command to Windows.

LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/585
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
2009-10-07 02:39:38 -07:00
Jeffrey Altman
e74f819555 documentation for "fs listacl -cmd"
LICENSE BSD

Reviewed-on: http://gerrit.openafs.org/586
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Hartmut Reuter <reuter@rzg.mpg.de>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
2009-10-06 13:39:52 -07:00
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