From: Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Cc: Kent Overstreet
<kent.overstreet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
device-mapper development
<dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Subject: Re: Bcache upstreaming
Date: Thu, 31 Jan 2013 22:38:11 -0500 [thread overview]
Message-ID: <20130201033810.GA14867@redhat.com> (raw)
In-Reply-To: <20130201003311.GJ12631-jC9Py7bek1znysI04z7BkA@public.gmane.org>
On Thu, Jan 31 2013 at 7:33pm -0500,
Kent Overstreet <koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> On Thu, Jan 31, 2013 at 06:08:00PM -0500, Mike Snitzer wrote:
> > On Thu, Jan 31 2013 at 5:25pm -0500,
> > Kent Overstreet <kent.overstreet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > On Thu, Jan 31, 2013 at 2:17 PM, Mike Snitzer <snitzer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> wrote:
> > > > Ah, yeah I had a typo in my script. When I fixed it I get a BUG (with
> > > > your latest bcache code) when I try to mkfs.xfs /dev/bcache0:
> > >
> > > Heh, that's the dev branch - you don't want to be running the dev
> > > branch, there's a lot of buggy crap in there and it almost definitely
> > > corrupts data. Testing branch should be good, though.
> >
> > OK, I'll pick up changes from -testing until directed elsewhere.
> >
> > BTW, here are couple things I've noticed with bcache:
> >
> > - The log messages seem to have an extra newline at the end.
>
> How are you seeing that/which log messages? I hadn't noticed that
> myself (do they not get printed somehow?)
I'm just seeing extra newlines (empty lines), e.g.:
bcache: run_cache_set() invalidating existing data
bcache: bch_cached_dev_attach() Caching dm-4 as bcache1 on set 5c0ba0d0-df36-4684-acc5-45f5b4683788
bcache: register_cache() registered cache device dm-3
EXT4-fs (bcache1): mounted filesystem with ordered data mode. Opts: discard
> > - bcache doesn't appear to be establishing proper holders on the devices
> > it uses for the backing and cache devices.
> > - lsblk doesn't show any associations with bcache devices.
>
> How's that created - what function am I looking for?
bd_link_disk_holder and bd_unlink_disk_holder
> > - the fio utility isn't able to get any stats for the bcache device or
> > the devices bcache uses.
>
> I'd been meaning to fix that, never got around to figuring out how those
> stats are generated. Function/file you can point me to?
I think you'll get the stats for via genhd (add_disk) -- the stats are
the 'disk_stats dkstats' member of the genhd's hd_struct. But as of
now you'll notice that /sys/block/bcacheX/stat only ever contains 0s.
part_stat_inc, part_stat_add are the low-level methods for driving the
counters up. But I'm not sure why bcache isn't getting these stats --
disk stats are something we get for free with DM devices so I haven't
really had to dig into these mechanics in detail.
> > - if I 'stop' a bcache device (using sysfs) while it is mounted; once I
> > unmount the filesystem the device that bcache was using as a cache
> > still has an open count of 1 but the bcache device then no longer
> > exists
>
> You mean the backing device isn't open, just the cache device?
>
> That's intended behaviour, backing and cache devices have separate
> lifetimes (and you can attach many backing devices to a single cache).
>
> You just have to stop the cache set separately, via
> /sys/fs/bcache/<uuid>/stop or /sys/block/<cache device>/bcache/set/stop
The /dev/bcacheX device was mounted. I issued 1 to
/sys/block/#{bcache_name}/bcache/stop before unmounting. I then
unmounted /dev/bcacheX, the remaining bcache device infrastructure was
torn down. But after that the device that was the cache device was
still held open -- seems like a reference leaked.
next prev parent reply other threads:[~2013-02-01 3:38 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20130104235040.GA26407@google.com>
2013-01-09 15:49 ` Bcache upstreaming Mike Snitzer
[not found] ` <CAMM=eLeeh6jb28KXGE9ZBbkMV1ysE-6NH2BjfpTsQcHAawEs+w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-10 17:59 ` Kent Overstreet
[not found] ` <20130110175954.GR26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-01-14 22:37 ` Kent Overstreet
[not found] ` <20130114223722.GZ26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-01-14 22:53 ` Mike Snitzer
[not found] ` <20130114225330.GA1365-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-17 2:27 ` Mike Snitzer
[not found] ` <20130117022728.GA16148-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-17 11:41 ` Kent Overstreet
[not found] ` <20130117114104.GJ10411-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2013-01-30 23:36 ` Kent Overstreet
[not found] ` <20130130233643.GD12631-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2013-01-30 23:48 ` Joseph Glanville
[not found] ` <CAOzFzEho6Jn8nd+vSZXEQR5_oxPEZRej=6mivJDz0MsAj5VAZg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31 1:25 ` Kent Overstreet
2013-01-31 0:10 ` Mike Snitzer
[not found] ` <20130131001020.GA7541-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-31 1:26 ` Kent Overstreet
[not found] ` <20130131012627.GF12631-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2013-01-31 1:27 ` Kent Overstreet
[not found] ` <20130131012747.GG12631-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2013-01-31 1:48 ` Kent Overstreet
[not found] ` <20130131014835.GH12631-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2013-01-31 19:02 ` Mike Snitzer
[not found] ` <20130131190249.GA12786-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-31 21:08 ` Kent Overstreet
[not found] ` <CAC7rs0u_aJS5BsJ0E7wH98z2VxXr=SK1z8yL0-m0Pc85ncJNHg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31 22:17 ` Mike Snitzer
[not found] ` <20130131221711.GA13540-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-31 22:25 ` Kent Overstreet
[not found] ` <CAC7rs0ue6YgqrX9Nc18GdnVtJd558F6W=BZiMXZdRqig3s7sBA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-31 23:08 ` Mike Snitzer
[not found] ` <20130131230800.GB13540-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-01 0:33 ` Kent Overstreet
[not found] ` <20130201003311.GJ12631-jC9Py7bek1znysI04z7BkA@public.gmane.org>
2013-02-01 3:38 ` Mike Snitzer [this message]
2013-02-01 10:39 ` Lars Ellenberg
2013-02-01 14:10 ` Mike Snitzer
[not found] ` <20130201141003.GA18095-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-01 14:55 ` Tejun Heo
[not found] ` <20130201145504.GS6824-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-02-01 15:16 ` Mike Snitzer
2013-02-01 15:27 ` Kent Overstreet
[not found] ` <20130201152743.GV26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-02-01 15:30 ` Tejun Heo
[not found] ` <20130201153019.GT6824-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-02-01 15:33 ` Kent Overstreet
[not found] ` <20130201153318.GW26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-02-01 16:08 ` Tejun Heo
[not found] ` <20130201160820.GA31863-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-02-01 16:15 ` Kent Overstreet
[not found] ` <20130201161547.GY26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-02-01 16:18 ` Tejun Heo
[not found] ` <20130201161809.GB31863-9pTldWuhBndy/B6EtB590w@public.gmane.org>
2013-02-01 20:32 ` Mike Snitzer
[not found] ` <20130201203229.GA21110-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-01 20:43 ` Tejun Heo
[not found] ` <20130201033810.GA14867-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-01 15:39 ` Kent Overstreet
[not found] ` <20130201153936.GX26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-02-01 16:12 ` Mike Snitzer
[not found] ` <20130201161227.GA19245-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-02-01 16:17 ` Kent Overstreet
2013-01-31 22:01 ` Kent Overstreet
2013-01-31 16:52 ` Mike Snitzer
[not found] ` <20130131165223.GB11894-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-31 17:01 ` Kent Overstreet
[not found] ` <20130131170103.GT26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-01-31 17:26 ` Mike Snitzer
2013-01-09 16:01 ` Mike Snitzer
[not found] ` <20130104235040.GA26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-01-09 16:12 ` Mike Snitzer
[not found] ` <CAMM=eLdxz17qG8=Px5VoRpv2pGsGhVn3erCQLrcr=Lm-vCOrWw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-01-10 16:47 ` Mike Snitzer
[not found] ` <20130110164704.GA30790-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-01-10 17:56 ` Mike Snitzer
2013-01-10 18:14 ` Kent Overstreet
[not found] ` <20130110181424.GS26407-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
2013-01-14 22:36 ` 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=20130201033810.GA14867@redhat.com \
--to=snitzer-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dm-devel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
--cc=kent.overstreet-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=koverstreet-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \
--cc=linux-bcache-u79uwXL29TY76Z2rM5mHXA@public.gmane.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