Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932149AbbFDPN1 (ORCPT ); Thu, 4 Jun 2015 11:13:27 -0400 Received: from elasmtp-spurfowl.atl.sa.earthlink.net ([209.86.89.66]:54061 "EHLO elasmtp-spurfowl.atl.sa.earthlink.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752187AbbFDPNX (ORCPT ); Thu, 4 Jun 2015 11:13:23 -0400 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=mindspring.com; b=HXOlZTB42ykj5eW309Jm4CA5PhnNoPUYC2CQetqPJZX+jOifi8PDESbv4cyTcJCY; h=Received:From:To:Cc:References:In-Reply-To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:X-Mailer:Thread-Index:Content-Language:X-Antivirus-Status:X-ELNK-Trace:X-Originating-IP; From: "Frank Filz" To: "'Dominique Martinet'" , , "'Anna Schumaker'" , "'Trond Myklebust'" Cc: References: <1433430257-11894-1-git-send-email-dominique.martinet@cea.fr> In-Reply-To: <1433430257-11894-1-git-send-email-dominique.martinet@cea.fr> Subject: RE: [PATCH] NFSv4: handle nfs4_get_referral failure Date: Thu, 4 Jun 2015 11:13:17 -0400 Message-ID: <004101d09ed8$fcbe7850$f63b68f0$@mindspring.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 15.0 Thread-Index: AQGnoFAjZpbCbbN1CIJ+YiJUw3dk5J3ub5sw Content-Language: en-us X-Antivirus: avast! (VPS 150604-0, 06/04/2015), Outbound message X-Antivirus-Status: Clean X-ELNK-Trace: 136157f01908a8929c7f779228e2f6aeda0071232e20db4d964445f847fd91756e02c47031402e54350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 68.56.142.232 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2224 Lines: 62 More detail on this, Basically what is going on is that a migration event has been detected in nfs4_get_referral, but the migration recovery is not actually initiated. We tripped over this because Ganesha intends to support referrals, but the implementation is incomplete (not all FSALs support referrals, and we don't necessarily change the fsid) and thus Ganesha's returning an NFS4ERR_MOVED winds up looking like a migration event to the client (of course we don't support migration either). Thanks Frank > -----Original Message----- > From: Dominique Martinet [mailto:dominique.martinet@cea.fr] > Sent: Thursday, June 4, 2015 11:04 AM > To: linux-nfs@vger.kernel.org; Anna Schumaker; Trond Myklebust > Cc: linux-kernel@vger.kernel.org; Dominique Martinet; Frank S. Filz > Subject: [PATCH] NFSv4: handle nfs4_get_referral failure > > nfs4_proc_lookup_common is supposed to return a posix error, we have to > handle any error returned that isn't errno > > Reported-by: Olga Kornievskaia > Signed-off-by: Frank S. Filz > Signed-off-by: Dominique Martinet > --- > > Other way of fixing it would be to return something like -EIO directly in > nfs4_get_referral, but I believe handling exception is the right thing to do. > Only other return code atm is -ENOMEM which probably isn't recoverable? > > fs/nfs/nfs4proc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 627f37c..e7fbf24 > 100644 > --- a/fs/nfs/nfs4proc.c > +++ b/fs/nfs/nfs4proc.c > @@ -3356,6 +3356,8 @@ static int nfs4_proc_lookup_common(struct > rpc_clnt **clnt, struct inode *dir, > goto out; > case -NFS4ERR_MOVED: > err = nfs4_get_referral(client, dir, name, fattr, > fhandle); > + if (err == -NFS4ERR_MOVED) > + err = > nfs4_handle_exception(NFS_SERVER(dir), err, &exception); > goto out; > case -NFS4ERR_WRONGSEC: > err = -EPERM; > -- > 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/