On Sun, 13 Mar 2011 20:57:12 +0000, Stefan Hajnoczi <stefa...@gmail.com> wrote: > On Sun, Mar 13, 2011 at 7:04 PM, Aneesh Kumar K. V > <aneesh.ku...@linux.vnet.ibm.com> wrote: > > On Sun, 13 Mar 2011 17:23:50 +0000, Stefan Hajnoczi <stefa...@gmail.com> > > wrote: > >> On Sat, Mar 5, 2011 at 5:52 PM, Aneesh Kumar K.V > >> <aneesh.ku...@linux.vnet.ibm.com> wrote: > >> > cache=none implies the file are opened in the host with O_SYNC open flag > >> > >> O_SYNC does not bypass the host page cache. It ensures that writes > >> only complete once data has been written to the disk. > >> > >> O_DIRECT is a hint to bypass the host page cache when possible. > >> > >> A boolean on|off option would be nicer than an option that takes the > >> special string "none". For example, direct=on|off. It also makes the > >> code nicer by using bools instead of strdup strings that get leaked. > >> > > > > What i wanted is the O_SYNC behavior. Well the comment should be updated. I > > want to make sure that we don't have dirty data in host page cache after > > a write. It is always good to make read hit the page cache > > I have sent a patch to clean up the -virtfs option parsing, you are > CCed. I think it will make it easier to add a new sync=on|off option.
Absolutely. So what i will do is i will carry the patch in the series and later will drop the same once your changes get pushed upstream. -aneesh