[lkml]   [2017]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectDAX error inject/page poison

We were trying to simulate pmem errors in an environment where a DAX
filesystem is used (ext4 although I suspect it does not matter). The
sequence attempted on a DAX filesystem is:
- Populate a file in the DAX filesystem
- mmap the file
- madvise(MADV_HWPOISON)

The madvise operation fails with EFAULT. This appears to come from
get_user_pages() as there are no struct pages for such mappings?

The idea is to make sure an application can recover from such errors
by hole punching and repopulating with another page.

A couple questions:
It seems like madvise(MADV_HWPOISON) is not going to work (ever?) in
such situations. If so, should we perhaps add a IS_DAX like check and
return something like EINVAL? Or, at least document expected behavior?

If madvise(MADV_HWPOISON) will not work, how can one inject errors to
test error handling code?

Mike Kravetz

 \ /
  Last update: 2017-09-20 01:15    [W:0.052 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site