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

Commit 047e0eff authored by Aneesh Kumar K.V's avatar Aneesh Kumar K.V Committed by Dan Williams
Browse files

libnvdimm/label: Remove the dpa align check



There's no strict requirement why slot_valid() needs to check for page alignment
and it would seem to actively hurt cross-page-size compatibility. Let's
delete the check and rely on checksum validation.

Signed-off-by: default avatarAneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
Link: https://lore.kernel.org/r/20190905154603.10349-6-aneesh.kumar@linux.ibm.com


Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
parent edbb52c2
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -353,11 +353,6 @@ static bool slot_valid(struct nvdimm_drvdata *ndd,
	if (slot != __le32_to_cpu(nd_label->slot))
		return false;

	/* check that DPA allocations are page aligned */
	if ((__le64_to_cpu(nd_label->dpa)
				| __le64_to_cpu(nd_label->rawsize)) % SZ_4K)
		return false;

	/* check checksum */
	if (namespace_label_has(ndd, checksum)) {
		u64 sum, sum_save;