From: Pavel Machek <pavel@ucw.cz>
To: Alasdair G Kergon <agk@redhat.com>, Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 9/9] device-mapper snapshot: fix invalidation
Date: Mon, 23 Jan 2006 21:48:11 +0100 [thread overview]
Message-ID: <20060123204810.GA1739@elf.ucw.cz> (raw)
In-Reply-To: <20060120213457.GJ4724@agk.surrey.redhat.com>
On Pá 20-01-06 21:34:57, Alasdair G Kergon wrote:
> When a snapshot becomes invalid, s->valid is set to 0.
> In this state, a snapshot can no longer be accessed.
>
> When s->lock is acquired, before doing anything else, s->valid must be
> checked to ensure the snapshot remains valid.
>
> This patch eliminates some races (that may cause panics) by adding
> some missing checks. At the same time, some unnecessary levels of
> indentation are removed and snapshot invalidation is moved into a
> single function that always generates a device-mapper event.
>
> Signed-Off-By: Alasdair G Kergon <agk@redhat.com>
> +static void __invalidate_snapshot(struct dm_snapshot *s, struct pending_exception *pe, int err)
> +{
> + if (!s->valid)
> + return;
> +
> + if ((err == -EIO))
> + DMERR("Invalidating snapshot: Error reading/writing.");
> + else if ((err == -ENOMEM))
I see you are trying to make it look distinct from assignment,
but... please don't do this.
Pavel
--
Thanks, Sharp!
next prev parent reply other threads:[~2006-01-23 20:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-20 21:34 [PATCH 9/9] device-mapper snapshot: fix invalidation Alasdair G Kergon
2006-01-23 20:48 ` Pavel Machek [this message]
2006-01-23 21:33 ` Alasdair G Kergon
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=20060123204810.GA1739@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=agk@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/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