From: Gabriel de Perthuis <g2p.code@gmail.com>
To: linux-bcache@vger.kernel.org
Subject: Re: Moving a backing device between 2 cachesets
Date: Wed, 29 Jan 2014 17:01:52 +0000 (UTC) [thread overview]
Message-ID: <lcbc60$ola$2@ger.gmane.org> (raw)
In-Reply-To: 56b62eb646f94bbe868ae6b2f26d94e8@navex1. navixia.local
>> After flushing, detaching does two things:
>> - the backing device gets flagged as detached
>> - the backing device is removed from the cache set's metadata
>> (stored as uuid_entry in a special bucket; the entry is flagged
>> with a bogus uuid but not reused). The offset in that uuids
>> array constitutes an id, local to the cache set, that is not
>> reused after detaching.
>>
>> The second step invalidates the backing device's id in the cache set,
>> and indirectly invalidates all buckets that referenced it (through
>> bkey->inode in the bucket key).
>
> I understand that we are safe, then. Right ?
tl;dr: after looking at the code, I expect you'll be fine
That's what I expected anyway (iirc these non-reusable ids appear
somewhere, maybe logs), I just spent a little more time checking.
> Thanks for your clarifications
prev parent reply other threads:[~2014-01-29 17:02 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-28 21:59 Moving a backing device between 2 cachesets Patrick Zwahlen
2014-01-28 22:35 ` matthew patton
2014-01-29 7:49 ` Patrick Zwahlen
2014-01-29 10:42 ` Gabriel de Perthuis
2014-01-29 15:55 ` Patrick Zwahlen
2014-01-29 17:50 ` matthew patton
2014-01-29 18:07 ` Patrick Zwahlen
2014-01-29 18:42 ` matthew patton
[not found] ` < lcalu5$iek$1@ger.gmane.org>
[not found] ` <56b62eb646f94bbe868ae6b2f26d94e8@navex1. navixia.local>
2014-01-29 17:01 ` Gabriel de Perthuis [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='lcbc60$ola$2@ger.gmane.org' \
--to=g2p.code@gmail.com \
--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.