Re: [PATCH] nfsd: return 0 on reads of fault injection files

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

 



On May 16, 2012, at 5:16 PM, J. Bruce Fields wrote:

> On Thu, May 10, 2012 at 03:31:10PM -0400, Weston Andros Adamson wrote:
>> debugfs read operations were returning the contents of an uninitialized u64.
> 
> Thanks, applied.
> 
>> 
>> Signed-off-by: Weston Andros Adamson <dros@xxxxxxxxxx>
>> ---
>> I found this while working on (forthcoming) fault injection tests for 
>> CB_PATH_DOWN.
> 
> Did you ever confirm whether the latest nfsd is setting that flag when
> it should be?

No, I haven't messed with it that much - I had other tasks take a higher priority, but I'm back on it as of this afternoon.

I'll try nfsd-next to get CB_PATH_DOWN without fault_injection and report back to you.  Also, I think we need to modify nfsd (nfsd4_new_conn()) to set cl_cb_state to NFSD4_CB_UNKNOWN on a successful BIND_CONN_TO_SESSION (IFF it's CB_DOWN with the right direction), otherwise the CB_PATH_DOWN flag will be set on every sequence OP and the client will keep sending BIND_CONN_TO_SESSION.  The idea is that once we call nfsd4_new_conn, we won't know if the back channel is really up until a callback is attempted.  Setting it to CB_UNKNOWN stops the loop of (sequence, bind_conn, sequence, bind_conn, …), but doesn't actually mark it as "UP" until a callback is successful.

Expect patches soon.

-dros

> 
> --b.
> 
>> 
>> fs/nfsd/fault_inject.c |    1 +
>> 1 files changed, 1 insertions(+), 0 deletions(-)
>> 
>> diff --git a/fs/nfsd/fault_inject.c b/fs/nfsd/fault_inject.c
>> index 46b7696..ab81144 100644
>> --- a/fs/nfsd/fault_inject.c
>> +++ b/fs/nfsd/fault_inject.c
>> @@ -62,6 +62,7 @@ static int nfsd_inject_set(void *op_ptr, u64 val)
>> 
>> static int nfsd_inject_get(void *data, u64 *val)
>> {
>> +	*val = 0;
>> 	return 0;
>> }
>> 
>> -- 
>> 1.7.4.4
>> 
> --
> 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

Attachment: smime.p7s
Description: S/MIME cryptographic signature


[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