All of lore.kernel.org
 help / color / mirror / Atom feed
From: Edward Thornber <thornber@redhat.com>
To: Dennis Yang <dennisyang@qnap.com>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: Possible data corruption with dm-thin
Date: Fri, 24 Jun 2016 09:55:11 -0400	[thread overview]
Message-ID: <20160624135510.GA13946@roamer.bos.redhat.com> (raw)
In-Reply-To: <CAAR726JWQ4VKOVR87QX6Tmuhu1JnCymm7coLT=TFn3BseKm8XA@mail.gmail.com>

Hi Dennis,

On Tue, Jun 21, 2016 at 03:56:26PM +0800, Dennis Yang wrote:
> So my question is, does dm-thin have any mechanism to eliminate the race
> when
> discarded block is reused right away by another device?

I'll try and recreate your scenario.  The transaction-manager will not
reallocate a block that's been freed within a transaction so that we
can always rollback.  So as long as there hasn't been a commit,
reallocation shouldn't be possible.  This is what normally guards
allocation, but in your case I think you may be onto something and we
may have to hold onto the data cell until the passdown discards are
complete.

- Joe

  parent reply	other threads:[~2016-06-24 13:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21  7:56 Possible data corruption with dm-thin Dennis Yang
2016-06-21  8:59 ` Zdenek Kabelac
2016-06-21 10:40   ` Dennis Yang
2016-06-21 10:46     ` Zdenek Kabelac
2016-06-24 13:55 ` Edward Thornber [this message]
2016-06-27  9:32   ` Dennis Yang
2016-07-01 13:18     ` Edward Thornber
2016-09-06  4:51       ` Dennis Yang

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=20160624135510.GA13946@roamer.bos.redhat.com \
    --to=thornber@redhat.com \
    --cc=dennisyang@qnap.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.