Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp6203993ybv; Tue, 18 Feb 2020 11:59:50 -0800 (PST) X-Google-Smtp-Source: APXvYqwJ0fx58LXaJlr+VpS2LZrydvb0vajW2hNjG23vOgyHCb1F5fdk8XmMPY657TZHBdpNLV+f X-Received: by 2002:a05:6830:15c2:: with SMTP id j2mr1066321otr.351.1582055990167; Tue, 18 Feb 2020 11:59:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582055990; cv=none; d=google.com; s=arc-20160816; b=g3OgSJL1Ye/gNxUNN0cG7ts0mnaZtglNH/srn9QyXbypNmPJ6cJmhcH+0Thk8rRLa7 36zdr6TSJF2UalPjTcBm8cc233vhvybLG+oNcHbZ2/Yv6E3Sry8K3GKKrikpnpXwPlI/ cGlXT4La6izMZrvyyfzn2J9ukZ3hXB/wPF2G4sh2EDUO902+yI5zcK2+RvEBnjtw/UUY wvT4nxePYfDEluKif1qAxaM1VLVzdqS/3pUmL+3cHXwxM5jB3ahKkTYUMtnpUXs5snPg ZsX6/EyfukitL4oRgyfockWbJ9KwqQZDaWW6piVVBDQYP41ve+sMTwFOhsQhS1od76MS mGTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0xKZ0PT87CJ7qULZkwUK8Zr7n2ZZ8Q0iXADSFJ3TkgM=; b=de+lAT0gG1zhioesXgFKN1rE+CNTWukIMC8kUk7WLcONnm+GFphhI29eQGhvOGfE7G zmDH7FozQuffqx7w7cIFtowirbVOdGeSxuU8iIzxnT8JBLTjLREw9XOHotuLPRyxscY3 2fqYm9d0GBzqYXepVZzlOXA27viGjjF5ls3Y0OG/Uw7d+e02OIjASXxEh89NNzh5m/VS Q2PVgJHSF5S/X4bNzy/P3xy0i/J0vTIEnSM4/sxJ+FFDCmh1IoACnZE4qkhdrLZBkH0E ubr9PYpFA5ZANrhdaNEM2B8vs7NFzDoKcCTDqx/oBLYxqvU9d0ZXxDBDawxtU7BJbbFM ck+Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S5cSV8Cu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si8606806oiw.262.2020.02.18.11.59.38; Tue, 18 Feb 2020 11:59:50 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=S5cSV8Cu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728137AbgBRT6M (ORCPT + 99 others); Tue, 18 Feb 2020 14:58:12 -0500 Received: from mail.kernel.org ([198.145.29.99]:35672 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728128AbgBRT6J (ORCPT ); Tue, 18 Feb 2020 14:58:09 -0500 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1E05520659; Tue, 18 Feb 2020 19:58:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582055889; bh=KpYOPciSmTWjaph1IG5iXug5PcvcPFkmcNBP0aZpfJI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=S5cSV8CucBJTs/ZHKVWKF2218QqpXEbK/iGDuy4FjPX5SU+ulO8iMU230gFviN8zQ 5aTWDELlW0hX6nzc2eJBueHvOxxgLlB9S9CrgePpIW9H+NMN10DH8IsWPS4L3EpD2C 4QKlisyOnh03QQe8oahTlBdJH3iP74i3tB4RDPEM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Anand Jain , Johannes Thumshirn , David Sterba Subject: [PATCH 5.4 22/66] btrfs: log message when rw remount is attempted with unclean tree-log Date: Tue, 18 Feb 2020 20:54:49 +0100 Message-Id: <20200218190430.142378570@linuxfoundation.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200218190428.035153861@linuxfoundation.org> References: <20200218190428.035153861@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Sterba commit 10a3a3edc5b89a8cd095bc63495fb1e0f42047d9 upstream. A remount to a read-write filesystem is not safe when there's tree-log to be replayed. Files that could be opened until now might be affected by the changes in the tree-log. A regular mount is needed to replay the log so the filesystem presents the consistent view with the pending changes included. CC: stable@vger.kernel.org # 4.4+ Reviewed-by: Anand Jain Reviewed-by: Johannes Thumshirn Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/super.c | 2 ++ 1 file changed, 2 insertions(+) --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c @@ -1804,6 +1804,8 @@ static int btrfs_remount(struct super_bl } if (btrfs_super_log_root(fs_info->super_copy) != 0) { + btrfs_warn(fs_info, + "mount required to replay tree-log, cannot remount read-write"); ret = -EINVAL; goto restore; }