From owner-cvs-all@FreeBSD.ORG Tue Apr 18 17:35:18 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C193F16A445 for ; Tue, 18 Apr 2006 17:35:18 +0000 (UTC) (envelope-from mohan_srinivasan@yahoo.com) Received: from web30803.mail.mud.yahoo.com (web30803.mail.mud.yahoo.com [68.142.200.146]) by mx1.FreeBSD.org (Postfix) with SMTP id 0F1AA43D7E for ; Tue, 18 Apr 2006 17:35:06 +0000 (GMT) (envelope-from mohan_srinivasan@yahoo.com) Received: (qmail 83528 invoked by uid 60001); 18 Apr 2006 17:35:05 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bC50BvV9KcQ27Wn8MxssxdAHeudW2ySHuThmfCnl2fs4aRgxWyvtRCnYBZUkr1DvtQ+GQ3G6MePthXyNp3T+qLSInv8dRwgKZTWrqpD4lLq+KQDWeertmu2oQntHKdvXL8rlNhxqeIIMH9jHAXODUgM29d6X2A1yuSJv64L504k= ; Message-ID: <20060418173505.83522.qmail@web30803.mail.mud.yahoo.com> Received: from [71.139.116.244] by web30803.mail.mud.yahoo.com via HTTP; Tue, 18 Apr 2006 10:35:05 PDT Date: Tue, 18 Apr 2006 10:35:05 -0700 (PDT) From: Mohan Srinivasan To: Alfred Perlstein , Xin LI In-Reply-To: <20060418133832.GF35896@elvis.mu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, ps@freebsd.org, cvs-all@FreeBSD.org, mohans@freebsd.orgc Subject: Re: cvs commit: src/sys/nfsclient nfs_bio.c nfs_vnops.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Apr 2006 17:35:18 -0000 Alfred, FYI - I am working on changes that would retain and re-dirty the buffers on other NFS errors as well. For example, on an ESTALE, there's little point in retaining the buffers. But on reception of an ENOSPC, it might be worth retaining and re-dirtying the buffers, as space could free up on the server volume and a subsequent retry of the write (say on the close()) could succeed. The problem I ran into here is that various parts of the vfs don't check for the return value of bwrite(). In particular, if getblk() is called with a size that is different from the b_count (of the cached buffer), getblk sets B_NOCACHE on the cached buffer and calls bwrite() on it (so that the existing buffer is written out and discarded and a new buffer of the required size can be allocated). If bwrite() fails (and if NFS decides to retain and re-dirty the buffer), getblk() needs to check for the return value from bwrite() and return failure to its caller, and callers of getblk() need to handle the errors from getblk(). For now, I am experimenting with an alternate version of getblk() that only NFS uses. mohan --- Alfred Perlstein wrote: > * Xin LI [060417 23:39] wrote: > > delphij 2006-04-18 05:28:41 UTC > > > > FreeBSD src repository > > > > Modified files: (Branch: RELENG_6) > > sys/nfsclient nfs_bio.c nfs_vnops.c > > Log: > > MFC src/sys/nfsclient/nfs_bio.c,v 1.154 > > and src/sys/nfsclient/nfs_vnops.c,v 1.262 (by ps@): > > > ... > > - Treat ETIMEDOUT as a "recoverable" error, causing the buffer > > to be re-dirtied. ETIMEDOUT can occur on soft mounts, when > > the number of retries are exceeded, and we don't want data loss > > in that case. > > Actually that's the documented behavior, if the mount times out, > one will lose data. > > What does this do? Leave the buffer dirty/held until forcefully > unmounted? I guess that sort of makes sense, can someone explain > a bit better? > > -- > - Alfred Perlstein >