2 * Copyright (C) 2018 by Kenneth Van Alstyne <kvanals@kvanals.org>
4 * This file may be redistributed under the terms of the
5 * GNU Lesser General Public License.
8 * Ceph BlueStore is one of the supported storage
9 * methods for Object Storage Devices (OSDs).
10 * This is used to detect the backing block devices
11 * used for these types of OSDs in a Ceph Cluster.
24 #include "superblocks.h"
26 #define BLUESTORE_MAGIC_L 22
28 struct bluestore_phdr
{
29 uint8_t magic
[BLUESTORE_MAGIC_L
];
30 } __attribute__((packed
));
32 static int probe_bluestore(blkid_probe pr
, const struct blkid_idmag
*mag
)
34 struct bluestore_phdr
*header
;
36 header
= blkid_probe_get_sb(pr
, mag
, struct bluestore_phdr
);
38 return errno
? -errno
: 1;
43 const struct blkid_idinfo bluestore_idinfo
=
45 .name
= "ceph_bluestore",
46 .usage
= BLKID_USAGE_OTHER
,
47 .probefunc
= probe_bluestore
,
50 { .magic
= "bluestore block device", .len
= 22 },