From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andi Kleen Subject: Re: [PATCH 2/2] xfs: don't truncate prealloc from frequently accessed inodes Date: Mon, 29 Nov 2010 10:42:29 +0100 Message-ID: <87vd3glb3u.fsf@basil.nowhere.org> References: <1290991431-20519-1-git-send-email-david@fromorbit.com> <1290991431-20519-3-git-send-email-david@fromorbit.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: xfs@oss.sgi.com, linux-fsdevel@vger.kernel.org To: Dave Chinner Return-path: Received: from one.firstfloor.org ([213.235.205.2]:55481 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751841Ab0K2Jmc (ORCPT ); Mon, 29 Nov 2010 04:42:32 -0500 In-Reply-To: <1290991431-20519-3-git-send-email-david@fromorbit.com> (Dave Chinner's message of "Mon, 29 Nov 2010 11:43:51 +1100") Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Dave Chinner writes: > > To avoid this problem, keep a count of the number of ->release calls > made on an inode. For most cases, an inode is only going to be opened > once for writing and then closed again during it's lifetime in > cache. Hence if there are multiple ->release calls, there is a good > chance that the inode is being accessed by the NFS server. Hence > count up every time ->release is called while there are delalloc > blocks still outstanding on the inode. Seems like a hack. It would be cleaner and less fragile to add a explicit VFS hint that is passed down from the nfs server, similar to the existing open intents. -Andi -- ak@linux.intel.com -- Speaking for myself only.