From patchwork Fri Oct 8 15:00:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 67230 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id F0C5DB6F11 for ; Sat, 9 Oct 2010 02:00:37 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758417Ab0JHPAf (ORCPT ); Fri, 8 Oct 2010 11:00:35 -0400 Received: from mail-ew0-f46.google.com ([209.85.215.46]:37780 "EHLO mail-ew0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753893Ab0JHPAf (ORCPT ); Fri, 8 Oct 2010 11:00:35 -0400 Received: by ewy23 with SMTP id 23so616477ewy.19 for ; Fri, 08 Oct 2010 08:00:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:cc:subject :date:message-id:x-mailer; bh=42TouRcYScXprs6SFY3ukJv9Bz7/XcybrexJe+IFMgI=; b=Mkb5P+Dn6kXSdk/q+CkS0uz7pQ7qjCQ8+E9uKYeyFhHcnc5S4qvleB0Z0W2n+RzrKr hfPRiH5MmKACDWT52zbePHDHtNBGifitwcaeCTlPZL/YUARrolIyKfRjEyG06UqROArX dN+ZbWXSYDUReOAOZk7O4rOUfgLGrotNPkcCc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:cc:subject:date:message-id:x-mailer; b=SzPgbdp2a2tqNxLrOkUaHRPKJ5q+3VDSNELbLU7g4298Cf1fy4nUqk4UbtXlSb8DuS /t7pJdKjHKUnQn/uLRo6cHDL/9enFleapGh6dAlUQf9v3phMxN/EIW0Sqbu0co2URjDm OifpuJh7F1fVJe3yC2kuJdfl4LsG5b8c9o6VA= Received: by 10.213.2.74 with SMTP id 10mr2704568ebi.45.1286550033758; Fri, 08 Oct 2010 08:00:33 -0700 (PDT) Received: from localhost.localdomain (swsoft-msk-nat.sw.ru [195.214.232.10]) by mx.google.com with ESMTPS id v59sm5509740eeh.10.2010.10.08.08.00.30 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 08 Oct 2010 08:00:31 -0700 (PDT) From: Dmitry Monakhov To: jaxboe@fusionio.com Cc: linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Dmitry Monakhov Subject: [PATCH 1/2] writeback: sync quota after inodes writeback Date: Fri, 8 Oct 2010 19:00:26 +0400 Message-Id: <1286550027-9684-1-git-send-email-dmonakhov@gmail.com> X-Mailer: git-send-email 1.7.0.4 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org inode writeback usually result in quota changes especially on filesystems with delalloc. So quota_sync() before writeback seems pointless. Let's do the job in a natural way. Signed-off-by: Dmitry Monakhov --- fs/sync.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/sync.c b/fs/sync.c index ba76b96..b0e2c6c 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -36,14 +36,14 @@ static int __sync_filesystem(struct super_block *sb, int wait) if (!sb->s_bdi || sb->s_bdi == &noop_backing_dev_info) return 0; - if (sb->s_qcop && sb->s_qcop->quota_sync) - sb->s_qcop->quota_sync(sb, -1, wait); - if (wait) sync_inodes_sb(sb); else writeback_inodes_sb(sb); + if (sb->s_qcop && sb->s_qcop->quota_sync) + sb->s_qcop->quota_sync(sb, -1, wait); + if (sb->s_op->sync_fs) sb->s_op->sync_fs(sb, wait); return __sync_blockdev(sb->s_bdev, wait);