From: Jonas Rebmann <jre@pengutronix.de>
To: ptxdist <ptxdist@pengutronix.de>
Cc: Jonas Rebmann <jre@pengutronix.de>
Subject: [ptxdist] [PATCH] util-linux: make blkdiscard selectable
Date: Thu, 23 Jan 2025 21:59:16 +0100 [thread overview]
Message-ID: <20250123-blkdiscard-v1-1-a8a4541186d5@pengutronix.de> (raw)
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
rules/util-linux.in | 12 ++++++++++++
rules/util-linux.make | 3 ++-
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/rules/util-linux.in b/rules/util-linux.in
index 8bf035f3901ef415faafd9502f8d23cc2841711f..58bd21100a9ea5e094a4121c489868d756ac2470 100644
--- a/rules/util-linux.in
+++ b/rules/util-linux.in
@@ -290,6 +290,18 @@ comment "BusyBox' taskset is selected!"
comment "sys-utils"
+config UTIL_LINUX_BLKDISCARD
+ bool
+ depends on !BUSYBOX_BLKDISCARD || ALLYES
+ prompt "blkdiscard"
+ help
+ blkdiscard is used to discard device sectors. This is useful for
+ solid-state drivers (SSDs) and thinly-provisioned storage. Unlike
+ fstrim, this command is used directly on the block device.
+
+comment "BusyBox' blkdiscard is selected!"
+ depends on BUSYBOX_BLKDISCARD
+
config UTIL_LINUX_CHMEM
bool
prompt "chmem"
diff --git a/rules/util-linux.make b/rules/util-linux.make
index 579c165e6edb03221125de9d5b338c5452eb2107..c98200a52258f930e08a3d4cedc3f1b001432d0a 100644
--- a/rules/util-linux.make
+++ b/rules/util-linux.make
@@ -54,7 +54,7 @@ UTIL_LINUX_CONF_OPT := \
-Dbuild-agetty=$(call ptx/endis, PTXCONF_UTIL_LINUX_AGETTY)d \
-Dbuild-bash-completion=disabled \
-Dbuild-bfs=disabled \
- -Dbuild-blkdiscard=disabled \
+ -Dbuild-blkdiscard=$(call ptx/endis, PTXCONF_UTIL_LINUX_BLKDISCARD)d \
-Dbuild-blkpr=disabled \
-Dbuild-blkzone=disabled \
-Dbuild-blockdev=disabled \
@@ -223,6 +223,7 @@ UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_CHRT) += bin/chrt
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_IONICE) += bin/ionice
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_TASKSET) += bin/taskset
# sys-utils
+UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_BLKDISCARD) += sbin/blkdiscard
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_CHMEM) += bin/chmem
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_DMESG) += bin/dmesg
UTIL_LINUX_BIN-$(PTXCONF_UTIL_LINUX_FLOCK) += bin/flock
---
base-commit: 1b82c74e1f1f2048cb08a381def774ea2f8e7227
change-id: 20250123-blkdiscard-96ec7df07d6d
Best regards,
--
Jonas Rebmann <jre@pengutronix.de>
next reply other threads:[~2025-01-23 20:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-23 20:59 Jonas Rebmann [this message]
2025-01-27 8:35 ` [ptxdist] [APPLIED] " Michael Olbrich
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=20250123-blkdiscard-v1-1-a8a4541186d5@pengutronix.de \
--to=jre@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/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