]> err.no Git - util-linux/commitdiff
blkid: add device-mapper snapshot cow device probe
authorMilan Broz <mbroz@redhat.com>
Thu, 7 May 2009 17:00:44 +0000 (19:00 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 27 May 2009 21:16:54 +0000 (23:16 +0200)
The copy-on-write area of device-mapper snapshot has
SnAp identifier, disk header is written directly by kernel.

[kzak@redhat.com: - rename from "snap_cow" to "DM_snapshot_cow"]

Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/probe.c
shlibs/blkid/src/probers/lvm.c
shlibs/blkid/src/probers/probers.h

index b2b888d40655e3a6f68203061b1817660e68783d..6e73696a3b2000685be1769ffc197f80342ab825 100644 (file)
@@ -55,6 +55,7 @@ static const struct blkid_idinfo *idinfos[] =
        &jmraid_idinfo,
        &lvm2_idinfo,
        &lvm1_idinfo,
+       &snapcow_idinfo,
        &luks_idinfo,
 
        /* Filesystems */
index d80d023dbd9830e6b09ace004fc2763e98ca8746..d8edc37ab81cab1f5ed0280d2fd714d87356bd1e 100644 (file)
@@ -164,4 +164,13 @@ const struct blkid_idinfo lvm1_idinfo =
        }
 };
 
-
+const struct blkid_idinfo snapcow_idinfo =
+{
+       .name           = "DM_snapshot_cow",
+       .usage          = BLKID_USAGE_OTHER,
+       .magics         =
+       {
+               { .magic = "SnAp", .len = 4 },
+               { NULL }
+       }
+};
index c3b227743ddd6fb08658c2b4f22156a2df23ea3d..78dbd4065c1ad7080b421052a60a4528f5c3188c 100644 (file)
@@ -47,6 +47,7 @@ extern const struct blkid_idinfo ufs_idinfo;
 extern const struct blkid_idinfo hpfs_idinfo;
 extern const struct blkid_idinfo lvm2_idinfo;
 extern const struct blkid_idinfo lvm1_idinfo;
+extern const struct blkid_idinfo snapcow_idinfo;
 extern const struct blkid_idinfo luks_idinfo;
 extern const struct blkid_idinfo highpoint37x_idinfo;
 extern const struct blkid_idinfo highpoint45x_idinfo;