Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2014-01-02 Thread Eric Blake
On 01/02/2014 01:55 AM, Stefan Hajnoczi wrote: > Okay, I think we got side-tracked worrying about identifying identical > files. The problem in your example is more fundamental. > > Here is what should have happened: > > (qemu) snapshot_blkdev drive-scsi0-0-0 /mnt/dir2/sn1 > Could not crea

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2014-01-02 Thread Stefan Hajnoczi
On Tue, Dec 10, 2013 at 09:58:44PM +0800, lijun wrote: > On 12/09/2013 08:17 PM, Stefan Hajnoczi wrote: > >On Mon, Dec 09, 2013 at 02:06:21PM +0800, jun muzi wrote: > >My question was about the bug. What is the problem you are seeing and > >how do you reproduce it (including the HMP commands)? > N

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-12-10 Thread lijun
On 12/09/2013 08:17 PM, Stefan Hajnoczi wrote: On Mon, Dec 09, 2013 at 02:06:21PM +0800, jun muzi wrote: If mount a local file(disk) in two different dirctories, it is similar to the network storage. Detecting identical "files" is still a problem. Such as: dd if=/dev/zero of=aa bs=1M count=10 m

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-12-09 Thread Stefan Hajnoczi
On Mon, Dec 09, 2013 at 02:06:21PM +0800, jun muzi wrote: > If mount a local file(disk) in two different dirctories, it is similar to the > network storage. Detecting identical "files" is still a problem. > Such as: > dd if=/dev/zero of=aa bs=1M count=10 > mkfs.ext4 aa > Then mount aa to two direct

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-12-08 Thread jun muzi
If mount a local file(disk) in two different dirctories, it is similar to the network storage. Detecting identical "files" is still a problem. Such as: dd if=/dev/zero of=aa bs=1M count=10 mkfs.ext4 aa Then mount aa to two directories. mount aa /mnt/dir1 mount aa /mnt/dir2 # tune2fs -l aa tune2fs 1

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-11-18 Thread Stefan Hajnoczi
On Fri, Nov 15, 2013 at 10:21:40AM -0700, Eric Blake wrote: > 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

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-11-15 Thread Eric Blake
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 numb

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-11-15 Thread Eric Blake
On 11/15/2013 09:22 AM, lijun wrote: > From: Jun Li > > Hi all, > > snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same > file. When file /root/sn1 is the base file, do snapshot using file > //root/sn1, qemu consider it as a new file. So this will rewrite the > base file. Care

Re: [Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-11-15 Thread Max Reitz
On 15.11.2013 17:31, lijun wrote: > From: Jun Li > > Hi all, > > snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same > file. when file /root/sn1 is the base file, do snapshot using file > //root/sn1, qemu consider it as a new file. So this will rewrite the > base file. Actually,

[Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-11-15 Thread lijun
From: Jun Li Hi all, snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file. when file /root/sn1 is the base file, do snapshot using file //root/sn1, qemu consider it as a new file. So this will rewrite the base file. Signed-off-by: Jun Li --- a/hmp.c2013-11-15 23

[Qemu-devel] [PATCH] HMP: snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file

2013-11-15 Thread lijun
From: Jun Li Hi all, snapshot_blkdev can not consider //root/sn1 and /root/sn1 as the same file. When file /root/sn1 is the base file, do snapshot using file //root/sn1, qemu consider it as a new file. So this will rewrite the base file. Signed-off-by: Jun Li --- a/hmp.c2013-11-15 23