From mboxrd@z Thu Jan 1 00:00:00 1970 From: Trond Myklebust Subject: Re: Why must NFS access metadata in synchronous mode? Date: Thu, 01 Jun 2006 01:55:40 -0400 Message-ID: <1149141341.13298.21.camel@lade.trondhjem.org> References: <4ae3c140605312104m441ca006j784a93354456faf8@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-kernel , linux-fsdevel@vger.kernel.org Return-path: Received: from pat.uio.no ([129.240.10.4]:47750 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S1751802AbWFAFzw (ORCPT ); Thu, 1 Jun 2006 01:55:52 -0400 To: Xin Zhao In-Reply-To: <4ae3c140605312104m441ca006j784a93354456faf8@mail.gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Thu, 2006-06-01 at 00:04 -0400, Xin Zhao wrote: > Until kernel 2.6.16, I think NFS still access metadata synchronously, > which may impact performance significantly. Several years ago, paper > "metadata update performance in file systems" already suggested using > asynchronous mode in metadata access. ...and how many NFS implementations have you seen based on that paper? > I am curious why NFS does not adopt this suggestion? Can someone explain this? a) NFS permissions are checked by the _server_, not the client. b) Cache consistency requirements are _much_ more stringent for asynchronous operation. Think for instance about an asynchronous mkdir(): how should the client guarantee exclusive semantics (i.e. that mkdir either creates a new directory or returns an EEXIST error)? how should it guarantee that the server will have enough disk space to satisfy your request? how should it guarantee that nobody will change the permissions on the parent directory before the metadata was synced to disk?,... People are considering how to implement this sort of thing using the NFSv4 concept of delegations and applying them to directories. It is not yet obvious how all the details will be solved. Trond