[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [patch 5/6] xenblk: Add O_DIRECT and O_SYNC support -- for ext3.



[patch 5/6] xenblk: Add O_DIRECT and O_SYNC support -- for ext3.


Signed-off-by: Joe Jin <joe.jin@xxxxxxxxxx>
---

diff -r 2fb13b8cbe13 fs/ext3/inode.c
--- a/fs/ext3/inode.c   Thu Oct 30 13:34:43 2008 +0000
+++ b/fs/ext3/inode.c   Mon Nov 03 10:31:41 2008 +0800
@@ -1229,6 +1229,8 @@
                        EXT3_I(inode)->i_disksize = new_i_size;
                ret = generic_commit_write(file, page, from, to);
        }
+       if ((file->f_flags & O_SYNC) || IS_SYNC(inode))
+               handle->h_sync = 1;
        ret2 = ext3_journal_stop(handle);
        if (!ret)
                ret = ret2;
@@ -1252,6 +1254,8 @@
        else
                ret = generic_commit_write(file, page, from, to);
 
+       if ((file->f_flags & O_SYNC) || IS_SYNC(inode))
+               handle->h_sync = 1;
        ret2 = ext3_journal_stop(handle);
        if (!ret)
                ret = ret2;
@@ -1285,6 +1289,8 @@
                if (!ret) 
                        ret = ret2;
        }
+       if ((file->f_flags & O_SYNC) || IS_SYNC(inode))
+               handle->h_sync = 1;
        ret2 = ext3_journal_stop(handle);
        if (!ret)
                ret = ret2;





_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.