From: sashiko-bot@kernel.org
To: "Sourav Panda" <souravpanda@google.com>,
djbw@kernel.org, vishal.l.verma@intel.com, dave.jiang@intel.com,
alison.schofield@intel.com, pankaj.gupta.linux@gmail.com,
mst@redhat.com, jasowangio@gmail.com, eperezma@redhat.com,
viro@zeniv.linux.org.uk, brauner@kernel.org
Cc: iweiny@kernel.org, jack@suse.cz, xuanzhuo@linux.alibaba.com,
shuah@kernel.org, david@kernel.org, nvdimm@lists.linux.dev,
linux-cxl@vger.kernel.org, virtualization@lists.linux.dev,
linux-mm@kvack.org
Subject: Re: [RFC PATCH 5/5] selftests/dax: add devdax_discard tests
Date: Tue, 01 Dec 2026 01:24:12 +0000 [thread overview]
Message-ID: <sashiko-outbox-242330@kernel.org> (raw)
In-Reply-To: <20261130012354.1894611-6-souravpanda@google.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] selftests/dax: daxdev() defaults to /dev/dax0.0 without
operator opt-in
--
commit 1e1297c97ec7f971120dea46ce76c41dea821f58
Author: Sourav Panda <souravpanda@google.com>
selftests/dax: add devdax_discard tests
This commit adds a kselftest for fallocate() hole punching and
madvise(MADV_REMOVE) discard on device-dax instances.
> diff --git a/tools/testing/selftests/dax/devdax_discard.c b/tools/testing/selftests/dax/devdax_discard.c
> new file mode 100644
> index 0000000000000..4fae31b186d8d
> --- /dev/null
> +++ b/tools/testing/selftests/dax/devdax_discard.c
> @@ -0,0 +1,250 @@
[ ... ]
> +#define DEFAULT_DAXDEV "/dev/dax0.0"
> +#define DISCARD (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE)
> +
> +static const char *daxdev(void)
> +{
> + const char *p = getenv("DAXDEV");
> +
> + return p && *p ? p : DEFAULT_DAXDEV;
> +}
[Severity: Medium]
Should daxdev() skip when DAXDEV is unset instead of defaulting to
/dev/dax0.0?
Because devdax_discard is registered in TEST_GEN_PROGS, a default kselftest
run executes it automatically, and discard_reads_zero and
close_preserves_data overwrite and punch holes at offset 0 of /dev/dax0.0
without saving or restoring existing persistent memory contents. The sibling
test tools/testing/selftests/dax/dax-kmem-hotplug.sh skips unless the operator
explicitly opts in via DAX_KMEM_TEST_DEV for this reason.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261130012354.1894611-1-souravpanda@google.com?part=5
next prev parent reply other threads:[~2026-12-01 1:24 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 1:23 [RFC PATCH 0/5] virtio-pmem & device-dax: host-backed range discard via fallocate() / MADV_REMOVE Sourav Panda
2026-11-30 1:23 ` [RFC PATCH 1/5] dax/device: validate mmap offset alignment against dev_dax->align Sourav Panda
2026-11-30 1:23 ` [RFC PATCH 2/5] virtio_pmem: add VIRTIO_PMEM_F_DISCARD and region discard hook Sourav Panda
2026-11-30 1:23 ` [RFC PATCH 3/5] vfs: allow fallocate() on character devices implementing ->fallocate() Sourav Panda
2026-11-30 13:55 ` Jan Kara
2026-11-30 18:08 ` Sourav Panda
2026-11-30 1:23 ` [RFC PATCH 4/5] dax/device: add fallocate() discard support Sourav Panda
2026-11-30 1:23 ` [RFC PATCH 5/5] selftests/dax: add devdax_discard tests Sourav Panda
2026-12-01 1:24 ` sashiko-bot [this message]
2026-12-01 18:34 ` Sourav Panda
2026-12-01 1:24 ` [RFC PATCH 0/5] virtio-pmem & device-dax: host-backed range discard via fallocate() / MADV_REMOVE sashiko-bot
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=sashiko-outbox-242330@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=alison.schofield@intel.com \
--cc=brauner@kernel.org \
--cc=dave.jiang@intel.com \
--cc=david@kernel.org \
--cc=djbw@kernel.org \
--cc=eperezma@redhat.com \
--cc=iweiny@kernel.org \
--cc=jack@suse.cz \
--cc=jasowangio@gmail.com \
--cc=linux-cxl@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mst@redhat.com \
--cc=nvdimm@lists.linux.dev \
--cc=pankaj.gupta.linux@gmail.com \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shuah@kernel.org \
--cc=souravpanda@google.com \
--cc=viro@zeniv.linux.org.uk \
--cc=virtualization@lists.linux.dev \
--cc=vishal.l.verma@intel.com \
--cc=xuanzhuo@linux.alibaba.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.