Whamcloud - gitweb
LU-10565 osd: use readdir while iterate is kabi_extend 99/31199/2
authorYang Sheng <yang.sheng@intel.com>
Thu, 25 Jan 2018 17:43:37 +0000 (01:43 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 9 Feb 2018 21:35:28 +0000 (21:35 +0000)
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 <yang.sheng@intel.com>
Change-Id: I43260a6d27003895b0ddd1bdf7b0539cc2ad64c5
Reviewed-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31199
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/autoconf/lustre-core.m4

index d260d08..0f54320 100644 (file)
@@ -1526,8 +1526,12 @@ LB_CHECK_COMPILE([if 'dir_context' exist],
 dir_context, [
        #include <linux/fs.h>
 ],[
+#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])