From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B5797C6FD18 for ; Thu, 30 Mar 2023 00:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229886AbjC3AFt (ORCPT ); Wed, 29 Mar 2023 20:05:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33924 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229560AbjC3AFs (ORCPT ); Wed, 29 Mar 2023 20:05:48 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 44BD92D48 for ; Wed, 29 Mar 2023 17:05:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wfcpaQZ1NDBaNRb61sEVJGMkagHxtXwTcJUTY0B3et8=; b=uSG35dPg5bu7ibnWLGeLQpJHqa 8yPtmO3971hx+XX9CEY56D3mYtCF9fQCfXWNzJJRmOhrCvd0q8Pqt5zb9a/NoU0hKgELUa61W83Mg DO7+Arl8yPLU6bxdlwr1OBUtCv+yp6IIMtlOxtUphTW0xdh5OmooXsVvs55pSfcC7ls8cNlZVJUaD GonMCWtBGU7+13NaKSrbUVlmvE+Dtj7nsSiN0ZiatJ8vwjb3WW1AoAXstlPr+hVayI091POb+D1LT M2w3ZlmFvPciCpHwUQKNxr8GGNDT0eLlHgyMXp+guftXtnrrYm2tHenus7xSs9uAGC/ucmt+Q+POv IpHTMzYA==; Received: from hch by bombadil.infradead.org with local (Exim 4.96 #2 (Red Hat Linux)) id 1phfnV-0027Kj-1M; Thu, 30 Mar 2023 00:05:45 +0000 Date: Wed, 29 Mar 2023 17:05:45 -0700 From: Christoph Hellwig To: Jan Kara Cc: Ted Tso , linux-ext4@vger.kernel.org Subject: Re: [PATCH 06/13] ext4: Drop special handling of journalled data from ext4_sync_file() Message-ID: References: <20230329125740.4127-1-jack@suse.cz> <20230329154950.19720-6-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230329154950.19720-6-jack@suse.cz> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Wed, Mar 29, 2023 at 05:49:37PM +0200, Jan Kara wrote: > /* > - * data=writeback,ordered: > * The caller's filemap_fdatawrite()/wait will sync the data. > * Metadata is in the journal, we wait for proper transaction to > * commit here. Nit: without the list, the two space indent looks a bit weird here. > if (!sbi->s_journal) > ret = ext4_fsync_nojournal(inode, datasync, &needs_barrier); > - else if (ext4_should_journal_data(inode)) > - ret = ext4_force_commit(inode->i_sb); > else > ret = ext4_fsync_journal(inode, datasync, &needs_barrier); Also if there is not journale the above comment doesn't make much sense. But I'm really not sure the comment adds any value to start with, so maybe just drop it entirely?