Re: [PATCH V2] NFSv4.1 handle DS stateid errors

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

 



I believe that COMMIT can be called with state == NULL - but looking
at the COMMIT errors, COMMIT should not return stateid errors.

I'll remove the stateid == NULL checks.

-->Andy

On Thu, Mar 8, 2012 at 9:09 AM, Myklebust, Trond
<Trond.Myklebust@xxxxxxxxxx> wrote:
> On Wed, 2012-03-07 at 18:44 -0500, andros@xxxxxxxxxx wrote:
>> From: Andy Adamson <andros@xxxxxxxxxx>
>>
>> Handle DS READ and WRITE stateid errors by recovering the stateid on the MDS.
>>
>> NFS4ERR_OLD_STATEID is ignored as the client always sends a
>> state sequenceid of zero for DS READ and WRITE stateids.
>>
>> Signed-off-by: Andy Adamson <andros@xxxxxxxxxx>
>> Signed-off-by: Trond Myklebust <Trond.Myklebust@xxxxxxxxxx>
>> ---
>>  fs/nfs/delegation.c     |    1 +
>>  fs/nfs/nfs4filelayout.c |   33 ++++++++++++++++++++++++++++++++-
>>  fs/nfs/nfs4state.c      |    2 ++
>>  3 files changed, 35 insertions(+), 1 deletions(-)
>>
>> diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c
>> index 87f7544..97d5357 100644
>> --- a/fs/nfs/delegation.c
>> +++ b/fs/nfs/delegation.c
>> @@ -474,6 +474,7 @@ void nfs_remove_bad_delegation(struct inode *inode)
>>               nfs_free_delegation(delegation);
>>       }
>>  }
>> +EXPORT_SYMBOL_GPL(nfs_remove_bad_delegation);
>>
>>  /**
>>   * nfs_expire_all_delegation_types
>> diff --git a/fs/nfs/nfs4filelayout.c b/fs/nfs/nfs4filelayout.c
>> index 47e8f34..cdaee60 100644
>> --- a/fs/nfs/nfs4filelayout.c
>> +++ b/fs/nfs/nfs4filelayout.c
>> @@ -36,6 +36,7 @@
>>  #include <linux/sunrpc/metrics.h>
>>
>>  #include "internal.h"
>> +#include "delegation.h"
>>  #include "nfs4filelayout.h"
>>
>>  #define NFSDBG_FACILITY         NFSDBG_PNFS_LD
>> @@ -86,12 +87,35 @@ static int filelayout_async_handle_error(struct rpc_task *task,
>>                                        struct nfs_client *clp,
>>                                        int *reset)
>>  {
>> +     struct nfs_server *mds_server;
>> +     struct nfs_client *mds_client;
>> +
>>       if (task->tk_status >= 0)
>>               return 0;
>> -
>>       *reset = 0;
>> +     if (state != NULL) {
>
> Why is this test necessary in the first place, BTW? When are you ever
> going to call this function with state == NULL?
>
> --
> Trond Myklebust
> Linux NFS client maintainer
>
> NetApp
> Trond.Myklebust@xxxxxxxxxx
> www.netapp.com
>
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[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