Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
dattobd built or tested to work with anything but 4k pages currently,4k cow blocks not always page aligned when page size is 64k, this patch add 64k PAGE_SIZE compatibility。
following is test result of this patch on system with 64k pagesize:
[root@localhost ~]# getconf PAGESIZE
65536
[root@localhost ~]# dbdctl setup-snapshot /dev/sda1 /mnt/.datto1 1
[root@localhost ~]# dd if=/dev/datto1 of=/tmp/sda1.img bs=1M
记录了1024+0 的读入
记录了1024+0 的写出
1073741824字节(1.1 GB,1.0 GiB)已复制,2.09144 s,513 MB/s
[root@localhost ~]# dd if=/dev/urandom of=/mnt/data bs=1M count=100
记录了100+0 的读入
记录了100+0 的写出
104857600字节(105 MB,100 MiB)已复制,0.394681 s,266 MB/s
[root@localhost ~]# dbdctl transition-to-incremental 1
[root@localhost ~]# dbdctl transition-to-snapshot /mnt/.datto2 1
[root@localhost ~]# update-img /dev/datto1 /mnt/.datto1 /tmp/sda1.img
snapshot is 262144 blocks large
copying blocks
copying complete: 25624 blocks changed, 0 errors
[root@localhost ~]# mount -o nouuid /tmp/sda1.img /tmp/X
[root@localhost ~]# md5sum /mnt/data
206ecf8bf19227ec78ef41970fe9e034 /mnt/data
[root@localhost ~]# md5sum /tmp/X/data
206ecf8bf19227ec78ef41970fe9e034 /tmp/X/data
[root@localhost ~]#