Received: by 2002:ab2:687:0:b0:1f4:6588:b3a7 with SMTP id s7csp144274lqe; Tue, 9 Apr 2024 18:25:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCX8azAtHxViyfGOx4FwNwGzk4zHbqYN9xztUYPWJa0Nh2jkKXMYFlRsjrle1GHnT7sP0hHthyVNk0C1eFUCU/7ogMoEw6GwF9lBIWF47Q== X-Google-Smtp-Source: AGHT+IEOfu8l9MGVv5j8dEdi9gp34XhJbfsQE490CqmPbKEKvqoDfKgPg1XjbNYXpvho2oEBUWk7 X-Received: by 2002:a81:6c09:0:b0:618:5aa:871c with SMTP id h9-20020a816c09000000b0061805aa871cmr1479378ywc.9.1712712334472; Tue, 09 Apr 2024 18:25:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712712334; cv=pass; d=google.com; s=arc-20160816; b=CbaJbJWryv18sToNyBgtBeavcZOYuIqPhgvn/7D/2cWTSuDXqhTxfj8ecWAxbTC3WQ 7nuhBa0wYAnT9Q7UJ4+MkbrIuIH0CzgOohu82Ze1NmPq9ohiLJRbVMmywhqhP8Bsn++j H4SomkjH6san114vXrYLwdskKUgpzWv1Uti0ZUWmD7w3sWkJ6hCKw9hZXAvX3FsCWSbv rQB27lHFQZ/tPf9h9YhG0WC49h+qwXg4EzKqR0ZFKqvQ70TfLC9tQqv/6h3BL7fGaTqz sTeUFZNUIw/WH1t2Ngk34nnOci8c2GDd2/rM9vA4ePW4S2afJJ/7Q2z0df+nAl3n1bVu pVxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=gtDeM3QBYI7TQJ6dhgKx/m96ARMHxqm9+NJcFbF/ltY=; fh=QPrKPcikwcAMwkhZ72L5tIdes4XEgBAwxcrES1fvdzM=; b=WqMEao24fxZu3CunGiyB5MJQEWRSP4D3/1QQ4mMICmIrVBHmLa0Tsqi3l8fs/fr632 hC20Kh7ZEhxFafdkUU0wfVlgw5t+m3LWxdnRAGgx4h7EVUei03a0sVhXvlQGYiTtg0d+ 7uU2tiamBwfM1n59I1yXwhGvi6j2Y05ewSR2C8qeyq6PrRLBfYXe2zLdFZJ6aDwihsVQ v8iZZ4NBrtY4z8U69SaxOjOe4GraFrsaw1Dlu07OhDVSyuPL+YtgChNSvwuyxy0RMeMV 0hOI6w19k/J2rMi5xtZPjSxqF13KxnJpE1MfNulXrbLnG5wNVHjq196KdmoxXkOKvROu 6ARA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oVDyR12B; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-137797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g5-20020ac87d05000000b004317c3ac9d5si2309734qtb.264.2024.04.09.18.25.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 18:25:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-137797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=oVDyR12B; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-137797-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-137797-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3759B1C21F1C for ; Wed, 10 Apr 2024 01:25:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E18710E5; Wed, 10 Apr 2024 01:25:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="oVDyR12B" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5676764A for ; Wed, 10 Apr 2024 01:25:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712712328; cv=none; b=aXdilf1OnqcKMmYfq4htGBTASurmda+YnxnBzWHcfalCFxtA4uxfDhlPr8kRlLxUC46EIwzVqZv/0cGzq7D4aL854oWUo3V7KfB1UEL2UHvZWpri0M/B5/mOSTdHb6jXP/TXoMfGdTWvGh4Gq/G67YyVjUu4mZPngUlG6Hkdu18= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712712328; c=relaxed/simple; bh=Ou5zIoiVqyh7NGlOGsFz+bFF2CoeqMAsgzjLT3LU3cM=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=OuJHe+P2xXllILO4+IHVlGkDHmiuXsmeEWpvv4UT8x9j7vQSV6ge0RaB/xKeISBWePzuHlhhlKz/HMuENn375ndikIvwX7lRzEPhMqF1wREzFa1QCNqcH8uW+Ev0mUAkGCJ5YE7EVkoC7og0dlNbUs1T1RLoW8clBWjOFyaC0nA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=oVDyR12B; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id AEC26C433F1; Wed, 10 Apr 2024 01:25:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712712327; bh=Ou5zIoiVqyh7NGlOGsFz+bFF2CoeqMAsgzjLT3LU3cM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=oVDyR12BfVxGXBv25opL4e4YGBJeCythNo4XuWRN8hBXxkCZBO59Qs4rphAWJbKsF IxUQ4rvEV5PYeMSnixqRN3elKr4mB3/Lc+ruN/GKSf0UlyVt8DQwdCY6Akj9DblSBQ bXBe3qHcISDy1yWLrM4FmDOWzA1MHphtNDk6R0SWEUKuICgT+p3zLyW1zqJUT24N8s u4/Gp5bnnCPYL+kzDV5fbz+f4Jgm6cs92h764vA1FkZ5/KSZ2oxUHTS/InUDmQHDRE pwv0EcN4Bex+tHja5Y6olVWeRZVgzEqaOKy69TasrhH813N5rt9WeKA9hSYcJY722l etrMReabFl3nQ== Message-ID: <6a7442d9-edee-4a03-9a6c-2ff10fff121c@kernel.org> Date: Wed, 10 Apr 2024 09:25:24 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [f2fs-dev] [PATCH v2] f2fs: don't set RO when shutting down f2fs To: Jaegeuk Kim , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Cc: =?UTF-8?B?TGlnaHQgSHNpZWggKOisneaYjueHiCk=?= References: <20240404195254.556896-1-jaegeuk@kernel.org> Content-Language: en-US From: Chao Yu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 2024/4/10 0:20, Jaegeuk Kim wrote: > Shutdown does not check the error of thaw_super due to readonly, which > causes a deadlock like below. > > f2fs_ioc_shutdown(F2FS_GOING_DOWN_FULLSYNC) issue_discard_thread > - bdev_freeze > - freeze_super > - f2fs_stop_checkpoint() > - f2fs_handle_critical_error - sb_start_write > - set RO - waiting > - bdev_thaw > - thaw_super_locked > - return -EINVAL, if sb_rdonly() > - f2fs_stop_discard_thread > -> wait for kthread_stop(discard_thread); > > Reported-by: "Light Hsieh (謝明燈)" > Signed-off-by: Jaegeuk Kim Reviewed-by: Chao Yu Thanks,