public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: dsterba@suse.cz, Qu Wenruo <wqu@suse.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 2/2] btrfs: move btrfs_super_block to uapi/linux/btrfs_tree.h
Date: Thu, 21 Oct 2021 07:18:32 +0800	[thread overview]
Message-ID: <be5ed653-e95b-351a-6946-6a9ff18491ee@gmx.com> (raw)
In-Reply-To: <20211020171326.GB30611@twin.jikos.cz>



On 2021/10/21 01:13, David Sterba wrote:
> On Wed, Oct 20, 2021 at 08:19:30AM +0800, Qu Wenruo wrote:
>>
>>
>> On 2021/10/20 00:10, David Sterba wrote:
>>> On Tue, Oct 19, 2021 at 07:29:25PM +0800, Qu Wenruo wrote:
>>>> Due to the fact that btrfs_tree.h contains all the info for
>>>> BTRFS_IOC_TREE_SEARCH, it's almost the perfect location of btrfs on-disk
>>>> schema.
>>>>
>>>> So let's move struct btrfs_super_block to uapi/linux/btrfs_tree.h,
>>>> further reducing the size of ctree.h.
>>>
>>> The definitions of tree items are in the public header due to the search
>>> tree ioctl, but why do you want to make superblock public? Ie. what user
>>> space tool is going to use it?
>>>
>>
>> Well, for super block I'd say any user space tool can directly see it.
>>
>> My main objective here is to move all on-disk format to uapi.
>
> Why? You sent such patches in the past, I need to read again what we
> discussed but I don't think we should put everything to the UAPI
> headers.
>
Then we need a new header for on-disk format that is not exposed through
tree search API.

It's definitely not ideal to put everything into ctree.h.

This is especially useful when someone is crafting a new btrfs
implementation, no matter if it's something like winBtrfs or BSD (if
they really want) or something else.

In fact when I am trying to create the btrfs-fuse, one of the things I'm
doing is separating things from ctree.h.

Thanks,
Qu

  reply	other threads:[~2021-10-20 23:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-19 11:29 [PATCH 0/2] btrfs: cleanup on btrfs_super_block definition Qu Wenruo
2021-10-19 11:29 ` [PATCH 1/2] btrfs: make sizeof(struct btrfs_super_block) to match BTRFS_SUPER_INFO_SIZE Qu Wenruo
2021-10-19 15:46   ` David Sterba
2021-10-19 11:29 ` [PATCH 2/2] btrfs: move btrfs_super_block to uapi/linux/btrfs_tree.h Qu Wenruo
2021-10-19 16:10   ` David Sterba
2021-10-20  0:19     ` Qu Wenruo
2021-10-20 17:13       ` David Sterba
2021-10-20 23:18         ` Qu Wenruo [this message]
2021-11-07 23:24   ` kernel test robot
2021-10-19 14:08 ` [PATCH 0/2] btrfs: cleanup on btrfs_super_block definition Josef Bacik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=be5ed653-e95b-351a-6946-6a9ff18491ee@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dsterba@suse.cz \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox