A
Adnan Abbas
Hi,
I have a problem useing fdatasync()…
This is how it goes.
Setup:
I have an external device connected through Firewire,
I am running Redhat 2.4.
I write to it in raw initiated mode (no File System)
Scenario:
I open the device using open() get a file descriptor. (flag set to
O_SYNC)
I write a block in a while loop using write()
I call fdatasync() and check for success response in each loop
I close using close()
Now in this code if I disconnect the firewire cable during the loop I
loose all the data.
This tells me fdatasync() did not work. however if i have a 1sec sleep
after each write i do get all the data on my disk but kills the
throughput(sleep is not an option).
Any clue why?
Please assist….
Adnan Abbas
I have a problem useing fdatasync()…
This is how it goes.
Setup:
I have an external device connected through Firewire,
I am running Redhat 2.4.
I write to it in raw initiated mode (no File System)
Scenario:
I open the device using open() get a file descriptor. (flag set to
O_SYNC)
I write a block in a while loop using write()
I call fdatasync() and check for success response in each loop
I close using close()
Now in this code if I disconnect the firewire cable during the loop I
loose all the data.
This tells me fdatasync() did not work. however if i have a 1sec sleep
after each write i do get all the data on my disk but kills the
throughput(sleep is not an option).
Any clue why?
Please assist….
Adnan Abbas