From: Akira Hayakawa <ruby.wktk@gmail.com>
To: dm-devel@redhat.com
Subject: Re: [Question] dm-cache table
Date: Sun, 01 Dec 2013 11:56:40 +0900 [thread overview]
Message-ID: <529AA568.5080908@gmail.com> (raw)
In-Reply-To: <20131127122916.GB18478@debian>
First of all, this is the current Writeboost's table line design:
writeboost <type> <backing dev> <cache dev>
#optional args [optional args]
#tunable args [tunable args]
There's a constraint.
Joe's device-mapper-test-suite uses table line output to clone a device to test.
This means getting rid of the tunables from the line will make it incapable of
testing _tuned_ device.
As Alasdair said,
there are userland tools that compares the representations of output and what to be input
to avoid unnecessary reload. My first thought is to remove these worthless
optimization.
Other option is to define .table_eq :: String -> Bool method in target and
allow users to use it for that checking where the default behavior is left
as string comparison.
Alasdair's suggestion that the output design is always unique so that
the user can make their input as in matching form and string comparison works.
However, this option will discard the benefit of leaving those arguments
optional because it always need to input full set of arguments.
But, this looks the most sane because the user land tool anyway creates
the full set of arguments (They don't use the default value set
by the target). The optional property of some part of the table line
is only beneficial for those who directly uses dmsetup command.
The drawback of requiring full set of arguments is that
it's hard to add arguments anymore after released for backward-compatibility
but we can deal with this problem by remembering what arguments are
originally input (and the ordering) and includes those in output.
> I guess the status should show what's running, and the table line
> should show what was originally loaded.
My idea can go along with your idea by not including the tunables in
table line output if what was originally loaded included none.
> The other option would be to store the tunables in the metadata, and
> have them only changed via messages (not on the target line). The
> draw back with this approach is it puts extra work on the userland
> volume management software; either they end up duplicating these
> settings in their own metadata, or have to be able to query them from
> the metadata (remember the volume may not be active). I suggest you
> go with this approach for now.
This is not about the table design.
Remembering tunables in cache metadata and applying them at resuming
under .ctr sounds nice but userland takes responsible for this setup things
is my opinion.
Akira
prev parent reply other threads:[~2013-12-01 2:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 10:54 [Question] dm-cache table Akira Hayakawa
2013-11-25 12:05 ` Joe Thornber
2013-11-27 1:54 ` Akira Hayakawa
2013-11-27 2:58 ` Alasdair G Kergon
2013-11-27 12:29 ` Joe Thornber
2013-12-01 2:56 ` Akira Hayakawa [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=529AA568.5080908@gmail.com \
--to=ruby.wktk@gmail.com \
--cc=dm-devel@redhat.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 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.