WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

[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