linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Qu Wenruo <quwenruo.btrfs@gmx.com>
To: Qu Wenruo <wqu@suse.com>, dm-devel@redhat.com
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH 0/2] dm log writes: Add support for filter bios based on its type
Date: Thu, 8 Aug 2019 20:54:40 +0800	[thread overview]
Message-ID: <256f2ccc-af5b-e30a-76c1-a911f242d252@gmx.com> (raw)
In-Reply-To: <20190619080312.11549-1-wqu@suse.com>


[-- Attachment #1.1: Type: text/plain, Size: 2157 bytes --]

Gentle ping?

This feature would be pretty useful if we want to really log heavy
operations on a relatively small log devices.

Thanks,
Qu

On 2019/6/19 下午4:03, Qu Wenruo wrote:
> Current dm-log-writes will record all bios, no matter if the bios is
> METADATA (normally what we care) or is DATA (normally we cares less for
> the log-replay context).
> 
> This causes a lot of extra space required for log device. E.g write 10M,
> sync, overwrite that 10M file, this would cause over 20M for log device
> just for the data.
> 
> This patchset introduces two way to specify the dump type:
> - dump_type=%s optional option for constructor
>   The default dump_type is ALL, thus no behavior change.
> 
> - dump_type=%s message type to change type on the fly
> 
> Also to cooperate the new dump_type= option, always output the dump_type
> for STATUSTYPE_TABLE.
> 
> A common use case would be:
>  # dmsetup create log --table 0 $(blockdev --getsz $dev) log-writes $dev $log_dev
>  # mkfs.btrfs -f /dev/mapper/log
>  # dmsetup suspend log
>  # dmsetup message log 0 dump_type=METADATA|FUA|FLUSH|DISCARD|MARK
>  # dmsetup resume log
>  # mount /dev/mapper/log <mnt>
>  # <do some work load>
>  # umount <mnt>
>  # dmsetup remove log
>  # <replay>
> 
> Now the log device will not record data writes, thus hugely reduce the
> space requirement for log device, allowing more operations to be down
> before hitting the space limit.
> 
> Currently btrfs check doesn't check data checksum by default, thus even
> we have wrong data on-disk, we should be fine checking the metadata.
> 
> I'm not 100% sure if this applies to other filesystems, but as long as
> metadata writes is marked correctly, other filesystems can also benifit
> from this feature.
> 
> Qu Wenruo (2):
>   dm log writes: Allow dm-log-writes to filter bios based on types to
>     reduce log device space usage
>   dm log writes: Introduce dump_type= message type to change dump_type
>     on the fly
> 
>  drivers/md/dm-log-writes.c | 177 ++++++++++++++++++++++++++++++++++---
>  1 file changed, 167 insertions(+), 10 deletions(-)
> 


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      parent reply	other threads:[~2019-08-08 12:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-19  8:03 [PATCH 0/2] dm log writes: Add support for filter bios based on its type Qu Wenruo
2019-06-19  8:03 ` [PATCH 1/2] dm log writes: Allow dm-log-writes to filter bios based on types to reduce log device space usage Qu Wenruo
2019-06-19  8:03 ` [PATCH 2/2] dm log writes: Introduce dump_type= message type to change dump_type on the fly Qu Wenruo
2019-08-08 12:54 ` Qu Wenruo [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=256f2ccc-af5b-e30a-76c1-a911f242d252@gmx.com \
    --to=quwenruo.btrfs@gmx.com \
    --cc=dm-devel@redhat.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=wqu@suse.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).