DD-ing from device to device.

Rogier Wolff (R.E.Wolff@BitWizard.nl)
Sun, 18 Nov 2001 14:26:19 +0100 (MET)


Hi,

I should NOT get a "file too large" error when copying from a device
to a device, right?

I should NOT get a "file too large" if the files are openeed using
the "O_LARGEFILE" option, right?

Well:

execve("/bin/dd", ["dd", "if=/dev/hda", "of=/dev/hdc", "bs=1024k", "count=10"], [/* 46 vars */]) = 0
[... libs and stuff ... ]
open("/dev/hda", O_RDONLY|O_LARGEFILE) = 4
open("/dev/hdc", O_RDWR|O_CREAT|O_TRUNC|O_LARGEFILE, 0666) = 5
[....signals and stuff. ]
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
munmap(0x400fb000, 1052672) = 0
write(2, "10+0 records in\n", 16) = 16
write(2, "10+0 records out\n", 17) = 17
close(4) = 0
close(5) = 0
_exit(0) = ?

But without the "count=10" I get:

read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048576
read(4, ""..., 1048576) = 1048576
write(5, ""..., 1048576) = 1048575
write(5, ".", 1) = -1 EFBIG (File too large)

This is on 2.2.14. I Could swear we made a working copy of a disk 30
minutes earlier....

Roger.

-- 
** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2137555 **
*-- BitWizard writes Linux device drivers for any device you may have! --*
* There are old pilots, and there are bold pilots. 
* There are also old, bald pilots. 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/