All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails
@ 2016-11-28  7:27 Tsutomu Itoh
  2016-11-29 15:18 ` Oliver Freyermuth
  2016-11-29 15:34 ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Tsutomu Itoh @ 2016-11-28  7:27 UTC (permalink / raw)
  To: David Sterba; +Cc: Linux Btrfs

Hi, David,

Many test of xfstests such as btrfs/007, btrfs/008 and btrfs/016 failed
with the following patch.

  fefbab75  btrfs-progs: send-stream: check number of read bytes from stream

This is because cmds-receive.c:do_receive() make a judgement of the end
of stream by returning 1 from send-stream.c:read_buf().
So, when applying this patch, 'btrfs receive' will always output the
following message at the end of stream.

  ERROR: short read from stream: expected 17 read 0

Thanks,
Tsutomu


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails
  2016-11-28  7:27 [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails Tsutomu Itoh
@ 2016-11-29 15:18 ` Oliver Freyermuth
  2016-11-29 15:34 ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: Oliver Freyermuth @ 2016-11-29 15:18 UTC (permalink / raw)
  To: linux-btrfs

Hi, 

just to chime in on this: This issue also affects me as a "downstream" user, 
so it also breaks real-life usecases. 

I use btrbk for backup, and when performing a regular incremental backup,
after switching to btrfs-progs 4.8.4, I get the same "short read from stream" problem. 

Internally, btrbk issues something along the lines of:
btrfs send -p /mnt/btrfs_pool/_btrbk_snap/home.20161127T020001+0100 /mnt/btrfs_pool/_btrbk_snap/home.20161127T030001+0100 | btrfs receive /mnt/btrfs_backup/alien17/
which then exits with a non-zero return code due to the "short read from stream" issue. 

Needless to say, everything is fine again after downgrade to btrfs-progs 4.8.3. 

Cheers, 
	Oliver

PS: While I will check back for replies in the archive, a courtesy cc will be 
appreciated since I am not subscribed to the list.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails
  2016-11-28  7:27 [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails Tsutomu Itoh
  2016-11-29 15:18 ` Oliver Freyermuth
@ 2016-11-29 15:34 ` David Sterba
  2016-11-30  6:42   ` Tsutomu Itoh
  1 sibling, 1 reply; 4+ messages in thread
From: David Sterba @ 2016-11-29 15:34 UTC (permalink / raw)
  To: Tsutomu Itoh; +Cc: David Sterba, Linux Btrfs

On Mon, Nov 28, 2016 at 04:27:06PM +0900, Tsutomu Itoh wrote:
> Many test of xfstests such as btrfs/007, btrfs/008 and btrfs/016 failed
> with the following patch.
> 
>   fefbab75  btrfs-progs: send-stream: check number of read bytes from stream
> 
> This is because cmds-receive.c:do_receive() make a judgement of the end
> of stream by returning 1 from send-stream.c:read_buf().
> So, when applying this patch, 'btrfs receive' will always output the
> following message at the end of stream.
> 
>   ERROR: short read from stream: expected 17 read 0

Thanks for the report, should be fixed in devel, I'm also adding more
tests.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails
  2016-11-29 15:34 ` David Sterba
@ 2016-11-30  6:42   ` Tsutomu Itoh
  0 siblings, 0 replies; 4+ messages in thread
From: Tsutomu Itoh @ 2016-11-30  6:42 UTC (permalink / raw)
  To: dsterba; +Cc: Linux Btrfs

Hi David,

On 2016/11/30 0:34, David Sterba wrote:
> On Mon, Nov 28, 2016 at 04:27:06PM +0900, Tsutomu Itoh wrote:
>> Many test of xfstests such as btrfs/007, btrfs/008 and btrfs/016 failed
>> with the following patch.
>>
>>   fefbab75  btrfs-progs: send-stream: check number of read bytes from stream
>>
>> This is because cmds-receive.c:do_receive() make a judgement of the end
>> of stream by returning 1 from send-stream.c:read_buf().
>> So, when applying this patch, 'btrfs receive' will always output the
>> following message at the end of stream.
>>
>>   ERROR: short read from stream: expected 17 read 0
> 
> Thanks for the report, should be fixed in devel, I'm also adding more
> tests.

I tried devel branch, btrfs/007 works fine. Thanks for your work.
But I found another problem in current devel branch.

btrfs/008, btrfs/016 etc. fail due to the following patch, probably.

   btrfs-progs: rework option parser to use getopt for global options

Thanks,
Tsutomu


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-11-30  6:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-28  7:27 [bug] btrfs-progs-v4.8.4: test of 'btrfs receive' in xfstests fails Tsutomu Itoh
2016-11-29 15:18 ` Oliver Freyermuth
2016-11-29 15:34 ` David Sterba
2016-11-30  6:42   ` Tsutomu Itoh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.