Re: [PATCH 6/9] device-mapper snapshot: barriers not supported
From: Alasdair G Kergon
Date: Wed Jan 25 2006 - 15:53:42 EST
On Mon, Jan 23, 2006 at 01:14:46PM -0800, Andrew Morton wrote:
> Lars Marowsky-Bree <lmb@xxxxxxx> wrote:
> > Now the interesting question is what happens when barriers are suddenly
> > verboten on a stack which used to support them - because the new mapping
> > doesn't support it _anymore_. Hrm. _Should_ work, but probably not
> > tested much ;-)
> I don't understand that, sorry.
> My concern is: has the above change any potential to cause
> currently-working setups to stop working?
I trust not. Various things don't support barriers yet, so code
shouldn't assume that they are supported. Where they are supported,
they allow for optimisation.
For example, jbd detects the error and retries without them.
fs/jbd/commit.c: static int journal_write_commit_record(
if (ret == -EOPNOTSUPP && barrier_done) {
...
printk(KERN_WARNING
"JBD: barrier-based sync failed on %s - "
"disabling barriers\n",
bdevname(journal->j_dev, b));
...
/* And try again, without the barrier */
...
Alasdair
--
agk@xxxxxxxxxx
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/