* [PATCH] raid6check.c: add O_SYNC to open
@ 2014-02-01 21:27 Piergiorgio Sartor
0 siblings, 0 replies; only message in thread
From: Piergiorgio Sartor @ 2014-02-01 21:27 UTC (permalink / raw)
To: linux-raid
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
diff -uNrp a/raid6check.c b/raid6check.c
--- a/raid6check.c 2014-02-01 22:12:15.069189406 +0100
+++ b/raid6check.c 2014-02-01 22:18:26.657197036 +0100
@@ -584,7 +584,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]);
--
piergiorgio
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-02-01 21:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-01 21:27 [PATCH] raid6check.c: add O_SYNC to open Piergiorgio Sartor
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).