On Sat, Jul 27, 2019 at 07:26:28AM +0800, Qu Wenruo wrote:
> [snip]
> > 
> >> +  }
> >> +
> >> +  read_extent_buffer(leaf, &ri, btrfs_item_ptr_offset(leaf, slot),
> >> +                     sizeof(ri));
> >> +
> >> +  /* Generateion related */
> > 
> > typo here and a few more times below
> > 
> >> +  if (btrfs_root_generation(&ri) >
> >> +      btrfs_super_generation(fs_info->super_copy) + 1) {
> >> +          generic_err(leaf, slot,
> >> +                  "invalid root generaetion, have %llu expect (0, %llu]",
> >> +                      btrfs_root_generation(&ri),
> >> +                      btrfs_super_generation(fs_info->super_copy) + 1);
> >> +          return -EUCLEAN;
> >> +  }
> >> +  if (btrfs_root_generation_v2(&ri) >
> >> +      btrfs_super_generation(fs_info->super_copy) + 1) {
> >> +          generic_err(leaf, slot,
> >> +          "invalid root v2 generaetion, have %llu expect (0, %llu]",
> > 
> > So (0, %llu] here means that it must be greater than zero, right? I'm
> > not sure that everyone uses the same notation for open/closed notation.
> 
> AFAIK in tree checker it's all the same notation.
> 
> Or any better solution for that?

No this one is fine, let's use it and eventualy update comments or
messages where this notation is not used.

Reply via email to