From 9cfb8177b2ba56fb04c09d38939ca300c05a4ce6 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 Signed-off-by: Bob Glossman Change-Id: I339e0505da2de7dbe2de7f3d5f513df8332fe956 Reviewed-on: http://review.whamcloud.com/2643 Reviewed-by: Bobi Jam Tested-by: Hudson Tested-by: Maloo 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 399a06d..067788b 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 af259f5..02d991e 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5835,6 +5835,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