Re: [PATCH v5 2/7] dax: introduce dax device flag DAXDEV_RECOVERY

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2/2/2022 5:23 AM, Christoph Hellwig wrote:
> On Fri, Jan 28, 2022 at 02:31:45PM -0700, Jane Chu wrote:
>> +int dax_prep_recovery(struct dax_device *dax_dev, void **kaddr)
>> +{
>> +	if (dax_recovery_capable(dax_dev)) {
>> +		set_bit(DAXDEV_RECOVERY, (unsigned long *)kaddr);
>> +		return 0;
>> +	}
>> +	return -EINVAL;
> 
> Setting a random bit on a passed in memory address looks a little
> dangerous to me.

Yeah, I see.  Would you suggest a way to pass the indication from
dax_iomap_iter to dax_direct_access that the caller intends the
callee to ignore poison in the range because the caller intends
to do recovery_write? We tried adding a flag to dax_direct_access, and 
that wasn't liked if I recall.

> 
> Also I'd return early for the EINVAL case to make the flow a little
> more clear.

Agreed, will do.

thanks!
-jane




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux