On Thu, 2017-04-27 at 15:38 -0700, Dave Jiang wrote:
> Adding ndctl support that will allow clearing of bad blocks for a
> device. Initial implementation will only support device dax devices.
> The ndctl takes a device path and parameters of the starting bad
> block, and the number of bad blocks to clear.
>
> Signed-off-by: Dave Jiang <[email protected]>
Hi Dave,
I am seeing a failure to open "badblocks" on my system since its sysfs
path with "/sys/devcies/platform/ACPI.NFIT" is not valid (not sure how
I got "ACPI.NFIT" here - I hope I did not mess up my build with test
cases).
As you can see below, other open paths use
"/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/" for "nbus0". If
you go from "/sys/devices/platform", a valid path seems to be:
"/sys/devices/platform/ACPI0012:00/firmware_node"
# strace ndctl clear-error -f /dev/dax0.0 -s 1048576 -l 1
execve("/usr/bin/ndctl", ["ndctl", "clear-error", "-f", "/dev/dax0.0",
"-s", "1048576", "-l", "1"], [/* 60 vars */]) = 0
:
open("/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region0/d
ax0.0/resource", O_RDONLY|O_CLOEXEC) = 4
read(4, "0x250200000\n", 1024) = 12
close(4) = 0
open("/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region0/d
ax0.0/size", O_RDONLY|O_CLOEXEC) = 4
read(4, "16909336576\n", 1024) = 12
close(4) = 0
getdents(3, /* 0 entries */, 32768) = 0
close(3) = 0
open("/sys/devices/LNXSYSTM:00/LNXSYBUS:00/ACPI0012:00/ndbus0/region0/r
esource", O_RDONLY|O_CLOEXEC) = 3
read(3, "0x240000000\n", 1024) = 12
close(3) = 0
open("/sys/devices/platform/ACPI.NFIT/ndbus0/region0/badblocks",
O_RDONLY) = -1 ENOENT (No such file or directory)
write(2, "libndctl: regions_badblocks_init"..., 34libndctl:
regions_badblocks_init: ) = 34
write(2, "region badblocks fopen failed\n", 30region badblocks fopen
failed
) = 30
exit_group(234) = ?
+++ exited with 234 +++
Thanks,
-Toshi
_______________________________________________
Linux-nvdimm mailing list
[email protected]
https://lists.01.org/mailman/listinfo/linux-nvdimm