Message ID | 1348687553-8461-1-git-send-email-bjschuma@netapp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Wed, Sep 26, 2012 at 9:25 PM, <bjschuma@netapp.com> wrote: > This causes a loop because the client never updates the nfs4_state after > discovering that the delegation is invalid. This means it will keep > trying to read using the bad delegation rather than attempting to re-open > the file. Oh, I already encountered this bug but never found the time to debug it / report it. Thanks a lot! I'll try to test it soon.
On 09/26/2012 06:19 PM, William Dauchy wrote: > On Wed, Sep 26, 2012 at 9:25 PM, <bjschuma@netapp.com> wrote: >> This causes a loop because the client never updates the nfs4_state after >> discovering that the delegation is invalid. This means it will keep >> trying to read using the bad delegation rather than attempting to re-open >> the file. > > Oh, I already encountered this bug but never found the time to debug > it / report it. > > Thanks a lot! I'll try to test it soon. > Awesome! Let me know how your tests go, thanks. - Bryan -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Thu, Sep 27, 2012 at 2:35 PM, Bryan Schumaker <bjschuma@netapp.com> wrote:
> Awesome! Let me know how your tests go, thanks.
Oh I didn't saw it was nfs4.1 specific since the header shows "NFS:
Remove bad delegations during open recovery"
Sorry, I thought about a general nfs bug.
Regards,
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 1e50326..1d49168 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -1774,7 +1774,11 @@ static void nfs41_clear_delegation_stateid(struct nfs4_state *state) * informs us the stateid is unrecognized. */ if (status != -NFS4ERR_BAD_STATEID) nfs41_free_stateid(server, stateid); + nfs_remove_bad_delegation(state->inode); + write_seqlock(&state->seqlock); + nfs4_stateid_copy(&state->stateid, &state->open_stateid); + write_sequnlock(&state->seqlock); clear_bit(NFS_DELEGATED_STATE, &state->flags); } }