Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp5296857imm; Tue, 31 Jul 2018 08:37:06 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfybpTSt8WHQf140LEFays7jCCyy1U0vFSfmKBTW8DivB856M5ReJpxEaQk+byd3FcQrKYI X-Received: by 2002:a63:1403:: with SMTP id u3-v6mr20865620pgl.13.1533051426781; Tue, 31 Jul 2018 08:37:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533051426; cv=none; d=google.com; s=arc-20160816; b=ZhpHCh9BonraXGzFuROt3f38xBiNLZ4DyxV0ZvglQAY5tAHhUeWj3aP95H8NBe8vWP uRAQiughgiYbDpSo4ol7eOEvyxj5XWOEmlnYu4rzoJhnezoZ2dmF4PVmy2LLDqD/dkcg EblcEYGUNljNmHlpFsRTfl6lEruhKtH6ESxRm+L36H11+YoiZbkFugOEQpqeZy7eoWuG YUnJmVqQfRfg51IZT67dVDO+FSpbiCqmwsXIVypBLo9xfhi3VLDDYN0NqHQAiUt8UKsq QP6lUX6EmN276Rr10u/7JA/PBbheTUKLLzMDWmUzCp4+xUoYBg3XlNK6N/s3YbaORJKo tOJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=u4q2dG9ARFnW8GuU8iJ+vh6aXmK9aLbh4LFa1rkoruc=; b=qC4EnmEWdGY++CC62EOTB2O28gwzMEg9CtMOypQ359H1PGV39ZN6Dq9QQnesLmjpBl Et7t4txpcDT99/l7QUgorcndM4oKj30+n5kGGYnzViBrbJyfoN6TbDwp8q0GuOpDl7qa yh2R/pW0abow6WE8o9xXAiF1vNKgHGxHftaPfEJwyJADII2i3u3K3fQ3d/Xm165tqal8 3HeBjt5xnFLoBX+FRhn+ObbiBFgJuhS6AZzVWf2Si9v+/fsQxvlTJkb06MXsEKjbTquE hgxFL/kYqxz92aoZAd+dYMCTVfbHXAb2s1ytb5BZJjNxojF29QX97kWsyzUYALK7g44h a1ug== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a1-v6si11577283pgq.387.2018.07.31.08.36.51; Tue, 31 Jul 2018 08:37:06 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732401AbeGaRQx (ORCPT + 99 others); Tue, 31 Jul 2018 13:16:53 -0400 Received: from mga07.intel.com ([134.134.136.100]:4743 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732013AbeGaRQw (ORCPT ); Tue, 31 Jul 2018 13:16:52 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2018 08:36:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,427,1526367600"; d="scan'208";a="249915686" Received: from djiang5-mobl2.amr.corp.intel.com (HELO [10.255.77.135]) ([10.255.77.135]) by fmsmga005.fm.intel.com with ESMTP; 31 Jul 2018 08:35:59 -0700 Subject: Re: [PATCH v3 0/6] kaddr and pfn can be NULL to ->direct_access() To: Huaisheng Ye , linux-nvdimm@lists.01.org, dan.j.williams@intel.com Cc: ross.zwisler@linux.intel.com, willy@infradead.org, vishal.l.verma@intel.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, viro@zeniv.linux.org.uk, martin.petersen@oracle.com, axboe@kernel.dk, gregkh@linuxfoundation.org, bart.vanassche@wdc.com, jack@suse.cz, agk@redhat.com, snitzer@redhat.com, keescook@chromium.org, dm-devel@redhat.com, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, colyli@suse.de, chengnt@lenovo.com, Huaisheng Ye References: <20180730071548.9172-1-yehs2007@zoho.com> From: Dave Jiang Message-ID: Date: Tue, 31 Jul 2018 08:35:58 -0700 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <20180730071548.9172-1-yehs2007@zoho.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/30/2018 12:15 AM, Huaisheng Ye wrote: Applied > From: Huaisheng Ye > > Changes since v2 [2]: > * Collect Martin and Mike's acks for dcssblk and dm-writecache; > * Rebase the series of patch to v4.18-rc7. > > Changes since v1 [1]: > * Involve the previous patches for pfn can be NULL. > * Reword the patch descriptions according to Christian's comment. > * According to Ross's suggestion, replace local pointer dummy_addr > with NULL within md/dm-writecache for direct_access. > > [1]: https://lkml.org/lkml/2018/7/24/199 > [2]: https://lkml.org/lkml/2018/7/25/581 > > Some functions within fs/dax, dax/super and md/dm-writecache don't > need to get local pointer kaddr or variable pfn from direct_access. > Assigning NULL to kaddr or pfn with ->direct_access() is more > straightforward and simple than offering a useless local pointer or > variable. > > So all ->direct_access() need to check the validity of pointer kaddr > and pfn for NULL assignment. If either of them is equal to NULL, that > is to say callers may have no need for kaddr or pfn, so this series of > patch are prepared for allowing them to pass in NULL instead of having > to pass in a local pointer or variable that they then just throw away. > > Huaisheng Ye (6): > libnvdimm, pmem: kaddr and pfn can be NULL to ->direct_access() > s390, dcssblk: kaddr and pfn can be NULL to ->direct_access() > tools/testing/nvdimm: kaddr and pfn can be NULL to ->direct_access() > dax/super: Do not request a pointer kaddr when not required > md/dm-writecache: Don't request pointer dummy_addr when not required > filesystem-dax: Do not request kaddr and pfn when not required > > drivers/dax/super.c | 3 +-- > drivers/md/dm-writecache.c | 3 +-- > drivers/nvdimm/pmem.c | 7 +++++-- > drivers/s390/block/dcssblk.c | 8 +++++--- > fs/dax.c | 13 ++++--------- > tools/testing/nvdimm/pmem-dax.c | 12 ++++++++---- > 6 files changed, 24 insertions(+), 22 deletions(-) >