The following series implements support for parsing of the BERT records
and adding the error memory ranges to nvdimm badblocks in order for the
kernel to avoid prevent the kernel from accessing those areas. And with
the addition of this support, we can surface the nd regions instead of waiting
for ARS to complete. So the ARS handling is reworked to run in the
background and not block nd region registration.
Dave Jiang (4):
acpi: add find error record in BERT function
acpi/libnvdimm: search through BERT records and add to nvdimm badblocks
acpi/nfit: removing ARS timeout and change scrubbing to delayed work
acpi/nfit: allow knob to disable ARS being issued at kernel boot
drivers/acpi/apei/bert.c | 137 +++++++++++++++++++++---
drivers/acpi/nfit/core.c | 262 ++++++++++++++++++++-------------------------
drivers/acpi/nfit/nfit.h | 13 ++
drivers/nvdimm/core.c | 6 +
include/linux/acpi.h | 10 ++
include/linux/libnvdimm.h | 1
6 files changed, 271 insertions(+), 158 deletions(-)
Changes since v6 :
* Collect some more reviewed-by's from Christoph, thanks Christoph!
* Rework XFS_MMAPLOCK_EXCL handling to *permit* rather than require
XFS_MMAPLOCK_EXCL to be held over calls to xfs_break_layouts()
* Clean up kbuild robot reports against "ext2, dax: introduce ext2_dax_aops"
and "fs, dax: use page->mapping to warn if truncate collides with a
* Squash the xfs_break_leased_layouts() 'did_unlock' rework into "xfs:
prepare xfs_break_layouts() for another layout type" (Christoph)
* Communicate the 'did_unlock' condition with an out parameter rather
than a positive error code (Christoph). A few other small / welcome
clean ups fell out as a result.
* Rename BREAK_TRUNCATE to BREAK_UNMAPI to make it clear the
implementation is concerned with any and all inode extent unmap
events, not just truncate(2). (Darrick)
* Rebase the branch on commit 6b2bb7265f0b "sched/wait: Introduce
wait_var_event()" from tip.git/sched/wait. Thanks Peter!
get_user_pages() in the filesystem pins file backed memory pages for
access by devices performing dma. However, it only pins the memory pages
not the page-to-file offset association. If a file is truncated the
pages are mapped out of the file and dma may continue indefinitely into
a page that is owned by a device driver. This breaks coherency of the
file vs dma, but the assumption is that if userspace wants the
file-space truncated it does not matter what data is inbound from the
device, it is not relevant anymore. The only expectation is that dma can
safely continue while the filesystem reallocates the block(s).
This expectation that dma can safely continue while the filesystem
changes the block map is broken by dax. With dax the target dma page
*is* the filesystem block. The model of leaving the page pinned for dma,
but truncating the file block out of the file, means that the filesytem
is free to reallocate a block under active dma to another file and now
the expected data-incoherency situation has turned into active
Defer all filesystem operations (fallocate(), truncate()) on a dax mode
file while any page/block in the file is under active dma. This solution
assumes that dma is transient. Cases where dma operations are known to
not be transient, like RDMA, have been explicitly disabled via
commits like 5f1d43de5416 "IB/core: disable memory registration of
The dax_layout_busy_page() routine is called by filesystems with a lock
held against mm faults (i_mmap_lock) to find pinned / busy dax pages.
The process of looking up a busy page invalidates all mappings
to trigger any subsequent get_user_pages() to block on i_mmap_lock.
The filesystem continues to call dax_layout_busy_page() until it finally
returns no more active pages. This approach assumes that the page
pinning is transient, if that assumption is violated the system would
have likely hung from the uncompleted I/O.
Dan Williams (14):
dax: store pfns in the radix
fs, dax: prepare for dax-specific address_space_operations
block, dax: remove dead code in blkdev_writepages()
xfs, dax: introduce xfs_dax_aops
ext4, dax: introduce ext4_dax_aops
ext2, dax: introduce ext2_dax_aops
fs, dax: use page->mapping to warn if truncate collides with a busy page
mm, dax: enable filesystems to trigger dev_pagemap ->page_free callbacks
mm, dev_pagemap: introduce CONFIG_DEV_PAGEMAP_OPS
memremap: mark devm_memremap_pages() EXPORT_SYMBOL_GPL
mm, fs, dax: handle layout changes to pinned dax mappings
xfs: prepare xfs_break_layouts() to be called with XFS_MMAPLOCK_EXCL
xfs: prepare xfs_break_layouts() for another layout type
xfs, dax: introduce xfs_break_dax_layouts()
drivers/dax/super.c | 96 +++++++++++++++++--
drivers/nvdimm/pmem.c | 3 -
fs/Kconfig | 1
fs/block_dev.c | 5 -
fs/dax.c | 231 ++++++++++++++++++++++++++++++++++++----------
fs/ext2/ext2.h | 1
fs/ext2/inode.c | 43 +++++----
fs/ext2/namei.c | 18 ----
fs/ext2/super.c | 6 +
fs/ext4/inode.c | 38 ++++++--
fs/ext4/super.c | 6 +
fs/libfs.c | 27 +++++
fs/xfs/xfs_aops.c | 21 +++-
fs/xfs/xfs_aops.h | 1
fs/xfs/xfs_file.c | 76 ++++++++++++++-
fs/xfs/xfs_inode.h | 16 +++
fs/xfs/xfs_ioctl.c | 8 --
fs/xfs/xfs_iops.c | 21 +++-
fs/xfs/xfs_pnfs.c | 16 ++-
fs/xfs/xfs_pnfs.h | 6 +
fs/xfs/xfs_super.c | 20 ++--
include/linux/dax.h | 46 ++++++++-
include/linux/fs.h | 3 +
include/linux/memremap.h | 28 ++----
include/linux/mm.h | 61 +++++++++---
kernel/memremap.c | 32 +++++-
mm/Kconfig | 5 +
mm/gup.c | 5 +
mm/hmm.c | 13 ---
mm/swap.c | 3 -
30 files changed, 638 insertions(+), 218 deletions(-)
sizeof_namespace_index() fails when NVDIMM devices have the minimum
1024 bytes label storage area. nvdimm_num_label_slots() returns 3
slots while the area is only big enough for 2 slots.
Change nvdimm_num_label_slots() to calculate a number of label slots
according to UEFI 2.7 spec.
Signed-off-by: Toshi Kani <toshi.kani(a)hpe.com>
Cc: Dan Williams <dan.j.williams(a)intel.com>
ndctl/lib/dimm.c | 34 ++++++++++++++++++++++++----------
1 file changed, 24 insertions(+), 10 deletions(-)
diff --git a/ndctl/lib/dimm.c b/ndctl/lib/dimm.c
index b3e032e..6b78a4b 100644
@@ -66,9 +66,27 @@ static unsigned int sizeof_namespace_label(struct nvdimm_data *ndd)
+static size_t __sizeof_namespace_index(u32 nslot)
+ return ALIGN(sizeof(struct namespace_index) + DIV_ROUND_UP(nslot, 8),
+static int __nvdimm_num_label_slots(struct nvdimm_data *ndd,
+ size_t index_size)
+ return (ndd->config_size - index_size * 2) /
static int nvdimm_num_label_slots(struct nvdimm_data *ndd)
- return ndd->config_size / (sizeof_namespace_label(ndd) + 1);
+ u32 tmp_nslot, n;
+ tmp_nslot = ndd->config_size / sizeof_namespace_label(ndd);
+ n = __sizeof_namespace_index(tmp_nslot) / NSINDEX_ALIGN;
+ return __nvdimm_num_label_slots(ndd, NSINDEX_ALIGN * n);
static unsigned int sizeof_namespace_index(struct nvdimm_data *ndd)
@@ -78,18 +96,14 @@ static unsigned int sizeof_namespace_index(struct nvdimm_data *ndd)
struct ndctl_ctx *ctx = ndctl_dimm_get_ctx(dimm);
- * The minimum index space is 512 bytes, with that amount of
- * index we can describe ~1400 labels which is less than a byte
- * of overhead per label. Round up to a byte of overhead per
- * label and determine the size of the index region. Yes, this
- * starts to waste space at larger config_sizes, but it's
- * unlikely we'll ever see anything but 128K.
+ * Per UEFI 2.7, the minimum size of the Label Storage Area is large
+ * enough to hold 2 index blocks and 2 labels. The minimum index
+ * block size is 256 bytes, and the minimum label size is 256 bytes.
nslot = nvdimm_num_label_slots(ndd);
space = ndd->config_size - nslot * sizeof_namespace_label(ndd);
- size = ALIGN(sizeof(struct namespace_index) + DIV_ROUND_UP(nslot, 8),
- NSINDEX_ALIGN) * 2;
- if (size <= space)
+ size = __sizeof_namespace_index(nslot) * 2;
+ if (size <= space && nslot >= 2)
return size / 2;
err(ctx, "%s: label area (%ld) too small to host (%d byte) labels\n",
Are you looking to recruit manpower from Pakistan, India, Philippines, Bangladesh, Sri Lanka, Indonesia, Nepal, Myanmar or Vietnam? If not currently, please save this email for your future reference.
We (S.A.Z UNIVERSAL LINKS LTD) are a professional HR, recruiting and manpower placement company that provides all types of manpower recruitment services and having a strong history of top line manpower solutions i.e. professional, executive level, skilled, semi-skilled and unskilled workforce from Pakistan and from other countries (through our counterpart offices & associates) to large number of reputable employers for their projects in Middle East, Far East, Europe and America. Our steadfast commitment to serve our clients with utmost efficiency and responsibility has become our hallmark. Please visit "www.sazunilinks.com/profile.pdf" for our detailed company profile with some of our work history for your kind reference.
We are a registered manpower placement company under Pakistan Overseas Employment Promoters Association (POEPA) with a well-experienced team to select perfect candidates for our esteemed clients. Our mission is to provide excellent services and solutions according to exact requirement of our valuable clients as we believe that this is a key for a long term relationship with them.
Over the years, we were able to earn the trust of many reputable companies worldwide, particularly in the Gulf region: Some of our major clients in different regions are as follows:
.|. Almarai Company .|. ASSAD SAID for Contracting Co .|. Jeddah Cables Company .|. Nesma & Partners .|. Freyssinet Saudi Arabia .|. Al-Rushaid group .|. Al-Faraa Group .|. Omrania & Associates .|. Al-Muhaidib Contracting Co. .|. Al-Saad General Contracting Co. .|. Abahsain Company .|. Jomail Saudi Arabia .|. Petrozone Est. .|. Electric Water .|. Heater Factory .|. Bridgeway Specialized Contracting Co. Ltd .|. Top Screens Co. .|. National scientific company .|. Achevx Advertising .|. Industrial Contractors Co. Ltd.(INCO) .|. SAED Recruitment Co. .|. Jamjoom Medical Industries .|. SAG Contracting .|. Anan Iskan Housing Solutions .|. Almaarefah school .|. Arcoma Group .|. Dakheel Company .|. Global Ports Co. .|. IHG | Holiday Inn Riyadh .|. Sisco Saudi .|. Angari Co. .|. Dejam Co. .|. STS Co. .|. Gandour, Saudi Arabia .|. Maaf Dalkia, Saudi Arabia .|. Saudi Chevron Phillips Company .|. Alkhorayef Group .|. Universal Motors Agencies (GMC) .|. Arabian Auto Agency (AAA) .|. Al-Jomaih Holding Company .|. Saeed R Al-Zahrani Corporation (SRACO) .|. Arcelor Mittal Steel Company .|. Al-Watania Industries .|. Kanoo Commercial Group .|. Batterjee Holdings .|. AnNasban Group .|. Searas International .|. Astra Foods .|. Petron Saudi Contracting Co. .|. International Paints Ltd (AKZO NOBEL) .|. Al-Faraa Group .|. AECOM Arabia Ltd. Co. .|. PVC Arabia Co. .|. Al-Rasheed Group .|. United Meem Co. .|. JENAN Properties .|. Engineering Unit Gen. Cont. .|. Masakeen Co. .|. Eastern Industrial Company .|. M.J.E Steel Co. .|. Saudi International Petrochemical Co. (Sipchem) .|. Construction & Roads Services Co. .|. Al-Beer Medical Group .|. Ali H. Al-Ghamdi & Partners Co [AG&P] .|. Zuhair Fayez Partnership Consultants .|. Gulf Quality Control Co. Ltd .|. Al-Hamrani Fuchs Petroleum Co. .|. Star Weddings Co. .|. Petromin Corporation .|. Saudi Fal Co. .|. ZMS Group .|. University of Ha'il .|. Arrow Food Distribution Company .|. Al-Nasser Group .|. SASIB Arabia .|. First Technical Contracting .|. Rayan Gulf Company .|. Saudi Cranes & Steel Works .|. Emdad Contracting Company .|-- Also serving some prestigious clients like Saudi Aramco, MARAFIQ Utility Company, SABIC (Saudi Basic Industries Corporation), Hadeed Iron & Steel Company and many more through their designated contractors in Kingdom.
.--- United Arab Emirates ---.:
.|. Gulf Piping Company .|. Jerry Varghese .|. Em Tech LLC .|. Maaf Dalikia UAE .|. Cladtech International (Unipods - Al-Rajhi Holdings) .|. Europcar UAE .|. Sawaeed Employment LLC .|. Wave Tech L.L.C .|. Tamas Projects .|. Damas Groupe .|. IFFCO Group .|. MPS Management Consultancy .|. Majestic Jetties Company .|. Global Glass Company .|. Woodworks Factory .|. International Cap Company .|. Elenco Security Systems .|. AkzoNobel Middle East .|. Petron Emirates Contracting Co. .|. Al-Bassam RAK .|. Emirate Dredging Company .|. Global Management Consultants .|-- Also a registered Pakistani Manpower Agency with Abu Dhabi Chamber of Commerce & Industry.
.--- Qatar ---.:
.|. Belfa International .|. HBK Engineering Company .|. Capital Technology Company .|. Al-Khayyat Contracting .|.
.--- Oman ---.:
.|. Rataj Factory for Kitchen & Furniture .|. Nizwa Marble Company .|. A.N Printing Press .|. Arabworld Recruitment Company .|.
.--- Bahrain ---.:
.|. Synergy MiddleEast Group .|. Burgerline Chain of Restaurants .|. Ascentech Telecom .|. Sayed Kadhem Al-Durazi & Sons .|.
.--- Libya ---.:
.|. Galaxy Catering Company .|.
.--- Yemen ---.:
.|. Yemen Plast Co .|. Al Khaled For Gen. Comm. Agencies .|. AMTC Automotive & Machinery Trading Center (Toyota) .|.
.--- Sudan ---.:
.|. Jedian Group .|. Florence Services & Ventures Inc .|. African House for Printing the Glorious Qura'n .|.
The list of our valuable and highly satisfied clients continues to grow and so is our commitment to serve them. We have been extending the network around the world by establishing partnerships with experienced consultants and associates to provide solutions to our clientele more effectively.
If you need one window solution to all your HR/employment needs, please give us a chance to prove our mettle by providing competent, qualified and experienced candidates to you in a very professional & timely manner. We have our own interview & trade testing facilities in major cities such as Karachi, Lahore & Islamabad etc. We are looking forward to work with your esteemed organization.
Thanks / B. Regards
Farrukh A. Shaikh | Director
WhatsApp for Android & iPhone 0092300-8228363
P.S: If you are not a concern person we should contact regarding Recruitment/HR, kindly let us have e-mail address of Recruitment/HR Manager of your company. We'd appreciate your kind co-operation in this regard. You can also add us on Skype "farrukh.a.shaikh" for any urgent discussions regarding your manpower needs between 11 AM to 7 PM PST.
S.A.Z Universal Links
Overseas Employment Promoters
(License # 2710/KHI)
3rd Floor, 11-E, 7th Commercial Lane,
Zamzama Boulevard, DHA-V,
P: 009221-3-5375035-7 / 3-5375774-5 / 3-5875188
** The information contained in this message or any of its attachments may be privileged and confidential and intended for the exclusive use of the addressee. The views expressed may not be S.A.Z Universal Links's policy but the personal views of the originator. If you have received this message in error, please unsubscribe by advising the sender immediately by reply e-mail and delete this message and any attachments without retaining a copy.**