Re: Can O_SYNC be implemented by using fsync?

From: Alan Cox (alan@lxorguk.ukuu.org.uk)
Date: Mon May 15 2000 - 19:32:43 EDT

  • Next message: Alexander Viro: "Re: Proposal: int (permission*)(struct dentry *, int)"

    > } Also I guess fsync()ing bookmarks updates is useful.
    > }
    > Maybe it wants cache integrity? Dunno...I simply got VERY poor
    > performance when I did an ll_rw_block() call if the O_SYNC flag was set
    > on the file pointer.

    O_SYNC applies to the write() not the blocks. That is you want to do

            while(blocks)
            {
                    stuff it in cache
                    if(sync)
                            queue_the_io
            }
            if(!sync)
                    return;
            while(queued_ios_left)
                    wait

    Alan

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/



    This archive was generated by hypermail 2b29 : Mon May 15 2000 - 20:10:25 EDT