Re: [PATCH 1/4] pmem: Initial version of persistent memory driver

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

 



On 11/03/2014 06:19 PM, Wilcox, Matthew R wrote:
<>
>>> +config BLK_DEV_PMEM_COUNT
>>> +	int "Default number of PMEM disks"
>>> +	default "4"
>>
>> For real use I think a default of 1 would be better.
> 
> For real use, you need at least two to run xfstests.  This whole configuration mechanism is going away soon anyway.
> 
>>> +	size_t page_offset = sector >> PAGE_SECTORS_SHIFT;
>>> +	size_t offset = page_offset << PAGE_SHIFT;
>>> +
>>
>> Since page_offset is only used to calculate offset, they
>> could be joined to avoid relying on the compiler to
>> optimize it away:
>> 	size_t offset = sector >> PAGE_SECTORS_SHIFT << PAGE_SHIFT;
> 
> If you insist on doing the compiler's job for it, why not:
> 
> 	size_t offset = sector >> (PAGE_SECTORS_SHIFT - PAGE_SHIFT);
> 
> I actually think the original is clearer.
> 

I wish you guys would actually review the correct code.

In the actual good driver that has any shape of proper code all these issue
are gone.

* config defaults gone, multiple-devices multiple-memory ranges fully supported
  hot plug style.
* above shifts cruft completely gone it is left overs from brd.c and
  its page usage.
* getgeo fixed to do what we realy want by the only application on earth
  that still uses it, fdisk. All other partitioners do not call it at all.

Why are we reviewing dead code ?

Cheers
Boaz

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




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