Received: by 2002:a05:6358:489b:b0:bb:da1:e618 with SMTP id x27csp7618182rwn; Wed, 14 Sep 2022 01:24:16 -0700 (PDT) X-Google-Smtp-Source: AA6agR4PFGN0LH4UJptNRxCjKaFkBb7FUQrrB04Cda/8768oWkqG2v4/GayKe8njN1wq7GWUhqNu X-Received: by 2002:a05:6402:2949:b0:451:fabf:d88a with SMTP id ed9-20020a056402294900b00451fabfd88amr9155992edb.324.1663143856013; Wed, 14 Sep 2022 01:24:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663143856; cv=none; d=google.com; s=arc-20160816; b=harHf9a9ixhg5RcGwy9xBv19Ghytg+GRoi5TgOl8f7FhVAWYqKYqeUgEcMbgIEN71A chJrjFo5AAtjmMUOkZBmvaYeY60HX08DFynux/wBxVRhjdvqcEXeolud/Uu6cE/L5xxb EvdfwW29BRUKAxrADS2/rh2zeS2AyJMLi8rBBSYkrsjLHX0YEV3T2m0BreDIcDaSlPOl 071zD5KA4tEV+SrvdQrvfUXZDCRobTAaIvOWoPD8q2BVUAmA7w0GF4gMy2YEuKBNgnQ+ OEdRUS7qgjS3gihz7mRg4OBlJ7T2JtlIlSR2ZC/xmzihYfqJZjk5I1leiLdmah37mApE 8jlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=zp/7JqwCzTOqGIdZh8R83bLDef94q2hon79O4kLNXpQ=; b=eTm62E0iUu71xGHWDeJSNFh8xbub2mUCcHq6fFX+DxrrqT90fBy3r+pHr6QpDcHfrg UdL9/iqO2b/pP+F7MJGULg8gFjQFxhQz73FQ7hbKSzF8vJtfVxuxuKNfWJXisjNRYtYV i/iSt4YwHeLvkgT8uFxjJLAevhN7KB0kbWHPU5VHAA0j7+EH+uNzvwVkopxGialLGAYb IEjK0fQGRFSO0YCh8NOWMB2OJXYKYEkk1Lzu4eA5qKGG09ni8Q108afHzW0Tx7bjmwei XsgHkW1HlgzU7nwRR1MJ4wxrnaFW0Rb0ksktv9GwTA8NH+Pa8iwYym2g047HACbFlAyx uobg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=macq.eu Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bt20-20020a170906b15400b007763cc7093csi9402493ejb.884.2022.09.14.01.23.51; Wed, 14 Sep 2022 01:24:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=macq.eu Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230266AbiINIO7 (ORCPT + 99 others); Wed, 14 Sep 2022 04:14:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33232 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230140AbiINIOw (ORCPT ); Wed, 14 Sep 2022 04:14:52 -0400 X-Greylist: delayed 366 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 14 Sep 2022 01:14:49 PDT Received: from frolo.macqel.be (smtp2.macqel.be [109.135.2.61]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3896813DE3 for ; Wed, 14 Sep 2022 01:14:47 -0700 (PDT) Received: by frolo.macqel.be (Postfix, from userid 1000) id 364CEDF00AC; Wed, 14 Sep 2022 10:08:38 +0200 (CEST) Date: Wed, 14 Sep 2022 10:08:39 +0200 From: Philippe De Muyter To: Wu Bo Cc: jaegeuk@kernel.org, chao@kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/1] f2fs: fix to check space of current segment journal Message-ID: <20220914080839.GA19067@172.21.0.10> References: <20220914040423.539-1-bo.wu@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220914040423.539-1-bo.wu@vivo.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no 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-kernel@vger.kernel.org Hello Wu Bo, On Wed, Sep 14, 2022 at 12:04:23PM +0800, Wu Bo wrote: > As Philippe De Muyter reported: > https://lore.kernel.org/linux-f2fs-devel/20220913224908.GA25100@172.21.0.10/T/#u > > The warning log showed that when finding a new space for nat the journal > space turned out to be full. This because the journal_rwsem is not > locked before the journal space checking. The journal space may become > full just after we check it. > > Reported-by: Philippe De Muyter > Signed-off-by: Wu Bo > --- > fs/f2fs/node.c | 6 +++--- > fs/f2fs/segment.c | 10 +++++----- > 2 files changed, 8 insertions(+), 8 deletions(-) > Thank you for your patch. Unfortunately it does not apply to my 4.1.15 or newer 4.1.y sources, and I do not have the knowledge of f2fs internals to modify your patch myself. E.g. 4.1.y lacks the '.journal' field in the 'struct curseg_info'. Could you make a version suitable for 4.1.y ? Best regards Philippe