Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7833b08e authored by Mike Snitzer's avatar Mike Snitzer
Browse files

dm table: print error on preresume failure



If preresume fails it is worth logging an error given that a device is
left suspended due to the failure.

This change was motivated by local preresume error logging that was
added to the cache target ("preresume failed").  Elevating this
target-agnostic context for the where the target-specific error occurred
relative to the DM core's callouts makes sense.

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarJoe Thornber <ejt@redhat.com>
parent ed04d981
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1562,9 +1562,12 @@ int dm_table_resume_targets(struct dm_table *t)
			continue;

		r = ti->type->preresume(ti);
		if (r)
		if (r) {
			DMERR("%s: %s: preresume failed, error = %d",
			      dm_device_name(t->md), ti->type->name, r);
			return r;
		}
	}

	for (i = 0; i < t->num_targets; i++) {
		struct dm_target *ti = t->targets + i;