<div class="zcontentRow"><p style="font-size:14px;font-family:arial;"><span style="line-height: 21px;">>> ---</span><br style="white-space: normal;"><span style="line-height: 21px;">>> Patch v1:</span><br style="white-space: normal;"><span style="line-height: 21px;">>> https://www.redhat.com/archives/libvir-list/2019-June/msg01248.html</span><br style="white-space: normal;"><span style="line-height: 21px;">>> </span><br style="white-space: normal;"><span style="line-height: 21px;">>> Changes in v2:</span><br style="white-space: normal;"><span style="line-height: 21px;">>>  - Adding a "stype" field for the --diskspec string which will indicate a "file" or "block" storage type.</span><br style="white-space: normal;">><br style="white-space: normal;"><span style="line-height: 21px;">> I'm a little late for bike-shedding, but could we have supported:</span><br style="white-space: normal;"><span style="line-height: 21px;">> --diskspec vda,block=/dev/xxx</span><br style="white-space: normal;"><span style="line-height: 21px;">> instead of the more verbose</span><br style="white-space: normal;"><span style="line-height: 21px;">> --diskspec vda,file=/dev/xxx,stype=block</span></p><p style="font-size:14px;font-family:arial;">This way is concise and more directly. Both OK c<span style="font-family: arial; line-height: 21px;">urrently</span>.</p><p style="font-size:14px;font-family:arial;">But if --diskspec options extend in the future, </p><p style="font-size:14px;font-family:arial;">e.g. <span style="line-height: 21px;">--diskspec vda,stype=block,file=/dev/xxx,running=/dev/yyy,backing=/dev/zzz,...</span></p><p style="font-size:14px;font-family:arial;">maybe 'stype' is a unified way to <span style="line-height: 21px;">indicate those</span> storage types other than change prefix name.</p><p style="font-size:14px;font-family:arial;"><br></p><p style="font-size:14px;font-family:arial;"><br></p><div><div class="zhistoryRow" style=""><div class="zhistoryDes" style="width: 100%; height: 28px; line-height: 28px; background-color: #E0E5E9; color: #1388FF; text-align: center;" language-data="HistoryOrgTxt">原始邮件</div><div id="zwriteHistoryContainer"><div class="control-group zhistoryPanel"><div class="zhistoryHeader" style="padding: 8px; background-color: #F5F6F8;"><div><strong language-data="HistorySenderTxt">发件人:</strong><span class="zreadUserName">EricBlake <eblake@redhat.com></span></div><div><strong language-data="HistoryTOTxt">收件人:</strong><span class="zreadUserName" style="display: inline;">刘大宇10031743;</span><span class="zreadUserName" style="display: inline;">libvir-list@redhat.com <libvir-list@redhat.com>;</span></div><div><strong language-data="HistoryCCTxt">抄送人:</strong><span class="zreadUserName" style="display: inline;">汪翼10129963;</span><span class="zreadUserName" style="display: inline;">王业超10154425;</span></div><div><strong language-data="HistoryDateTxt">日 期 :</strong><span class="">2019年07月09日 21:48</span></div><div><strong language-data="HistorySubjectTxt">主 题 :</strong><span class="zreadTitle"><strong>Re: [libvirt] [PATCH v2] libvirt: support block device storage typein virshParseSnapshotDiskspec</strong></span></div></div><div class="zhistoryContent"><div>On 7/8/19 4:46 AM, Liu Dayu wrote:<br>> virsh snapshot-create-as supports 'file' storage type in --diskspec by default.<br>> But it doesn't support 'block' storage type in the virshParseSnapshotDiskspec().<br>> So if a snapshot on a block device (e.g. LV) was created, the type of<br>> current running storage source in dumpxml is inconsistent with the actual<br>> backend storage source. It will check file-system type mismatch failed<br>> and return an error message of 'Migration without shared storage is unsafe'<br>> when VM performs a live migration after this snapshot.<br>> <br>> Considering virsh has to be able to work remotely that recognizing a block device<br>> by prefix /dev/ or by stat() may be not suitable, so adding a "stype" field<br>> for the --diskspec string which will be either "file" or "block".<br>> e.g. --diskspec vda,snapshot=external,driver=qcow2,stype=block,file=/dev/xxx.<br>> <br>> Signed-off-by: Liu Dayu <liu.dayu@zte.com.cn><br>> ---<br>> Patch v1:<br>> https://www.redhat.com/archives/libvir-list/2019-June/msg01248.html<br>> <br>> Changes in v2:<br>>  - Adding a "stype" field for the --diskspec string which will indicate a "file" or "block" storage type.<br><br>I'm a little late for bike-shedding, but could we have supported:<br>--diskspec vda,block=/dev/xxx<br>instead of the more verbose<br>--diskspec vda,file=/dev/xxx,stype=block<br><br><br>-- <br>Eric Blake, Principal Software Engineer<br>Red Hat, Inc.           +1-919-301-3226<br>Virtualization:  qemu.org | libvirt.org<br><br></div></div></div></div></div></div><p><br></p></div>