Andrew Deason [Mon, 3 May 2010 19:57:28 +0000 (14:57 -0500)]
Solaris: shutdown in freevfs, not unmount
Call the afs shutdown sequence (afs_shutdown()) in the VFS_FREEVFS
handler, instead of in the VFS_UNMOUNT handler. This way we shutdown
when the last reference to our vfs goes away, instead of when we are
unmounted. That doesn't make much of a difference right now, but doing
so will be required for supporting forced unmounts.
Andrew Deason [Thu, 29 Apr 2010 22:47:15 +0000 (17:47 -0500)]
Solaris: prevent AFS umount while busy
Return EBUSY from unmount if someone still references stuff in AFS.
This prevents kernel panics that can occur on shutdown if we umount
while there is a file in AFS open. Normally a process can hold a file
in AFS open, AFS is unmounted, and the file is closed, triggering our
code which explodes if called after we're unmounted.
This adds VFS_HOLD/VFS_RELE calls whenever we 'create' a vcache, or
retire an old one, to keep track if anyone has an open reference to
us.
Simon Wilkinson [Sat, 7 Nov 2009 00:16:28 +0000 (00:16 +0000)]
Refactor afs_NewVCache
afs_NewVCache was a twisty turny maze of #ifdefs and duplicated code.
This makes a number of sweeping changes to simplify this code, and to
move platform specific elements out into their own directories.
*) ShakeLooseVCaches is refactored so that the same code can be used
both for platforms that support dynamic vcaches, and those which
don't.
*) afs_NewVCache, ShakeLooseVCaches, and afs_AllocVCache are all
modified to remove platform specific code, and to call platform
specific functions.
*) A new platform file 'osi_vcache.c' is created to hold a number of
platform specific vcache operations:
*) osi_TryEvictVCache handles the decision of whether a vcache can
be evicted or not, and does so if required
*) osi_NewVnode allocates a new vnode
*) osi_PrePopulateVCache does the necessary population of the
vcache, before it's threaded onto the VLRUQ and associated hash
tables.
*) osi_AttachVnode handles attaching an OS vnode to our vcache,
where that is necessary
*) osi_PostPopulateVCache handles the vcache population that must
occur after we're on the VLRUQ and have a vnode attached.
OpenBSD: Fix bug in setpag() when group list is empty
In OpenBSD, the PAG uses the 2nd and 3rd group slots in the task's
group list. If an application sets en empty group list (such as Samba
does), any existing PAG is lost and any new one is NOT set because
the existing code will set the new group count to 2 instead of 3, and
it leaves the first group entry as garbage (whatever random value the
memory contained), thereby totally messing up the task's group list.
This patch fixes it so that it behaves as expected.
Fix pattern to detect i386-based OpenBSD system type
When the pattern to detect OpenBSD system types (via MKAFS_OSTYPE) was split
into two separate ones for amd64 and i386 architectures, the pattern for
i386-based systems was not set quite right. As a result, i386-based OpenBSD
systems are no longer detected properly at this stage, resulting in an error
of "cannot find input file: src/libafs/MakefileProto..in" during configure.
This patch corrects the pattern.
Windows: Show configuration pages for all types of MSI installations
The OpenAFS MSI installer wizard used to not show any configuration
pages for "Typical" and "Complete" installations. Setting the
workstation cell and logon options during installation required
selecting the "Custom" option. Many users choose the "Typical" option
during installation, and thus would never see the configuration pages.
Therefore, for these users, the workstation cell was being set to the
default.
This patch makes the workstation cell and logon option configuration
pages visible to all types of installations (except silent
installations which show no UI).
Jeffrey Altman [Sun, 2 May 2010 19:30:27 +0000 (15:30 -0400)]
Windows: Restructure cm_LookupInternal addition of Freelance entries
cm_LookupInternal creates Freelance mount points and symlinks
when queries cannot be found in the Freelance root.afs directory.
If the search name is a full cell name for which vldb information
can be obtained, then a mount point is added. If the search name
is a left-most substring or the full cell name with a dot appended
to it, then a symlink was created. This approach created a very
poluted Freelance name space.
This patchset makes the following changes:
1. Do not create symlinks with a dot appended to the cellname
2. Do not create symlinks where the left-most substring is not
a full dot separated component of the cellname.
3. Permit lookups to succeed when we would have created a
symlink in the past without creating the symlink.
Jeffrey Altman [Sun, 2 May 2010 19:26:39 +0000 (15:26 -0400)]
Windows: Permit BPlus tree lookups within cm_ApplyDir
BPlus tree lookups are much faster than searching through
the native directory format on Windows because the case sensitive
hash tables cannot be used successfully. Permit BPlus trees
to be used except when called with cm_BPlusDirFoo as the action
function because cm_BPlusDirFoo is used to build the BPlus trees
from the native directory format.
Jeffrey Altman [Sun, 2 May 2010 18:48:00 +0000 (14:48 -0400)]
Windows: Force rebuilding Freelance directory in AddMount and AddSymlink
cm_FreelanceAddMount and cm_FreelanceAddSymlink is supposed to
return the allocated FID of the entry that was added. However,
cm_NameI is called to perform the lookup without forcing an update
of the Freelance fake directory. As a result the entry may not be
found.
Force an update prior to calling cm_NameI() by using
cm_clearLocalMountPointChange() and cm_reInitLocalMountPoints()
if required.
Jeffrey Altman [Sun, 2 May 2010 18:03:23 +0000 (14:03 -0400)]
Windows: use cm_noteLocalMountPointChange whenever fakeDirVersion is changed
cm_noteLocalMountPointChange() is meant to be used when fakeDirVersion
is changed. It previously wasn't used because cm_noteLocalMountPointChange()
would obtain the cm_Freelance_Lock. Now that cm_noteLocalMountPointChange()
can be called while holding the lock, use it everywhere.
Jeffrey Altman [Sun, 2 May 2010 17:56:24 +0000 (13:56 -0400)]
Windows: add locked parameter to cm_noteLocalMountPointChange
If cm_Freelance_Lock is held set the 'locked' parameter to TRUE.
This avoids a requirement to drop the lock only to have it be
obtained when cm_noteLocalMountPointChange.
The validation check for the response from the GetVolumeStatus
pioctl is incorrect. The response is not simply a VolumeStatus
structure but also several C strings appended to it.
Jeffrey Altman [Sun, 2 May 2010 13:16:29 +0000 (09:16 -0400)]
Windows: getAFSServer wrong variable used in uncompiled code
In the uncompiled implementation of getAFSServer, the unmodified
'cellname' is used in the send_DNS_AFSDB_Query call instead of
the properly constructed 'query' variable.
Windows: FlushFile ioctl should call cm_FSync, not buf_CleanVnode
When flushing a file, we need to commit the file length changes
as well as the dirty buffers. Call cm_FSync instead of buf_CleanVnode
which is called by cm_FSync.
Windows: add 'locked' flag to cm_FSync and call when dropping write locks
cm_FSync should be called when releasing file server write locks.
This ensures that all dirty buffers are stored before the lock
can be acquired by another client.
Since cm_Unlock holds the cm_scache_t->rw exclusively when calling
cm_FSync, add a 'locked' parameter to cm_FSync to avoid an unnecessary
release and reacquire of the rwlock.
Matt Benjmain [Wed, 28 Apr 2010 10:19:16 +0000 (06:19 -0400)]
netbsd: rebase cm at NetBSD 4.0
Rebases the NetBSD client port at OpenBSD, which was originally
based on an original NetBSD client port by John Kohl. The
platforms remain closely connected.
At latest milestone, the port builds as a NetBSD LKM, which was
loadable and can mount /afs (but much work remains past this
point).
Simon Wilkinson [Wed, 28 Apr 2010 00:13:30 +0000 (01:13 +0100)]
Linux: Register number sysctls only when desperate
The AFS sysctl interface was trying to register numeric system
calls whenever the kernel would let it. This is anti-social, as
we've never had sysctl numbers allocated to us. In kernels newer
than 2.6.24, this misbehaviour is detected and punished. In recent
kernels, the binary interface has gone away entirely.
Since 2.6.19, the kernel has supported allocated unnumbered system
calls. These are only available via /proc/sys (and not the using
the legacy, binary, API), but they're really the only interface
available to us.
Change the sysctl registration code to use unnumbered calls whenever
they are available. Unnumbered calls aren't available in 2.4.x, so
completely remove that code there.
Marc Dionne [Sun, 25 Apr 2010 02:12:27 +0000 (22:12 -0400)]
Linux: Remove unnecessary crhold on incomplete kernel credentials
When credentials debugging is active in the kernel, sanity checks
in various credentials functions such as get_cred or put_cred
require that they are called with full fledged kernel credentials.
This can be a problem with recent kernels in osi_Init where we
build our own credentials and try to "crhold" them.
Getting a reference doesn't make much sense anyway since we're
using a statically allocated structure that we never try to free
or modify.
As a minimal fix, just don't call crhold when we're using
the kernel credentials structure.
right now, flock with LOCK_EX, on unlock, triggers an async store.
make it sync, but also, make sure to ask to have any in-memory
data sent to us (e.g. VM_StoreAllSegments); unlike Solaris
VMSYNC_INVAL, we don't want to invalidate the pages, just get copies
written back.
LOCK_SH did not, does not and AFAICT should not trigger writes.
Simon Wilkinson [Tue, 27 Apr 2010 18:31:55 +0000 (19:31 +0100)]
Linux: Reorder the tests
As a final change to the Linux autoconf stuff, reorder the list of
tests so that it's more easy to see what's being checked for, and to
prevent multiple copies of the same thing being added.
Simon Wilkinson [Tue, 27 Apr 2010 17:57:30 +0000 (18:57 +0100)]
Linux: Don't preprocess osi_vfs.h
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.
Simon Wilkinson [Tue, 27 Apr 2010 16:41:22 +0000 (17:41 +0100)]
Linux: Add general autoconf macro for Linux kernel
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.
Simon Wilkinson [Tue, 27 Apr 2010 12:02:20 +0000 (13:02 +0100)]
Linux: Add autoconf macro for structure checks
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.
Simon Wilkinson [Mon, 26 Apr 2010 22:54:05 +0000 (23:54 +0100)]
Linux: Macroise kernel function autoconf tests
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.
Simon Wilkinson [Mon, 26 Apr 2010 21:13:39 +0000 (22:13 +0100)]
Linux: Tidy up freezer code
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.
Simon Wilkinson [Mon, 26 Apr 2010 20:34:17 +0000 (21:34 +0100)]
Linux: Simplify header file checks
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.
Simon Wilkinson [Mon, 26 Apr 2010 22:36:38 +0000 (23:36 +0100)]
Overzealous .gitignore under rxkad
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.
Marc Dionne [Mon, 26 Apr 2010 22:15:16 +0000 (18:15 -0400)]
Overzealous clean target under rxkad
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.
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
Simon Wilkinson [Fri, 23 Apr 2010 16:07:40 +0000 (17:07 +0100)]
Linux: Don't hide memory management
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>
Simon Wilkinson [Fri, 23 Apr 2010 16:10:15 +0000 (17:10 +0100)]
Linux: The kernel module always runs in the kernel
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.
Marc Dionne [Thu, 22 Apr 2010 21:22:37 +0000 (17:22 -0400)]
Initialize oldvtix
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.
Simon Wilkinson [Fri, 23 Apr 2010 17:03:49 +0000 (18:03 +0100)]
Linux: Use kernel network helper functions
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.
Simon Wilkinson [Fri, 23 Apr 2010 17:38:02 +0000 (18:38 +0100)]
Linux: Remove old code from RX kernel implementation
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.
Simon Wilkinson [Fri, 23 Apr 2010 15:54:39 +0000 (16:54 +0100)]
Linux: Don't pass f_pos down to the filesystem
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.
Simon Wilkinson [Fri, 23 Apr 2010 14:07:58 +0000 (15:07 +0100)]
Linux: Don't roll our own llseek
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.
Simon Wilkinson [Sun, 25 Apr 2010 21:07:04 +0000 (22:07 +0100)]
Move rxkad/domestic/* into rxkad/ directory proper
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.
Simon Wilkinson [Sun, 25 Apr 2010 18:11:06 +0000 (19:11 +0100)]
Improve shared library building support
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.
Simon Wilkinson [Sun, 25 Apr 2010 10:31:36 +0000 (11:31 +0100)]
Linux: Remove prototype warning inhibition
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.
Simon Wilkinson [Sun, 25 Apr 2010 09:55:23 +0000 (10:55 +0100)]
Fix make clean and make distclean
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.
Simon Wilkinson [Sat, 24 Apr 2010 16:34:02 +0000 (17:34 +0100)]
Fix objdir builds
Change f2db78a346112f5320efc6f0b6b9fe4ae0d893d3 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.
Simon Wilkinson [Thu, 22 Apr 2010 21:24:11 +0000 (22:24 +0100)]
Unix: Modify disk cache versioning
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>
Andrew Deason [Thu, 22 Apr 2010 16:54:06 +0000 (11:54 -0500)]
Update nextVnodeUnique before checking inUse
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.
Andrew Deason [Thu, 22 Apr 2010 18:21:52 +0000 (13:21 -0500)]
Prefer EndCall errors in StoreMini
Partially revert b1eb6a7a3f80500f0187cc6a1dd2013e1a5e154a, 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>
Simon Wilkinson [Thu, 22 Apr 2010 16:56:25 +0000 (17:56 +0100)]
Linux: RedHat packaging updates for RHEL6
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.
Fix UCONTEXT detection on ppc_linux26 via include order
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.
Andrew Deason [Wed, 21 Apr 2010 17:41:21 +0000 (12:41 -0500)]
Recover from afs_GetVolSlot errors
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.
Add RFC 5864 to the protocol documentation directory
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.
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.
Andrew Deason [Sun, 18 Apr 2010 23:49:18 +0000 (18:49 -0500)]
Add documentation for fs callback xstats
Change I572ff682de4cc7ef27bb46dd028d3d797b873841 added the fileserver
callback xstats collection to afsmonitor. Provide some documentation
for these fields, along with the other fields displayed by afsmonitor.
* 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.
Remove special-case call sequence for KAM_SetPassword on s390
For Linux s390 (but not s390x), an additional argument was passed
to KAM_SetPassword between the kvno and the encryption key. This
doesn't seem to match the rest of the code and is now, with stricter
prototyping, preventing the code from compiling. Remove it and use
the same call sequence on s390 as everywhere else.
Andrew Deason [Mon, 19 Apr 2010 19:48:14 +0000 (14:48 -0500)]
Use AC_PREREQ
We use AC_USE_SYSTEM_EXTENSIONS, which was introduced in autoconf
2.60. To allow for less confusion and perhaps a more clear error
message, specify that we require using at least that version.
Add a caution explaining how the file server addresses are registered
and pointing users at NetInfo and NetRestrict plus restarting the file
server for the normal case.
Mention what version of OpenAFS introduced this command. Drop the note
about the version of OpenAFS that added the -encrypt flag, since the
whole command is newer than that.
Reference vos listaddrs -printuuid specifically to get the UUID.
General formatting and wording cleanup: use terminology more consistently,
continue a long example line, wrap long lines, fix a spelling error, and
add cross-references to NetInfo and NetRestrict.
Windows: Preserve volume location info in case of comm fail
The cache manager refreshes volume location information every
two hours. If during a refresh the communication with the
vldb server fails, the previously known volume location information
should continue to be used.
The previous behavior in which the volume location information
is discarded first and then the update is performed can result
in unnecessary client failures when a temporary disruption in
communication with the vldb server occurs. Instead, wait until
we have a successful response from the vldb server before the
previous server list is discarded.
The idle error value (if any) is stored in the cm_req_t object.
Since the value is never cleared, the same value can be returned
for all requests that make use of the same cm_req_t object.
Change the behavior to only return an idle error once and then
clear it.