Re: btrfs on whole disk (no partitions)

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

 



On Jun 25, 2014, at 7:01 AM, Imran Geriskovan <imran.geriskovan@xxxxxxxxx> wrote:

> On 6/23/14, Martin K. Petersen <martin.petersen@xxxxxxxxxx> wrote:
>> Anyway. The short answer is that Linux will pretty much always do I/O in
>> multiples of the system page size regardless of the logical block size
>> of the underlying device. There are a few exceptions to this such as
>> direct I/O, legacy filesystems using bufferheads and raw block device
>> access.
> 
> Thanks for the clarification.
> 
> And some random notes:
> 
> Note that gdisk gives default 8 sector alignment value for AF disks.
> That is 'sector' meant by gdisk is 'Logical Sector'!
> Sufficiently determined user may create misaligned
> partitions by playing with alignment value and partition start/end
> values.
> 
> There are SSDs with 4K, 8K block/page sizes and
> 512K, 1M, 1.5M Erase block sizes.
> 
> Partitions should be aligned with Erase blocks.
> 

That sounds plausible, but the FTL in the consumer SSD's most all of us are buying isn't going to give you any assurance it's actually writing with such boundaries in mind. You may have partition 1 start on LBA 2048, which is 1MB aligned, but as soon as you're writing data to LBA 2048 through say LBA 2560, for all you know that write actually ends up in pages that are located in the first and second erase blocks; or maybe all of it's in the 8th erase block. The OS side of things we don't have insight or control over this.

Also these days parted, fdisk and gdisk should all be starting partition 1 at LBA 2048, 1MB aligned. Some differences come into play with 4096/4096 logical/physical sector drives, but so far I've only seen this as the result of USB enclosures. I haven't seen 4Kn AF bare drives in the wild thus far.


Chris Murphy--
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