From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 701B6C43461 for ; Wed, 16 Sep 2020 11:24:59 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFDA8221E5 for ; Wed, 16 Sep 2020 11:24:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFDA8221E5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from ml01.vlan13.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 584CB144137B2; Wed, 16 Sep 2020 04:24:58 -0700 (PDT) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=195.135.220.15; helo=mx2.suse.de; envelope-from=jack@suse.cz; receiver= Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A1F57143F0B9E for ; Wed, 16 Sep 2020 04:24:55 -0700 (PDT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 9C964B14C; Wed, 16 Sep 2020 11:25:09 +0000 (UTC) Received: by quack2.suse.cz (Postfix, from userid 1000) id 004841E12E1; Wed, 16 Sep 2020 13:24:53 +0200 (CEST) Date: Wed, 16 Sep 2020 13:24:53 +0200 From: Jan Kara To: Dan Williams Subject: Re: =?utf-8?B?5Zue5aSN77yacmVncmVzc2lvbiBj?= =?utf-8?Q?aused_by_patch_6180bb446ab624b9ab8bf201ed251ca87f07b413=3F=3F_?= =?utf-8?Q?=28=22dax=3A_fix_detectio?= =?utf-8?Q?n?= of dax support for non-persistent memory block?? devices") Message-ID: <20200916112453.GE3607@quack2.suse.cz> References: <211sy17ij47lox90ncna7kwk-k7cl0b-ubtml5jg8ocd-r7lb68jgkncbq5ng3g-koqyd471rzfh-t231u5-sxwvexwht98i-b7in5pxxck0j-3b40lqlmuelf13q0uk-ye4ohhsbgodw-xuloz9wpp7tf.1600139009031@email.android.com> <20200915080106.GG4863@quack2.suse.cz> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Message-ID-Hash: 6R7H2OUONKR6EH53ZDIG7LMIG3HRCTNI X-Message-ID-Hash: 6R7H2OUONKR6EH53ZDIG7LMIG3HRCTNI X-MailFrom: jack@suse.cz X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation CC: Jan Kara , "colyli@suse.de" , Adrian Huang , Jan Kara , Mike Snitzer , Pankaj Gupta , "linux-nvdimm@lists.01.org" , Mikulas Patocka X-Mailman-Version: 3.1.1 Precedence: list List-Id: "Linux-nvdimm developer list." Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Tue 15-09-20 12:49:10, Dan Williams wrote: > On Tue, Sep 15, 2020 at 1:01 AM Jan Kara wrote: > > > > Hi! > > > > On Tue 15-09-20 11:03:29, colyli@suse.de wrote: > > > Could you please to take a look? I am offline in the next two weeks. > > > > I just had a look into this. IMHO the justification in 6180bb446a "dax: fix > > detection of dax support for non-persistent memory block devices" is just > > bogus and people got confused by the previous condition > > > > if (!dax_dev && !bdev_dax_supported(bdev, blocksize)) > > > > which was bogus as well. bdev_dax_supported() always returns false for bdev > > that doesn't have dax_dev (naturally so). So in the original condition > > there was no point in calling bdev_dax_supported() if we know dax_dev is > > NULL. > > > > Then this was changed to: > > > > if (!dax_dev || !bdev_dax_supported(bdev, blocksize)) > > > > which looks more sensible at the first sight. But only at the first sight - > > if you look at wider context, __generic_fsdax_supported() is the bulk of > > code that decides whether a device supports DAX so calling > > bdev_dax_supported() from it indeed doesn't look as such a great idea. So > > IMO the condition should be just: > > > > if (!dax_dev) > > > > I'll send a fix for this. > > If you beat me to it, great, but you might be sleeping now. I agree > the original condition was bogus and looks to be a result of previous > non-thorough refactoring on my part. I think we can move that !dax_dev > into dax_supported(). I'll take a look. Adrian actually already submitted a fix here: https://lore.kernel.org/linux-nvdimm/20200915075729.12518-1-adrianhuang0701@gmail.com/ so we're now refining the fix in that thread. Honza -- Jan Kara SUSE Labs, CR _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org