On Wed, Mar 07, 2018 at 09:40:18AM +0900, Misono, Tomohiro wrote: > On 2018/03/07 5:29, Goffredo Baroncelli wrote: > > On 03/06/2018 09:30 AM, Misono, Tomohiro wrote: > >> Add new unprivileged ioctl (BTRFS_IOC_GET_SUBVOL_INFO) which searches > >> and returns only subvolume related item (ROOT_ITEM/ROOT_BACKREF/ROOT_REF) > >> from root tree. The arguments of this ioctl are the same as treesearch > >> ioctl and can be used like treesearch ioctl. > > > > Is it a pro ? The treesearch ioctl is tightly coupled to the btrfs internal > > structure, this means that if we would change the btrfs internal structure, > > we have to update all the clients of this api. For the treesearch it is an > > acceptable compromise between flexibility and speed of developing. But for > > a more specialized API, I think that it would make sense to provide a less > > coupled api to the internal structure. > > Thanks for the comments. > > The reason I choose the same api is just to minimize the code change in > btrfs-progs.
That's not IMO a good reason. We can cahnge the code in btrfs-progs and that's not going to be the only user of the ioctl so the interfact (ie. the structures) should be adapted for the needs of the ioctl. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html