LIPE_SOURCES = debug.c debug.h \
flist.c flist.h misc.c misc.h \
lustre_ea.c lustre_ea.h \
- lipe_ldiskfs.c lipe_ldiskfs.h \
lipe_object_attrs.c \
lipe_object_attrs.h \
lipe_version.c \
lipe_version.h \
policy.c policy.h \
- ldiskfs_read_ldd.c ldiskfs_read_ldd.h \
general_policy.h general_policy.c \
- lustre_ea_ldiskfs.c lustre_ea_ldiskfs.h \
posix.c posix.h posix_ea.c posix_ea.h
if BUILD_SERVER
ext4_inode2path_SOURCES = debug.c debug.h ext4_inode2path.c
-LIPE_SOURCES += cmd.c cmd.h \
- list.h
+LIPE_SOURCES += cmd.c \
+ cmd.h \
+ ldiskfs_read_ldd.c \
+ ldiskfs_read_ldd.h \
+ lipe_ldiskfs.c \
+ lipe_ldiskfs.h \
+ list.h \
+ lustre_ea_ldiskfs.c \
+ lustre_ea_ldiskfs.h
endif
LIPE_CFLAGS = -Wall -Werror -g -I/usr/include $(json_c_CFLAGS)
#include <linux/lustre/lustre_ostid.h>
#include "debug.h"
#include "general_policy.h"
-#include "ldiskfs_read_ldd.h"
-#include "lipe_ldiskfs.h"
#include "lipe_scan2.h"
#ifdef HAVE_ZFS
# include "lipe_zfs.h"
#endif
#include "lustre_ea.h"
-#include "lustre_ea_ldiskfs.h"
+
+#ifdef HAVE_LDISKFS
+# include "ldiskfs_read_ldd.h"
+# include "lipe_ldiskfs.h"
+# include "lustre_ea_ldiskfs.h"
+#endif
+
#include "policy.h"
#include "posix.h"
}
switch (backfs_type) {
+#ifdef HAVE_LDISKFS
case LBT_LUSTRE_ON_LDISKFS:
case LBT_EXT4:
rc = pthread_create(&infos[i].ti_thread_id, &attr,
if (rc == 0)
tmp_pinfo->ti_started = true;
break;
+#endif
#ifdef HAVE_ZFS
case LBT_LUSTRE_ON_ZFS:
case LBT_ZFS:
enum lipe_backfs_type lipe_detect_fs_type(const char *dev)
{
- ext2_filsys fs;
int rc;
enum lipe_backfs_type fs_type = LBT_UNKNOWN;
if (rc == 1) {
LDEBUG("directory is detected on [%s]\n", dev);
return LBT_POSIX;
- } else if (rc < 0) {
+ } else if (rc < 0)
goto out;
- }
+
+#ifdef HAVE_LDISKFS
+ /* check whether it is ldiskfs */
+ ext2_filsys fs;
rc = ext2fs_open(dev, LDISKFS_OPENFS_FLAGS,
0, 0, unix_io_manager, &fs);
}
LINFO("Lustre on Ldiskfs is detected on device [%s]\n", dev);
fs_type = LBT_LUSTRE_ON_LDISKFS;
- } else {
+ } else
+#endif /* HAVE_LDISKFS */
+ {
#ifdef HAVE_ZFS
FILE *fp;
char cmd[PATH_MAX];
LINFO("pure ZFS is detected on device [%s]\n", dev);
}
#else
- LERROR("invalid device [%s], %s\n", dev, strerror(errno));
+ LERROR("unsupported device type [%s], %s\n", dev, strerror(errno));
#endif
}
out:
case LBT_POSIX:
rc = posix_scan(instance, policy, result, sum_counter_list,
sum_classify_list, NULL, num_threads, workspace,
- abort_failure);
+ abort_failure, ldd_error);
break;
+#if HAVE_LDISKFS
case LBT_LUSTRE_ON_LDISKFS:
case LBT_EXT4:
rc = ldiskfs_scan(instance, policy, result, sum_counter_list,
abort_failure,
ldd_error);
break;
+#endif
#ifdef HAVE_ZFS
case LBT_LUSTRE_ON_ZFS:
case LBT_ZFS:
NULL /* sum_classify_list */,
thread_data, thread_count,
NULL /* workspace */,
- false /* abort_failure */);
+ false /* abort_failure */,
+ &ldd_error);
break;
+#ifdef HAVE_LDISKFS
case LBT_LUSTRE_ON_LDISKFS:
case LBT_EXT4:
rc = ldiskfs_scan(instance,
false /* abort_failure */,
&ldd_error);
break;
+#endif
#ifdef HAVE_ZFS
case LBT_LUSTRE_ON_ZFS:
case LBT_ZFS: