Re: [PATCH] mkfs.btrfs: round all device sizes to sectorsize

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

 



On 7/25/14, 12:12 PM, Zach Brown wrote:
> On Thu, Jul 24, 2014 at 11:27:32PM -0500, Eric Sandeen wrote:
>> make_btrfs() rounds down the first device size to a multiple of sectorsize:
> 
>                ^^^^^^^^^^^
> 
>> -	device->total_bytes = block_count;
>> +	device->total_bytes = (block_count / sectorsize) * sectorsize;
> 
> kerncompat.h:#define round_down(x, y) ((x) & ~__round_mask(x, y))
> 
> - z
> 

yeah yeah ;) this isn't copied kernel code but sure, that'd be better.

I'm trying to clean up this whole "we say blocks when we mean bytes!"
thing, and I'll include round_down() as well.

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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux