From 9d92d8bddd3d66374d7303e30650df0c518891bf Mon Sep 17 00:00:00 2001 From: Lai Siyao Date: Mon, 29 Aug 2011 20:21:39 -0700 Subject: [PATCH] LU-646 port bz23485 (clarification of lustre fsync behavior) Add directory fsync operation. Signed-off-by: Lai Siyao Change-Id: I6bad2cc1df840bbf827b9fcb352361877dd493d1 Reviewed-on: http://review.whamcloud.com/1308 Tested-by: Hudson Reviewed-by: Bobi Jam Reviewed-by: Johann Lombardi --- 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 3154d32..2e3aaf3 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -1721,5 +1721,6 @@ struct file_operations ll_dir_operations = { .release = ll_file_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 8ee39c2..239e38d 100644 --- a/lustre/tests/sanity.sh +++ b/lustre/tests/sanity.sh @@ -5175,6 +5175,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