From: Wu Guanghao <wuguanghao3@huawei.com>
To: lvm-devel@redhat.com
Subject: [QUESTION] lvmcache_label_scan: checksum error at offset xxx
Date: Wed, 9 Jun 2021 17:32:39 +0800 [thread overview]
Message-ID: <1cefcef9-7a6b-4054-68a6-bc0d7556065d@huawei.com> (raw)
Hi,
lvcreate and lvremove execute lvmcache_label_scan() to read the metadata on the lvm device,
but no lock is added for protection. if other processes are currently executing vg_commit() to submit metadata,
then it will go wrong.
lvremove (process1)
|--> lvmcache_label_scan()(no lock protection)
|-> read metadata data
|
|
|
|--------->lvm device metadata
lvremove (process2)
...
|--> lockd_vg(process_vg)
| (Lock the vg that needs to be processed)
...
|--> vg_commit()
|--> write metadata data
|-----------------> lvm device metadata
...
|--> unlock_vg(process_vg)
Wu Guanghao
next reply other threads:[~2021-06-09 9:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-09 9:32 Wu Guanghao [this message]
2021-06-09 11:09 ` [QUESTION] lvmcache_label_scan: checksum error at offset xxx Zdenek Kabelac
2021-06-10 9:19 ` Wu Guanghao
2021-06-10 9:53 ` Zdenek Kabelac
2021-06-10 18:44 ` David Teigland
2021-06-11 1:53 ` Wu Guanghao
2021-06-11 21:50 ` David Teigland
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=1cefcef9-7a6b-4054-68a6-bc0d7556065d@huawei.com \
--to=wuguanghao3@huawei.com \
--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.