<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">2014-05-19 23:17 GMT+03:00 Andrei Erghelegiu <span dir="ltr"><<a href="mailto:andrei.erghelegiu@gmail.com" target="_blank">andrei.erghelegiu@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Multumesc pentru raspuns. As mai avea o intrebare. Trebuie folosit<br>
flag-ul O_DIRECT atunci cand deschid un fisier? Din cate am vazut pe<br>
internet este folosit in destul de multe exemple cu aio, dar nu am<br>
inteles in totalitate ce face.<br></blockquote><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><font face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)" color="#000000">Nu ai nevoie de acest flag. Ultimul post din [1] explica situatiile in care se foloseste. Ai si in [2] o descriere putin mai detaliata (cauta dupa "<span style="font-size:13px;line-height:18.479999542236328px">O_DIRECT Flag</span>").</font></div>
<div><font face="arial, helvetica, sans-serif" style="background-color:rgb(255,255,255)" color="#000000">Pe scurt, folosind <span style="font-size:13px">O_DIRECT, datele nu se vor mai copia in kernel space (se elimina cache-ul de la acest nivel), ci direct in bufferul din user space.</span> Asa cum este precizat si in pagina de manual [3], poate fi folosit atunci cand aplicatia se ocupa de caching-ul datelor (ea stie ce date trebuie pastrate in cache).</font></div>
<div><br></div><div>Tot in [3] sunt descrise si problemele care pot aparea.</div><div><br></div><div>[1] <a href="http://unix.stackexchange.com/questions/6467/use-of-o-direct-on-linux">http://unix.stackexchange.com/questions/6467/use-of-o-direct-on-linux</a></div>
<div>[2] <a href="http://www.thesubodh.com/2013/07/what-are-exactly-odirect-osync-flags.html">http://www.thesubodh.com/2013/07/what-are-exactly-odirect-osync-flags.html</a></div><div>[3] <a href="http://man7.org/linux/man-pages/man2/open.2.html">http://man7.org/linux/man-pages/man2/open.2.html</a></div>
</div></div></div>