Re: [PATCH v3 06/11] mm, pmem: Implement ->memory_failure() in pmem driver

2021-02-10 Thread Christoph Hellwig
> +static int pmem_pagemap_memory_failure(struct dev_pagemap *pgmap, > + unsigned long pfn, int flags) > +{ > + struct pmem_device *pdev; > + struct gendisk *disk; > + loff_t disk_offset; > + int rc = 0; > + unsigned long size = page_size(pfn_to_page(pfn)); > + > +

[PATCH v3 06/11] mm, pmem: Implement ->memory_failure() in pmem driver

2021-02-08 Thread Shiyang Ruan
Call the ->memory_failure() which is implemented by pmem driver, in order to finally notify filesystem to handle the corrupted data. The handler which collects and kills processes are moved into mf_dax_mapping_kill_procs(), which will be called by filesystem. Keep the old handler in order to roll