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

Commit 48551054 authored by Mike Snitzer's avatar Mike Snitzer
Browse files

dm cache metadata: name the cache block that couldn't be loaded



Improves __load_mapping_v1() and __load_mapping_v2() DMERR messages to
explicitly name the cache block number whose mapping couldn't be
loaded.

Signed-off-by: default avatarMike Snitzer <snitzer@redhat.com>
parent 629d0a8a
Loading
Loading
Loading
Loading
+8 −4
Original line number Original line Diff line number Diff line
@@ -1316,8 +1316,10 @@ static int __load_mapping_v1(struct dm_cache_metadata *cmd,


		r = fn(context, oblock, to_cblock(cb), flags & M_DIRTY,
		r = fn(context, oblock, to_cblock(cb), flags & M_DIRTY,
		       le32_to_cpu(hint), hints_valid);
		       le32_to_cpu(hint), hints_valid);
		if (r)
		if (r) {
			DMERR("policy couldn't load cblock");
			DMERR("policy couldn't load cache block %llu",
			      (unsigned long long) from_cblock(to_cblock(cb)));
		}
	}
	}


	return r;
	return r;
@@ -1355,8 +1357,10 @@ static int __load_mapping_v2(struct dm_cache_metadata *cmd,
		dirty = dm_bitset_cursor_get_value(dirty_cursor);
		dirty = dm_bitset_cursor_get_value(dirty_cursor);
		r = fn(context, oblock, to_cblock(cb), dirty,
		r = fn(context, oblock, to_cblock(cb), dirty,
		       le32_to_cpu(hint), hints_valid);
		       le32_to_cpu(hint), hints_valid);
		if (r)
		if (r) {
			DMERR("policy couldn't load cblock");
			DMERR("policy couldn't load cache block %llu",
			      (unsigned long long) from_cblock(to_cblock(cb)));
		}
	}
	}


	return r;
	return r;