From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> To better accommodate 4K sector drives, use 4K buffer alignment for superblock buffers. Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- super1.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/super1.c b/super1.c index ca9e4e4..513f406 100644 --- a/super1.c +++ b/super1.c @@ -837,7 +837,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info, int rfd; char defname[10]; - if (posix_memalign((void**)&sb, 512, SUPER1_SIZE) != 0) { + if (posix_memalign((void**)&sb, 4096, SUPER1_SIZE) != 0) { fprintf(stderr, Name ": %s could not allocate superblock\n", __func__); return 0; @@ -1220,7 +1220,7 @@ static int compare_super1(struct supertype *st, struct supertype *tst) return 1; if (!first) { - if (posix_memalign((void**)&first, 512, SUPER1_SIZE) != 0) { + if (posix_memalign((void**)&first, 4096, SUPER1_SIZE) != 0) { fprintf(stderr, Name ": %s could not allocate superblock\n", __func__); return 1; @@ -1332,7 +1332,7 @@ static int load_super1(struct supertype *st, int fd, char *devname) return 1; } - if (posix_memalign((void**)&super, 512, SUPER1_SIZE) != 0) { + if (posix_memalign((void**)&super, 4096, SUPER1_SIZE) != 0) { fprintf(stderr, Name ": %s could not allocate superblock\n", __func__); return 1; -- 1.7.7.6 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html