[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [libvirt PATCH] storage: Skip not active lv volumes

On 07/05/13 22:47, Eric Blake wrote:
On 05/07/2013 04:29 AM, Osier Yang wrote:
If the volume is of a clustered volume group, and not active, the
related pool APIs fails on open /dev/vg/lv. If the volume is suspended,
it hangs on open(2) the volume.

Though the best solution is to expose the volume status in volume
XML, and even better to provide API to active/deactive the volume,

but it's not the work I want to touch currently. Volume status in
other status is just fine to skip.
Yeah, nice ideas for future improvement, and not as important as fixing
the bug now.

About the 5th field of lv_attr (from man lvs[8])
  5 State: (a)ctive, (s)uspended, (I)nvalid snapshot, invalid
    (S)uspended snapshot, snapshot (m)erge failed,suspended
    snapshot (M)erge failed, mapped (d)evice present without
    tables,  mapped device present with (i)nactive table
  src/storage/storage_backend_logical.c | 29 +++++++++++++++++++----------
  1 file changed, 19 insertions(+), 10 deletions(-)

      int i, err, nextents, nvars, ret = -1;
+    const char *attrs = groups[9];
+    /* Skip not active volume */
s/not active/inactive/

Thanks, pushed with the changes.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]