[NSWI131] HW 7: O_DIRECT vs O_SYNC

Petr Tůma petr.tuma at d3s.mff.cuni.cz
Mon Apr 20 19:20:18 CEST 2020


Hi,

oops, sorry for the oversight, please use O_SYNC everywhere and O_DIRECT where it works.

Thank you, Petr


On 20/04/2020 18:40, Kuba Maroušek wrote:
> Hello,
> 
> I'm working on the last homework to date and was wondering, can I use
> O_SYNC instead of O_DIRECT when calling open()?
> 
> I was able to make O_DIRECT work with an ordinary file, however, it
> does not let me write to /dev/null. From the manual page, it seems we
> can use O_SYNC as well because this option also forces the data to be
> written to the real destination. Is this correct?
> 
> Thank you for the answer
> Kuba Maroušek
> _______________________________________________
> NSWI131 mailing list
> NSWI131 at d3s.mff.cuni.cz
> https://d3s.mff.cuni.cz/mailman/listinfo/nswi131
> 


More information about the NSWI131 mailing list