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>
This commit is contained in:
Piergiorgio Sartor 2014-02-01 22:27:58 +01:00 committed by NeilBrown
parent 21d648132a
commit e645b3417c
1 changed files with 1 additions and 1 deletions

View File

@ -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]);