From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46239) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhN5Z-0000Xr-0c for qemu-devel@nongnu.org; Fri, 15 Nov 2013 12:21:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VhN5U-0005Z7-LL for qemu-devel@nongnu.org; Fri, 15 Nov 2013 12:21:48 -0500 Received: from mx1.redhat.com ([209.132.183.28]:23713) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VhN5U-0005YS-Ci for qemu-devel@nongnu.org; Fri, 15 Nov 2013 12:21:44 -0500 Message-ID: <52865824.7070600@redhat.com> Date: Fri, 15 Nov 2013 10:21:40 -0700 From: Eric Blake MIME-Version: 1.0 References: <52864C79.20800@gmail.com> <52864EEE.3000900@redhat.com> In-Reply-To: <52864EEE.3000900@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WRskDWPsBbjR3t9eNcfR8uN0beFWNxLaV" Subject: Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz , lijun , qemu-devel@nongnu.org Cc: lcapitulino@redhat.com This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --WRskDWPsBbjR3t9eNcfR8uN0beFWNxLaV Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 =E2=80=9C.=E2=80=9D and =E2=80=9C..=E2=80=9D in it =E2=80=93 = 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). --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --WRskDWPsBbjR3t9eNcfR8uN0beFWNxLaV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.15 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJShlgkAAoJEKeha0olJ0NqAHgH/RBFZKhmLfo7TUDtcFi+gSil Ct0pDv54w0cDF26+HnMak0MpFKZWAMe/NuLi+UQVGHXu6F/A73f1ZFCQ4XYtSp+7 nqXVMxjxzX6D3shj8bWIW/bFDCYiv+PwIbeEBSvbW5gWjlCNTVfeiu/jIs6Xjqgr gTTpGmZlpaEYXESa1HNJdRz3bE3zj1DR9V5SVA/8RXCqVdaKGRZzEgyLtkJUYO0q XLlVnQMlUv8cYoMN6t6LyHW+53CDwiPRFEzzMjrG/sFu3ydEJwcjXWMk6liEcJDO RxjhByws7LlZXBe6ut/VmaMO3KWDF2ikNaXaIeIqYiNsfod2oVghdGXgqh0AyJc= =LiEN -----END PGP SIGNATURE----- --WRskDWPsBbjR3t9eNcfR8uN0beFWNxLaV--