summaryrefslogtreecommitdiffstats
path: root/Grow.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-10-12 16:55:12 +1100
committerNeilBrown <neilb@suse.de>2009-10-12 16:55:12 +1100
commit5fdf37e35783a00ded31a7287785451134c9ca26 (patch)
tree6b34f64e085c5319ee0dfffba87ddb31bd3ecbe3 /Grow.c
parent249887eb76d984d7a0053dfc79cd917880e883de (diff)
downloadmdadm-5fdf37e35783a00ded31a7287785451134c9ca26.tar.gz
mdadm-5fdf37e35783a00ded31a7287785451134c9ca26.tar.xz
mdadm-5fdf37e35783a00ded31a7287785451134c9ca26.zip
Grow: make sure bsb2 is properly aligned
We do O_DIRECT io in bsb2, so it must be aligned properly. Easiest if it is static. Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'Grow.c')
-rw-r--r--Grow.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Grow.c b/Grow.c
index 5ebb482..e3239d6 100644
--- a/Grow.c
+++ b/Grow.c
@@ -387,7 +387,7 @@ int Grow_addbitmap(char *devname, int fd, char *file, int chunk, int delay, int
* It has the following structure.
*/
-struct mdp_backup_super {
+static struct mdp_backup_super {
char magic[16]; /* md_backup_data-1 or -2 */
__u8 set_uuid[16];
__u64 mtime;
@@ -402,7 +402,7 @@ struct mdp_backup_super {
__u64 length2;
__u32 sb_csum2; /* csum of preceeding bytes. */
__u8 pad[512-68-32];
-} __attribute__((aligned(512))) bsb;
+} __attribute__((aligned(512))) bsb, bsb2;
int bsb_csum(char *buf, int len)
{
@@ -1331,7 +1331,6 @@ static void validate(int afd, int bfd, unsigned long long offset)
* This is only used for regression testing and should not
* be used while the array is active
*/
- struct mdp_backup_super bsb2;
if (afd < 0)
return;
lseek64(bfd, offset - 4096, 0);