Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp92610imm; Thu, 31 May 2018 19:25:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIO88Qk8fUsBIB7xUsQtUVyH2tgntpJcw0LLGHu38+0g3LEZuku0wlC0UnWCupBU8+ygWRj X-Received: by 2002:a62:dc1c:: with SMTP id t28-v6mr4721327pfg.137.1527819901429; Thu, 31 May 2018 19:25:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527819901; cv=none; d=google.com; s=arc-20160816; b=X3ysYZ2+Qcen3BsPlbIya2IwseRWtEYh6Mhas4qh5nb43JZF6ssfO5ZV8zbvyjZ5oT kX0vx+EBuzTTj+9h46XIMnghsK0puzYwEOGn8Vc7Wu0U5HgC/MbURvZHYiLDY+PN0gkm 8O1JGBEZ913e8ImQlTyFZ5i2sylgiXfZgLNFtj2qqPiiSvzl39ufFcjY0oHgT/+UI/TA UDd455DvaYqL8imKBUZUDAkyW8twLxUcMCmCtwa1dy2cmCZxSNJndJaANraPF4PaVMeI BLAXGW8kw2tpKH0moC7tZkI4iazMJ+WrqYlSAHKdgeKOwkGsZ6DYEprN7/GrjZlrpmE2 E9mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ILSTwCDhCGnLl4u7ZaYfxvB2cit4fNxCig4fJwPhGKA=; b=WvZdR2ML7bKJaQcXfL2hg1WXR4s8HDvcqOwXiy9MTFyL7hgT2FcrRaumAo7Z6/LL9E R59iHVelamHtUtQa1Xv//01H2eMBAGSasI0fB0/cBz+U8FfwvXEfFVzMgV8UKFnSD/gB f601xajyGGGLTqoHIAiyAqiiMpfKaHZSuBpfLL2czt/B7o4ktwvEy+2/OJIw0ytVFF7y bD+9Y9N4i9LJ7Ctgr6sq4d66NlM0a4v88L9EmB3xDzxX4aOeSskmetGv9g0+hmCBLnGt bMB/uq3Xl3PokKJUtV9rrjUSupnrWWtdSS9ZxPY9QyTeVwWuvkHt3ICdJaIvZytdhULk fBMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u20-v6si19430903pgv.318.2018.05.31.19.24.47; Thu, 31 May 2018 19:25:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750913AbeFACYX (ORCPT + 99 others); Thu, 31 May 2018 22:24:23 -0400 Received: from ipmailnode02.adl6.internode.on.net ([150.101.137.148]:22594 "EHLO ipmailnode02.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750715AbeFACYV (ORCPT ); Thu, 31 May 2018 22:24:21 -0400 Received: from ppp59-167-129-252.static.internode.on.net (HELO dastard) ([59.167.129.252]) by ipmail02.adl6.internode.on.net with ESMTP; 01 Jun 2018 11:54:18 +0930 Received: from dave by dastard with local (Exim 4.80) (envelope-from ) id 1fOZjm-0004Pk-94; Fri, 01 Jun 2018 12:24:18 +1000 Date: Fri, 1 Jun 2018 12:24:18 +1000 From: Dave Chinner To: Dan Williams Cc: "Darrick J. Wong" , Mike Snitzer , linux-nvdimm , Linux Kernel Mailing List , linux-xfs , device-mapper development , linux-fsdevel Subject: Re: [PATCH v2 2/7] dax: change bdev_dax_supported() to support boolean returns Message-ID: <20180601022418.GR10363@dastard> References: <20180529195106.14268-1-ross.zwisler@linux.intel.com> <20180529195106.14268-3-ross.zwisler@linux.intel.com> <20180529212510.GJ30110@magnolia> <20180529220114.GA13948@linux.intel.com> <20180531191332.GB7825@magnolia> <20180601012657.GQ10363@dastard> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 31, 2018 at 06:57:33PM -0700, Dan Williams wrote: > On Thu, May 31, 2018 at 6:26 PM, Dave Chinner wrote: > > On Thu, May 31, 2018 at 12:13:32PM -0700, Darrick J. Wong wrote: > >> On Tue, May 29, 2018 at 04:01:14PM -0600, Ross Zwisler wrote: > >> > On Tue, May 29, 2018 at 02:25:10PM -0700, Darrick J. Wong wrote: > >> > > On Tue, May 29, 2018 at 01:51:01PM -0600, Ross Zwisler wrote: > >> > > > From: Dave Jiang > >> > > > > >> > > > The function return values are confusing with the way the function is > >> > > > named. We expect a true or false return value but it actually returns > >> > > > 0/-errno. This makes the code very confusing. Changing the return values > >> > > > to return a bool where if DAX is supported then return true and no DAX > >> > > > support returns false. > >> > > > > >> > > > Signed-off-by: Dave Jiang > >> > > > Signed-off-by: Ross Zwisler > >> > > > >> > > Looks ok, do you want me to pull the first two patches through the xfs > >> > > tree? > >> > > > >> > > Reviewed-by: Darrick J. Wong > >> > > >> > Thanks for the review. > >> > > >> > I'm not sure what's best. If you do that then Mike will need to have a DM > >> > branch for the rest of the series based on your stable commits, yea? > >> > > >> > Mike what would you prefer? > >> > >> I /was/ about to say that I would pull in the first two patches, but now > >> I can't get xfs to mount with pmem at all, and have no way of testing > >> this...? > > > > I have similar problems, too, but: > > > > $ ndctl list > > [ > > { > > "dev":"namespace1.0", > > "mode":"raw", > > "size":8589934592, > > "sector_size":512, > > "blockdev":"pmem1" > > }, > > { > > "dev":"namespace0.0", > > "mode":"raw", > > "size":8589934592, > > "sector_size":512, > > "blockdev":"pmem0" > > } > > ] > > $ sudo ndctl create-namespace -f -e namespace0.0 --mode=fsdax > > Error: operation failed, region0 fsdax mode not available > > > > failed to reconfigure namespace: Invalid argument > > $ > > > > I can't make head or tail of what is going wrong here - how am I > > supposed to debug this and get it working again? > > > > FWIW, XFS+DAX used to just work on this setup (I hadn't even > > installed ndctl until this morning!) but after changing the kernel > > it no longer works. That would make it a regression, yes? > > This commit caused the behavior change: > > 569d0365f571 dax: require 'struct page' by default for filesystem dax > > The justification is in that patch, but the short summary is we killed > off "pageless" dax because it had so many incomplete holes and > surprise behaviors. It needed to die on the path to making dax not > experimental, i.e. to close safety holes, and be feature complete for > all the ways userspace expects to use mappings (direct-io, fork, > poison handling, etc). > > I suspect your kernel does not have CONFIG_ZONE_DEVICE enabled which > has the following dependencies: > > depends on MEMORY_HOTPLUG > depends on MEMORY_HOTREMOVE > depends on SPARSEMEM_VMEMMAP Filesystem DAX now has a dependency on memory hotplug? Fmeh. No wonder I never enabled CONFIG_ZONE_DEVICE. It's described in menuconfig as "Device memory (pmem, HMM, etc...) hotplug support". This isn't for hotplug support - it required for basic DAX functionality. I've never enabled memory hotplug in any of my test kernel configs, because the VMs I run the kernels on don't ever get memory hotplugged.... OK, works now I've found the magic config incantantions to turn everything I now need on. Can we get this rationalised to a single top level config option in the filesystems menu "Enable Filesystem DAX" that turns on every knob that is required? Cheers, Dave. -- Dave Chinner david@fromorbit.com