Skip to content

Commit

Permalink
libnvdimm/label: Remove the dpa align check
Browse files Browse the repository at this point in the history
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: Aneesh Kumar K.V <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
kvaneesh authored and djbw committed Sep 5, 2019
1 parent edbb52c commit 047e0ef
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/nvdimm/label.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 047e0ef

Please sign in to comment.