From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com ([74.125.82.65]:38902 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbeFDQYW (ORCPT ); Mon, 4 Jun 2018 12:24:22 -0400 Received: by mail-wm0-f65.google.com with SMTP id m129-v6so15054181wmb.3 for ; Mon, 04 Jun 2018 09:24:22 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180604124850.GA30780@lst.de> References: <20180604123729.23414-1-agruenba@redhat.com> <20180604123729.23414-6-agruenba@redhat.com> <20180604124850.GA30780@lst.de> From: =?UTF-8?Q?Andreas_Gr=C3=BCnbacher?= Date: Mon, 4 Jun 2018 18:24:21 +0200 Message-ID: Subject: Re: [PATCH v7 05/12] fs: allow to always dirty inode in __generic_write_end To: Christoph Hellwig Cc: Andreas Gruenbacher , cluster-devel , Linux FS-devel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 2018-06-04 14:48 GMT+02:00 Christoph Hellwig : > On Mon, Jun 04, 2018 at 02:37:22PM +0200, Andreas Gruenbacher wrote: >> @@ -2106,7 +2105,7 @@ int __generic_write_end(struct inode *inode, loff_t pos, unsigned copied, >> * ordering of page lock and transaction start for journaling >> * filesystems. >> */ >> - if (i_size_changed) >> + if (dirty_inode) >> mark_inode_dirty(inode); >> return copied; > > Calling mark_inode_dirty on an already dirty inode is cheap, so how > about just calling it directly in your caller that always wants to > set the inode dirty? The dirty_inode hook is where gfs2 converts the in-core inode into the on-disk format (the equivalent of xfs_inode_to_disk), so it's not quite that cheap. I realize this could be done differently in gfs2, but that's not where we stand today, and I really can't fix ten things all at the same time. Thanks, Andreas