mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
thin: always clear memory before parsing status
Ensure there cannot be 'reused' any data from some previous call.
This commit is contained in:
parent
2166d7be72
commit
2208ebfe16
@ -1,5 +1,6 @@
|
|||||||
Version 2.02.177 -
|
Version 2.02.177 -
|
||||||
====================================
|
====================================
|
||||||
|
Ensure _node_send_message always uses clean status of thin pool.
|
||||||
Fix lvmlockd to use pool lock when accessing _tmeta volume.
|
Fix lvmlockd to use pool lock when accessing _tmeta volume.
|
||||||
Report expected sanlock_convert errors only when retries fail.
|
Report expected sanlock_convert errors only when retries fail.
|
||||||
Avoid blocking in sanlock_convert on SH to EX lock conversion.
|
Avoid blocking in sanlock_convert on SH to EX lock conversion.
|
||||||
|
@ -1493,7 +1493,7 @@ static int _node_send_messages(struct dm_tree_node *dnode,
|
|||||||
{
|
{
|
||||||
struct load_segment *seg;
|
struct load_segment *seg;
|
||||||
struct thin_message *tmsg;
|
struct thin_message *tmsg;
|
||||||
struct dm_status_thin_pool stp = { 0 };
|
struct dm_status_thin_pool stp;
|
||||||
const char *uuid;
|
const char *uuid;
|
||||||
int have_messages;
|
int have_messages;
|
||||||
|
|
||||||
|
@ -350,6 +350,8 @@ int parse_thin_pool_status(const char *params, struct dm_status_thin_pool *s)
|
|||||||
{
|
{
|
||||||
int pos;
|
int pos;
|
||||||
|
|
||||||
|
memset(s, 0, sizeof(*s));
|
||||||
|
|
||||||
if (!params) {
|
if (!params) {
|
||||||
log_error("Failed to parse invalid thin params.");
|
log_error("Failed to parse invalid thin params.");
|
||||||
return 0;
|
return 0;
|
||||||
@ -406,7 +408,7 @@ int dm_get_status_thin_pool(struct dm_pool *mem, const char *params,
|
|||||||
{
|
{
|
||||||
struct dm_status_thin_pool *s;
|
struct dm_status_thin_pool *s;
|
||||||
|
|
||||||
if (!(s = dm_pool_zalloc(mem, sizeof(struct dm_status_thin_pool)))) {
|
if (!(s = dm_pool_alloc(mem, sizeof(struct dm_status_thin_pool)))) {
|
||||||
log_error("Failed to allocate thin_pool status structure.");
|
log_error("Failed to allocate thin_pool status structure.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user