diff options
author | NeilBrown <neilb@suse.de> | 2013-02-05 05:34:17 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-02-05 06:00:55 +0100 |
commit | 9698df15d9efaa32d30e17ff839315cedf1e7984 (patch) | |
tree | dbbe22c79f5ef36cdf0c1ece9e743b80a3eb50b5 /super-mbr.c | |
parent | Detail: print correct size for large external-metadata arrays. (diff) | |
download | mdadm-9698df15d9efaa32d30e17ff839315cedf1e7984.tar.xz mdadm-9698df15d9efaa32d30e17ff839315cedf1e7984.zip |
Avoid using BLKFLSBUF.
Now that we use O_DIRECT for all device IO, BLKFLSBUF is not needed to
ensure we get current data, and it can impose a cost if any flush-out
is needed. So remove it.
To be safe, add O_DIRECT to one place where it isn't currently used:
when reading a bitmap.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'super-mbr.c')
-rw-r--r-- | super-mbr.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/super-mbr.c b/super-mbr.c index 42186193..8b175e31 100644 --- a/super-mbr.c +++ b/super-mbr.c @@ -86,8 +86,6 @@ static int load_super_mbr(struct supertype *st, int fd, char *devname) return 1; } - ioctl(fd, BLKFLSBUF, 0); /* make sure we read current data */ - lseek(fd, 0, 0); if (read(fd, super, sizeof(*super)) != sizeof(*super)) { if (devname) @@ -126,8 +124,6 @@ static int store_mbr(struct supertype *st, int fd) return 1; } - ioctl(fd, BLKFLSBUF, 0); /* make sure we read current data */ - lseek(fd, 0, 0); if (read(fd, old, sizeof(*old)) != sizeof(*old)) { free(old); |