Set a flag to say when we've called SubEnumerate, so that we don't
end up calling it twice when in -format mode
(Simon Wilkinson extracted this from a larger patch by sanket)
FIXES 41031
Change-Id: I2cadd536cb6c9f389330d64ffbf35a16d673d2de
Reviewed-on: http://gerrit.openafs.org/2320
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Include the new man pages in the base 'openafs' package. The package
build process fails with unpackaged files without this update.
Change-Id: Ie7a80a283bb95b492b56be0133c1bd811953c57e
Reviewed-on: http://gerrit.openafs.org/2364
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
VPrintDiskStats_r tried to log some information using separate Log()
statements on the same line. This looks very odd when logged, since we
add a timestamp to every Log() call these days. Fix it to print the
line as one call to Log().
Change-Id: I19a5365c24208229201ba54ff04e793b5e50eee5
Reviewed-on: http://gerrit.openafs.org/2359
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The "File Server has started at" log message contains a trailing '\r'
for some reason. Remove it (ctime will give us a trailing '\n').
Change-Id: I8f280abff9a7548f376f007021d74d3a21ac45cf
Reviewed-on: http://gerrit.openafs.org/2358
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
FUSE was already in 1.5.74, and DAFS fast-restart was not in
1.5.75.
Change-Id: I2e1b765c61ce4670800787dbcfd13c2c2af63f79
Reviewed-on: http://gerrit.openafs.org/2356
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Previous commit to this file was not as tested as we thought.
This one actually builds (well, except for the part where flex
doesn't like et_lex.lex.l at the moment).
Change-Id: I11d918adc50bb387c022d90cb0877a6a667e8252
Reviewed-on: http://gerrit.openafs.org/2362
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We've had per-cpu counter variables for a while, use the proper
macros to adjust them.
FBSD90 has had the page queue locks pushed down a level, so we
don't need to lock them and should lock individual pages instead.
This fixes mmap() on FreeBSD HEAD.
Change-Id: I95d16097aaa65c1c99b4a686c05ac84fe9c11584
Reviewed-on: http://gerrit.openafs.org/2360
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The ifdefs in klog_prompter were getting a bit confusing. Split out
some logic into a separate "is this prompt a password prompt"
function. As a result, we can build without KRB5_PROMPT_TYPE_PASSWORD
defined, which happens to be the case on hp_ux11i.
Change-Id: I1d5f794bfc33017f699478e367cde91a3e77d33c
Reviewed-on: http://gerrit.openafs.org/2353
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Setting AFSTOV(avc)->v_mount is the linux/BSD way. avc->v.v_vfsp is
the HP-UX (et al) way.
Change-Id: If2cd1c1e74fcd0ca5ad981497abe7968d97cf0ed
Reviewed-on: http://gerrit.openafs.org/2351
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We use proc_t in a typedef, and we need proc_iface to get proc_t. So,
include it.
Change-Id: I515abe43ae1d3b4a2c54ebe1b7192a91ed441117
Reviewed-on: http://gerrit.openafs.org/2350
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
We need to include limits.h to use UINT_MAX on some platforms, so
include it in src/rxkad/v5der.c.
Change-Id: I79343011e72080e58f07d53195488808d9e29121
Reviewed-on: http://gerrit.openafs.org/2339
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
several of the mtu configuration cases for the kernel version
of InitPeerParams were bogus. clean up the function.
(a forthcoming change reworks this anyway, but..)
Change-Id: Ia4449d5cecc80cddae7d0f611186f48614b908ee
Reviewed-on: http://gerrit.openafs.org/2343
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
It is not immediately clear how to obtain the current process name on
HPUX, and the current osi_procname definition breaks the build, so
just make osi_procname a stub for HPUX.
Change-Id: I8c825d53d7f25b1500b41629ba73f2fe1f48f00a
Reviewed-on: http://gerrit.openafs.org/2341
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
don't assume every system have uint16_t and uint32_t;
instead massage for use of native afs types.
Change-Id: I8943f37ecf6dd5d1565ed295b6e6a2ca9eea5b6d
Reviewed-on: http://gerrit.openafs.org/2334
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The soclose(rx_socket) call is needed in order to restart AFS.
(Otherwise sobind() fails with EADDRINUSE.)
While here, use the defined constant SHUT_RDWR instead of
hardcoding '2' for soshutdown's second argument.
Change-Id: Iba7cac3aec79764783628da28b12253d496a7680
Reviewed-on: http://gerrit.openafs.org/2331
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
If sobind() failed, we would lock the glock before going to bad,
which proceeded to lock the glock, panic()ing on the recursion attempt.
Remove the unneeded first call.
Change-Id: Ifa793735ebe64bde98156caa610c06612bdb92bd
Reviewed-on: http://gerrit.openafs.org/2330
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The executable %{_bindir}/kpasswd was included in the
the 'openafs' base package.
This change removes the kpasswd executable from the base package. It
is still built and is installed in the 'openafs-kpasswd' package. I
believe this was the original intent of the 'openafs-kpasswd' package.
Change-Id: Idf49747d8a703bb959cdf758d489d640045f285f
Reviewed-on: http://gerrit.openafs.org/2305
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
move the log message i added to the correct place and put one where
it came from. oops
Change-Id: Ieb78d8cc076dbc2279922b0909546878b9ee005e
Reviewed-on: http://gerrit.openafs.org/2327
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
When trying to create a volume (either an entirely new volume or a
clone), request a demand-salvage on that volume group if we hit an
unexpected error. This can allow some situations to automatically
rectify themselves if, for example, a volume is missing its .vol
header, but still otherwise exists and causes an error during a clone.
Change-Id: I22b3e9028685395a8e621962138dee9f5f2ec822
Reviewed-on: http://gerrit.openafs.org/2286
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Allow salvage requests over FSSYNC (FORCE_ERROR with the FSYNC_SALVAGE
reason code) that are requested on volumes that we do not know to
exist. This can be helpful if a salvage is requested on a volume that
someone attempted to create but failed, indicating that a
partially-created volume may be in the way.
Log an additional message when we do this, as it should not be a
normal occurrence.
Change-Id: I6e1bbe35111a41c489fe85cad36e6a8a6f323a5a
Reviewed-on: http://gerrit.openafs.org/2285
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add some parentheses around the tests for FCSBypass.
Without them, the test will not always give the intended result.
Change-Id: I94cb2b2c95c702981fce9cff066b620bce652ee1
Reviewed-on: http://gerrit.openafs.org/2324
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Cast the printf argument to int to match the format specifier.
Change-Id: I4300c8a407c99c40e116a6e166a76112fb92d254
Reviewed-on: http://gerrit.openafs.org/2323
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Formerly, we assumed that any page eligible for background i/o could
be effectively pinned by lock_page. Persuant to concern expressed by
Simon that such pages might be eligible to be released by the kernel
after readpages returns, call get_page to increment the refcount on
each page before dispatching a background read (and matching put_page
when the i/o is completed).
Change-Id: Ib3a63e56e6b902b4eb5deb769847e7f17ce2c9ff
Reviewed-on: http://gerrit.openafs.org/2215
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Log in FileLog (or VolserLog, or the log of any program that requests
salvages) when we request a demand-salvage to occur.
Change-Id: I2444480287a1647c2d3e25039467167e28e17f38
Reviewed-on: http://gerrit.openafs.org/2284
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
Rework the git version detection script to handle some issues that
have been pointed out.
1/ Make it work properly with objdir builds
2/ Don't try to work out if the tree is dirty if git describe failed
3/ Use the configured VERSION as a fallback if we can't obtain proper
version information during a make
Change-Id: I39494e1c18cf4eacbb55386334da7128fbe96310
Reviewed-on: http://gerrit.openafs.org/2283
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The destroyMe conditional does not depend on the result of
VShouldCheckInUse(), so move it outside of that block.
Change-Id: Ieb4c97ae9f76b4369680629f18eecd1dfc06682f
Reviewed-on: http://gerrit.openafs.org/2276
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Tested-by: Derrick Brashear <shadow@dementia.org>
avoid growing a volume index too large. handle errors other than just by
dropping a core
Change-Id: Id1bf7a1a40672b6b960cc0d7a1cd54f48ab0b50a
Reviewed-on: http://gerrit.openafs.org/2291
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
In afs_AllocCBR, use dynamically created afs_cbr structures
when running out of preformatted ones, rather than calling
afs_FlushVCBs under, potentially, the afs_xvcache lock
(which would be held across the RPC, difficult to drop and
re-acquire under the current hierarchy).
Modest modernization of the number preformatted afs_cbr structures,
rule-of-thumb, not pretending any research.
Change-Id: I9427427d5dab7d4639822c370bdded0418f67d9e
Reviewed-on: http://gerrit.openafs.org/2243
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This warning printf has some issues - it prints out pointers as
ints with %d (which causes warnings), and if the intention was
to print the referenced values, they wouldn't be set yet at that
point in the function.
Since the purpose is not clear and it has issues, just remove it.
Change-Id: Ied69c390818f9dff235bdaa31af42996aaa39af3
Reviewed-on: http://gerrit.openafs.org/2325
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Fix two minor warnings in afs_pioctl.c:
- gcc complains that threshold may get used uninitialized. the
warning looks bogus, but initialize it to keep gcc happy.
- PSetCachingBlkSize is declared but never defined.
Change-Id: I3ac84d665f60ba51fef2d52f2bd8d90e0a7bc3b3
Reviewed-on: http://gerrit.openafs.org/2322
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Deal correctly with the case of a server with no 64-bit fetch
support. In that case, the code needs to fallback to the standard
FetchData call, similar to what happens in afs_fetchstore.c.
Move existing check out of 64-bit-only branch so servers
already known to be non-64-bit and not merely those newly
discovered so execute the non-64-bit FetchData.
Change-Id: I505ce6d88072bc3ee5208863717395a78f8562fa
Reviewed-on: http://gerrit.openafs.org/2319
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
truncate_inode_pages requires the mapping to be protected using
i_mutex / i_sem, which is not held whereever osi_FlushPages is called.
Change-Id: I2ca59cf75633368efb7f6a17fd01c7c517a8f609
Reviewed-on: http://gerrit.openafs.org/2244
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Some variables are only used for AFS_64BIT_CLIENT code, so make
their declaration conditional as well.
Also, initialize 'code' while we're at it. The compiler has a
legitimate complaint that it could be used before it's set,
for instance if we have AFS_64BIT_CLIENT but afs_serverHasNo64Bit
is true.
Change-Id: Ic04b07fffa9668123a9029bb42415a7c701c2339
Reviewed-on: http://gerrit.openafs.org/2317
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Remove unnecessary warning for the UKERNEL case. This file will
always get compiled with UKERNEL.
Remove an "if 1" ifdef that was probably used while debugging to
make the function non static.
Change-Id: I5ba5bbb4bd2b782c605699028cf3ad2c7e8cd41f
Reviewed-on: http://gerrit.openafs.org/2318
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Cache-bypass was still using the old style pagevec manipulation
functions, and so won't build on newer kernels. Update it to use the
same pagevec functions as the generic readpages code.
FIXES 127505
Change-Id: I9d8acaf3165bbdf24068bd9145a2369cd0c87e4d
Reviewed-on: http://gerrit.openafs.org/2298
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
afs_ShakeLooseVcaches grabs the write lock before calling
osi_TryEvictVCache. The latter calls vgone(l), which sometimes
calls into VOP_CLOSE, which again trys to acquire the write lock,
leading to deadlock. Drop the write lock and reaquire it in
TryEvictVCache as a fix.
While here, set *slept to 1 since we drop the glock.
This churn was enough that the gcc no longer cached the value of
AFSTOV(avc), which gets set to 0 in VOP_RECLAIM, so the subsequent
VOP_UNLOCK dereferenced a null pointer. Cache the vnode pointer
in a local variable for the entire function instead of using
AFSTOV() everywhere.
Change-Id: Ic826e7888cb400c19857c58cb6ed88b9bdd0dddc
Reviewed-on: http://gerrit.openafs.org/2315
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Correct the fs manpage to show that 'fs diskfree' shows a header
called 'total' to represent the total disk space, not 'kbytes'.
Change-Id: Id827ec81dcfd79ab28eed3bc392524a378f0069d
Reviewed-on: http://gerrit.openafs.org/2313
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
'fs lq' output separates its space values by whitespace, but 'fs df'
does not, which was causing the human-readable output for 'fs' to not
be properly aligned with the output headers. Modify HumanPrintSpace to
take up exactly 10 characters (9 for the value, 1 for the exponent),
and have the callers print out an extra space if appropriate.
Change-Id: Ied81e73e1e84df34e63fdf0c80ad86341bea0cd4
Reviewed-on: http://gerrit.openafs.org/2311
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
includes updated instructions for updating.
note that gen_glue.c in lib/asn1 has a bug which omits
a needed newline in the "const struct units * asn1_%s_units(void);",
line.
FIXES 127554
Change-Id: Ibc880bf51419d51de40b33d8c43122e592971b0b
Reviewed-on: http://gerrit.openafs.org/2306
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>