Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp1023115ybm; Wed, 27 May 2020 14:04:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztUDpGI6RZAGSt22ggemBRLJ44PD+vNlnGnokqNLA5WKho+vffUv7CRniN46DiMUk+y50Q X-Received: by 2002:a17:906:9493:: with SMTP id t19mr151601ejx.461.1590613497914; Wed, 27 May 2020 14:04:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590613497; cv=none; d=google.com; s=arc-20160816; b=RhYFNeR3kxvl72IhHqQCL9bRHhK+OQVlFwom4HPbPRTbFFGL6G6gFjoYLpqquXVSmh tnOR2F5dUg3pZT8hSf13Y7fLRjZXf43jLx48FYphkOGQ8a5h+/c0Z8TSoaVyt2IXiwkP DSBzvuKoDbGrUycXXo7IRwadmvNSMqAjYXCUBTaSvjce+vmNjPSJfpega30d9N2VfOkp 25fB9YAoPwJjiTp5E+KwowJDLAG2epdLKsTIzTAf+/zHlrpH+F0lRJK2DFE7wObHzd+l CEyaQ+d+53K6nKMNmxeBuc7a4YE57ngO3VgNOQoqzIqiYkBy/Jp4X6JKOXPIzqEObRok oxEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=cuG6d73b3Qtrl61FfEHP8WI8MH+P68LZHv0Rh/UFseI=; b=FKq+95ixFD223dO+xjIXbZc12oDdhUgYKBuGwg/0l2gsbOTGF9z77f0/avT3I3leRu LAIHdU2SzhAhXbIaSPUephYEhgrypjVvKt+ppdABuSjJ0kAdTJ96f/cNMFr+vr6cI4re dzZQyOhRJRKrmAR65DFPDFlITwOMdo6cXG4MYfEJCm/ccSkV8irOIIIRYELbTXO0twFC dvfR6QFAuMDk22rOZSfU6JQ0mLNSfxpNQ9ffsDQ8x72Kqelo2hho2ruefrXO4wGaj7Vr lVbZ9m/Lcc10LrEzljcw4v5Sl1fEsp51fS1/9tNlcsXOuPxoeD0Q/T+3zkzIINfQi/+y YPJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gqEJvXas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b1si2561697edq.592.2020.05.27.14.04.34; Wed, 27 May 2020 14:04:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=gqEJvXas; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728589AbgE0VCe (ORCPT + 99 others); Wed, 27 May 2020 17:02:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:59764 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgE0VCe (ORCPT ); Wed, 27 May 2020 17:02:34 -0400 Received: from localhost (unknown [104.132.1.66]) (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 C06A02075A; Wed, 27 May 2020 21:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590613353; bh=ZpO0iNl8OoGkBHS2pJ/PqkCglFvOTpmwqFbqZfDiGY4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=gqEJvXasPi5lFg1/xywpRwGhcG5v/IH/172gnPF/Ty0re3g/x3sczXploZAL2VVM/ mr9oqYQ4igDy90BmYERy8TsNN5tHyttqq4aamjX0DkSV5ehxCZVOz0iMjlIuOcWUY9 qnzC8MZMrrdZgShG+Ao3RflypOXb7B0xhbwIBJ0o= Date: Wed, 27 May 2020 14:02:33 -0700 From: Jaegeuk Kim To: Chao Yu Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, chao@kernel.org Subject: Re: [PATCH 3/3] f2fs: fix to cover meta flush with cp_lock Message-ID: <20200527210233.GC206249@google.com> References: <20200527102753.15743-1-yuchao0@huawei.com> <20200527102753.15743-3-yuchao0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200527102753.15743-3-yuchao0@huawei.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/27, Chao Yu wrote: > meta inode page should be flushed under cp_lock, fix it. It doesn't matter for this case, yes? > > Signed-off-by: Chao Yu > --- > fs/f2fs/file.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c > index f7de2a1da528..0fcae4d90074 100644 > --- a/fs/f2fs/file.c > +++ b/fs/f2fs/file.c > @@ -2260,7 +2260,9 @@ static int f2fs_ioc_shutdown(struct file *filp, unsigned long arg) > set_sbi_flag(sbi, SBI_IS_SHUTDOWN); > break; > case F2FS_GOING_DOWN_METAFLUSH: > + mutex_lock(&sbi->cp_mutex); > f2fs_sync_meta_pages(sbi, META, LONG_MAX, FS_META_IO); > + mutex_unlock(&sbi->cp_mutex); > f2fs_stop_checkpoint(sbi, false); > set_sbi_flag(sbi, SBI_IS_SHUTDOWN); > break; > -- > 2.18.0.rc1