Check the returned value of activemap_write_complete() and update matadata on
disk if needed. This should fix a potential case when extents are cleared in activemap but metadata is not updated on disk. Suggested by: pjd Approved by: pjd (mentor)
This commit is contained in:
parent
aa64b2f494
commit
d9f039e0b3
@ -1687,8 +1687,11 @@ ggate_send_thread(void *arg)
|
|||||||
}
|
}
|
||||||
if (ggio->gctl_error == 0 && ggio->gctl_cmd == BIO_WRITE) {
|
if (ggio->gctl_error == 0 && ggio->gctl_cmd == BIO_WRITE) {
|
||||||
mtx_lock(&res->hr_amp_lock);
|
mtx_lock(&res->hr_amp_lock);
|
||||||
activemap_write_complete(res->hr_amp,
|
if (activemap_write_complete(res->hr_amp,
|
||||||
ggio->gctl_offset, ggio->gctl_length);
|
ggio->gctl_offset, ggio->gctl_length)) {
|
||||||
|
res->hr_stat_activemap_update++;
|
||||||
|
(void)hast_activemap_flush(res);
|
||||||
|
}
|
||||||
mtx_unlock(&res->hr_amp_lock);
|
mtx_unlock(&res->hr_amp_lock);
|
||||||
}
|
}
|
||||||
if (ggio->gctl_cmd == BIO_WRITE) {
|
if (ggio->gctl_cmd == BIO_WRITE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user