From: Christoph Hellwig Subject: Re: Does fsync() block read and write ops on the same file? Date: Fri, 11 Dec 2009 08:21:33 -0500 Message-ID: <20091211132133.GA18258@infradead.org> References: <82ein3npyc.fsf@mid.bfk.de> <20091211035521.GI30608@discord.disaster> <82hbrxhoxa.fsf@mid.bfk.de> <20091211124224.GK30608@discord.disaster> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Florian Weimer , linux-fsdevel@vger.kernel.org To: Dave Chinner Return-path: Received: from bombadil.infradead.org ([18.85.46.34]:41773 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750925AbZLKNVb (ORCPT ); Fri, 11 Dec 2009 08:21:31 -0500 Content-Disposition: inline In-Reply-To: <20091211124224.GK30608@discord.disaster> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Dec 11, 2009 at 11:42:24PM +1100, Dave Chinner wrote: > No usually - normally only for data writes and metadata > modifications. However, some filesystems > dirty objects even on read (e.g. changing atime) and so can > serialise on other filesystem locks (e.g. ext3 journal lock) that > is being held by the fsync. Actually we also take the XFS ilock in shared mode in read, and XFS takes it in exclusive mode if it has to update filesystem attributes like the atime. This might be what Florian is seeing.