From: Kent Overstreet <kent.overstreet@gmail.com>
To: Eric Wheeler <bcache@lists.ewheeler.net>
Cc: linux-bcache@vger.kernel.org
Subject: Re: bcachefs: can bcachefs export block devices?
Date: Wed, 3 Aug 2016 22:08:46 -0800 [thread overview]
Message-ID: <20160804060846.GB8042@kmo-pixel> (raw)
In-Reply-To: <alpine.LRH.2.11.1605271927020.9562@mail.ewheeler.net>
On Fri, May 27, 2016 at 07:45:32PM -0700, Eric Wheeler wrote:
> > On Wed, May 25, 2016 at 02:47:29PM -0700, Eric Wheeler wrote:
> > > Does bcachefs's implementation reuse and update the existing
> > > bcache code such that the block device driver inherits the bcachefs
> > > improvements? I understand the cache superblock changed, maybe the cached
> > > dev super too.
> >
> > Yes, all of the existing functionality is still there (though some of it's
> > broken at the moment because I haven't been running those tests; if you're
> > interested in using bcache-dev for the old style caching (there are performance
> > and robustness improvements) it wouldn't take me long to get it working again).
>
> I can test that once its working. Would it use the same bcachefs tools
> for formatting superblocks?
>
> Relatedly, can you point out the best place to abstract cachemeta-v1 vs.
> cachemeta-v2 for simultaneous use? Could it be just a bunch of function
> pointers in the cachedev struct and assignment during initialization for
> v1/v2? Have the call arguments changed? What functions would need
> abstractions (the smallest v1/v2 intersection)?
You mean compile a kernel that supports both old and new on disk format?
Realistically the only way that's going to happen is to completely fork the
source code, ext2/3/4 style.
Although that's going to have to happen eventually.
> > > Can bcachefs provide /dev/bcacheN devices without loop.ko?
> > >
> > > If so, are these simply filesystem objects (files)?
> >
> > The way it works is the first 4096 inode numbers are owned by the block device
> > interface - inodes in that range are for either cached devices or thin
> > provisioned volumes. The filesystem code owns inode numbers >= 4096.
> >
> > So while blockdev volumes/cached data do have inodes, they're not reachable via
> > the filesystem because there will never be dirents that point to them (also,
> > they use a different inode type with extra fields for the UUID/label).
>
> Thats a neat implementation. Would creating a dirent for such an inode
> expose the block device with the same size and content (and ordering) if
> if the inode were compatable? Would the blockdev be block-size aligned
> versus the file or might the file have an alignment requirement?
What we'd want to do is add an ioctl or something to take a fs inode (a normal
file, that already has a dirent) and create at runtime a block device for it.
> I'm particularly excited about this as a precursor to snapshot support,
> especially if udev could help produce something like this:
>
> /dev/disk/by-path/bcache-mydiskfile -> /dev/bcacheN
> /dev/disk/by-path/bcache-mydisksnap -> /dev/bcacheN+1
Not sure what you mean by precursor - that would still require essentially the
entire snapshots implementation. But yes, once we have snapshots we could do
that too.
next prev parent reply other threads:[~2016-08-04 7:10 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-25 21:47 bcachefs: can bcachefs export block devices? Eric Wheeler
2016-05-25 22:51 ` Kent Overstreet
2016-05-28 2:45 ` Eric Wheeler
2016-08-04 6:08 ` Kent Overstreet [this message]
2016-08-04 23:46 ` Eric Wheeler
2016-08-06 4:34 ` Kent Overstreet
2017-02-09 22:17 ` Eric Wheeler
2017-02-09 22:41 ` Martin Raiber
2016-08-04 0:30 ` Eric Wheeler
2016-08-04 6:04 ` Kent Overstreet
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=20160804060846.GB8042@kmo-pixel \
--to=kent.overstreet@gmail.com \
--cc=bcache@lists.ewheeler.net \
--cc=linux-bcache@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.