summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJes Sorensen <Jes.Sorensen@redhat.com>2012-03-21 08:01:04 +1100
committerNeilBrown <neilb@suse.de>2012-03-21 08:01:04 +1100
commit3c0bcd460908469613fae3bdf25e191f9d65e70b (patch)
tree3665d37e34c84ba0589fa37a1bc5e5cd46efa34b
parent2de0b8a2b4d4c0bdc7fbe4caf591a7c160d86da5 (diff)
downloadmdadm-3c0bcd460908469613fae3bdf25e191f9d65e70b.tar.gz
Use 4K buffer alignment for superblock allocations
To better accommodate 4K sector drives, use 4K buffer alignment for superblock buffers. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: NeilBrown <neilb@suse.de>
-rw-r--r--super1.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/super1.c b/super1.c
index 61655ad..447515b 100644
--- a/super1.c
+++ b/super1.c
@@ -843,7 +843,7 @@ static int init_super1(struct supertype *st, mdu_array_info_t *info,
char defname[10];
int sbsize;
- 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;
@@ -1227,7 +1227,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;
@@ -1339,7 +1339,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;