HarryWei / cloudxy

Automatically exported from code.google.com/p/cloudxy
6 stars 3 forks source link

QEMU clone question #29

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. git clone git://git.qemu.org/qemu.git
2. cd qemu
3, git reset --hard v1.3.0
4. cp ../hlfs/patches/hlfs_driver_for_qemu.patch ./ 
5. git apply hlfs_driver_for_qemu.patch
6, Modify the dead path
7, ./configure 
8, make
9, ./qemu-img create -f hlfs hlfs:local:///tmp/testenv/testfs 10G
10,./qemu-img create -f hlfs hlfs:local:///tmp/testenv/testfs1 10G
11,./qemu-img snapshot -c snapshot1 hlfs:local:///tmp/testenv/testfs 
12,./qemu-img rebase -b local:///tmp/testenv/testfs%snapshot1 
hlfs:local:///tmp/testenv/testfs1

What is the expected output? What do you see instead?
Expected output:
$ cat /tmp/testenv/testfs1/superblock 

[METADATA]
uri=local:///tmp/testenv/testfs1
block_size=8192
segment_size=67108864
max_fs_size=1024
is_compress=0
from_segno=0
father_uri=local:///tmp/testenv/testfs
father_ss=snapshot1
snapshot_inode=0

See instead:
$ cat /tmp/testenv/testfs1/superblock 

[METADATA]
uri=local:///tmp/testenv/testfs1
block_size=8192
is_compress=0
segment_size=67108864
max_fs_size=10240

Original issue reported on code.google.com by harryxi...@gmail.com on 23 Jan 2013 at 12:58

GoogleCodeExporter commented 9 years ago
Expected output should be:
Expected output:
$ cat /tmp/testenv/testfs1/superblock 

[METADATA]
uri=local:///tmp/testenv/testfs1
block_size=8192
segment_size=67108864
max_fs_size=1024
is_compress=0
from_segno=1
father_uri=local:///tmp/testenv/testfs
father_ss=snapshot1
snapshot_inode=0

NOTE: 0.seg is used by base device, so first one is 1.

Original comment by harryxi...@gmail.com on 24 Jan 2013 at 11:23

GoogleCodeExporter commented 9 years ago
qemu-img: Could not open old backing file ''

This is the exactly bug logs of this bug!

Original comment by harryxi...@gmail.com on 24 Jan 2013 at 12:19

GoogleCodeExporter commented 9 years ago
$ ./qemu-img rebase -f hlfs -b hlfs:local:///tmp/testenv/testfs%snapshot1 
hlfs:local:///tmp/testenv/testfs1
enter func init_storage_handler
loc [fs:testfs1], 

uri:local:///tmp/testenv/testfs1,head:local,dir:/tmp/testenv,fsname:testfs1,host
name:default,port:0,user:kanghua
leave func init_storage_handler
enter func init_from_superblock
SEGMENT_SIZE:67108864,HBLOCK_SIZE:8192
father uri:(null)
enter func get_cur_latest_segment_info
how much file :1

7777 file:superblock,size:116,time:1359033991

7777 file:,size:0,time:0

leave func get_cur_latest_segment_info
Raw Hlfs Ctrl Init Over ! 
uri:local:///tmp/testenv/testfs1,max_fs_size:10240,seg_size:67108864,block_size:
8192,last_segno:0,last_offset:0,start_segno:0,io_nonactive_period:10
enter func seg_clean_task
 we should do clean in silent period ;access timestamp:0,cur timestamp:1359034044240
Data Block Cache Init Over ! 
cache_size:4096,block_size:8192,flush_interval:5,flush_trigger_level:80,flush_on
ce_size:64
-- flush worker doing --
--iblock_size:8192,icache_size:1024,invalidate_trigger_level:90,invalidate_once_
size:64
Indirect  Block Cache Init Over ! 
icache_size:1024,iblock_size:8192,invalidate_trigger_level:90,invalidate_once_si
ze:64
enter func hlfs_open
inode no 0 , inode address 0
empty filesystem testfs1
create new fs inode !
ctrl->rw_inode_flag:1
do not need read alive snapshot file
leave func hlfs_open
qemu-img: Could not open old backing file ''
hlfs close over !
enter func deinit_storage_handler
disconnect succ
leave func deinit_storage_handler
 time wait res for cond is :1 !
-- flush worker should exit --
--flush worker exit--
--Entering func icache_destroy
--Leaving func icache_destroy
leave func seg_clean_task

Original comment by harryxi...@gmail.com on 24 Jan 2013 at 1:28

GoogleCodeExporter commented 9 years ago

Original comment by kanghua...@gmail.com on 9 Feb 2013 at 6:24