tytso / e2fsprogs

Ext2/3/4 file system utilities
http://ext4.wiki.kernel.org
375 stars 222 forks source link

blkid: Add support for > 64k cluster NTFS volumes. #167

Open unsound opened 11 months ago

unsound commented 11 months ago

Windows 10 Creators Edition introduced larger cluster sizes for NTFS, but since the number of sectors per cluster is stored as an 8-bit integer and 128 is the largest power of 2 that can be represented as an unsigned 8-bit integer, larger cluster sizes are encoded as a bitshift value / power of two counted down from the value 255. I.e. past the sectors_per_cluster value 128 the actual number of sectors per cluster is calculated as 2^(256 - sectors_per_cluster).