diff --git a/WHATS_NEW b/WHATS_NEW index 947fbfe64..adf3f64ab 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.01.15 - ================================= + Add format1 dev_write debug messages. Add clustered VG attribute to report. Move lvconvert parameters into struct lvconvert_params. Add clustered VG flag to LV lock requests. diff --git a/lib/format1/disk-rep.c b/lib/format1/disk-rep.c index 9418ff98b..cf305af05 100644 --- a/lib/format1/disk-rep.c +++ b/lib/format1/disk-rep.c @@ -506,6 +506,9 @@ static int _write_vgd(struct disk_list *data) struct vg_disk *vgd = &data->vgd; uint64_t pos = data->pvd.vg_on_disk.base; + log_debug("Writing %s VG metadata to %s at %" PRIu64 " len %" PRIsize_t, + data->pvd.vg_name, dev_name(data->dev), pos, sizeof(*vgd)); + _xlate_vgd(vgd); if (!dev_write(data->dev, pos, sizeof(*vgd), vgd)) fail; @@ -528,6 +531,10 @@ static int _write_uuids(struct disk_list *data) return 0; } + log_debug("Writing %s uuidlist to %s at %" PRIu64 " len %" + PRIsize_t, data->pvd.vg_name, dev_name(data->dev), + pos, NAME_LEN); + if (!dev_write(data->dev, pos, NAME_LEN, ul->uuid)) fail; @@ -539,6 +546,10 @@ static int _write_uuids(struct disk_list *data) static int _write_lvd(struct device *dev, uint64_t pos, struct lv_disk *disk) { + log_debug("Writing %s LV %s metadata to %s at %" PRIu64 " len %" + PRIsize_t, disk->vg_name, disk->lv_name, dev_name(dev), + pos, sizeof(*disk)); + _xlate_lvd(disk); if (!dev_write(dev, pos, sizeof(*disk), disk)) fail; @@ -581,6 +592,10 @@ static int _write_extents(struct disk_list *data) struct pe_disk *extents = data->extents; uint64_t pos = data->pvd.pe_on_disk.base; + log_debug("Writing %s extents metadata to %s at %" PRIu64 " len %" + PRIsize_t, data->pvd.vg_name, dev_name(data->dev), + pos, len); + _xlate_extents(extents, data->pvd.pe_total); if (!dev_write(data->dev, pos, len, extents)) fail; @@ -613,6 +628,10 @@ static int _write_pvd(struct disk_list *data) memset(buf, 0, size); memcpy(buf, &data->pvd, sizeof(struct pv_disk)); + log_debug("Writing %s PV metadata to %s at %" PRIu64 " len %" + PRIsize_t, data->pvd.vg_name, dev_name(data->dev), + pos, size); + _xlate_pvd((struct pv_disk *) buf); if (!dev_write(data->dev, pos, size, buf)) { dbg_free(buf);