On Mon, Nov 11, 2019 at 06:17:17PM +0800, Su Yue wrote: > >>>> + * Return the block group that contains or after bytenr > >>>> + */ > >>> > >>> What about "Return the block group thart starts at or after @bytenr" ? > >>> > >> > >> That's what documented in kernel already. > >> The thing I try to express is "contains". > >> For such a block group marked as B[n, m). > >> btrfs_lookup_first_block_group(x) (x > n && x < m). Kernel code will > >> return the block group next to B. However, progs side will return the > >> block group B. > > > > "Contains" indeed covers your example. > > But the "after @bytenr" part looks strange to me. > > > > Did you mean if @bytenr is not covered by any block group, then the next > > block group starts after @bytenr is returned? > > > Yes, that's precisely what I mean. I'll use the wording as suggested by Qu. Thanks.
