Re: [PATCH v2] btrfs: Add self-tests for btrfs_rmap_block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 10, 2020 at 04:46:20PM +0200, Nikolay Borisov wrote:
> >> +	int expected_mapped_addr;
> > 
> > This should be bool
> 
> Actually the idea here is for expected_mapped_addr to contains the
> number of addresses we are expected to map. Currently tests only expect
> 0 or 1 but if tests are expanded in the future  this might be 2 or 3.
> 
> THe body of the test does:
> 
>  if (out_ndaddrs != test->expected_mapped_addr) {
>                   for (i = 0; i < out_ndaddrs; i++)
> 
>                           test_msg("Mapped %llu", logical[i]);

Ok, int is fine then.

> >> +	struct rmap_test_vector rmap_tests[] = {
> >> +		{
> >> +			/*
> >> +			 * Tests a chunk with 2 data stripes one of which
> >> +			 * interesects the physical address of the super block
> >> +			 * is correctly recognised.
> >> +			 */
> >> +			.raid_type = BTRFS_BLOCK_GROUP_RAID1,
> >> +			.physical_start = SZ_64M - SZ_4M,
> >> +			.data_stripe_size = SZ_256M,
> >> +			.num_data_stripes = 2,
> >> +			.num_stripes = 2,
> >> +			.data_stripe_phys_start = {SZ_64M - SZ_4M, SZ_64M - SZ_4M + SZ_256M},
> > 
> > Formatting
> 
> What do you mean?

Line over 80 cols



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux