Linux CXL
 help / color / mirror / Atom feed
* [PATCH ndctl 0/2] daxctl: Fix error handling and propagation in daxctl/device.c
@ 2024-04-12 21:05 Vishal Verma
  2024-04-12 21:05 ` [PATCH ndctl 1/2] daxctl/device.c: Handle special case of destroying daxX.0 Vishal Verma
  2024-04-12 21:05 ` [PATCH ndctl 2/2] daxctl/device.c: Fix error propagation in do_xaction_device() Vishal Verma
  0 siblings, 2 replies; 8+ messages in thread
From: Vishal Verma @ 2024-04-12 21:05 UTC (permalink / raw)
  To: nvdimm, linux-cxl
  Cc: Dan Williams, Alison Schofield, Dave Jiang, Ira Weiny,
	Vishal Verma

An intermittently failing daxctl-create.sh test revealed two things:
1/ The kernel handles the 0th DAX device under a region specially, and
refuses to delete it, returning an EBUSY. The daxctl-destroy-device
failed to account for this, even if other aspects of the destroy
operation succeeded (i.e. setting the size to zero). Patch 1 fixes this
by expecting the EBUSY on the 0th device, and not failing for it.

2/ When looping over multiple DAX devices, do_xaction_device() just
returned the status from the action on the last device. Since this order
can be effectively random, so would be the status returned. Patch 2
makes this behavior more consistent by saving any non-zero status from
the device iterations, and returning that instead of the last action's
status.

Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
---
Vishal Verma (2):
      daxctl/device.c: Handle special case of destroying daxX.0
      daxctl/device.c: Fix error propagation in do_xaction_device()

 daxctl/device.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
---
base-commit: e0d0680bd3e554bd5f211e989480c5a13a023b2d
change-id: 20240412-vv-daxctl-fixes-bd7992ea229d

Best regards,
-- 
Vishal Verma <vishal.l.verma@intel.com>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-15 16:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-12 21:05 [PATCH ndctl 0/2] daxctl: Fix error handling and propagation in daxctl/device.c Vishal Verma
2024-04-12 21:05 ` [PATCH ndctl 1/2] daxctl/device.c: Handle special case of destroying daxX.0 Vishal Verma
2024-04-12 21:09   ` Dan Williams
2024-04-15 16:17   ` Dave Jiang
2024-04-12 21:05 ` [PATCH ndctl 2/2] daxctl/device.c: Fix error propagation in do_xaction_device() Vishal Verma
2024-04-12 21:30   ` Dan Williams
2024-04-12 21:42     ` Verma, Vishal L
2024-04-15 16:19   ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox