From: David Teigland <teigland@sourceware.org>
To: lvm-devel@redhat.com
Subject: master - devices: fix reopen for unopened device
Date: Mon, 28 Sep 2020 18:29:27 +0000 (GMT) [thread overview]
Message-ID: <20200928182927.71827386101B@sourceware.org> (raw)
Gitweb: https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=890c7ef451809a498978651a1802f65606a7c16b
Commit: 890c7ef451809a498978651a1802f65606a7c16b
Parent: 8952dcbff0c1ca9bfaa2f8fe8b6da78a10319e6b
Author: David Teigland <teigland@redhat.com>
AuthorDate: Fri Sep 25 11:59:49 2020 -0500
Committer: David Teigland <teigland@redhat.com>
CommitterDate: Mon Sep 28 13:25:57 2020 -0500
devices: fix reopen for unopened device
If there's a request to reopen rw a device that's not
open, then just call the normal open function.
---
lib/label/label.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/label/label.c b/lib/label/label.c
index 0090fd0a5..27d06d783 100644
--- a/lib/label/label.c
+++ b/lib/label/label.c
@@ -1460,7 +1460,8 @@ int label_scan_reopen_rw(struct device *dev)
dev_name(dev), dev->bcache_fd, dev->bcache_di);
return 0;
}
- goto do_open;
+ dev->flags |= DEV_BCACHE_WRITE;
+ return _scan_dev_open(dev);
}
if ((dev->flags & DEV_BCACHE_WRITE))
@@ -1477,7 +1478,6 @@ int label_scan_reopen_rw(struct device *dev)
return 0;
}
- do_open:
flags |= O_DIRECT;
flags |= O_NOATIME;
flags |= O_RDWR;
reply other threads:[~2020-09-28 18:29 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=20200928182927.71827386101B@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.