public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Anders Henke <anders.henke@1und1.de>
To: Jens Axboe <jens.axboe@oracle.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	device-mapper development <dm-devel@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [dm-devel] Re: device mapper not reporting no-barrier-support?
Date: Thu, 28 Feb 2008 13:05:38 +0100	[thread overview]
Message-ID: <20080228120538.GG13026@1und1.de> (raw)
In-Reply-To: <20080226222556.GU6704@kernel.dk>

[-- Attachment #1: Type: text/plain, Size: 1077 bytes --]

On Feb 26 2008, Jens Axboe wrote:
> > [  234.946192] drbd0: conn( WFSyncUUID -> SyncTarget ) 
> > [  234.956176] drbd0: Began resync as SyncTarget (will sync 19542404 KB
> > [4885601
> >  bits set]).
> > [  234.972567] drbd0: Writing meta data super block now.
> > [  235.018203] drbd0: local disk flush failed with status -95
> > 
> > DRBD sees the EOPNOTSUPP, logs this message only once and doesn't try
> > any further barrier requests (as intended).
> 
> OK good, that's what I expected :-)
> 
> I'll queue the patch for 2.6.25, the 2.6.24 should go to stable. Send me
> a properly formatted patch and I'll make sure it goes that way.
> 
> Thanks for testing!

'diff -up''d patch is attached.

Anders
-- 
1&1 Internet AG            System Design
Brauerstrasse 48           v://49.721.91374.50
D-76135 Karlsruhe          f://49.721.91374.225

Amtsgericht Montabaur HRB 6484
Vorstand: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Andreas Gauger,
Thomas Gottschlich, Matthias Greve, Robert Hoffmann, Markus Huhn, Achim Weiss
Aufsichtsratsvorsitzender: Michael Scheeren

[-- Attachment #2: ll_rw_blk-eopnotsup-2.6.24.2.patch --]
[-- Type: text/x-diff, Size: 741 bytes --]

--- linux-2.6.24.2-vanilla/block/ll_rw_blk.c	2008-02-11 06:51:11.000000000 +0100
+++ linux-2.6.24.2/block/ll_rw_blk.c	2008-02-28 10:38:22.392987649 +0100
@@ -2667,8 +2667,11 @@ EXPORT_SYMBOL(blk_execute_rq);
 
 static void bio_end_empty_barrier(struct bio *bio, int err)
 {
-	if (err)
+	if (err) {
+		if (err == -EOPNOTSUPP)
+			set_bit(BIO_EOPNOTSUPP, &bio->bi_flags);
 		clear_bit(BIO_UPTODATE, &bio->bi_flags);
+	}
 
 	complete(bio->bi_private);
 }
@@ -2717,7 +2720,9 @@ int blkdev_issue_flush(struct block_devi
 		*error_sector = bio->bi_sector;
 
 	ret = 0;
-	if (!bio_flagged(bio, BIO_UPTODATE))
+	if (bio_flagged(bio, BIO_EOPNOTSUPP))
+		ret = -EOPNOTSUPP;
+	else if (!bio_flagged(bio, BIO_UPTODATE))
 		ret = -EIO;
 
 	bio_put(bio);

      reply	other threads:[~2008-02-28 12:05 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-25 13:26 device mapper not reporting no-barrier-support? Anders Henke
2008-02-25 23:20 ` Andrew Morton
2008-02-26  1:36   ` [dm-devel] " Alasdair G Kergon
2008-02-26 16:17     ` Jens Axboe
2008-02-26 19:33       ` Anders Henke
2008-02-26 19:41         ` Jens Axboe
2008-02-26 20:20           ` Anders Henke
2008-02-26 22:25             ` Jens Axboe
2008-02-28 12:05               ` Anders Henke [this message]

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=20080228120538.GG13026@1und1.de \
    --to=anders.henke@1und1.de \
    --cc=akpm@linux-foundation.org \
    --cc=dm-devel@redhat.com \
    --cc=jens.axboe@oracle.com \
    --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