doug-gilbert / ddpt Goto Github PK
View Code? Open in Web Editor NEWofficial git-svn mirror for ddpt, yet another dd variant
Home Page: https://sg.danny.cz/sg/ddpt.html
License: Other
official git-svn mirror for ddpt, yet another dd variant
Home Page: https://sg.danny.cz/sg/ddpt.html
License: Other
Here's an example using 0.97 (also exhibited on debian's 0.95) on a BTRFS filesystem.
# ddpt if=/dev/urandom of=test seek=17,3,21,3,63,1
Assume logical block size of 512 bytes for both input and output
7+0 records in
7+0 records out
time to transfer data: 0.000213 secs at 16.83 MB/sec
# cp --reflink=always -a test{,.ssp}; ddpt if=test of=test.ssp bpt=512,1 bs=512 conv=sparse oflag=sparing
64+0 records in
7+0 records out
57 bypassed records out
time to transfer data: 0.271519 secs at 120.7 KB/sec
# filefrag -v test
Filesystem type is: 9123683e
File size of test is 32768 (8 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 2.. 2: 6298878.. 6298878: 1: 2:
1: 7.. 7: 7504901.. 7504901: 1: 6298883: last,eof
test: 2 extents found
# filefrag -v test.ssp
Filesystem type is: 9123683e
File size of test.ssp is 32768 (8 blocks of 4096 bytes)
ext: logical_offset: physical_offset: length: expected: flags:
0: 2.. 2: 7504902.. 7504902: 1: 2:
1: 7.. 7: 7504903.. 7504903: 1: last,eof
test.ssp: 1 extent found
Here it can be seen that test.ssp
contains differing extents from test
, meaning that the extents that had been reflinked were written to. The files contents are identical so sparing appears to not be adhered to. If conv=sparse
is removed, no writes are done.
Only on the website there is this documentation with respect to using sparse and sparing together:
It seems unlikely that it would be useful to have both sparse writes and write sparing active on the same OFILE. If they are both given (i.e. 'oflag=sparing,sparse') then sparse writes are checked first and if zeros are found, the check for write sparing is bypassed on that segment.
However, this only applies to when the input block is all zeroes. This implies that when a block not of all zeroes is found that the check for sparing is not skipped. What appears to be happening in this case is that the sparse check is failing, but the sparing check is not being done. Because if the sparing check had been done, no writes should occur.
Hi,
Add nvme support please.
# ddpt --version
0.95 20141226 [svn: r307]
#ddpt oflag=pt,trim bs=64K if=a.img of=/dev/nvme0n1
INQUIRY failed on /dev/nvme0n1
nvme scsi command translation is droped.
so we need some native nvme support.
Best Regards
This html document is more descriptive than the man page and the README combined. It would be nice to have it installed to /usr/share/doc/ddpt
for offline use. Also mentioning this in the man page would be helpful.
For files that have large holes in them, it makes little sense to read those holes knowing they will be zero-filled. For instance, when using sparse
mode, ddpt could seek to the end of a hole in the input with SEEK_DATA. Of course, the user could figure out the data blocks themself and use a scatter-gather list to only read the data. But it would be nice to have it be transparent.
It looks like similar functionality could be implemented for SCSI devices via the SCSI GET LBA STATUS
command to see what blocks are mapped.
The subdirectory "release-0.96" was added in commit 477d402. I'm guessing this was an accident and the intention, according to the commit message was to create a tag. Although it looks to come from an SVN commit, so maybe this was intentional.
Since it doesn't appear as though this repo is heavily used, I think it reasonable to remove the commit and do a force push (rewrite history).
The README mentions that "improvement/bug feedback are encouraged", but no information is given as to how this should be done. Grepping the source, there are various places where the email "dgilbert at interlog.com" is given for bug reports, though it is not mentioned in the README. This repo is mentioned at https://sg.danny.cz/sg as a mirror for ddpt, but it is not explained whether issues or pull requests are acceptable forms of communicating bugs/fixes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.