Administrative commands and server binaries can benefit from the
ability to translate RPC OpCode numbers to proper function names.
For this purpose, rxgen now emits the function
char *PKGTranslateOpCode(int)
where PKG is replaced by the respective package prefix.
The function is generated in the exact same way that ExecuteRequest is.
This way, the right optimization (array storage vs. generated case
statement) according to the respective sparseness of OpCodes in the
different RX packages is maintained.
Change-Id: Ib083597c0841f50518afd2b159b98c0447e13da0
Reviewed-on: http://gerrit.openafs.org/3305
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
We do not want to process .pod.in files when generating HTML versions
of the man pages. Change the filename filtering logic to only accept
.pod files, so we'll also skip over all other stuff we don't want,
like CVS or fragments directories.
Change-Id: Ic7da67dd5297aa52a67a8a0dc0b9cc7904cfa2b4
Reviewed-on: http://gerrit.openafs.org/3302
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
This change removes all of the local crypto use in userspace, in
favour of using our shiny new afshcrypto library.
Change-Id: Iac21b42e49bac424cc28c449a31f2da44121b7e5
Reviewed-on: http://gerrit.openafs.org/2577
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Replace all of the bits of libutil that were originally culled
from libroken with libroken originals.
Change-Id: I361d7a8d134a361caa2da16963408c74c55a1d4e
Reviewed-on: http://gerrit.openafs.org/3211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Use the system wide libroken, rather than building our own bits
locally, for libafshcrypto.
Change-Id: I93eaa3a1d6b9290e30c0892a3313a8eaa639d52a
Reviewed-on: http://gerrit.openafs.org/3206
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
There was a stray ( in the shared library build system. We hadn't
noticed this, as the only place that uses the shared makefile and
produces binaries is the hcrypto test suite that isn't built by
default.
Change-Id: I1414c0e1db52307f8ffff4214f411bc028c03fd5
Reviewed-on: http://gerrit.openafs.org/3210
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Build the pthreaded salvage server on Windows.
(This work is not yet complete.)
Change-Id: I6c2656131a4e49d2bc5869c21f3aa5056a1f3a66
Reviewed-on: http://gerrit.openafs.org/3328
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
With kernel 2.6.37 it is now mandatory to define the llseek operation
for files and directories. If these are not defined, no_llseek is
called, and any attempt to seek returns ESPIPE.
Most file systems use generic_file_llseek, but it seems safer to use
default_llseek which is what the vfs used to call for us by default.
In 2.6.37 these two functions are actually functionally identical.
Change-Id: I7ad736e3953c4feaa51afb9f7ff2760c3140373f
Reviewed-on: http://gerrit.openafs.org/3292
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Some organizations may need to pass additional parameters to
signtool.exe. Add the optional CODESIGN_OTHER value to permit
arbitrary additional parameters to be specified.
Change-Id: Idba3a06585b11b3bb80854049a8ebcd1f7e2550a
Reviewed-on: http://gerrit.openafs.org/3322
Tested-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
In src/volser/vsprocs.c is an unused function, yesprompt.
Get rid of it.
Change-Id: Ie87e89f58a0ad0dc37d38fa48a178d19d7459515
Reviewed-on: http://gerrit.openafs.org/3309
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The support routines relied upon by vos use the older nvldbentry
data structures which do not include the UUID for the server.
This patchset updates the code to use the uvldbentry structure
so that a future patchset can make use of UUID values when available.
Any functions from vsprocs.c which are referenced by vos.c are
considered public. This includes all of the VL_xxxx, UV_xxxx
and Lp_xxxx functions, the EnumerateEntry, SubEnumerateEntry, and
host mapping functions. For any which references an nvldbentry as a
parameter a new 'U' version is created that accepts a uvldbentry.
These new 'U' functions are then used throughout vos.c and the internal
routines.
Change-Id: Ib95e4c38574c97284e6b8eee06d92555365a179e
Reviewed-on: http://gerrit.openafs.org/2089
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
A minimal change set to get libroken to build on Windows. Sadly,
libroken contains definitions for a number of platform compatibility
macros which were previously scattered throughout the windows code.
These scattered macros have to be removed in order to build libroken.
The impact of this removal is that a very large number of files
throughout the tree require the addition of "roken.h" to pick up the
new compatibility code. The bulk of this change is adding these
includes.
In addition, some of the added includes add roken dependencies to the
Unix build. So, also add libroken to the build rules in affected Unix
Makefiles.
Change-Id: Ifba431bd37e67b1e273fbc6f69b805a232193456
Reviewed-on: http://gerrit.openafs.org/3205
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
vsyslog on AIX (added to rokenafs by commit
f21fbf6b9c) requires rk_*printf,
add them to the libroken build.
Change-Id: I243cb89b5715be03920c562559b326786a9e9518
Reviewed-on: http://gerrit.openafs.org/3320
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
in order to make aix happy, build vsyslog if we have it.
Change-Id: I78e7870ed4fef7ee9d41b0ae6096e6c2b1c6cc19
Reviewed-on: http://gerrit.openafs.org/3316
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Some callers in vol and volser were not using afs_foff_t for file
offsets for calls to STREAM_ASEEK, FDH_TRUNC, FDH_PREAD, or
FDH_PWRITE. Most notably, in code for volume cloning, purging, and
dumping operations. Fix them to use afs_foff_t to prevent errors when
dealing with large special files.
Change-Id: I531fa8cb3070007a9c03e5e19c70d546f272a12c
Reviewed-on: http://gerrit.openafs.org/3289
Tested-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Fixes some “warning: function declaration isn’t a prototype”, and
makes the prototypes consistent with the corresponding definitions.
Change-Id: I7dce475800b585c3cc8a735d0a2f92ca339c9fac
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3278
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
struct vcache gets two new fields:
int protocol
which in the lower 16 bits contains the protocol number
1 classical rx-fileserver,
2 rxosd,
4 direct access to visible vicep partitions.
void *vpacRock
which for visible files in a vicep-partition contains
a pointer to a struct known only inside afs_vicep.c
which contains the pointer to the open file and other
information.
Change-Id: I9d471a010d99bfa53ac59be3e7daad72e29d02ee
Reviewed-on: http://gerrit.openafs.org/3013
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
ubik is currently tracking writeTidCounter for write transactions
separately from regular transactions (assigned from tidCounter).
Specifically, tidCounter is incremented twice for each transaction,
but writeTidCounter is incremented twice only for write transactions.
As a result, writeTidCounter and tidCounter tend to drift far apart.
This is a problem, since the tid for DISK_* calls uses the transaction
id of the current transaction (based on tidCounter), and VOTE_Beacon
uses writeTidCounter for its transaction id. So, in effect, the tid in
VOTE_Beacon is completely bogus and unrelated to the transaction id of
the actual current write transaction. This can cause valid write
transactions to become invalidated when tidCounter becomes negative,
since VOTE_Beacon will send a positive tid, and if there is a current
in-flight write transaction with a negative tid, SVOTE_Beacon will
deem the transactions inequal and will abort the write transaction.
So instead, record the transaction id counter for the last write
transaction in writeTidCounter. This way, when we call VOTE_Beacon, we
will use the correct transaction id counter for the current write
transaction, and SVOTE_Beacon on the remote site will not invalidate
the transaction.
Change-Id: I66f290d21fefdfcf9bd9deb704eefff987fe6970
Reviewed-on: http://gerrit.openafs.org/2647
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
when linux calls osi_linux_free_inode_pages we can try to queue a vcb.
this is foolish as we are shutting down. so, don't.
Change-Id: I18290396d9107455453de28097e7fad58526ae06
Reviewed-on: http://gerrit.openafs.org/3297
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add an -s option to afscp, to specify an amount of time to sleep in
the middle of a read or write operation. This can be helpful in
simulating a slow client.
Change-Id: I51228033ff485a92a7805a76e2d6645ec4123495
Reviewed-on: http://gerrit.openafs.org/3291
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Permit a popular path through afs_linux_dentry_revalidate to pass without
taking a lock which it actually does not need. This affects multi-core
software-build nodes in particular, where serialization and high stat() counts
restricts useful processing to a single core.
Change-Id: I6151a1240519d9f91f6e258af71b797ce276f4e1
Reviewed-on: http://gerrit.openafs.org/3298
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Add the -offline-timeout and -offline-shutdown-timeout options to the
fileserver, to implement interrupting clients accessing volumes we are
trying to take the volume offline. Document the new options.
Currently this is only implemented for read operations. Implementing
this for write operations and callback breaks will require more work.
This also removes the VGetVolumeTimed interface from the volume
package, since the fileserver was the only user and with this change
the fileserver now uses the VGetVolumeWithCall interface.
Change-Id: I2c6246d522d37dfd2fa0ecf69d6f71803b2acc03
Reviewed-on: http://gerrit.openafs.org/2984
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When we are waiting for a volume to go offline, only wait a certain
amount of time for it to go offline before we interrupt all RX calls
associated with that volume. This amount of time is configurable in
the new offline_timeout and offline_shutdown_timeout volume package
option fields.
Change-Id: Ib6beb3c37f44dcc067c1c94506804f61752cc4ff
Reviewed-on: http://gerrit.openafs.org/3216
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Add VGetVolumeWithCall and VPutVolumeWithCall, to associate RX calls
with volume heavyweight references. Also add the interrupt_rxcall
field to the volume package options structure.
This also adds the VIsGoingOffline function, so a caller can tell when
a volume is going offline.
Change-Id: Iacb7738775c8e3aa611360320ca739f5de4ba625
Reviewed-on: http://gerrit.openafs.org/3215
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Replace the VGetVolumeNoWait interface with the more general
VGetVolumeTimed interface, which allows for waiting for offlining
volume for arbitrary amounts of time (instead of just "waiting
forever" or "not waiting at all"). Also add VOL_CV_TIMEDWAIT and
VTimedWaitStateChange_r as necessary to implement this.
Change-Id: I3d9ea7a89f16ec5fd185eae7679e84033eb2d581
Reviewed-on: http://gerrit.openafs.org/3214
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Improper use of == instead of the intended = within
ktc_ListTokensEx.
Change-Id: Id8b49ef91d83000c0685a37bab4a2ca44fc037b4
Reviewed-on: http://gerrit.openafs.org/3304
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The new token interface generates token.h and token.xdr.c
from token.xg in the src/auth directory. Add the missing
clean target for these files.
Change-Id: Ic689a5cad3643b450963f10abee725e0010f1e15
Reviewed-on: http://gerrit.openafs.org/3303
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Simon Wilkinson <sxw@inf.ed.ac.uk>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
The fileserver allows nonexistent volumes to be checked out. Since
VOL_STATE_DELETED volumes conceptually do not exist, we should also
allow them to be checked out.
Change-Id: Ibc0f761569b339579acff03a3cbd9f795f783e0a
Reviewed-on: http://gerrit.openafs.org/2873
Reviewed-by: Tom Keiser <tkeiser@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The fileserver synopsis was missing the leading 'fileserver' before
the options list. This causes the options list to not be interpreted
as POD, and so you get a lot of ugly unprocessed POD markup in the man
page. Fix that.
Change-Id: I8e2faf6d46a81185967d30b1669d3f48cbf269dd
Reviewed-on: http://gerrit.openafs.org/3301
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Use the port information in ugen_ClientInit also if no server was
specified and info.hostAddr[i].sin_port is not set.
Change-Id: I7f53f1bea0b034018d44acf0d0ae3b3a39b85134
Reviewed-on: http://gerrit.openafs.org/3293
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When we get an error from a fetch or store operation, show what the
error was, instead of just saying "some network error occured".
Change-Id: I4b1baca0e1b11bd048014ef2b4f4789c7813f0e7
Reviewed-on: http://gerrit.openafs.org/3290
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Commit 9fed169b1c attempts to remove any
remote RO site that has RO_DONTUSE set. However, we set RO_DONTUSE on
all sites earlier in the release process if this is a full release,
resulting in all sites getting a full dump.
Correct this by remembering in 'origflags' what flags each site has
before we messed with the vldb entry.
Thanks to Mike Meffie.
Change-Id: I8c9582c9f7aaee92637ddc1ad11aed96fd69686b
Reviewed-on: http://gerrit.openafs.org/3296
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Tested-by: Michael Meffie <mmeffie@sinenomine.net>
The test programs in tests/util did not depend on libutil.a or
libtap.a. So, if libutil.a changed, they were not relinked. Add the
dependencies so correcting a part of libutil will cause the tests to
actually reflect the change.
Change-Id: Iad9d15ef6affd8178d7ef7cb919f66dcce8c61da
Reviewed-on: http://gerrit.openafs.org/2484
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
The global host lock must be held over h_Release_r. Fix the
the case in h_Enumerate where h_Release_r is called without
the global host lock held.
Change-Id: I010338edf0a515f543e3468afff907e97eb07163
Reviewed-on: http://gerrit.openafs.org/3294
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When salvaging whole partitions / whole servers, the fileserver is
assumed to not be running. So only break callbacks if we are salvaging
a single volume. If we are salvaging a whole partition, do not tell
the fileserver to break callbacks on changed volumes, since the
fileserver will not be around and we will just hang.
Change-Id: Ia158d5a00574a6907b9b040510ef7d827a2ee05d
Reviewed-on: http://gerrit.openafs.org/2865
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The salvager ends up deadlocking when multiple linktables exist
in the same volume group special directory. The issue is that we
open and flock all discovered linktables, but only close out the
last one found. Consequently, when our child scans the linktables
again, we deadlock against the locked and leaked descriptor(s) our
parent left around before forking.
While we have so far been unable to root-cause the actual creation
of spurious linktables, this patch will at least stop the salvager
from deadlocking against itself when this occurs.
Change-Id: I67821f2c99663c56e4ec0b008e1d2d3a8751df0e
Reviewed-on: http://gerrit.openafs.org/2979
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
DECLARE_MUTEX is gone as of 2.6.37; afs_global_lock switches from
DECLARE_MUTEX to DEFINE_MUTEX at 2.6.16, so do the same here.
Change-Id: If2ea5e1d3b5406c631cade1128425b5be79ffd4a
Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>
Reviewed-on: http://gerrit.openafs.org/3273
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Tested-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
When a file's size is an exact multiple of the page size, the vfs
will issue a readpage for an extra page at the end, for which there
is no data. Deal with it here instead of letting it trickle down
to the background daemon, which will issue an unnecessary read to the
server, and maybe get confused because there is no data.
Change-Id: If86ed785c4e9d50edb1a960142f726fa869c50fc
Reviewed-on: http://gerrit.openafs.org/3281
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
Currently, the volserver just looks at the destroyMe field in a volume
header to see if it should tell the fileserver a volume has been
deleted (FSYNC_VOL_DONE opcode). However, temporary volumes created by
the volserver (such as new volumes or clones) have destroyMe set, but
are obviously not deleted, and so the fileserver should just be told
FSYNC_VOL_LEAVE_OFF about these volumes instead.
With commit bb9caf9822, FSYNC_VOL_DONE
and FSYNC_VOL_LEAVE_OFF actually do different things, so this does
make a difference.
Note that this commit slightly changes the meaning of the
vp->needsPutBack field. Now it must be set to VOL_PUTBACK_DELETE to
tell the fileserver that the volume has been deleted, and set to
VOL_PUTBACK if it just needs to be given back to the fileserver.
Change-Id: I020679c853b93593e5c75c4f30ac56312ba0f8d6
Reviewed-on: http://gerrit.openafs.org/2872
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
The bypass code's readpages does deal with a non-contiguous list
of pages, but it doesn't adjust the size of the read it requests
from the background daemon accordingly. As a result we'll ask the
server for pages we were not asked to read.
Change-Id: I5468a4a68f4f415961298144f5bb581faeda540a
Reviewed-on: http://gerrit.openafs.org/3282
Reviewed-by: Matt Benjamin <matt@linuxbox.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Since rxi_PrepareSendPacket drops the call->lock during
processing the caller must perform a rxi_WaitforTQ prior
to manipulating the transmit queue.
Change-Id: Icd16444d84235c1fb647bf96bd85706c7396a4bb
Reviewed-on: http://gerrit.openafs.org/3279
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
VAttachVolumeByName_r has logic to give back a volume over FSSYNC if
we checked out a volume but failed to attach it for whatever reason.
However, the logic used for determining if the volume was checked out
or not is a bit inaccurate (even moreso than the comments imply),
potentially causing us to VOL_ON volumes that don't exist at all.
Instead of trying to guess based on various conditions whether or not
we checked out the volume, keep track of a variable that is only set
when we actually checkout the volume from the fileserver. Then only
give back the volume if it is set.
Change-Id: I03197eca3e1a31a4b9566552eb9032fdc7cc5909
Reviewed-on: http://gerrit.openafs.org/3274
Tested-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>