From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933923AbdLRMcH (ORCPT ); Mon, 18 Dec 2017 07:32:07 -0500 Received: from bombadil.infradead.org ([65.50.211.133]:56167 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933536AbdLRMcE (ORCPT ); Mon, 18 Dec 2017 07:32:04 -0500 Date: Mon, 18 Dec 2017 04:32:02 -0800 From: Christoph Hellwig To: "Theodore Ts'o" , Seongbae Son , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash Message-ID: <20171218123202.GA25645@infradead.org> References: <20171216043326.GA12365@son-VirtualBox> <20171216233239.oy4mcyjuq6hjugnx@thunk.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171216233239.oy4mcyjuq6hjugnx@thunk.org> User-Agent: Mutt/1.9.1 (2017-09-22) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > that update of the timestamp and i_size needs to be moved to an I/O > completion handler. We do this already to convert unwritten requests > to be written in fs/ext4/page_io.c. See ext4_put_io_end_defer() in > fs/ext4/page_io.c; if we need to convert unwritten extents the > EXT4_IO_END_UNWRITTEN flag is set, and ext4_add_complete_io() tacks > the io_end queue onto a workqueue. This infrastructure could be made > more general so that it can do other work after the I/O has been > completed, including the i_size update. That's what we do for the i_size update in XFS.