From: Eric Sandeen <sandeen@redhat.com>
To: Josef Bacik <jbacik@fusionio.com>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: How are userspace & kernelspace kept in sync?
Date: Fri, 05 Apr 2013 19:34:50 -0500 [thread overview]
Message-ID: <515F6DAA.60903@redhat.com> (raw)
In-Reply-To: <20130406002027.GS1876@localhost.localdomain>
On 4/5/13 7:20 PM, Josef Bacik wrote:
> On Fri, Apr 05, 2013 at 04:48:56PM -0600, Eric Sandeen wrote:
>> One thing led to another in poking around the code, and I realized
>> that while userspace has lots of code copied from the kernel, it
>> was last copied in 2008, in many cases. ;)
>>
>> What's the plan here, how are userspace & kernelspace to be kept
>> in sync?
>>
>> New features fairly obviously hit both, but what about bugfixes
>> that hit one codebase or the other?
>>
>> Is it clear (to anyone) which code needs to be synced?
>>
>> Should it be done as a wholesale sync-up/rebase from time to
>> time, or should commits be merged from one to the other?
>>
>
> So having just had to bring back part of the free space cache code I'd say we
> just cherry pick stuff since it is a huge pain to just copy it over, especially
> when you start talking about the extent buffer stuff. If maybe we could
> seperate out the really kernel specific stuff (like the stuff that does the
> reading/writing or interfaces with vfs) and the btrfs specific stuff then maybe
> it would be good to keep them in sync. But honestly I think the core stuff is
> pretty solid right now so cherry-picking is probably our better bet. Thanks,
Some of it is just different style, but there seem to be
some functional differences as well.
>From some spot-checking, I found a few things that were kind of uh, what?
Like comparing:
commit 95d3f20b51e9b2ee21822313ad4f31279396407b
Author: Chris Mason <chris.mason@oracle.com>
Date: Fri May 29 16:35:30 2009 -0400
Mixed back reference (FORWARD ROLLING FORMAT CHANGE)
commit 5d4f98a28c7d334091c1b7744f48a1acdd2a4ae0
Author: Yan Zheng <zheng.yan@oracle.com>
Date: Wed Jun 10 10:45:14 2009 -0400
Btrfs: Mixed back reference (FORWARD ROLLING FORMAT CHANGE)
had differences like:
convert_extent_item_v0, from userspace to kernelspace:
- ret = btrfs_search_slot(trans, root, &key, path, new_size, 1);
+ ret = btrfs_search_slot(trans, root, &key, path,
+ new_size + extra_size, 1);
Either that's incredibly subtle and undocumented, or just wrong
in one case or the other?
I mean, this is just one thing. Seems like a plan to keep it
in sync is warranted, maybe keeping the kernel copies in
separate files, so diffs make some semblance of sense?
I dunno, I just worry about long-term maintainability of it
all.
-Eric
> Josef
>
prev parent reply other threads:[~2013-04-06 0:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-05 22:48 How are userspace & kernelspace kept in sync? Eric Sandeen
2013-04-06 0:20 ` Josef Bacik
2013-04-06 0:34 ` Eric Sandeen [this message]
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=515F6DAA.60903@redhat.com \
--to=sandeen@redhat.com \
--cc=jbacik@fusionio.com \
--cc=linux-btrfs@vger.kernel.org \
/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