nvdimm.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Vishal Verma <vishal.l.verma@intel.com>
To: <linux-nvdimm@lists.01.org>
Cc: Dave Hansen <dave.hansen@linux.intel.com>,
	Chunye Xu <chunye.xu@intel.com>
Subject: [ndctl PATCH 0/3] daxctl-device fixes
Date: Tue, 30 Mar 2021 21:12:26 -0600	[thread overview]
Message-ID: <20210331031229.384068-1-vishal.l.verma@intel.com> (raw)

This series contains a couple of fixes:

1/ Check the kernel policy for onlining blocks. If that is set to
'online', and if daxctl is passed --no-online or is onlining to
ZONE_MOVABLE (default), then fail the reconfigure command as we know
we can't satisfy that ask. (Prior to these patches, the reconfigure
would succeed, and we'd print a warning after the fact, which may
result in a surprising experience).

2/ For ndctl disable-namespace (and destroy-namespace), fail the
operation if the dax device is active as system-ram.

Additionally, augment the daxctl-devices.sh unit test to test for both
of these conditions and the expected (fixed) behavior in both cases.

Vishal Verma (3):
  daxctl: fail reconfigure-device based on kernel onlining policy
  libdaxctl: add an API to check if a device is active
  libndctl: check for active system-ram before disabling daxctl devices

 .../daxctl/daxctl-reconfigure-device.txt      | 12 ++++-
 daxctl/lib/libdaxctl-private.h                |  1 +
 daxctl/lib/libdaxctl.c                        | 31 +++++++++++
 ndctl/lib/libndctl.c                          | 25 ++++++++-
 daxctl/libdaxctl.h                            |  2 +
 daxctl/device.c                               | 10 ++++
 daxctl/lib/libdaxctl.sym                      |  6 +++
 test/daxctl-devices.sh                        | 52 +++++++++++++++++++
 8 files changed, 137 insertions(+), 2 deletions(-)

-- 
2.30.2
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

             reply	other threads:[~2021-03-31  3:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-31  3:12 Vishal Verma [this message]
2021-03-31  3:12 ` [ndctl PATCH 1/3] daxctl: fail reconfigure-device based on kernel onlining policy Vishal Verma
2021-03-31  3:12 ` [ndctl PATCH 2/3] libdaxctl: add an API to check if a device is active Vishal Verma
2021-03-31  3:12 ` [ndctl PATCH 3/3] libndctl: check for active system-ram before disabling daxctl devices Vishal Verma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210331031229.384068-1-vishal.l.verma@intel.com \
    --to=vishal.l.verma@intel.com \
    --cc=chunye.xu@intel.com \
    --cc=dave.hansen@linux.intel.com \
    --cc=linux-nvdimm@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).