Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752801AbdHAVTx (ORCPT ); Tue, 1 Aug 2017 17:19:53 -0400 Received: from mail-ua0-f180.google.com ([209.85.217.180]:34969 "EHLO mail-ua0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752038AbdHAVTv (ORCPT ); Tue, 1 Aug 2017 17:19:51 -0400 MIME-Version: 1.0 In-Reply-To: <1501621491.2475.20.camel@wdc.com> References: <150161113411.34055.9762658795237184307.stgit@dwillia2-desk3.amr.corp.intel.com> <20170801190257.GA10033@redhat.com> <1501621491.2475.20.camel@wdc.com> From: Dan Williams Date: Tue, 1 Aug 2017 14:19:50 -0700 Message-ID: Subject: Re: dm: enable opt-out of device-mapper dax support To: Bart Van Assche Cc: "snitzer@redhat.com" , "dm-devel@redhat.com" , "linux-kernel@vger.kernel.org" , "linux-nvdimm@lists.01.org" , "agk@redhat.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1874 Lines: 39 On Tue, Aug 1, 2017 at 2:04 PM, Bart Van Assche wrote: > On Tue, 2017-08-01 at 13:59 -0700, Dan Williams wrote: >> On Tue, Aug 1, 2017 at 12:45 PM, Dan Williams wrote: >> > On Tue, Aug 1, 2017 at 12:02 PM, Mike Snitzer wrote: >> > > On Tue, Aug 01 2017 at 2:12pm -0400, >> > > Dan Williams wrote: >> > > > [ ... ] >> > > >> > > I'm questioning the need to have yet another Kbuild CONFIG option. If >> > > the user has enabled CONFIG_BLK_DEV_PMEM and CONFIG_FS_DAX (DAX already >> > > gets selected by CONFIG_FS_DAX) then shouldn't the DM capabilities just >> > > be enabled? >> > > >> > > Guess I'm just skeptical of: why do we want to move to a model where >> > > users need to opt-in to DM support for DAX? >> > > >> > > I also _really_ don't like each target's DAX support being colocated in >> > > drivers/md/dm-dax.c >> > > >> > > This all looks and feels like a serious step backwards. >> > >> > Ok, you want ifdef'd sections of DAX code in each target and make >> > DM_DAX a silent option that gets enabled with BLK_DEV_PMEM, anything >> > else? >> >> Actually, no, I was thrown off by Bart's suggestion to move code >> around. I can handle this all by deleting "select DAX" and adding more >> stubbed out dax helpers. > > Hello Mike and Dan, > > How about one *-dax.c file per *.c dm file that has to be modified to add DAX support? > I think that approach would avoid collocation of code for different targets in a > single dm-dax.c file and would also avoid that #ifdef CONFIG_DAX statements have to > be added. This approach is orthogonal to removal of CONFIG_DM_DAX. You're free to send an alternative approach, but the new ifdefs in include/linux/dax.h seem to be the cleanest option to remove dax text size when the device-mapper dax support is not needed.