Before we did inodes properly, we needed to pre-process osi_vfs.h,
in order to merge our inode structure with the Linux one. Ever since
we moved to native inodes, that preprocessing has been disabled, and
we've just copied osi_vfs.hin to osf_vfs.h Skip this pointless step,
permanently rename osi_vfs.hin to osi_vfs.h, and remove the unused
support scripts.
Change-Id: I5e21eccf2242080cd8b994bd1654260bfb531420
Reviewed-on: http://gerrit.openafs.org/1856
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If something is a #define, then there's no point in doing a test
compile to check for its presence. Instead, just do #if defined(X)
Remove the tests for for_each_process and prev_task.
Change-Id: Id8a9fddf2571cccd5d61982d4662bce2009c8f43
Reviewed-on: http://gerrit.openafs.org/1855
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add AC_CHECK_LINUX_BUILD() to do a standardised Linux build, which
takes a "checking" message, the autoconf variable to use to cache
the results, headers and code to run, preprocessor variable to
define, and a description of that variable.
Reimplement all of our existing check macros in terms of this one,
resolving many typos along the way.
Change-Id: I41988c83fcdbfbf8152f6dd0e7c4bd16c7a04240
Reviewed-on: http://gerrit.openafs.org/1854
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a new autoconf macro for doing structure element checks, and
modify all simple structure checks to use it. This introduces a
standard name form - STRUCT_structure_HAS_element, so there are
some changes in the code to make use of this standard form.
Change-Id: Ife967322503ae6f428e76845000de04f26929e65
Reviewed-on: http://gerrit.openafs.org/1853
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We spend a lot of time in autoconf checking to see if kernel
functions are available. Rather than copying and pasting the same
code everytime we do so, create a macro to do function tests, and
use that macro. This results in standardised naming, so change all
of the places that use autoconf results to use the same standardised
names.
Change-Id: I36212e6c28c4b8455f859da1bbf3e456a2aabc07
Reviewed-on: http://gerrit.openafs.org/1849
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Linux now provides try_to_freeze(), which can be used to replace
all of our refrigerator code. This has been in the tree for a long
time, and actually predates many of the changes we've been modifying
our code to work with. So, use try_to_freeze wherever we can, and keep
a simpler compatibility function for kernels which are too old to have
it.
Change-Id: Iec50f83382f46d2b17b43da815a75755ea916bc6
Reviewed-on: http://gerrit.openafs.org/1845
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Provide an autoconf macro to perform tests for the existence of
Linux kernel header files. Use this to standardise the naming of
header file presence #defines, and to simplify the linux tests.
Change-Id: I49629679db56c5f9a39487bd78fc2e59d5da0269
Reviewed-on: http://gerrit.openafs.org/1844
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The OBSD cm port prefixes function names with afs_nbsd_, an
artifact of its origin in the original NBSD cm port. Make the
prefix afs_obsd_.
Change-Id: Id412fe0f752a147e2a9afda904db220ea6efd736
Reviewed-on: http://gerrit.openafs.org/1850
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The .gitignore in rxkad ignores sboxes.h and fcrypt.h,
since they used to get copied there from the domestic subdir.
Now that they actually live under rxkad, they souldn't be
ignored.
(with thanks to Marc for the commit message)
Change-Id: I1dd6766e75c15ca7f5604601bbe5b4e67f4fffa6
Reviewed-on: http://gerrit.openafs.org/1848
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The clean target under rxkad removes sboxes.h and fcrypt.h,
since they used to get copied there from the domestic subdir.
Now that they actually live under rxkad, they souldn't be
removed.
Change-Id: I867496dd0d3dd997d402ebfbfc6272447b1af98e
Reviewed-on: http://gerrit.openafs.org/1847
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
note that IFDirtyPages is Solaris-only, so there's no confusion. may be
worth visiting to see if and how the code should be minimized or adapted
for elsewhere
Change-Id: I7dfe4760eb4038d23a920c2e23f33d93e604bbca
Reviewed-on: http://gerrit.openafs.org/1840
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Given that we now only switch from user space into kernel space in
one place, don't hide the mechanism we use to do so behind macros.
This makes it much easier to visually confirm the correctness of the
code.
Change-Id: Ie52e071c81a9178c792be1eaa7e36d8453ebb319
Reviewed-on: http://gerrit.openafs.org/1820
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Dan Hyde <drh@umich.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
There's no situation where we'd be including osi_machdep.h and not
be building for the kernel, so just remove the case that disables all of
the locks if __KERNEL__ isn't defined.
Change-Id: I1141c37cf0cd517191dee7ca2404e109d4053c29
Reviewed-on: http://gerrit.openafs.org/1821
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
i failed to push this to commit 0dac8f93af,
and so, well, here's the real fix. sorry.
Change-Id: I6799ecb207f246ac3e4c48b1de55268d2fba4d23
Reviewed-on: http://gerrit.openafs.org/1837
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Initialize the variable to avoid compiler complaints that it
could be used uninitialized. Use a sentinel value and issue
a warning if we try to use the variable and we haven't set
it to a useful value.
Change-Id: I037be2ad8e0b55d06b50aafdeca5012764640f16
Reviewed-on: http://gerrit.openafs.org/1810
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Linux has various network helper functions available, which are
guaranteed to do the right thing in terms of setting address space
limits, not dereferencing NULL pointers, and the like. Use these, where
they're available, rather than rolling our own.
kernel_sendmsg and kernel_recvmsg appeared in 2.6.8.
Change-Id: I1cd91afd2182ad936756bbc4cf692262499c16e4
Reviewed-on: http://gerrit.openafs.org/1822
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The RX implementation was split into LINUX and LINUX24 along with
the kernel, but the old 2.4 and 2.2 only code was never removed from
the LINUX/ directory. Do so now.
Change-Id: I80300a1390e297298f4af3c06086e25d0acf8c1a
Reviewed-on: http://gerrit.openafs.org/1819
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
In 2.6.8, Linux shifted from passing f_pos directly to the read
and write routines, and started passing a copy. This helps reduce,
but does not remove, the race issues with f_pos itself. Make this
change for us.
Take the opportunity to remove the uneccessary macros, and tidy up
some casting.
Change-Id: I3b4cdf1e6e8127cbe0055829605268953c4397a6
Reviewed-on: http://gerrit.openafs.org/1818
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
VFS_STATFS isn't used in the Linux 2.6 case, and is wrong anyway.
Remove it in an attempt to clarify some particularly muddy water.
Change-Id: I404429e3eeb87146bfdced5625b56857ba2ab9fd
Reviewed-on: http://gerrit.openafs.org/1817
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
llseek is a little more complex than just setting the pos field of
the file structure.
Where vfs_llseek is available to us (it has been since 2.6.8) use that
directly. If vfs_llseek isn't available, then use either the
filesystem's llseek method, or default_llseek (available since 2.6.0),
to ensure we get the proper locking.
Change-Id: I26bcbff984c7164be1724eee7a46cbe6e02bc510
Reviewed-on: http://gerrit.openafs.org/1816
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
have just one path for exiting on errors so we do everything
this means we will EndCall, instead of not, in the EFBIG case
Change-Id: I2df025eee4bd5173ed4f80a73f9a9a347e7257d2
Reviewed-on: http://gerrit.openafs.org/1827
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Historically, the fcrypt code lived in its own directory, named
'domestic', so that ACLs could be used to prevent nasty foreigners
from getting access to it. Now that those days are gone, having the
domestic directory just complicates builds. Remove it, and reunite
fcrypt with the rest of the tree.
Change-Id: I2d1f66463121bbb391260b613913d76c27931429
Reviewed-on: http://gerrit.openafs.org/1836
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This change removes the need to maintain two forms of symbol export
lists, instead generating the simpler lists required by AIX and Mac OS X
from the more complex Linux and Solaris mapfile. It can only handle
simple mapfiles at present, any more complex files (for example, those
which contain versioning information) will require changes to the
translation script. The now unused .exp files are removed, and a
dependency on the .map file added to the library build line.
This change adds support for export lists to Darwin for the first time.
Doing so identified a number of symbols in libafsrpc that are required
by libafsauthent, which were not being exported. Export these symbols,
and bump the minor revision of the shared library.
Change-Id: Ibd1d02bb89b85500dc2a010e6cde1f4b81efe050
Reviewed-on: http://gerrit.openafs.org/1831
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The Linux kernel builds used to add -Wno-strict-prototypes to the
CFLAGS. Now that we've got prototypes for pretty much everything,
remove this line so we can see any real warnings that might occur.
Change-Id: I71b97bd3d19259f6ec6a55cfe095f5f4bf1ab78f
Reviewed-on: http://gerrit.openafs.org/1830
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix these make targets so they actually clean the tree. Reorder the list
of file deletions in distclean so that it exactly mirrors the creation
order in configure.in, which should hopefully make it easier to keep
this all in sync in future. Add all of the missing files in packaging,
and the shared library build tools, to this list.
Make kauth and vol clean remove ka-forwarder and fssync-debug,
respectively.
Change-Id: Iae13419f1cb21058882c0b0e0c283e3c947e33c9
Reviewed-on: http://gerrit.openafs.org/1829
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Some bits of des_stub were lingering on. Get rid of it completely.
Change-Id: I853135621a757c78cdb50117500f056ade0e6ab5
Reviewed-on: http://gerrit.openafs.org/1835
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change f2db78a346 included hard
references to compilation sources with no srcdir prefix, and so
broke objdir builds. Fix this so that we can build outside the
source tree again.
Change-Id: Iaae2d4a1047cc2ac0f5f4aae92cadc1f2a0d09e2
Reviewed-on: http://gerrit.openafs.org/1826
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
so it can be tagged and non-unversioned builds of the mac client changes can
be seeded for testing
Change-Id: Ibaa231d356bf667b13e271c9868c6ce0182bd2a6
Reviewed-on: http://gerrit.openafs.org/1814
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
right now we would wait 20 seconds for shutdown (the default),
get impatient and be useless.
be less useless.
Change-Id: I8c6bc9b7546352cfa73d461b7cdddd2b5b5d7889
Reviewed-on: http://gerrit.openafs.org/1813
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This change increments the disk cache version number, and adds a
structure size record to the disk cache header. All old disk caches
will be replaced when the client is started.
With the various changes made to unify our file handles, and to
support large file handles on Linux, the size of the 'fcache'
structure was modified earlier in the 1.5 series. However, fcache
is also the building block of the CacheItems file, so these changes
inadvertently broke users upgrading from 1.4. In addition, as the
disk cache inode is now a union of many different structures, the
structure size is now potentially volatile across both kernel, and
OpenAFS revisions.
Up the version number so old disk caches are invalidated and won't
crash users who are upgrading. Also take the opportunity to add an
item to the header which stores the size of struct fcache used
by the disk cache. If the size on disk doesn't match that expected
by the kernel module, truncate the cache and start again.
Change-Id: I2ee8863d0bfaaaba34272c9e139638e17669a53e
Reviewed-on: http://gerrit.openafs.org/1811
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Cast argument to match the expected type from the format string.
Change-Id: Iddec912ff8a27f46d872fc3101677913adfb537a
Reviewed-on: http://gerrit.openafs.org/1812
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When attaching a volume, update the nextVnodeUnique field for the
volume, before we do any checks on the volume; for example, checking
inUse, which may result in a demand-salvage if we are running DAFS.
If we do not do this, we can schedule a demand-salvage without setting
nextVnodeUnique, and VUpdateVolume_r will update the volume header
uniquifier to nextVnodeUnique+200, when nextVnodeUnique is not set.
So, we will always set the uniquifier to 200. Fortunately, the salvage
should usually fix the uniquifer anyway.
So, set nextVnodeUnique before doing any of those checks, to avoid
screwing up the uniquifier when taking the volume offline.
Change-Id: Ib211bbf5e93efbebcb679259944e7abf211aa6e1
Reviewed-on: http://gerrit.openafs.org/1809
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Partially revert b1eb6a7a3f, so we do
not mask the rx_EndCall error with a EndRXAFS_StoreData error (for
example, if EndRXAFS_StoreData returns RXGEN_CC_UNMARSHAL, and
rx_EndCall returns VBUSY). We need to agree on how to do this
throughout the tree, but for now, just fix StoreMini.
Change-Id: I4913946089fd0857506d9186f85c5c8115a5b95d
Reviewed-on: http://gerrit.openafs.org/1808
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Remove the fuzz setting - we're no longer patching the build, so
we don't need it.
Change-Id: Ic56b4d9efed40aedb425d9852018907736ef957f
Reviewed-on: http://gerrit.openafs.org/1807
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Update our bundled spec file and related tools so they can be used
to build OpenAFS on the RHEL6 beta.
- Make kmodtool recognise el6 as having "modern" kernel naming
conventions
- Replace %{PACKAGE_VERSION} (which seems to have disappeared)
with the standard %{version} macro
Thanks to billings and phalenor on IRC for their testing efforts.
Change-Id: I6538af56f365952b98c2dcbafb1c043435449e63
Reviewed-on: http://gerrit.openafs.org/1806
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
'fs rmmount' is the only 'fs' command that does not resolve symlinks
for its pioctls for some reason. Make it resolve symlinks.
Thanks to Arne Wiebalck.
Change-Id: Ifb6bdf0b381abd2e157d93d7eea4d853e1b3a689
Reviewed-on: http://gerrit.openafs.org/1805
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
is is the same pid cmdebug would print. just include it in the logged
byte-range lock warning.
FIXES 126438
Change-Id: Idd83a4c4a56edf43ab257b3a7f08e1bbb774f04a
Reviewed-on: http://gerrit.openafs.org/1333
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
osi_procname(procname, size) is added to different platforms to obtain
the processname in the string procname( preallocated ) with size size
Change-Id: Iab8fed3e99839cee7c07a2de6144af9b09af3a57
Change-Id: Ib4e45564ae942e74c331444969a462427f5e7cf3
Reviewed-on: http://gerrit.openafs.org/1771
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
revamp this to avoid various issues with vnode references,
and to avoid potentially finding CVInit vcaches but not reclaiming
Change-Id: I6cb8d73b66c449a104799082259c97ede7e32e9b
Reviewed-on: http://gerrit.openafs.org/1802
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
param.linux26.h defines USE_UCONTEXT for all Linux platforms for
glibc 2.4 and higher, but it does this by testing __GLIBC__ and
__GLIBC_MINOR__. These are defined by features.h, which is included
by any system header. At least one system header must be included
before those are defined. lwp/process.c was including <afsconfig.h>
and <afs/param.h> before any other headers, leading to those macros
being undefined. Most of the Linux architectures either have their
own implementation or were explicitly defining USE_UCONTEXT in the
per-architecture param file, but ppc_linux26 was relying on the
default.
Fix this by reordering the includes to include the various system
headers before <afs/param.h> and add a comment explaining why.
This previously worked in earlier versions because the old
param.ppc_linux26.h file included <afs/afs_sysnames.h>, which
included "stds.h", which included a system header prior to the check
for ucontext. The new generic param file reverses that order.
Change-Id: I214e54f684afdef07e6e2dec5b6e6e4d255ab4ec
Reviewed-on: http://gerrit.openafs.org/1791
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
afs_GetVolSlot can panic in a few different ways, such as failing to
read from or write to VolumeInfo. Instead of panic'ing, return an
error to the application. Adjust callers to deal with getting a NULL
volume returned.
Based on a patch by Mike Meffie.
Change-Id: Ibb301fed795ee9ee5906b8e7973945a06218b8f1
Reviewed-on: http://gerrit.openafs.org/1801
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add a copy of RFC 5864 (DNS SRV Resource Records for AFS) to the
protocol documentation directory for reference. As permitted by
the IETF Trust License Policy section 3(e), I release this document
under the MIT/X Consortium license included in this copy of the
document.
LICENSE MIT
Change-Id: I8e22aac07b4cedbe18b8375213a7866cf98a1386
Reviewed-on: http://gerrit.openafs.org/1799
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
If --enable-fuse-client is passed to configure and afsd.fuse is built,
install it into the same directory as afsd and install afsd.fuse.8 as a
symlink to the afsd.8 man page. Add documentation of afsd.fuse to the
afsd man page.
Change-Id: I7d0cd3992a8466e626af2191c713e5623cc40d84
Reviewed-on: http://gerrit.openafs.org/1792
Tested-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Change I572ff682de4cc7ef27bb46dd028d3d797b873841 added the fileserver
callback xstats collection to afsmonitor. Provide some documentation
for these fields, along with the other fields displayed by afsmonitor.
Change-Id: I21618047519fbb28f6707ff9ba95a17fe27e0f3c
Reviewed-on: http://gerrit.openafs.org/1783
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Russ Allbery <rra@stanford.edu>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
* Removed the logic to set $SMP based on CONFIG_SMP from
/boot/config-$kernelver
* When using --with-linux-kernel-packaging in the configure line, dkms
no longer needs MPS=$SMP in the make line.
Change-Id: Ib65782050cae9f439ad5fed5c7bbbc403e556b4f
Reviewed-on: http://gerrit.openafs.org/1798
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Since restorevol is placed in %{_prefix}/afs/bin by make dest, we
need to fix it so it ends up in %{_bindir} to be used in the base
package.
Change-Id: I31f2602868230416525a84a9d716230f08cb34ab
Reviewed-on: http://gerrit.openafs.org/1796
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Moved restorevol man page to base package
Moved state_analyzer man page to server package
Change-Id: I714dd6eca86def48fefc0206c93038ae71415cc9
Reviewed-on: http://gerrit.openafs.org/1795
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>