Re: [PATCH 1/3] md: align superblock writes to physical blocks

2020-10-23 Thread Christoph Hellwig
> + /* Respect physical block size if feasible. */ > + bmask = queue_physical_block_size(rdev->bdev->bd_disk->queue)-1; > + if (!((rdev->sb_start * 512) & bmask) && (rdev->sb_size & bmask)) { > + int candidate_size = (rdev->sb_size | bmask) + 1; > + > + if (minor

Re: [PATCH 1/3] md: align superblock writes to physical blocks

2020-10-22 Thread Song Liu
On Thu, Oct 22, 2020 at 8:31 PM Christopher Unkel wrote: > > Writes of the md superblock are aligned to the logical blocks of the > containing device, but no attempt is made to align them to physical > block boundaries. This means that on a "512e" device (4k physical, 512 > logical) every superbl

[PATCH 1/3] md: align superblock writes to physical blocks

2020-10-22 Thread Christopher Unkel
Writes of the md superblock are aligned to the logical blocks of the containing device, but no attempt is made to align them to physical block boundaries. This means that on a "512e" device (4k physical, 512 logical) every superblock update hits the 512-byte emulation and the possible associated p