diff options
author | Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> | 2014-02-01 22:27:58 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-02-04 06:06:46 +0100 |
commit | e645b3417c61dbe40795addf45faa51b9bfdcbef (patch) | |
tree | 97b1ebc1f84b6b3bc4e2f4e33153b40fc1e8bab2 /raid6check.c | |
parent | raid6check.c: fix Q parity generation (diff) | |
download | mdadm-e645b3417c61dbe40795addf45faa51b9bfdcbef.tar.xz mdadm-e645b3417c61dbe40795addf45faa51b9bfdcbef.zip |
raid6check.c: add O_SYNC to open
It could be better to make sure the
data reaches the disks, so open the
drives with O_SYNC flag.
Signed off: piergiorgio.sartor@nexgo.de
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'raid6check.c')
-rw-r--r-- | raid6check.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/raid6check.c b/raid6check.c index 48e9094a..22b74cc1 100644 --- a/raid6check.c +++ b/raid6check.c @@ -592,7 +592,7 @@ int main(int argc, char *argv[]) if(disk_slot >= 0) { disk_name[disk_slot] = map_dev(comp->disk.major, comp->disk.minor, 0); offsets[disk_slot] = comp->data_offset * 512; - fds[disk_slot] = open(disk_name[disk_slot], O_RDWR); + fds[disk_slot] = open(disk_name[disk_slot], O_RDWR | O_SYNC); if (fds[disk_slot] < 0) { perror(disk_name[disk_slot]); fprintf(stderr,"%s: cannot open %s\n", prg, disk_name[disk_slot]); |