]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
imsm: fix store_imsm_mpb() alignment for O_DIRECT
authorDan Williams <dan.j.williams@intel.com>
Mon, 14 Jul 2008 20:55:02 +0000 (13:55 -0700)
committerDan Williams <dan.j.williams@intel.com>
Mon, 14 Jul 2008 20:55:02 +0000 (13:55 -0700)
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
super-intel.c

index e81d284fc6686794814531f8792682eaa45c2427..713670f6c14b35b1606963721e1fb0c4a6a45b59 100644 (file)
@@ -1812,7 +1812,7 @@ static int store_imsm_mpb(int fd, struct intel_super *super)
                if (lseek64(fd, dsize - (512 * (2 + sectors)), SEEK_SET) < 0)
                        return 1;
 
-               if (write(fd, super->buf + 512, mpb_size - 512) != mpb_size - 512)
+               if (write(fd, super->buf + 512, 512 * sectors) != 512 * sectors)
                        return 1;
        }