On Thu, Sep 23, 2021 at 1:56 PM Jane Chu <jane....@oracle.com> wrote: [..] > > This (AFAICT) has already been done for dax_zero_page_range, so I sense > > that Dan is trying to save you a bunch of code plumbing work by nudging > > you towards doing s/dax_clear_poison/dax_zero_page_range/ to this series > > and then you only need patches 2-3. > > Thanks Darrick for the explanation! > I don't mind to add DM layer support, it sounds straight forward. > I also like your latest patch and am wondering if the clear_poison API > is still of value.
No, the discussion about fallocate(...ZEROINIT...) has lead to a better solution. Instead of making error clearing a silent / opportunistic side-effect of writes, or trying to define new fallocate mode, just add a new RWF_CLEAR_HWERROR flag to pwritev2(). This allows for dax_direct_access() to map the page regardless of poison and trigger pmem_copy_from_iter() to precisely handle sub-page poison.