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

2014-07-25 Thread Anand Jain
On 07/25/2014 12:27 PM, Eric Sandeen wrote: make_btrfs() rounds down the first device size to a multiple of sectorsize: num_bytes = (num_bytes / sectorsize) * sectorsize; but subsequent device adds don't. This seems a bit odd inconsistent, and it makes xfstest btrfs/011 _notrun(),

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

2014-07-25 Thread Zach Brown
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;

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

2014-07-25 Thread Eric Sandeen
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 /

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

2014-07-25 Thread Eric Sandeen
On 7/25/14, 12:25 PM, Eric Sandeen wrote: 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; +

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

2014-07-24 Thread Eric Sandeen
make_btrfs() rounds down the first device size to a multiple of sectorsize: num_bytes = (num_bytes / sectorsize) * sectorsize; but subsequent device adds don't. This seems a bit odd inconsistent, and it makes xfstest btrfs/011 _notrun(), because it explicitly checks that devices are