diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2013-06-14 09:51:09 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2013-06-16 00:07:32 +0200 |
commit | 02405219424619a56e7e3a3619e157f942e4fdb4 (patch) | |
tree | 82a76799ca8990572ab1ebf17560665bbe552857 | |
parent | a040dd8cfb8828e07a4df00117d89173562ab8be (diff) | |
download | lvm2-02405219424619a56e7e3a3619e157f942e4fdb4.tar.gz |
cleanup: add extra internal error
Ensure the target line will work only with segment with pool.
-rw-r--r-- | lib/thin/thin.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/thin/thin.c b/lib/thin/thin.c index d1ffd27a5..116b7e109 100644 --- a/lib/thin/thin.c +++ b/lib/thin/thin.c @@ -493,6 +493,11 @@ static int _thin_add_target_line(struct dev_manager *dm, char *pool_dlid, *external_dlid; uint32_t device_id = seg->device_id; + if (!seg->pool_lv) { + log_error(INTERNAL_ERROR "Segment %s has no pool.", + seg->lv->name); + return 0; + } if (!(pool_dlid = build_dm_uuid(mem, seg->pool_lv->lvid.s, lv_layer(seg->pool_lv)))) { log_error("Failed to build uuid for pool LV %s.", seg->pool_lv->name); |