On Tue, Feb 7, 2017 at 8:49 PM, Xiong Zhou <[email protected]> wrote: > On Tue, Feb 07, 2017 at 08:10:14PM -0800, Dan Williams wrote: >> On Tue, Feb 7, 2017 at 7:51 PM, Xiong Zhou <[email protected]> wrote: >> > On Fri, Jan 20, 2017 at 12:40:07PM +0800, Xiong Zhou wrote: >> >> Hi, >> >> >> >> At first, I am not sure whether this is an issue. >> >> >> >> mmap a file in a DAX mountpoint, open another file >> >> in a non-DAX mountpoint with O_DIRECT, write the >> >> mapped area to the other file. >> >> >> >> This write Success on pmem ramdisk(memmap=2G!20G like) >> >> This write Fail(Bad address) on nvdimm pmem devices. >> >> This write Fail(Bad address) on brd based ramdisk. >> >> >> >> If we skip the O_DIRECT flag, all tests pass. >> >> >> >> If we write from DAX to DAX, all tests pass. >> >> If we write from non-DAX to DAX, all tests pass. >> >> >> > snip.. >> > >> > To falloc instead of pwrite while initiating test files, >> > ( Thanks Ross! :) >> > the write call returned success, however the following >> > read back to mmaped area FAILED the same way: >> > >> > return (Bad address) on raw-mode nvdimm device; >> > return (Success) on memory-mode nvdimm device; >> > return (Bad address) on brd based ramdisk. >> > >> > Also, this only happends with O_DIRECT flag on. >> > >> > This smells like an issue to me, still looking into why >> > read can't get that page.. >> > >> >> Why does it smell like an issue? Any path that calls get_user_pages() > > Because the write call gets its page and succeeds, while read back fails. > __get_user_pages on the same address first pass, then fail.
Ok, I might have misread your description. Can you tell me the exact reproduction steps so I can give it a try? _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
