From da25d1da3a1ba55ef6a21fb54ddff7878620f92c Mon Sep 17 00:00:00 2001 From: Yang Sheng Date: Fri, 26 Jan 2018 01:43:37 +0800 Subject: [PATCH] LU-10565 osd: use readdir while iterate is kabi_extend Sometime iterate interface is not initialized in ldiskfs. So we use readdir in such case. Lustre-change: https://review.whamcloud.com/31018 Lustre-commit: 7db38378aa07f7ce5fb79bc379271fd4218d95bd Signed-off-by: Yang Sheng Change-Id: I43260a6d27003895b0ddd1bdf7b0539cc2ad64c5 Reviewed-by: Nathaniel Clark Reviewed-by: Bob Glossman Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/31199 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: John L. Hammond --- lustre/autoconf/lustre-core.m4 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4 index d260d08..0f54320 100644 --- a/lustre/autoconf/lustre-core.m4 +++ b/lustre/autoconf/lustre-core.m4 @@ -1526,8 +1526,12 @@ LB_CHECK_COMPILE([if 'dir_context' exist], dir_context, [ #include ],[ +#ifdef FMODE_KABI_ITERATE +#error "back to use readdir in kabi_extand mode" +#else struct dir_context ctx; ctx.pos = 0; +#endif ],[ AC_DEFINE(HAVE_DIR_CONTEXT, 1, [dir_context exist]) -- 1.8.3.1