[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file |
Date: |
Fri, 15 Nov 2013 10:21:40 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 |
On 11/15/2013 09:42 AM, Max Reitz wrote:
> Actually, the same problem can occur anyway if you have a path with a
> couple of “.” and “..” in it – or even just a hardlink. Thus, to be
> completely safe, we'd have to check whether the snapshot file (if it
> already exists) has a different inode number and/or is located on a
> different filesystem.
See also the recent thread on detecting backing file loops - this should
be part of that solution (if it isn't already):
https://lists.gnu.org/archive/html/qemu-devel/2013-11/msg01840.html
Backing file loops might get away with string-only detection; but then I
start to worry that the string-only detection will misbehave on relative
paths (consider: /dir1/a <- /dir1/b [backed by relative 'a'] <- /dir2/a
[backed by absolute /dir1/b] <- /dir2/a [backed by relative 'a']);
devno/inode pairs are the only reliable to detect loops when only the
filesystem is involved, but then you also introduce network protocols
(and there, it's worse: gluster://host1/vol/img and
gluster://host2/vol/img could be the same file, if host1 and host2 are
part of the same storage cluster, but there is no devno/inode to tell
you that).
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature