public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/daemons/lvmetad lvmetad-client.h
@ 2012-02-23 11:40 mornfall
0 siblings, 0 replies; 3+ messages in thread
From: mornfall @ 2012-02-23 11:40 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2012-02-23 11:40:24
Modified files:
daemons/lvmetad: lvmetad-client.h
Log message:
Also use DEFAULT_RUN_DIR for the lvmetad socket on the client side.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/lvmetad-client.h.diff?cvsroot=lvm2&r1=1.5&r2=1.6
--- LVM2/daemons/lvmetad/lvmetad-client.h 2012/01/16 08:25:32 1.5
+++ LVM2/daemons/lvmetad/lvmetad-client.h 2012/02/23 11:40:24 1.6
@@ -67,7 +67,7 @@
/* TODO configurable */
daemon_info lvmetad_info = {
.path = "lvmetad",
- .socket = socket ?: "/var/run/lvm/lvmetad.socket",
+ .socket = socket ?: DEFAULT_RUN_DIR "/lvmetad.socket",
.autostart = 1
};
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2/daemons/lvmetad lvmetad-client.h
@ 2011-06-02 8:58 mbroz
0 siblings, 0 replies; 3+ messages in thread
From: mbroz @ 2011-06-02 8:58 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2011-06-02 08:58:06
Modified files:
daemons/lvmetad: lvmetad-client.h
Log message:
Use /var/run/lvm for lvmetad socket.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/lvmetad-client.h.diff?cvsroot=lvm2&r1=1.1&r2=1.2
--- LVM2/daemons/lvmetad/lvmetad-client.h 2011/05/13 08:17:26 1.1
+++ LVM2/daemons/lvmetad/lvmetad-client.h 2011/06/02 08:58:05 1.2
@@ -66,7 +66,7 @@
/* TODO configurable */
daemon_info lvmetad_info = {
.path = "lvmetad",
- .socket = "/var/run/lvmetad.socket",
+ .socket = "/var/run/lvm/lvmetad.socket",
.autostart = 1
};
^ permalink raw reply [flat|nested] 3+ messages in thread
* LVM2/daemons/lvmetad lvmetad-client.h
@ 2011-05-13 8:17 mornfall
0 siblings, 0 replies; 3+ messages in thread
From: mornfall @ 2011-05-13 8:17 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2011-05-13 08:17:26
Added files:
daemons/lvmetad: lvmetad-client.h
Log message:
First go at the lvmetad client-side interface.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/lvmetad-client.h.diff?cvsroot=lvm2&r1=NONE&r2=1.1
/cvs/lvm2/LVM2/daemons/lvmetad/lvmetad-client.h,v --> standard output
revision 1.1
--- LVM2/daemons/lvmetad/lvmetad-client.h
+++ - 2011-05-13 08:17:27.582611000 +0000
@@ -0,0 +1,81 @@
+/*
+ * Copyright (C) 2011 Red Hat, Inc. All rights reserved.
+ *
+ * This file is part of LVM2.
+ *
+ * This copyrighted material is made available to anyone wishing to use,
+ * modify, copy, or redistribute it subject to the terms and conditions
+ * of the GNU Lesser General Public License v.2.1.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ */
+
+#ifndef _LVM_LVMETAD_CLIENT_H
+#define _LVM_LVMETAD_CLIENT_H
+
+#include "daemon-client.h"
+
+/* Different types of replies we may get from lvmetad. */
+
+typedef struct {
+ daemon_reply r;
+ const char **uuids; /* NULL terminated array */
+} lvmetad_uuidlist;
+
+typedef struct {
+ daemon_reply r;
+ struct config_tree *cft;
+} lvmetad_vg;
+
+static inline daemon_handle lvmetad_open();
+static inline void lvmetad_close(daemon_handle h);
+
+/* Get a list of VG UUIDs that match a given VG name. */
+lvmetad_uuidlist lvmetad_lookup_vgname(daemon_handle h, const char *name);
+
+/* Get the metadata of a single VG, identified by UUID. */
+lvmetad_vg lvmetad_get_vg(daemon_handle h, const char *uuid);
+
+/*
+ * Add and remove PVs on demand. Udev-driven systems will use this interface
+ * instead of scanning.
+ */
+daemon_reply lvmetad_add_pv(daemon_handle h, const char *pv_uuid, const char *mda_content);
+daemon_reply lvmetad_remove_pv(daemon_handle h, const char *pv_uuid);
+
+/* Trigger a full disk scan, throwing away all caches. XXX do we eventually want
+ * this? Probalby not yet, anyway.
+ * daemon_reply lvmetad_rescan(daemon_handle h);
+ */
+
+/*
+ * Update the version of metadata of a volume group. The VG has to be locked for
+ * writing for this, and the VG metadata here has to match whatever has been
+ * written to the disk (under this lock). This initially avoids the requirement
+ * for lvmetad to write to disk (in later revisions, lvmetad_supersede_vg may
+ * also do the writing, or we probably add another function to do that).
+ */
+daemon_reply lvmetad_supersede_vg(daemon_handle h, struct volume_group *vg);
+
+/* Implementation of inline functions */
+
+static inline daemon_handle lvmetad_open()
+{
+ /* TODO configurable */
+ daemon_info lvmetad_info = {
+ .path = "lvmetad",
+ .socket = "/var/run/lvmetad.socket",
+ .autostart = 1
+ };
+
+ return daemon_open(lvmetad_info);
+}
+
+static inline void lvmetad_close(daemon_handle h)
+{
+ return daemon_close(h);
+}
+
+#endif
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-02-23 11:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-23 11:40 LVM2/daemons/lvmetad lvmetad-client.h mornfall
-- strict thread matches above, loose matches on Subject: below --
2011-06-02 8:58 mbroz
2011-05-13 8:17 mornfall
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).