From: "Darrick J. Wong" <djwong@kernel.org>
To: guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me,
hch@infradead.org
Subject: [PATCH v1.1 3/3] common/populate: change how we describe cached populated images
Date: Wed, 24 Mar 2021 11:17:48 -0700 [thread overview]
Message-ID: <20210324181748.GK1670408@magnolia> (raw)
In-Reply-To: <161647319905.3429609.14862078528489327236.stgit@magnolia>
From: Darrick J. Wong <djwong@kernel.org>
The device name of a secondary storage device isn't all that important,
but the size is.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
v1.1: fix variable names
---
common/populate | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/common/populate b/common/populate
index c01b7e0e..d484866a 100644
--- a/common/populate
+++ b/common/populate
@@ -808,13 +808,23 @@ _fill_fs()
_scratch_populate_cache_tag() {
local extra_descr=""
local size="$(blockdev --getsz "${SCRATCH_DEV}")"
+ local logdev_sz="none"
+ local rtdev_sz="none"
+
+ if [ "${USE_EXTERNAL}" = "yes" ] && [ -n "${SCRATCH_LOGDEV}" ]; then
+ logdev_sz="$(blockdev --getsz "${SCRATCH_LOGDEV}")"
+ fi
+
+ if [ "${USE_EXTERNAL}" = "yes" ] && [ -n "${SCRATCH_RTDEV}" ]; then
+ rtdev_sz="$(blockdev --getsz "${SCRATCH_RTDEV}")"
+ fi
case "${FSTYP}" in
"ext4")
- extra_descr="LOGDEV ${SCRATCH_LOGDEV} USE_EXTERNAL ${USE_EXTERNAL}"
+ extra_descr="LOGDEV_SIZE ${logdev_sz}"
;;
"xfs")
- extra_descr="LOGDEV ${SCRATCH_LOGDEV} USE_EXTERNAL ${USE_EXTERNAL} RTDEV ${SCRATCH_RTDEV}"
+ extra_descr="LOGDEV_SIZE ${logdev_sz} RTDEV_SIZE ${rtdev_sz}"
_populate_xfs_qmount_option
if echo "${MOUNT_OPTIONS}" | grep -q 'usrquota'; then
extra_descr="${extra_descr} QUOTAS"
next prev parent reply other threads:[~2021-03-24 18:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-23 4:19 [PATCHSET 0/3] populate: fix a few bugs with fs pre-population Darrick J. Wong
2021-03-23 4:19 ` [PATCH 1/3] populate: create block devices when pre-populating filesystems Darrick J. Wong
2021-03-24 18:03 ` Christoph Hellwig
2021-03-23 4:19 ` [PATCH 2/3] common/populate: create fifos " Darrick J. Wong
2021-03-24 18:05 ` Christoph Hellwig
2021-03-23 4:19 ` [PATCH 3/3] common/populate: change how we describe cached populated images Darrick J. Wong
2021-03-24 18:11 ` Christoph Hellwig
2021-03-24 18:15 ` Darrick J. Wong
2021-03-24 18:17 ` Darrick J. Wong [this message]
2021-03-24 18:22 ` [PATCH v1.1 " Christoph Hellwig
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=20210324181748.GK1670408@magnolia \
--to=djwong@kernel.org \
--cc=fstests@vger.kernel.org \
--cc=guan@eryu.me \
--cc=guaneryu@gmail.com \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.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).