summaryrefslogtreecommitdiff
path: root/lib/format_text/format-text.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/format_text/format-text.c')
-rw-r--r--lib/format_text/format-text.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c
index 2a5c8ece1..9ace66a52 100644
--- a/lib/format_text/format-text.c
+++ b/lib/format_text/format-text.c
@@ -247,14 +247,10 @@ static int _raw_write_mda_header(const struct format_type *fmt,
MDA_HEADER_SIZE -
sizeof(mdah->checksum_xl)));
- dev_set_last_byte(dev, start_byte + MDA_HEADER_SIZE);
-
if (!dev_write_bytes(dev, start_byte, MDA_HEADER_SIZE, mdah)) {
- dev_unset_last_byte(dev);
- log_error("Failed to write mda header to %s fd %d", dev_name(dev), dev->bcache_fd);
+ log_error("Failed to write mda header to %s", dev_name(dev));
return 0;
}
- dev_unset_last_byte(dev);
return 1;
}
@@ -950,8 +946,6 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
goto out;
}
- dev_set_last_byte(mdac->area.dev, mda_start + mdah->size);
-
log_debug_metadata("VG %s %u metadata write at %llu size %llu (wrap %llu)",
vg->name, vg->seqno,
(unsigned long long)write1_start,
@@ -959,8 +953,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
(unsigned long long)write2_size);
if (!dev_write_bytes(mdac->area.dev, write1_start, (size_t)write1_size, write_buf)) {
- log_error("Failed to write metadata to %s fd %d", devname, mdac->area.dev->bcache_fd);
- dev_unset_last_byte(mdac->area.dev);
+ log_error("Failed to write metadata to %s", devname);
goto out;
}
@@ -972,14 +965,11 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg,
if (!dev_write_bytes(mdac->area.dev, write2_start, write2_size,
write_buf + new_size - new_wrap)) {
- log_error("Failed to write metadata wrap to %s fd %d", devname, mdac->area.dev->bcache_fd);
- dev_unset_last_byte(mdac->area.dev);
+ log_error("Failed to write metadata wrap to %s", devname);
goto out;
}
}
- dev_unset_last_byte(mdac->area.dev);
-
rlocn_new->checksum = calc_crc(INITIAL_CRC,
(uint8_t *)write_buf,
(uint32_t)(new_size - new_wrap));