]> sourceware.org Git - lvm2.git/commitdiff
Fix !DEVMAPPER_SUPPORT build
authorZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Feb 2011 14:29:39 +0000 (14:29 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Fri, 18 Feb 2011 14:29:39 +0000 (14:29 +0000)
Fix build when devmapper is disabled.

WHATS_NEW
lib/activate/activate.c
lib/mirror/mirrored.c
lib/snapshot/snapshot.c

index 66ec2c4a88a67a8f23252626a9401a12c1a684f4..706587baf844bea2f115f961f2302743987e6368 100644 (file)
--- a/WHATS_NEW
+++ b/WHATS_NEW
@@ -1,5 +1,6 @@
 Version 2.02.85 - 
 ===================================
+  Fix compilation when devmapper is dissabled.
   Remove fs_unlock() from lv_suspend error path.
   Change memory locking semantic and use critical sections.
   Add configurable pv_min_size to select block devices by its size.
index 5c5ad38a4eb48c3a91f3c61f25b8e03e80a715bd..779b41b3a9058b5cfa204a9854340e41414042dd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
- * Copyright (C) 2004-2009 Red Hat, Inc. All rights reserved.
+ * Copyright (C) 2004-2011 Red Hat, Inc. All rights reserved.
  *
  * This file is part of LVM2.
  *
@@ -171,7 +171,7 @@ int lvs_in_vg_activated(struct volume_group *vg)
 {
        return 0;
 }
-int lvs_in_vg_opened(struct volume_group *vg)
+int lvs_in_vg_opened(const struct volume_group *vg)
 {
        return 0;
 }
@@ -181,15 +181,16 @@ int lv_suspend(struct cmd_context *cmd, const char *lvid_s)
        return 1;
 }
 *******/
-int lv_suspend_if_active(struct cmd_context *cmd, const char *lvid_s)
+int lv_suspend_if_active(struct cmd_context *cmd, const char *lvid_s, unsigned origin_only)
 {
        return 1;
 }
-int lv_resume(struct cmd_context *cmd, const char *lvid_s)
+int lv_resume(struct cmd_context *cmd, const char *lvid_s, unsigned origin_only)
 {
        return 1;
 }
-int lv_resume_if_active(struct cmd_context *cmd, const char *lvid_s)
+int lv_resume_if_active(struct cmd_context *cmd, const char *lvid_s,
+                       unsigned origin_only, unsigned exclusive)
 {
        return 1;
 }
@@ -210,28 +211,42 @@ int lv_activate_with_filter(struct cmd_context *cmd, const char *lvid_s, int exc
 {
        return 1;
 }
-
 int lv_mknodes(struct cmd_context *cmd, const struct logical_volume *lv)
 {
        return 1;
 }
-
 int pv_uses_vg(struct physical_volume *pv,
               struct volume_group *vg)
 {
        return 0;
 }
-
 void activation_release(void)
 {
-       return;
 }
-
 void activation_exit(void)
 {
-       return;
 }
-
+int lv_is_active(struct logical_volume *lv)
+{
+       return 0;
+}
+int lv_is_active_exclusive_locally(struct logical_volume *lv)
+{
+       return 0;
+}
+int lv_is_active_exclusive_remotely(struct logical_volume *lv)
+{
+       return 0;
+}
+int lv_check_transient(struct logical_volume *lv)
+{
+       return 1;
+}
+int monitor_dev_for_events(struct cmd_context *cmd, struct logical_volume *lv,
+                          unsigned origin_only, int monitor)
+{
+       return 1;
+}
 #else                          /* DEVMAPPER_SUPPORT */
 
 static int _activation = 1;
index 0bf3b3b0fabf5338f3b2800c3ea949d8830238a0..9da8efaa6bb540a97697ab98efc6df8c047f70ca 100644 (file)
@@ -30,9 +30,6 @@
 
 #include <sys/utsname.h>
 
-static int _block_on_error_available = 0;
-static unsigned _mirror_attributes = 0;
-
 enum {
        MIRR_DISABLED,
        MIRR_RUNNING,
@@ -158,6 +155,9 @@ static int _mirrored_text_export(const struct lv_segment *seg, struct formatter
 }
 
 #ifdef DEVMAPPER_SUPPORT
+static int _block_on_error_available = 0;
+static unsigned _mirror_attributes = 0;
+
 static struct mirror_state *_mirrored_init_target(struct dm_pool *mem,
                                         struct cmd_context *cmd)
 {
@@ -641,9 +641,11 @@ struct segment_type *init_segtype(struct cmd_context *cmd)
        segtype->private = NULL;
        segtype->flags = SEG_AREAS_MIRRORED;
 
+#ifdef DEVMAPPER_SUPPORT
 #ifdef DMEVENTD
        if (_get_mirror_dso_path(cmd))
                segtype->flags |= SEG_MONITORED;
+#endif
 #endif
 
        log_very_verbose("Initialised segtype: %s", segtype->name);
index 1a98d7e0d993c1f8677840b7d3f9d6c437c07849..af5d70895bf6213e3bd975d211bf9bc8e3daa9af 100644 (file)
@@ -260,9 +260,11 @@ struct segment_type *init_segtype(struct cmd_context *cmd)
        segtype->private = NULL;
        segtype->flags = SEG_SNAPSHOT;
 
+#ifdef DEVMAPPER_SUPPORT
 #ifdef DMEVENTD
        if (_get_snapshot_dso_path(cmd))
                segtype->flags |= SEG_MONITORED;
+#endif
 #endif
        log_very_verbose("Initialised segtype: %s", segtype->name);
 
This page took 0.048982 seconds and 5 git commands to generate.