Linux Device Mapper development
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Ming Lei <minlei@redhat.com>,
	Mikulas Patocka <mpatocka@redhat.com>,
	dm-devel@redhat.com, Milan Broz <mbroz@redhat.com>
Subject: Re: dm: don't overallocate the tags space
Date: Fri, 8 Feb 2019 11:02:36 -0500	[thread overview]
Message-ID: <20190208160235.GA8620@redhat.com> (raw)
In-Reply-To: <1549641492.34241.81.camel@acm.org>

On Fri, Feb 08 2019 at 10:58am -0500,
Bart Van Assche <bvanassche@acm.org> wrote:

> On Fri, 2019-02-08 at 10:52 -0500, Mikulas Patocka wrote:
> > bio_sectors returns the value in the units of 512-byte sectors (no matter
> > what's the real sector size of the device). dm-crypt multiplies
> > bio_sectors by on_disk_tag_size to calculate the space allocated for
> > integrity tags. If dm-crypt is running with sector size larger than 512,
> > it allocates more data than what's needed.
> > 
> > Device mapper trimmed this extra space when passing the bio to
> > dm-integrity, so this bug didn't result in any visible misbehavior. This
> > bug showed up when device mapper stopped trimming the bio.
> > 
> > Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> > Reported-by: Milan Broz <mbroz@redhat.com>
> 
> Hi Mikulas,
> 
> Is this a fix for commit fa8db4948f52 ("dm: don't use bio_trim() afterall")?
> If so, please consider adding a "Fixes:" tag.

No, it isn't.  It stands on its own.

But yes, it could serve as a replacement for fa8db4948f52 ("dm: don't
use bio_trim() afterall").  But using bio_trim() isn't critical, and I
intend to remove all of DM's internal bio splitting for 5.1 or later
anyway.

  reply	other threads:[~2019-02-08 16:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-08 15:52 [PATCH] dm: don't overallocate the tags space Mikulas Patocka
2019-02-08 15:58 ` Bart Van Assche
2019-02-08 16:02   ` Mike Snitzer [this message]
2019-02-08 18:06 ` Milan Broz

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=20190208160235.GA8620@redhat.com \
    --to=snitzer@redhat.com \
    --cc=bvanassche@acm.org \
    --cc=dm-devel@redhat.com \
    --cc=mbroz@redhat.com \
    --cc=minlei@redhat.com \
    --cc=mpatocka@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