Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp518478pxb; Thu, 21 Oct 2021 04:22:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2Tt6/U5EnD4KhQrzZP7r3rxKJz23JMDNnQGwHIpyafblIV8cLWFCZEtxiqItP70CzB6IX X-Received: by 2002:a17:90b:3144:: with SMTP id ip4mr5981574pjb.23.1634815367332; Thu, 21 Oct 2021 04:22:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634815367; cv=none; d=google.com; s=arc-20160816; b=Wwa+hFNsewrMGEmGuUlJTjtzwYOloZCAPLdjnLrzOzSwB9dda2C/h8rla3qYhLO6XD /s0kupfV6VxHJn6rBzn7gcjkEzMdRU5qlZkSR3tPM357zer3welsoARuznO//8pnVS+H UnT8/1ni1DJEKmsaSCdmvsd3H7D1QoAJ+PF4w9vEm4nO8IMpP2fFxxRLfk7V/90l5GAR KZIxXTB1yS6axNtr1GoW0pUtTGe3MUTV0GkLXqlniYaV2mFZTEzDoaAd9FEPG1AHulJZ FpNabyNDHmSuAw95UWVvq0NLivcYeeVWjnjdpOD6u/y//J5wgGehFAr8chyHOpmUrV6o gM5A== 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=M0rGryBEzzZjhmAi4X1KijO5IeZtO8wnm5ufeDUGYIk=; b=Pa0iybZyB/KLwTZKzP9PHnnhSYVH0YXXunBKKv3KA5UXly148kIxtbYBZGZMgQqFpo Ko3vY9TT3LNEoHN30O+goBMO7Qla+DRyhiRej5nrjXmHl2fhsR61vlOlkMgFfXNCognw E7rGz3D6mqWidUGNfqQSFjHxjPPCwOc71gaPwwFYrGKJEfQs3BjtHn8kaZmEqxehUW69 KpoX5qZ8f4FGKiRLdXlCJjcrz98UIVGTv63RmEuUQLfMIp7WgWp2vMq/J+Uu23gBuc7p KWCsMaonXRT9GinlzP/0dK6UwTExXYuN8kO1w6QDMHbB0FCebG9d9bIuXA1+Gz8OtLNC dXRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2Mms4J2l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q189si1941898pgq.160.2021.10.21.04.22.20; Thu, 21 Oct 2021 04:22:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=2Mms4J2l; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230260AbhJULWu (ORCPT + 99 others); Thu, 21 Oct 2021 07:22:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230205AbhJULWt (ORCPT ); Thu, 21 Oct 2021 07:22:49 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 01B98C06161C; Thu, 21 Oct 2021 04:20:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=M0rGryBEzzZjhmAi4X1KijO5IeZtO8wnm5ufeDUGYIk=; b=2Mms4J2lVeSKufy9yFdNswsyye 2AsR+X5xVhPSAi4aQpIQzgqxqGKeFtYax7tGSuQdJYJ/PR+xx1yvJi4ILRyRtXv7ry23EP6KldqOg ZIB64KTzT/lvLK5e0PlfnobqN6k/btromer+WlPZYlJ2npvVSW7EuolY10LqykgCiwde7h8hyQAPT QPaK0aF8zEI9kA4z5vXtj21xafnTWI9MqGVHhSbu5gaukRQWUz3lqq7R89p1VJHZXVDvIPBvmxMQW kSny0vZxrtKEVnvfMAN1BJxmfDOTPg1GdYDe1q8RzhhEhaNRunhxb8O3axpkEZkInEeGGIPzHvN5q utXpNR6g==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mdW7H-007KJP-3a; Thu, 21 Oct 2021 11:20:11 +0000 Date: Thu, 21 Oct 2021 04:20:11 -0700 From: Christoph Hellwig To: Jane Chu Cc: david@fromorbit.com, djwong@kernel.org, dan.j.williams@intel.com, hch@infradead.org, vishal.l.verma@intel.com, dave.jiang@intel.com, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, ira.weiny@intel.com, willy@infradead.org, vgoyal@redhat.com, linux-fsdevel@vger.kernel.org, nvdimm@lists.linux.dev, linux-kernel@vger.kernel.org, linux-xfs@vger.kernel.org Subject: Re: [PATCH 2/6] dax: prepare dax_direct_access() API with DAXDEV_F_RECOVERY flag Message-ID: References: <20211021001059.438843-1-jane.chu@oracle.com> <20211021001059.438843-3-jane.chu@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211021001059.438843-3-jane.chu@oracle.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 20, 2021 at 06:10:55PM -0600, Jane Chu wrote: > @@ -156,8 +156,8 @@ bool generic_fsdax_supported(struct dax_device *dax_dev, > } > > id = dax_read_lock(); > - len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn); > - len2 = dax_direct_access(dax_dev, pgoff_end, 1, &end_kaddr, &end_pfn); > + len = dax_direct_access(dax_dev, pgoff, 1, &kaddr, &pfn, 0); > + len2 = dax_direct_access(dax_dev, pgoff_end, 1, &end_kaddr, &end_pfn, 0); FYI, I have a series killing this code. But either way please avoid these overly long lines. > long dax_direct_access(struct dax_device *dax_dev, pgoff_t pgoff, long nr_pages, > - void **kaddr, pfn_t *pfn) > + void **kaddr, pfn_t *pfn, unsigned long flags) API design: I'd usually expect flags before output paramters.