From bfields@fieldses.org Wed Jun 16 02:03:36 2004 Return-Path: Received: from mail-imap3.uio.no ([unix socket]) by mail-imap3.uio.no (Cyrus v2.1.11) with LMTP; Wed, 16 Jun 2004 02:03:36 +0200 X-Sieve: CMU Sieve 2.2 Delivery-date: Wed, 16 Jun 2004 02:03:36 +0200 Received: from mail-mx2.uio.no ([129.240.10.30]) by mail-imap3.uio.no with esmtp (Exim 4.34) id 1BaNtw-0003Ig-3G for trond.myklebust@fys.uio.no; Wed, 16 Jun 2004 02:03:36 +0200 Received: from dsl093-002-214.det1.dsl.speakeasy.net ([66.93.2.214] helo=pickle.fieldses.org) by smtp.uio.no with esmtp (TLSv1:RC4-SHA:128) (Exim 4.34) id 1BaNts-0006Q1-K4 for trond.myklebust@fys.uio.no; Wed, 16 Jun 2004 02:03:33 +0200 Received: from bfields by pickle.fieldses.org with local (Exim 4.34) id 1BaNtp-0007dU-Jt; Tue, 15 Jun 2004 20:03:29 -0400 To: Trond Myklebust Cc: nfsv4@linux-nfs.org Subject: [PATCH 2 of 4] Stricter checking on errors server returns to NFSv4 client. Message-ID: <1087343949.ac7589ca.2@fieldses.org> In-Reply-To: <1087343949.ac7589ca.1@fieldses.org> From: "J. Bruce Fields" Date: Tue, 15 Jun 2004 20:03:29 -0400 X-MailScanner-Information: This message has been scanned for viruses/spam. Contact postmaster@uio.no if you have questions about this scanning X-UiO-MailScanner: No virus found X-UiO-Spam-info: not spam, SpamAssassin (score=0, required 12) X-Evolution-Source: imap://trondmy@imap.uio.no/ Mime-Version: 1.0 Content-Transfer-Encoding: 8bit OK, so it's trivial and probably superfluous, but I don't see why we shouldn't be slightly stricter here, so I'm just going to keep sending this until I'm told to stop.... Make sure that unmapped errors are approximately in the range of defined NFS4 errors. fs/nfs/nfs4xdr.c | 2 +- 1 files changed, 1 insertion(+), 1 deletion(-) diff -puN fs/nfs/nfs4xdr.c~pickier_err_return_mapping fs/nfs/nfs4xdr.c --- linux-2.6.7-rc3-bk7/fs/nfs/nfs4xdr.c~pickier_err_return_mapping 2004-06-15 12:24:06.000000000 -0400 +++ linux-2.6.7-rc3-bk7-bfields/fs/nfs/nfs4xdr.c 2004-06-15 12:24:06.000000000 -0400 @@ -3957,7 +3957,7 @@ nfs_stat_to_errno(int stat) if (nfs_errtbl[i].stat == stat) return nfs_errtbl[i].errno; } - if (stat < 0) { + if (stat <= 10000 || stat > 10100) { /* The server is looney tunes. */ return ESERVERFAULT; } _