Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-15 Thread Chris Mason
Excerpts from Li Zefan's message of 2010-12-14 22:33:33 -0500: Suppose to have the following sequence keys [objectid, type, offset]: [...] 1)[300, BTRFS_EXTENT_DATA_KEY, xx] 2)[300, BTRFS_INODE_ITEM_KEY, xx] 3)[300, BTRFS_XATTR_ITEM_KEY, xx] 4)[301,

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-15 Thread Goffredo Baroncelli
On Wednesday, 15 December, 2010, Chris Mason wrote: Excerpts from Li Zefan's message of 2010-12-14 22:33:33 -0500: Suppose to have the following sequence keys [objectid, type, offset]: [...] 1)[300, BTRFS_EXTENT_DATA_KEY, xx] 2)[300, BTRFS_INODE_ITEM_KEY, xx] 3)

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-15 Thread Goffredo Baroncelli
On Wednesday, 15 December, 2010, Li Zefan wrote: Goffredo Baroncelli wrote: On Wednesday, 15 December, 2010, Li Zefan wrote: h4) objectid asis, type asis, offset++ - we should get the correct result. This fix the problem of the missing subvolume. But for the other case (searching for

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-15 Thread Chris Mason
Excerpts from Goffredo Baroncelli's message of 2010-12-15 13:42:23 -0500: On Wednesday, 15 December, 2010, Chris Mason wrote: Excerpts from Li Zefan's message of 2010-12-14 22:33:33 -0500: Suppose to have the following sequence keys [objectid, type, offset]: [...] 1)[300,

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-15 Thread Goffredo Baroncelli
On Wednesday, 15 December, 2010, Chris Mason wrote: [...] Hi Chris, I am a bit confused about your answer. The actual API is a bit confused (or almost not obvious). An application in order to work properly has to make some adjustment to the min_* fields AND filter the results

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-15 Thread Li Zefan
02:48, Goffredo Baroncelli wrote: On Wednesday, 15 December, 2010, Li Zefan wrote: Goffredo Baroncelli wrote: On Wednesday, 15 December, 2010, Li Zefan wrote: h4) objectid asis, type asis, offset++ - we should get the correct result. This fix the problem of the missing subvolume. But for

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-14 Thread Goffredo Baroncelli
On Tuesday, 14 December, 2010, Li Zefan wrote: Goffredo Baroncelli wrote: Hi Li, On Monday, 13 December, 2010, Li Zefan wrote: The keys returned by tree search ioctl should be restricted to: key.objectid = [min_objectid, max_objectid] key.offset = [min_offset, max_offset]

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-14 Thread Li Zefan
Goffredo Baroncelli wrote: On Tuesday, 14 December, 2010, Li Zefan wrote: Goffredo Baroncelli wrote: Hi Li, On Monday, 13 December, 2010, Li Zefan wrote: The keys returned by tree search ioctl should be restricted to: key.objectid = [min_objectid, max_objectid] key.offset =

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-14 Thread Goffredo Baroncelli
On Wednesday, 15 December, 2010, Li Zefan wrote: h4) objectid asis, type asis, offset++ - we should get the correct result. This fix the problem of the missing subvolume. But for the other case (searching for more than one type) the problem still here. because the current ioctl uses

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-14 Thread Li Zefan
Goffredo Baroncelli wrote: On Wednesday, 15 December, 2010, Li Zefan wrote: h4) objectid asis, type asis, offset++ - we should get the correct result. This fix the problem of the missing subvolume. But for the other case (searching for more than one type) the problem still here. I don't

Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-13 Thread Goffredo Baroncelli
Hi Li, On Monday, 13 December, 2010, Li Zefan wrote: The keys returned by tree search ioctl should be restricted to: key.objectid = [min_objectid, max_objectid] key.offset = [min_offset, max_offset] key.type = [min_type, max_type] But actually it returns those

Re: Bug in the design of the tree search ioctl API ? [was Re: [PATCH 1/3] Btrfs: Really return keys within specified range]

2010-12-13 Thread Li Zefan
Goffredo Baroncelli wrote: Hi Li, On Monday, 13 December, 2010, Li Zefan wrote: The keys returned by tree search ioctl should be restricted to: key.objectid = [min_objectid, max_objectid] key.offset = [min_offset, max_offset] key.type = [min_type, max_type] But