Re: [PATCH] btrfs-progs: ins: Add v2 ioctl support in logical-resolve

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 19, 2018 at 02:03:38PM +0800, Qu Wenruo wrote:
> >>>  cmds-inspect.c                                | 17 +++++++++++++++--
> >>>  ioctl.h                                       | 10 +++++++++-
> >>>  libbtrfsutil/btrfs.h                          | 10 +++++++++-
> >>
> >> Not related to this patch itself, but I'm wondering could we just use
> >> /usr/include/linux/btrfs.h?
> >>
> >> So we could save 2 same copies of headers here.
> > 
> > If we want to compile the newest btrfs-progs, but the older
> > /usr/include/linux/btrfs.h maybe doesn't have already defined the ioctl,
> > this will cause the compile error.
> 
> Makes sense.

Yeah, the system header may be missing or older than the btrfs-progs
version built. The linux/btrfs.h is exported from kernel sources and
should match ioctl.h, but both are managed in different projects so this
is a bit of duplication.

> > I am curious about why the
> > libbtrfsutil need to copy the part of ioctl.h instead of including the
> > ioctl.h directly?
> 
> Maybe for distribution purpose? Some binding may be delivered as
> independent package just as Omar tries to do.
> So in that case independent header makes sense.

And same here, there should be no fundamental difference in the
btrfs-progs and libbtrfsutil versions, but some level of independence is
desired for future changes.

In the end, all the three files should match as much as possible so it's
easy to open side by side diff in vim and just to see if there are parts
that need to be applied to the others. The might be some slight
differences like the __cpluplus protection but that are obvious in the
visual diff.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux