dm-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Joe Thornber <thornber@redhat.com>
To: Mike Snitzer <snitzer@redhat.com>
Cc: dm-devel@redhat.com
Subject: Re: [PATCH] dm thin metadata: clarify __open_device functionality and fix callers
Date: Tue, 10 Jan 2012 10:31:05 +0000	[thread overview]
Message-ID: <20120110103104.GA5981@ubuntu> (raw)
In-Reply-To: <1326141188-2172-1-git-send-email-snitzer@redhat.com>

On Mon, Jan 09, 2012 at 03:33:08PM -0500, Mike Snitzer wrote:
> The __open_device() error path of __create_thin() and __create_snap()
> will call __close_device() even if td was not initialized by
> __open_device().
>
> Clearly define what callers should expect from __open_device()'s
> return.
>
> Also, remove redundant 'td->changed = 1' in __create_thin() --
> __open_device() with create=1 will have set td->changed on successful
> return.

Hi Mike,

This looks like a code review patch, and as such I ACK it.

I don't think it changes any behaviour though.  Both create_thin and
create_snapshot hold a mutex when they run, and the first thing they
do is check for the existence of the device.

        r = dm_btree_lookup(&pmd->details_info, pmd->details_root,
                            &key, &details_le);
        if (!r)
                return -EEXIST;

I don't think there's a race on creation?

We need to focus on reproducing Kabi's issue.

- Joe

  reply	other threads:[~2012-01-10 10:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-09 20:33 [PATCH] dm thin metadata: clarify __open_device functionality and fix callers Mike Snitzer
2012-01-10 10:31 ` Joe Thornber [this message]
2012-01-10 14:22   ` Mike Snitzer

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=20120110103104.GA5981@ubuntu \
    --to=thornber@redhat.com \
    --cc=dm-devel@redhat.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).