Subject: Re: bug#19072: cp does not work with davfs2 (fuse) under GNU/Linux; coreutils-8.21

From: Klaus-Jürgen Wolf <[email-masked]>
Date: Mon, 17 Nov 2014 15:36:24 +0100

I have to correct my former comment: cp --sparse=never only works with very
small files, e.g. 542 bytes.

(PWD=/home/kj/MyDrive)

$ /bin/cp --sparse=never ~/prj/kaese/cpp/Makefile .
$ stat Makefile
  File: ‘Makefile’
  Size: 542             Blocks: 2          IO Block: 4096   regular file
Device: 28h/40d Inode: 18825536    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/      kj)   Gid: ( 1000/      kj)
Access: 2014-11-17 15:27:05.000000000 +0100
Modify: 2014-11-17 15:27:05.000000000 +0100
Change: 2014-11-17 15:27:05.000000000 +0100
 Birth: -

$ dd if=/dev/zero conv=notrunc count=1 seek=1 of=/home/kj/MyDrive/eio.test
1+0 records in
1+0 records out
512 bytes (512 B) copied, 0.00248944 s, 206 kB/s

But, with longer files:

$ /bin/cp --sparse=never ~/Tc7200.bin .
/bin/cp: error writing ‘./Tc7200.bin’: Input/output error
/bin/cp: failed to extend ‘./Tc7200.bin’: Input/output error

$ ll ~/Tc7200.bin
-rw-r--r-- 1 kj kj 26296 Sep  8 21:45 /home/kj/Tc7200.bin

I need to say that using tar, I can produce much longer files:

$ stat kaese20141116.7z
  File: ‘kaese20141116.7z’
  Size: 981305          Blocks: 1917       IO Block: 4096   regular file
Device: 28h/40d Inode: 18802464    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/      kj)   Gid: ( 1000/      kj)
Access: 2014-11-16 11:13:20.000000000 +0100
Modify: 2014-11-16 11:12:48.000000000 +0100
Change: 2014-11-16 11:12:55.000000000 +0100
 Birth: -