Re: [PATCH v2 0/5] vfio, dax: prevent long term filesystem-dax pins and other fixes

2018-02-23 Thread Haozhong Zhang
On 02/22/18 23:17 -0800, Dan Williams wrote: > Changes since v1 [1]: > > * Fix the detection of device-dax file instances in vma_is_fsdax(). > (Haozhong, Gerd) > > * Fix compile breakage in the FS_DAX=n and DEV_DAX=y case. (0day robot) > > [1]: https://lists.01.org/pipermail/linux-nvdimm/2018-

[PATCH v2] acpi: nfit: document sysfs interface

2018-02-23 Thread Aishwarya Pant
This is an attempt to document the nfit sysfs interface. The descriptions have been collected from git commit logs and the ACPI specification 6.2. Signed-off-by: Aishwarya Pant --- Changes in v2: - Add descriptions for range_index and ecc_unit_size - Edit various descriptions as suggested Docum

Re: [PATCH] acpi: nfit: document sysfs interface

2018-02-23 Thread Aishwarya Pant
On Wed, Feb 21, 2018 at 03:46:06PM -0800, Dan Williams wrote: > > So, this looks great and is something I've had on my backlog for a > while. That said this is a bit incomplete. These attributes are > relative to the the "nd" bus which is the libnvdimm sub-system sysfs > interface. This documen

NetApp Storage Users List

2018-02-23 Thread anita . graham
style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(31,78,121)">Hello there,  I would like to know if you are interested in acquiring NetApp Storage Users List? style="font-size:11pt;font-family:Calibri,sans-serif"> style="font-size:11pt;font-family:Calibri,sans-serif;color:rgb(3

Re: [PATCH v2 0/5] vfio, dax: prevent long term filesystem-dax pins and other fixes

2018-02-23 Thread Dan Williams
On Fri, Feb 23, 2018 at 12:55 AM, Haozhong Zhang wrote: > On 02/22/18 23:17 -0800, Dan Williams wrote: >> Changes since v1 [1]: >> >> * Fix the detection of device-dax file instances in vma_is_fsdax(). >> (Haozhong, Gerd) >> >> * Fix compile breakage in the FS_DAX=n and DEV_DAX=y case. (0day rob

Re: [ndctl PATCH] ndctl, firmware-update: kill usage of flock() in verify_fw_file()

2018-02-23 Thread Ross Zwisler
On Thu, Feb 22, 2018 at 10:59:27PM -0800, Dan Williams wrote: > It serves no purpose, we never explicitly unlock it, and it causes > needless failures if the firmware file happens to be on a filesystem > that does not support file locks. > > Cc: Dave Jiang > Signed-off-by: Dan Williams Yay, I w

Re: [ndctl PATCH] ndctl, test: kill usage of fallocate in firmware-update.sh

2018-02-23 Thread Ross Zwisler
On Thu, Feb 22, 2018 at 10:59:22PM -0800, Dan Williams wrote: > The 'fallocate -l 196608 $image' step in the test fails when $image is > on an NFS mount. Use dd instead to create a sparse file. We do not need > to allocate anything since we are only writing zeros. > > Cc: Dave Jiang > Signed-off-

Re: [ndctl PATCH] ndctl, test: skip btt-pad compat test on pre-4K capable kernels

2018-02-23 Thread Ross Zwisler
On Thu, Feb 22, 2018 at 10:59:17PM -0800, Dan Williams wrote: > Prior to the introduction of v1.2 namespace labels it was not possible > to specify a pmem namespace with a 4K sector size. Skip this test when > that namespace creation attempt fails. > > Cc: Vishal Verma > Signed-off-by: Dan Willia

[PATCH 0/2] update label size handlings per UEFI 2.7

2018-02-23 Thread Toshi Kani
This patchset updates label storage size check and index block size calculation according to UEFI 2.7 spec. --- Toshi Kani (2): 1/2 libnvdimm, label: change min label storage size per UEFI 2.7 2/2 libnvdimm, label: change nvdimm_num_label_slots per UEFI 2.7 --- drivers/nvdimm/label.c | 34

[PATCH 2/2] libnvdimm, label: change nvdimm_num_label_slots per UEFI 2.7

2018-02-23 Thread Toshi Kani
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-b

[PATCH 1/2] libnvdimm, label: change min label storage size per UEFI 2.7

2018-02-23 Thread Toshi Kani
UEFI 2.7 defines in page 758 that: Initial Label Storage Area Configuration : The minimum size of the Label Storage Area is large enough to hold 2 index blocks and 2 labels. The mininum index block size is 256 bytes, and the minimum label size is also 256 bytes. Change ND_LABEL_MIN_SI

[ndctl PATCH] ndctl, tests: firmware-update.sh post-test cleanup

2018-02-23 Thread Ross Zwisler
When firmware-update.sh is run multiple times by itself, all runs but the first fail with this: + ../ndctl/ndctl update-firmware -d nmem1 -f update-fw.img Error: START FIRMWARE UPDATE failed: 0x9 Error: Another firmware upload in progress or finished. Fix this by having the test properly cle

Re: [ndctl PATCH] ndctl, test: kill usage of fallocate in firmware-update.sh

2018-02-23 Thread Dan Williams
On Fri, Feb 23, 2018 at 12:58 PM, Ross Zwisler wrote: > On Thu, Feb 22, 2018 at 10:59:22PM -0800, Dan Williams wrote: >> The 'fallocate -l 196608 $image' step in the test fails when $image is >> on an NFS mount. Use dd instead to create a sparse file. We do not need >> to allocate anything since w

Re: [ndctl PATCH] ndctl, tests: firmware-update.sh post-test cleanup

2018-02-23 Thread Dan Williams
On Fri, Feb 23, 2018 at 1:38 PM, Ross Zwisler wrote: > When firmware-update.sh is run multiple times by itself, all runs but the > first fail with this: > > + ../ndctl/ndctl update-firmware -d nmem1 -f update-fw.img > Error: START FIRMWARE UPDATE failed: 0x9 > > Error: Another firmware upload

Re: [ndctl PATCH] ndctl, test: kill usage of fallocate in firmware-update.sh

2018-02-23 Thread Ross Zwisler
On Fri, Feb 23, 2018 at 01:45:40PM -0800, Dan Williams wrote: > On Fri, Feb 23, 2018 at 12:58 PM, Ross Zwisler > wrote: > > On Thu, Feb 22, 2018 at 10:59:22PM -0800, Dan Williams wrote: > >> The 'fallocate -l 196608 $image' step in the test fails when $image is > >> on an NFS mount. Use dd instead

Re: [ndctl PATCH] ndctl, test: fix tests that use error injection on older kernels

2018-02-23 Thread Dan Williams
On Wed, Feb 21, 2018 at 3:20 PM, Vishal Verma wrote: > When we updated from using canned badblocks to injected errors in > nfit_test, we ended up breaking the tests for older kernels that didn't > have error injection capabilities. > > Fix this by first checking if badblocks already exist. If they

[PATCH v3 4/6] dax: fix S_DAX definition

2018-02-23 Thread Dan Williams
Make sure S_DAX is defined in the CONFIG_FS_DAX=n + CONFIG_DEV_DAX=y case. Otherwise vma_is_dax() may incorrectly return false in the Device-DAX case. Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: Christoph Hellwig Cc: Jan Kara Cc: Fixes: dee410792419 ("/dev/dax, core: file operatio

[PATCH v3 0/6] vfio, dax: prevent long term filesystem-dax pins and other fixes

2018-02-23 Thread Dan Williams
Changes since v2 [1]: * Fix yet more compile breakage in the FS_DAX=n and DEV_DAX=y case. (0day robot) [1]: https://lists.01.org/pipermail/linux-nvdimm/2018-February/014046.html --- The vfio interface, like RDMA, wants to setup long term (indefinite) pins of the pages backing an address range

[PATCH v3 2/6] dax: fix dax_mapping() definition in the FS_DAX=n + DEV_DAX=y case

2018-02-23 Thread Dan Williams
An address_space will only have dax exceptional entries when FS_DAX is enabled. The current reliance on S_DAX causes compile failures when S_DAX is defined for DEV_DAX, but FS_DAX is disabled. Make dax_mapping() always return false so that mm/truncate.c drops its link time dependencies on fs/dax.c.

[PATCH v3 6/6] vfio: disable filesystem-dax page pinning

2018-02-23 Thread Dan Williams
Filesystem-DAX is incompatible with 'longterm' page pinning. Without page cache indirection a DAX mapping maps filesystem blocks directly. This means that the filesystem must not modify a file's block map while any page in a mapping is pinned. In order to prevent the situation of userspace holding

[PATCH v3 5/6] dax: short circuit vma_is_fsdax() in the CONFIG_FS_DAX=n case

2018-02-23 Thread Dan Williams
Do not bother looking up the file type in the case when Filesystem-DAX is disabled at build time. Cc: Alexander Viro Cc: linux-fsde...@vger.kernel.org Cc: Christoph Hellwig Cc: Jan Kara Signed-off-by: Dan Williams --- include/linux/fs.h |2 ++ 1 file changed, 2 insertions(+) diff --git a

[PATCH v3 3/6] xfs, dax: introduce IS_FSDAX()

2018-02-23 Thread Dan Williams
Given that S_DAX is non-zero in the FS_DAX=n + DEV_DAX=y case, another mechanism besides the plain IS_DAX() check to compile out dead filesystem-dax code paths. Without IS_FSDAX() xfs will fail at link time with: ERROR: "dax_finish_sync_fault" [fs/xfs/xfs.ko] undefined! ERROR: "dax_iomap_f

[PATCH v3 1/6] dax: fix vma_is_fsdax() helper

2018-02-23 Thread Dan Williams
Gerd reports that ->i_mode may contain other bits besides S_IFCHR. Use S_ISCHR() instead. Otherwise, get_user_pages_longterm() may fail on device-dax instances when those are meant to be explicitly allowed. Fixes: 2bb6d2837083 ("mm: introduce get_user_pages_longterm") Cc: Reported-by: Gerd Rausch