[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <90b46d82-f4ed-db07-b3a4-31cf806f1d96@oracle.com>
Date: Thu, 14 Apr 2022 00:51:28 +0000
From: Jane Chu <jane.chu@...cle.com>
To: Christoph Hellwig <hch@...radead.org>,
Dan Williams <dan.j.williams@...el.com>
CC: david <david@...morbit.com>, "Darrick J. Wong" <djwong@...nel.org>,
Vishal L Verma <vishal.l.verma@...el.com>,
Dave Jiang <dave.jiang@...el.com>,
Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>,
device-mapper development <dm-devel@...hat.com>,
"Weiny, Ira" <ira.weiny@...el.com>,
Matthew Wilcox <willy@...radead.org>,
Vivek Goyal <vgoyal@...hat.com>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Linux NVDIMM <nvdimm@...ts.linux.dev>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
linux-xfs <linux-xfs@...r.kernel.org>, X86 ML <x86@...nel.org>
Subject: Re: [PATCH v7 4/6] dax: add DAX_RECOVERY flag and .recovery_write
dev_pgmap_ops
On 4/11/2022 10:02 PM, Christoph Hellwig wrote:
> On Mon, Apr 11, 2022 at 09:57:36PM -0700, Dan Williams wrote:
>> So how about change 'int flags' to 'enum dax_access_mode mode' where
>> dax_access_mode is:
>>
>> /**
>> * enum dax_access_mode - operational mode for dax_direct_access()
>> * @DAX_ACCESS: nominal access, fail / trim access on encountering poison
>> * @DAX_RECOVERY_WRITE: ignore poison and provide a pointer suitable
>> for use with dax_recovery_write()
>> */
>> enum dax_access_mode {
>> DAX_ACCESS,
>> DAX_RECOVERY_WRITE,
>> };
>>
>> Then the conversions look like this:
>>
>> - rc = dax_direct_access(iter->iomap.dax_dev, pgoff, 1, &kaddr, NULL);
>> + rc = dax_direct_access(iter->iomap.dax_dev, pgoff, 1,
>> DAX_ACCESS, &kaddr, NULL);
>>
>> ...and there's less chance of confusion with the @nr_pages argument.
>
> Yes, this might be a little nicer.
Will do.
Thanks!
-jane
Powered by blists - more mailing lists