From: Heming Zhao <heming.zhao@suse.com>
To: Zdenek Kabelac <zkabelac@redhat.com>,
LVM general discussion and development <linux-lvm@redhat.com>,
Gang He <GHe@suse.com>
Subject: Re: [linux-lvm] pvresize will cause a meta-data corruption with error message "Error writing device at 4096 length 512"
Date: Fri, 11 Oct 2019 11:50:41 +0000 [thread overview]
Message-ID: <9beaffc6-d70e-c6cb-a964-5ce439499d75@suse.com> (raw)
In-Reply-To: <491a6f93-7b6d-0e51-5e0d-fc6911bd91e9@redhat.com>
For _raw_write_mda_header(), the latest codes are same as stable-2.02.
And below usage is wrong, should be fixed.
```
if (!dev_write_bytes(mdac->area.dev, write1_start, (size_t)write1_size, write_buf)) {
... ...
dev_unset_last_byte(mdac->area.dev); <==== invalid code, this time fd had been released.
... ...
}
```
This issue only happened on our customer machine, when updating lvm2 from
2.02.120 (no bcache code) to 2.02.180 (contains bcache).
Thanks
zhm
On 10/11/19 6:38 PM, Zdenek Kabelac wrote:
> Dne 11. 10. 19 v 11:22 Heming Zhao napsal(a):
>> Only one thing I am confusion all the time.
>> When read/write error, lvm will call bcache_invalidate_fd & _scan_dev_close to close fd.
>> So the first successfully read (i.e.: f747), which following f748 finally has fc68's fd.
>> This will cause f747 metadata overwrite not f748.
>>
>>
>
> Hi
>
> Have you considered checking newer version of lvm2?
>
> Regards
>
> Zdenek
>
>
next prev parent reply other threads:[~2019-10-11 11:50 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 9:17 [linux-lvm] pvresize will cause a meta-data corruption with error message "Error writing device at 4096 length 512" Gang He
2019-09-11 10:01 ` Ilia Zykov
2019-09-11 10:03 ` Ilia Zykov
2019-09-11 10:10 ` Ingo Franzki
2019-09-11 10:20 ` Gang He
2019-10-11 8:11 ` Heming Zhao
2019-10-11 9:22 ` Heming Zhao
2019-10-11 10:38 ` Zdenek Kabelac
2019-10-11 11:50 ` Heming Zhao [this message]
2019-10-11 15:14 ` David Teigland
2019-10-12 3:23 ` Gang He
2019-10-12 6:34 ` Heming Zhao
2019-10-12 7:11 ` Heming Zhao
2019-10-14 3:07 ` Heming Zhao
2019-10-14 3:13 ` Heming Zhao
2019-10-16 8:50 ` Heming Zhao
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=9beaffc6-d70e-c6cb-a964-5ce439499d75@suse.com \
--to=heming.zhao@suse.com \
--cc=GHe@suse.com \
--cc=linux-lvm@redhat.com \
--cc=zkabelac@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 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).