LVM2/lib commands/toolcontext.c metadata/segty ...
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-08-25 10:00:09
Modified files:
lib/commands : toolcontext.c lib/metadata : segtype.h lib/thin : thin.c
Log message:
Add registration of thin_pool segment
Register thin and thin_pool segment via multiple_segtypes.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.129&r2=1.130
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/segtype.h.diff?cvsroot=lvm2&r1=1.38&r2=1.39
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/thin/thin.c.diff?cvsroot=lvm2&r1=1.1&r2=1.2
lib/commands/toolcontext.c +5 -0
@@ -1030,6 +1030,11 @@return 0 ;#endif +#ifdef THIN_INTERNAL +if (!init_thin_segtypes (cmd, &seglib)) +return 0 ; +#endif +#ifdef HAVE_LIBDL /* Load any formats in shared libs unless static */ if (!is_static() &&
lib/metadata/segtype.h +7 -4
@@ -40,6 +40,7 @@#define SEG_REPLICATOR_DEV 0x00000200U#define SEG_RAID 0x00000400U#define SEG_THIN 0x00000800U +#define SEG_THIN_POOL 0x00001000U#define SEG_UNKNOWN 0x80000000U#define seg_is_mirrored (seg) ((seg)->segtype->flags & SEG_AREAS_MIRRORED ? 1 : 0)
@@ -50,6 +51,7 @@#define seg_is_virtual (seg) ((seg)->segtype->flags & SEG_VIRTUAL ? 1 : 0)#define seg_is_raid (seg) ((seg)->segtype->flags & SEG_RAID ? 1 : 0)#define seg_is_thin (seg) ((seg)->segtype->flags & SEG_THIN ? 1 : 0) +#define seg_is_thin_pool (seg) ((seg)->segtype->flags & SEG_THIN_POOL ? 1 : 0)#define seg_can_split (seg) ((seg)->segtype->flags & SEG_CAN_SPLIT ? 1 : 0)#define seg_cannot_be_zeroed (seg) ((seg)->segtype->flags & SEG_CANNOT_BE_ZEROED ? 1 : 0)#define seg_monitored (seg) ((seg)->segtype->flags & SEG_MONITORED ? 1 : 0)
@@ -59,6 +61,7 @@#define segtype_is_mirrored (segtype) ((segtype)->flags & SEG_AREAS_MIRRORED ? 1 : 0)#define segtype_is_raid (segtype) ((segtype)->flags & SEG_RAID ? 1 : 0)#define segtype_is_thin (segtype) ((segtype)->flags & SEG_THIN ? 1 : 0) +#define segtype_is_thin_pool (segtype) ((segtype)->flags & SEG_THIN_POOL ? 1 : 0)#define segtype_is_virtual (segtype) ((segtype)->flags & SEG_VIRTUAL ? 1 : 0)struct segment_type {
@@ -137,6 +140,10 @@int init_replicator_segtype (struct cmd_context *cmd,struct segtype_library *seglib);#endif +#ifdef THIN_INTERNAL +int init_thin_segtypes (struct cmd_context *cmd,struct segtype_library *seglib); +#endif +#ifdef SNAPSHOT_INTERNAL struct segment_type *init_snapshot_segtype (struct cmd_context *cmd);#endif
@@ -149,8 +156,4 @@struct segment_type *init_crypt_segtype (struct cmd_context *cmd);#endif -#ifdef THIN_INTERNAL -struct segment_type *init_thin_segtype (struct cmd_context *cmd); -#endif -#endif
lib/thin/thin.c +61 -19
110 lines not on this page · raw message