lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <7c8c71a4-ab7a-080e-1d61-d559003f052f@oracle.com>
Date:   Mon, 8 Nov 2021 20:43:16 +0000
From:   Jane Chu <jane.chu@...cle.com>
To:     "Darrick J. Wong" <djwong@...nel.org>
CC:     "david@...morbit.com" <david@...morbit.com>,
        "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
        "hch@...radead.org" <hch@...radead.org>,
        "vishal.l.verma@...el.com" <vishal.l.verma@...el.com>,
        "dave.jiang@...el.com" <dave.jiang@...el.com>,
        "agk@...hat.com" <agk@...hat.com>,
        "snitzer@...hat.com" <snitzer@...hat.com>,
        "dm-devel@...hat.com" <dm-devel@...hat.com>,
        "ira.weiny@...el.com" <ira.weiny@...el.com>,
        "willy@...radead.org" <willy@...radead.org>,
        "vgoyal@...hat.com" <vgoyal@...hat.com>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "nvdimm@...ts.linux.dev" <nvdimm@...ts.linux.dev>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-xfs@...r.kernel.org" <linux-xfs@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] dax: Introduce normal and recovery dax operation
 modes

On 11/5/2021 6:50 PM, Darrick J. Wong wrote:
> 
> <snip>
> 
>> diff --git a/include/linux/dax.h b/include/linux/dax.h
>> index 324363b798ec..931586df2905 100644
>> --- a/include/linux/dax.h
>> +++ b/include/linux/dax.h
>> @@ -9,6 +9,10 @@
>>   /* Flag for synchronous flush */
>>   #define DAXDEV_F_SYNC (1UL << 0)
>>   
>> +/* dax operation mode dynamically set by caller */
>> +#define	DAX_OP_NORMAL		0
>> +#define	DAX_OP_RECOVERY		1
> 
> Mostly looks ok to me, but since this is an operation mode, should this
> be an enum instead of an int?

Yeah, I tried enum at first, and then noticed that the
new dax enum type need to be introduced to device-mapper.h
by either include dax.h or define a mirrored enum, and
I wondered if that would be an over kill, so I ended up
settle on #define.

> 
> Granted I also think six arguments is a lot... though I don't really
> see any better way to do this.

Dan has a suggestion, and that'll reduce the number of args to 5.
> 
> (Dunno, I spent all day running internal patches through the process
> gauntlet so this is the remaining 2% of my brain speaking...)

Thanks!
-jane

> 
> --D
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ