From ca3587c56cead648c831d7ec041a512917a3a0ae Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Mon, 29 Aug 2011 20:44:31 -0700 Subject: [PATCH] LU-646 port bz23485 (clarification of lustre fsync behavior) Add directory fsync operation. Signed-off-by: Lai Siyao Change-Id: I9915bab70291c503ff1462328d5f2fbcff2b700e Reviewed-on: http://review.whamcloud.com/1309 Tested-by: Hudson Tested-by: Maloo Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi Reviewed-by: Oleg Drokin --- lustre/llite/dir.c | 3 ++- lustre/tests/sanity.sh | 9 +++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index 1db1875..62f330f 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -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 }; diff --git a/lustre/tests/sanity.sh b/lustre/tests/sanity.sh index 052a207..57175e2 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -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 -- 1.8.3.1