Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'libnvdimm-fix-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm fix from Dan Williams:
"Restore support for 1GB alignment namespaces, truncate the end of
misaligned namespaces"

* tag 'libnvdimm-fix-5.3-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
libnvdimm/pfn: Fix namespace creation on misaligned addresses

+4 -1
+4 -1
drivers/nvdimm/pfn_devs.c
··· 655 655 resource_size_t start, size; 656 656 struct nd_region *nd_region; 657 657 unsigned long npfns, align; 658 + u32 end_trunc; 658 659 struct nd_pfn_sb *pfn_sb; 659 660 phys_addr_t offset; 660 661 const char *sig; ··· 697 696 size = resource_size(&nsio->res); 698 697 npfns = PHYS_PFN(size - SZ_8K); 699 698 align = max(nd_pfn->align, (1UL << SUBSECTION_SHIFT)); 699 + end_trunc = start + size - ALIGN_DOWN(start + size, align); 700 700 if (nd_pfn->mode == PFN_MODE_PMEM) { 701 701 /* 702 702 * The altmap should be padded out to the block size used ··· 716 714 return -ENXIO; 717 715 } 718 716 719 - npfns = PHYS_PFN(size - offset); 717 + npfns = PHYS_PFN(size - offset - end_trunc); 720 718 pfn_sb->mode = cpu_to_le32(nd_pfn->mode); 721 719 pfn_sb->dataoff = cpu_to_le64(offset); 722 720 pfn_sb->npfns = cpu_to_le64(npfns); ··· 725 723 memcpy(pfn_sb->parent_uuid, nd_dev_to_uuid(&ndns->dev), 16); 726 724 pfn_sb->version_major = cpu_to_le16(1); 727 725 pfn_sb->version_minor = cpu_to_le16(3); 726 + pfn_sb->end_trunc = cpu_to_le32(end_trunc); 728 727 pfn_sb->align = cpu_to_le32(nd_pfn->align); 729 728 checksum = nd_sb_checksum((struct nd_gen_sb *) pfn_sb); 730 729 pfn_sb->checksum = cpu_to_le64(checksum);