Re: [PATCH] Btrfs: Improve btrfs_ioctl_search_key documentation

2017-06-05 Thread Hans van Kranenburg
On 06/05/2017 09:00 PM, Goffredo Baroncelli wrote: > On 2017-06-05 17:27, Hans van Kranenburg wrote: >> + * When doing a tree search, we're actually taking a slice from a linear >> + * search space of 136-bit keys: >> + * >> + * Key of the first possible item to be returned: >> +

Re: [PATCH] Btrfs: Improve btrfs_ioctl_search_key documentation

2017-06-05 Thread Goffredo Baroncelli
On 2017-06-05 17:27, Hans van Kranenburg wrote: > + * When doing a tree search, we're actually taking a slice from a linear > + * search space of 136-bit keys: > + * > + * Key of the first possible item to be returned: > + * (min_objectid << 72) + (min_type << 64) + min_o

Re: [PATCH] Btrfs: Improve btrfs_ioctl_search_key documentation

2017-06-05 Thread Hans van Kranenburg
On 06/05/2017 05:27 PM, Hans van Kranenburg wrote: > A programmer who is trying to implement calling the btrfs SEARCH > or SEARCH_V2 ioctl will probably soon end up reading this struct > definition. > > Properly document the input fields to prevent common misconceptions: > 1. The search space is

[PATCH] Btrfs: Improve btrfs_ioctl_search_key documentation

2017-06-05 Thread Hans van Kranenburg
A programmer who is trying to implement calling the btrfs SEARCH or SEARCH_V2 ioctl will probably soon end up reading this struct definition. Properly document the input fields to prevent common misconceptions: 1. The search space is linear, not 3 dimensional. 2. The transaction id (a.k.a. gener