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

2020-10-22 Thread Christopher Unkel
associated performance penalty. Respect the physical block alignment when possible. Signed-off-by: Christopher Unkel --- drivers/md/md.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/md/md.c b/drivers/md/md.c index 98bac4f304ae..2b42850acfb3 100644 --- a/drivers/md/

[PATCH 3/3] md: pad writes to end of bitmap to physical blocks

2020-10-22 Thread Christopher Unkel
no bitmap write will respect the physical block boundaries.) Signed-off-by: Christopher Unkel --- drivers/md/md-bitmap.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 600b89d5a3ad..21af5f94d495 100644 --- a/drivers/md/md-bitm

[PATCH 2/3] md: factor sb write alignment check into function

2020-10-22 Thread Christopher Unkel
Refactor in preparation for a second use of the logic. Signed-off-by: Christopher Unkel --- drivers/md/md-bitmap.c | 72 +++--- 1 file changed, 40 insertions(+), 32 deletions(-) diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c index 200c5d0f08bf

[PATCH 0/3] mdraid sb and bitmap write alignment on 512e drives

2020-10-22 Thread Christopher Unkel
reciated. --Chris Christopher Unkel (3): md: align superblock writes to physical blocks md: factor sb write alignment check into function md: pad writes to end of bitmap to physical blocks drivers/md/md-bitmap.c | 80 +- drivers/md/md.c|

[PATCH 3/3] md: reuse sb length-checking logic

2020-10-29 Thread Christopher Unkel
The logic in super_1_load() to check the length of the superblock against (new_)data_offset has the same purpose as the newly-created super_1_sb_length_ok(). The latter is also more complete in that it check for overlap between the superblock write and the bitmap. Signed-off-by: Christopher

[PATCH v2 1/3] md: factor out repeated sb alignment logic

2020-10-29 Thread Christopher Unkel
super_1_load() and super_1_sync() both contain a copy of logic to pad out the superblock size so that it is aligned on a logical block boundary. Factor into new function, and use round_up() rather than explict bitmask-based calculation. Signed-off-by: Christopher Unkel --- This series replaces

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

2020-10-29 Thread Christopher Unkel
associated performance penalty. Respect the physical block alignment when possible, that is, when the write padded out to the physical block doesn't run into the data or bitmap. Signed-off-by: Christopher Unkel --- This series replaces the first patch of the previous series (https://lkml.org/lkml/

[PATCH v2 0/3] md superblock write alignment on 512e devices

2020-10-29 Thread Christopher Unkel
tion would be more likely to trigger it. Thanks, --Chris Christopher Unkel (3): md: factor out repeated sb alignment logic md: align superblock writes to physical blocks md: reuse sb length-checking logic drivers/md/md.c | 69 + 1 file c