linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heinz Mauelshagen <heinzm@redhat.com>
To: Josef Bacik <josef@toxicpanda.com>,
	snitzer@redhat.com, amir73il@gmail.com, dm-devel@redhat.com,
	linux-fsdevel@vger.kernel.org, kernel-team@fb.com, clm@fb.com,
	osandov@fb.com, rwareing@fb.com
Subject: Re: [dm-devel] [RFC] Multi-device dm-log-writes
Date: Mon, 4 Sep 2017 16:42:53 +0200	[thread overview]
Message-ID: <b32fb3c9-cb93-f3ee-74b7-37884e24b580@redhat.com> (raw)
In-Reply-To: <20170901183110.qjyxjrrksnub7y4a@destiny>

Josef,

using the current log-writes target, would a device tree with a single large
logged device sliced up into N linear mappings used by btrfs/md/... work to?
Or would that miss any semantics as of your design?

Heinz


On 09/01/2017 08:31 PM, Josef Bacik wrote:
> Hello,
>
> I'm looking at extending dm-log-writes to support multiple devices to log to a
> single log.  The benefit for this is testing things like btrfs's raid code, the
> xfs realtime device thing, and even mdraid.  I left room in the log format to
> change it as needed with this use case in mind, so I'm not worried about that.
> I'm more looking for verification that my plan doesn't suck, or if it does suck
> what would be a better approach.  I'll lay out the different parts to try and
> make this as quick and concise as possible.
>
> 1) Add a "log-writes-log" target that just takes the single device we are going
> to use as the log.  This will do the work of taking the log IO from the actual
> "log-writes" target and putting it in the log.
>
> 2) Extend the "log-writes" target table format to include an "id" at the end of
> the table line that will be used to indicate which device the log entry will be
> fore.  In this case the "log device" portion will point at the "log-writes-log"
> device mapper target.  Everything would work normally, except in this mode we
> send the log bio's down with bi_sector = 0 and let the "log-writes-log" target
> do the actual mapping for the bio.
>
> So to test with multiple devices you would have to do something like
>
> dmsetup create log --table "0 <size> log-writes-log <log device>"
> dmsetup create lw1 --table "0 <size> log-writes <device> /dev/mapper/log 0"
> dmsetup create lw2 --table "0 <size> log-writes <device> /dev/mapper/log 1"
> mkfs.btrfs -d raid1 -m raid1 /dev/mapper/lw1 /dev/mapper/lw2
> mount /dev/mapper/lw1 /mnt
> <do whatever>
> umount /mnt
> dmsetup remove lw1
> dmsetup remove lw2
> dmsetup remove log
>
> Mike, I would simply add a new struct target_type for log-writes-log that would
> do it's own ->map function to re-route the bio's coming into them.  I'd also
> change the ->ctr function of the log-writes target_type to handle the new id
> field and do the new fancy thing if we have that field populated.  Does that
> sound reasonable from an implementation point of view?
>
> Any comments or suggestions are welcome.  I haven't written any code yet so I'm
> open to other ideas.  Thanks,
>
> Josef
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel

  parent reply	other threads:[~2017-09-04 14:43 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 18:31 [RFC] Multi-device dm-log-writes Josef Bacik
2017-09-01 20:05 ` Mike Snitzer
2017-09-02  0:10   ` Josef Bacik
2017-09-02  8:12     ` Amir Goldstein
2017-09-02  9:54       ` Josef Bacik
2017-09-04 14:42 ` Heinz Mauelshagen [this message]
2017-09-07 13:54   ` [dm-devel] [RFC] " Josef Bacik

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=b32fb3c9-cb93-f3ee-74b7-37884e24b580@redhat.com \
    --to=heinzm@redhat.com \
    --cc=amir73il@gmail.com \
    --cc=clm@fb.com \
    --cc=dm-devel@redhat.com \
    --cc=josef@toxicpanda.com \
    --cc=kernel-team@fb.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=osandov@fb.com \
    --cc=rwareing@fb.com \
    --cc=snitzer@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).