Re: [PATCH 01/14] NFS: Clean up TEST_STATEID and FREE_STATEID proc error reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2012-07-09 at 11:43 -0400, Chuck Lever wrote:
> The TEST_STATEID and FREE_STATEID operations can return
> NFS4ERR_BAD_STATEID, NFS4ERR_OLD_STATEID, or NFS4ERR_DEADSESSION.
> These error values should not be passed to nfs4_handle_exception(),
> since that will recursively kick off state recovery, resulting in a
> deadlock.  The reason to continue using nfs4_handle_exception() is
> to deal with NFS4ERR_DELAY.
> 
> Moreover, specifically when the TEST_STATEID operation returns
> NFS4_OK, res.status can contain one of these errors.
> _nfs41_test_stateid() replaces NFS4_OK with the value in res.status,
> which is then returned to callers.
> 
> But res.status is not passed through nfs4_stat_to_errno(), and thus is
> a positive NFS4ERR value.  Currently callers are only interested in
> !NFS4_OK, and nfs4_handle_exception() ignores positive values, so this
> oversight hasn't bitten us so far.
> 
> Bryan agrees the original intent was to return res.status as a
> negative NFS4ERR value to callers of nfs41_test_stateid(), as long as
> no state ID recovery is attempted.

None of this describes a cleanup... AFAICS it is all a bugfix

> As a finishing touch, add appropriate documenting comments and some
> debugging printk's.

This should be a separate patch so that we can send the bugfix part to
stable@vger if needed...

> Signed-off-by: Chuck Lever <chuck.lever@xxxxxxxxxx>
> ---


-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com

��.n��������+%������w��{.n�����{��w���jg��������ݢj����G�������j:+v���w�m������w�������h�����٥



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux