From: Chris Mason Subject: directory mutex held during fsync Date: Wed, 10 Sep 2008 09:31:08 -0400 Message-ID: <1221053468.29741.91.camel@think.oraclecorp.com> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit To: linux-fsdevel@vger.kernel.org Return-path: Received: from agminet01.oracle.com ([141.146.126.228]:59981 "EHLO agminet01.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751028AbYIJNbS (ORCPT ); Wed, 10 Sep 2008 09:31:18 -0400 Received: from rgmgw2.us.oracle.com (rgmgw2.us.oracle.com [138.1.186.111]) by agminet01.oracle.com (Switch-3.2.4/Switch-3.1.7) with ESMTP id m8ADVCUe003139 for ; Wed, 10 Sep 2008 08:31:14 -0500 Received: from acsmt701.oracle.com (acsmt701.oracle.com [141.146.40.71]) by rgmgw2.us.oracle.com (Switch-3.2.4/Switch-3.2.4) with ESMTP id m8ADVA2Z016212 for ; Wed, 10 Sep 2008 07:31:10 -0600 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello everyone, Is there a VFS level reason why we hold the directory mutex while we fsync the directory? I'm seeing a pretty dramatic improvement in directory fsync heavy workloads when I drop it during transaction commit, and it seems like this should be a safe optimization in all journaled the filesystems. This applies file fsync as well, the mutex doesn't protect us from all the possible places that might come in and make new dirty data. -chris