Re: [PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
On Thu, Apr 08, 2021 at 04:16:28PM -0700, Eric Biggers wrote: > On Thu, Apr 08, 2021 at 11:49:37AM -0700, Boris Burkov wrote: > > On Thu, Apr 08, 2021 at 11:41:42AM -0700, Eric Biggers wrote: > > > On Thu, Apr 08, 2021 at 11:30:12AM -0700, Boris Burkov wrote: > > > > > > > > Note that there is a b

Re: [PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Eric Biggers
On Thu, Apr 08, 2021 at 11:49:37AM -0700, Boris Burkov wrote: > On Thu, Apr 08, 2021 at 11:41:42AM -0700, Eric Biggers wrote: > > On Thu, Apr 08, 2021 at 11:30:12AM -0700, Boris Burkov wrote: > > > > > > Note that there is a bit of a kludge here: since btrfs_corrupt_block > > > doesn't handle stre

Re: [PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
On Thu, Apr 08, 2021 at 11:41:42AM -0700, Eric Biggers wrote: > On Thu, Apr 08, 2021 at 11:30:12AM -0700, Boris Burkov wrote: > > > > Note that there is a bit of a kludge here: since btrfs_corrupt_block > > doesn't handle streaming corruption bytes from stdin (I could change > > that, but it feels

Re: [PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Eric Biggers
On Thu, Apr 08, 2021 at 11:30:12AM -0700, Boris Burkov wrote: > > Note that there is a bit of a kludge here: since btrfs_corrupt_block > doesn't handle streaming corruption bytes from stdin (I could change > that, but it feels like overkill for this purpose), I just read the > first corruption byt

[PATCH v2 2/3] generic/574: corrupt btrfs merkle tree data

2021-04-08 Thread Boris Burkov
generic/574 has tests for corrupting the merkle tree data stored by the filesystem. Since btrfs uses a different scheme for storing this data, the existing logic for corrupting it doesn't work out of the box. Adapt it to properly corrupt btrfs merkle items. Note that there is a bit of a kludge her