Skip to content

Commit 047e0ef

Browse files
kvaneeshdjbw
authored andcommitted
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: Aneesh Kumar K.V <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dan Williams <[email protected]>
1 parent edbb52c commit 047e0ef

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/nvdimm/label.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -353,11 +353,6 @@ static bool slot_valid(struct nvdimm_drvdata *ndd,
353353
if (slot != __le32_to_cpu(nd_label->slot))
354354
return false;
355355

356-
/* check that DPA allocations are page aligned */
357-
if ((__le64_to_cpu(nd_label->dpa)
358-
| __le64_to_cpu(nd_label->rawsize)) % SZ_4K)
359-
return false;
360-
361356
/* check checksum */
362357
if (namespace_label_has(ndd, checksum)) {
363358
u64 sum, sum_save;

0 commit comments

Comments
 (0)