All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - writecache: skip fs block size check in test mode
Date: Tue,  7 Jul 2020 18:21:48 +0000 (GMT)	[thread overview]
Message-ID: <20200707182148.23926385ED4B@sourceware.org> (raw)

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=40266faaab07f5578d137f9e400fbc9190edabcd
Commit:        40266faaab07f5578d137f9e400fbc9190edabcd
Parent:        ad773511c59aea239592c014a2dab4161ed92214
Author:        David Teigland <teigland@redhat.com>
AuthorDate:    Tue Jul 7 13:20:18 2020 -0500
Committer:     David Teigland <teigland@redhat.com>
CommitterDate: Tue Jul 7 13:20:18 2020 -0500

writecache: skip fs block size check in test mode

if doing so requires activating the LV
---
 tools/lvconvert.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/lvconvert.c b/tools/lvconvert.c
index 0155fdbf9..61256c698 100644
--- a/tools/lvconvert.c
+++ b/tools/lvconvert.c
@@ -5649,6 +5649,11 @@ static int _set_writecache_block_size(struct cmd_context *cmd,
 		stack;
 
 	if (!(fs_dev = dev_cache_get(cmd, pathname, NULL))) {
+		if (test_mode()) {
+			log_print("Test mode skips checking fs block size.");
+			fs_block_size = 0;
+			goto skip_fs;
+		}
 		log_error("Device for LV not found to check block size %s", pathname);
 		goto_bad;
 	}
@@ -5667,6 +5672,7 @@ static int _set_writecache_block_size(struct cmd_context *cmd,
 	 * With 512 LBS and 4K PBS, mkfs.xfs will use xfs sector size 4K.
 	 */
 	rv = get_fs_block_size(fs_dev, &fs_block_size);
+skip_fs:
 	if (!rv || !fs_block_size) {
 		if (lbs_4k && pbs_4k && !pbs_512) {
 			block_size = 4096;



                 reply	other threads:[~2020-07-07 18:21 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20200707182148.23926385ED4B@sourceware.org \
    --to=teigland@sourceware.org \
    --cc=lvm-devel@redhat.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.