Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp661787rwd; Thu, 1 Jun 2023 05:12:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6LCHLXjpleALM3oRJsitgdK55vHT+HU/SNwXkQYrsySj8J/AwRO/Z96/hlveNLgzLarkst X-Received: by 2002:a05:6e02:54c:b0:335:c544:a1a7 with SMTP id i12-20020a056e02054c00b00335c544a1a7mr5985585ils.0.1685621524273; Thu, 01 Jun 2023 05:12:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685621524; cv=none; d=google.com; s=arc-20160816; b=QprKrVZ9r2eadg/AsJuEkWfg5ELnqApP0rjxQQ3zu3uhORFsKRuIo6PDOSV4BZbmio XTuOf89VnPwjwdcOAohp0w1PqKWeLQydfcFXzfjBG/pCc+5jqN+0IhCO8XGlNkDOrKFZ Hu8TJDyn3b2f2B+uwi5YQSsJcZxC6MvI5aAW0zjwFSgvqHTEqihOfaZ/3vQlk2vp1bug qNT42wkdrNBD/N9pKgznVTDn3NCS7r6YBo8h4stTsg6Oek5nsiC7TcACICe4Ej1s8GQ0 MQFKN6wvmexEncE3MAzYx/rgAOPGOYF+Gy8pxTuslus94PirRnPA9Q4m3UNsnmC6t0nL v6EQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=X7ULdJ4Ab2b47vEWN486zFKO2o/CmnOZmXp0dkx+i0c=; b=0UjZrsrhVL1FWAMADlWriqgwGi6ToTCPYvqNrqwGsiRudGzefDY39njL3YqZ3nQCoS kuahuvS6/RPbfqAS7l8yNTozOQIX77S4jct2wGv+mB7OJj4kAvSZDrafz/gehcA9x/Fa OJ67zi2RWxsozrzWSQSf2LwDD9SZELizl19+GMTe+HKbkloLDsECu93Q95i3AR/BKF+t yiXjMNLTExbmbkv4v7wJVQgW+7V7u0JccVPVWDCOlL2VOFG3Nk8vQHde9SVosQIu8RZe ywZRwIxBZdFUknescRo8Zcacw+9uL+P0isUbjVGJpd0HydcsTeRfuK9fWv8TI0GfT0Bf ZMlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=beCO+OOg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i185-20020a636dc2000000b0053eedcc504esi849915pgc.373.2023.06.01.05.11.49; Thu, 01 Jun 2023 05:12:04 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=beCO+OOg; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229977AbjFALqa (ORCPT + 99 others); Thu, 1 Jun 2023 07:46:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229880AbjFALq2 (ORCPT ); Thu, 1 Jun 2023 07:46:28 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DDD14129 for ; Thu, 1 Jun 2023 04:45:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1685619941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=X7ULdJ4Ab2b47vEWN486zFKO2o/CmnOZmXp0dkx+i0c=; b=beCO+OOguuo21ENyvOmOF2+6BgNbuEBh26PgkqVSo97FEjY688mkOEOATdWUjBozSFWTbz ZueXNleroNvh8ZWiah0C+GeruDW/lbmXIARN/ylsyf44bqQSe8TH+z3PVADFvdGHQy0Sft UMtAdDADHn7Nbwa3IFnFFdAigDzZ11s= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-338-mMIuAwj2MKiKI-pxk9nXWA-1; Thu, 01 Jun 2023 07:45:32 -0400 X-MC-Unique: mMIuAwj2MKiKI-pxk9nXWA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 873C0802355; Thu, 1 Jun 2023 11:45:32 +0000 (UTC) Received: from fedora.redhat.com (unknown [10.22.8.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C2BD8C154D7; Thu, 1 Jun 2023 11:45:31 +0000 (UTC) Received: by fedora.redhat.com (Postfix, from userid 1000) id 5EE5716F1EC; Thu, 1 Jun 2023 07:45:31 -0400 (EDT) Date: Thu, 1 Jun 2023 07:45:31 -0400 From: Vivek Goyal To: Jingbo Xu Cc: miklos@szeredi.hu, linux-fsdevel@vger.kernel.org, gerry@linux.alibaba.com, linux-kernel@vger.kernel.org, German Maglione Subject: Re: [PATCH] fuse: fix return value of inode_inline_reclaim_one_dmap in error path Message-ID: References: <20230424123250.125404-1-jefflexu@linux.alibaba.com> <33fd8e03-7c99-c12d-255d-b7190612379b@linux.alibaba.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <33fd8e03-7c99-c12d-255d-b7190612379b@linux.alibaba.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On Thu, Jun 01, 2023 at 09:45:52AM +0800, Jingbo Xu wrote: > > > On 6/1/23 4:03 AM, Vivek Goyal wrote: > > On Mon, Apr 24, 2023 at 08:32:50PM +0800, Jingbo Xu wrote: > >> When range already got reclaimed by somebody else, return NULL so that > >> the caller could retry to allocate or reclaim another range, instead of > >> mistakenly returning the range already got reclaimed and reused by > >> others. > >> > >> Reported-by: Liu Jiang > >> Fixes: 9a752d18c85a ("virtiofs: add logic to free up a memory range") > >> Signed-off-by: Jingbo Xu > > > > Hi Jingbo, > > > > This patch looks correct to me. > > > > Are you able to reproduce the problem? Or you are fixing it based on > > code inspection? > > It's spotted by Liu Jiang during code review. Not tested yet. > > > > > How are you testing this? We don't have virtiofsd DAX implementation yet > > in rust virtiofsd yet. > > > > I am not sure how to test this chagne now. We had out of tree patches > > in qemu and now qemu has gotten rid of C version of virtiofsd so these > > patches might not even work now. > > Yeah this exception path may not be so easy to be tested as it is only > triggered in the race condition. I have the old branch (of qemu) with > support for DAX, and maybe I could try to reproduce the exception path > by configuring limited DAX window and heavy IO workload. That would be great. Please test it with really small DAX window size. Also put some pr_debug() statements to make sure you are hitting this particular path during testing. Thanks Vivek