Whamcloud - gitweb
LU-646 port bz23485 (clarification of lustre fsync behavior)
authorLai Siyao <laisiyao@whamcloud.com>
Tue, 30 Aug 2011 03:44:31 +0000 (20:44 -0700)
committerOleg Drokin <green@whamcloud.com>
Thu, 27 Oct 2011 05:29:42 +0000 (01:29 -0400)
Add directory fsync operation.

Signed-off-by: Lai Siyao <laisiyao@whamcloud.com>
Change-Id: I9915bab70291c503ff1462328d5f2fbcff2b700e
Reviewed-on: http://review.whamcloud.com/1309
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Bobi Jam <bobijam@whamcloud.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/dir.c
lustre/tests/sanity.sh

index 1db1875..62f330f 100644 (file)
@@ -1598,5 +1598,6 @@ struct file_operations ll_dir_operations = {
         .release  = ll_dir_release,
         .read     = generic_read_dir,
         .readdir  = ll_readdir,
-        .ioctl    = ll_dir_ioctl
+        .ioctl    = ll_dir_ioctl,
+        .fsync    = ll_fsync
 };
index 052a207..57175e2 100644 (file)
@@ -5713,6 +5713,15 @@ test_118k()
 }
 run_test 118k "bio alloc -ENOMEM and IO TERM handling ========="
 
+test_118l()
+{
+       # LU-646
+       mkdir -p $DIR/$tdir
+       multiop $DIR/$tdir Dy || error "fsync dir failed"
+       rm -rf $DIR/$tdir
+}
+run_test 118l "fsync dir ========="
+
 [ "$SLOW" = "no" ] && [ -n "$OLD_RESENDCOUNT" ] && set_resend_count $OLD_RESENDCOUNT
 
 test_119a() # bug 11737