Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp336958rwb; Wed, 28 Sep 2022 03:30:02 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6Rf+MeJnDbNN/WvjvQrKXylyPR1QvkDCZdQtwrMKxgXjTeuNfqSAtVAsQw7R3yllF3mqhg X-Received: by 2002:a05:6402:b73:b0:457:d003:18f5 with SMTP id cb19-20020a0564020b7300b00457d00318f5mr5489797edb.202.1664361002139; Wed, 28 Sep 2022 03:30:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664361002; cv=none; d=google.com; s=arc-20160816; b=bw5392dcj3VjczUrAdVXEm58HQ1paEee+bSapkTyIK1B6jgh+v7dZuwYKrMEbHINpE akVbWWyRzni9yojq5QLBRVMrETb4EafubGWfLLx3OFW9crpemsclmFGikaDG1WCz+mve nLNrNCvl74mp7uyzkP8J8TxZ2lI/wcG7BDgT6ZuI2M03gqHH/s3AUgI5eAy1EUlm+Mnw 6EEcV0XPb72b/Kl/tHav7vULsQK5Y+u4BNUvHqeD5PYToW4S592ZiEfOmUJQwJ1u6AFx kRhnbdWysz2XCTht4OJtKz3kWh2q4dxdM4JJlw1fNKT0w8ZouDMh0fTEncx6q1WcxYOt Z+bA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=WvcDsRzQdK0BQn1Sq69/O3pYYBaGX0xrVqrsCJRZmaQ=; b=nzR7mq5kBCtVu5lDXQfCe0imW4y35dLfgjygKpAhuwDnr9R4eZ+TPyZG5wH1aZ3nKM KjwDWjo0+zcTgzGVAyNv9eRsR3CGGUEGgv/xLh9X2YQwb5trAphPeZOhAUQtda2EhrG/ GDM70hDAcq9EHsovux3VWwn7L2sPxHS50T73V6M3hUa43QJdWO5+CEcQrUu+o9IPhpTm zyaTTo2X+b1LDZUz37/D9W1OIp0UcJNbCZTY4Cz9ML4eUlJ9wLotEExFXcA5eL0vSicm sYCoGs0JOYPJphlsNFklQ+p/CAKVH52f5x8b6t972EfJUAV0S5nyjqKdNlb9Y+wKdiOq 30tw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gb35-20020a170907962300b0077d854aa10dsi3873024ejc.57.2022.09.28.03.29.32; Wed, 28 Sep 2022 03:30:02 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229508AbiI1KKt (ORCPT + 99 others); Wed, 28 Sep 2022 06:10:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbiI1KKs (ORCPT ); Wed, 28 Sep 2022 06:10:48 -0400 Received: from mx1.molgen.mpg.de (mx3.molgen.mpg.de [141.14.17.11]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4FEFCDE0ED; Wed, 28 Sep 2022 03:10:45 -0700 (PDT) Received: from theinternet.molgen.mpg.de (theinternet.molgen.mpg.de [141.14.31.7]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: buczek) by mx.molgen.mpg.de (Postfix) with ESMTPSA id 6297461EA1929; Wed, 28 Sep 2022 12:10:43 +0200 (CEST) Subject: Re: ext4_writepages: jbd2_start: 5120 pages, ino 11; err -5 To: Theodore Ts'o Cc: Jan Kara , linux-ext4@vger.kernel.org, linux-fsdevel@vger.kernel.org, dm-devel@redhat.com, it+linux@molgen.mpg.de, Linux Kernel Mailing List References: <4e83fb26-4d4a-d482-640c-8104973b7ebf@molgen.mpg.de> <20220531103834.vhscyk3yzsocorco@quack3.lan> <3bfd0ad9-d378-9631-310f-0a1a80d8e482@molgen.mpg.de> From: Donald Buczek Message-ID: <302f2af1-eee8-95aa-91f5-55fe5cf8727f@molgen.mpg.de> Date: Wed, 28 Sep 2022 12:10:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.5 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On 5/31/22 5:39 PM, Theodore Ts'o wrote: > Hmmm..... I think this patch should fix your issues. Thanks a lot. Unfortunately, it didn't, I still occasionally get [368259.560885] EXT4-fs (dm-0): ext4_writepages: jbd2_start: 344 pages, ino 279244; err -5 D. > > If the journal has been aborted (which happens as part of the > shutdown, we will never write out the commit block --- so it should be > fine to skip the writeback of any dirty inodes in data=ordered mode. > > BTW, if you know that the file system is going to get nuked in this > way all the time, so you never care about file system after it is shut > down, you could mount the file system with the mount option > data=writeback. > > - Ted > > > diff --git a/fs/ext4/super.c b/fs/ext4/super.c > index 8ff4c6545a49..2e18211121f6 100644 > --- a/fs/ext4/super.c > +++ b/fs/ext4/super.c > @@ -542,7 +542,10 @@ static int ext4_journalled_submit_inode_data_buffers(struct jbd2_inode *jinode) > static int ext4_journal_submit_inode_data_buffers(struct jbd2_inode *jinode) > { > int ret; > + journal_t *journal = EXT4_SB(jinode->i_vfs_inode->i_sb)->s_journal; > > + if (!journal || is_journal_aborted(journal)) > + return 0; > if (ext4_should_journal_data(jinode->i_vfs_inode)) > ret = ext4_journalled_submit_inode_data_buffers(jinode); > else > @@ -554,7 +557,10 @@ static int ext4_journal_submit_inode_data_buffers(struct jbd2_inode *jinode) > static int ext4_journal_finish_inode_data_buffers(struct jbd2_inode *jinode) > { > int ret = 0; > + journal_t *journal = EXT4_SB(jinode->i_vfs_inode->i_sb)->s_journal; > > + if (!journal || is_journal_aborted(journal)) > + return 0; > if (!ext4_should_journal_data(jinode->i_vfs_inode)) > ret = jbd2_journal_finish_inode_data_buffers(jinode); > -- Donald Buczek buczek@molgen.mpg.de Tel: +49 30 8413 1433