From patchwork Wed Mar 7 23:32:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Sandeen X-Patchwork-Id: 10265619 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D0460602C8 for ; Wed, 7 Mar 2018 23:32:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C1E1B28EC2 for ; Wed, 7 Mar 2018 23:32:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B636B29020; Wed, 7 Mar 2018 23:32:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 30D9128EC2 for ; Wed, 7 Mar 2018 23:32:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754781AbeCGXcc (ORCPT ); Wed, 7 Mar 2018 18:32:32 -0500 Received: from sandeen.net ([63.231.237.45]:48276 "EHLO sandeen.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754745AbeCGXcc (ORCPT ); Wed, 7 Mar 2018 18:32:32 -0500 Received: from [10.0.0.4] (liberator [10.0.0.4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sandeen.net (Postfix) with ESMTPSA id 922E2452064; Wed, 7 Mar 2018 17:31:24 -0600 (CST) Subject: [PATCH 1/2] xfs: always check for and process unlinked inodes on mount To: Eric Sandeen , linux-xfs References: <83696ce6-4054-0e77-b4b8-e82a1a9fbbc3@redhat.com> From: Eric Sandeen Message-ID: Date: Wed, 7 Mar 2018 17:32:29 -0600 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <83696ce6-4054-0e77-b4b8-e82a1a9fbbc3@redhat.com> Content-Language: en-US Sender: linux-xfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-xfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Process any unlinked inodes unconditionally; this allows us to skip dirtying the log on frozen filesystems and still have proper recovery on the next mount. Signed-off-by: Eric Sandeen --- -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c index 1937a93..2a645c0 100644 --- a/fs/xfs/xfs_log_recover.c +++ b/fs/xfs/xfs_log_recover.c @@ -5854,8 +5854,6 @@ static inline bool xlog_item_is_intent(struct xfs_log_item *lip) */ xfs_log_force(log->l_mp, XFS_LOG_SYNC); - xlog_recover_process_iunlinks(log); - xlog_recover_check_summary(log); xfs_notice(log->l_mp, "Ending recovery (logdev: %s)", @@ -5865,6 +5863,14 @@ static inline bool xlog_item_is_intent(struct xfs_log_item *lip) } else { xfs_info(log->l_mp, "Ending clean mount"); } + + /* + * Process any unlinked inodes unconditionally, this allows us to + * skip dirtying the log on frozen filesystems and still have + * proper recovery on the next mount. + */ + xlog_recover_process_iunlinks(log); + return 0; }