All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed Cashin <ecashin@coraid.com>
To: ecashin@coraid.com, jens.axboe@oracle.com,
	akpm@linux-foundation.org, apw@canonical.com,
	bonbons@linux-vserver.org, linux-kernel@vger.kernel.org
Subject: [PATCH] aoe: end barrier bios with EOPNOTSUPP
Date: Wed, 9 Sep 2009 12:45:17 -0400	[thread overview]
Message-ID: <60772f633c524ba873f569966fccd6ce@coraid.com> (raw)
In-Reply-To: <20090908193540.GB18599@kernel.dk>

BugLink: http://bugzilla.kernel.org/show_bug.cgi?id=13942

Bruno Premont noticed that aoe throws a BUG during umount of an XFS in
2.6.31:

[ 5259.349897] aoe: bi_io_vec is NULL
[ 5259.349940] ------------[ cut here ]------------
[ 5259.349958] kernel BUG at /usr/src/linux-2.6/drivers/block/aoe/aoeblk.c:177!
[ 5259.349990] invalid opcode: 0000 [#1]

The bio in question is a barrier.  Jens Axboe suggested that such bios
need to be recognized and ended with -EOPNOTSUPP by any driver that
provides its own ->make_request_fn handler and does not handle
barriers.

In testing the changes below eliminate the BUG.

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
---
After this patch has been reviewed I plan to add this patch to
the aoe quilt tree for linux-next.

 drivers/block/aoe/aoeblk.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/block/aoe/aoeblk.c b/drivers/block/aoe/aoeblk.c
index 2307a27..d6806fb 100644
--- a/drivers/block/aoe/aoeblk.c
+++ b/drivers/block/aoe/aoeblk.c
@@ -172,6 +172,9 @@ aoeblk_make_request(struct request_queue *q, struct bio *bio)
 		BUG();
 		bio_endio(bio, -ENXIO);
 		return 0;
+	} else if (bio_barrier(bio)) {
+                bio_endio(bio, -EOPNOTSUPP);
+                return 0;
 	} else if (bio->bi_io_vec == NULL) {
 		printk(KERN_ERR "aoe: bi_io_vec is NULL\n");
 		BUG();
-- 
1.5.6.5


-- 
  Ed Cashin
  http://noserose.net/e/
  http://www.coraid.com/

  parent reply	other threads:[~2009-09-09 16:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 19:55 + aoe-ensure-we-initialise-the-request_queue-correctly.patch added to -mm tree akpm
     [not found] ` <20090903063539.GH12579@kernel.dk>
     [not found]   ` <2339aa04a4e8fb440a52624273728352@coraid.com>
     [not found]     ` <20090904183525.GB18599@kernel.dk>
     [not found]       ` <f48e25c99e41e375f2ddd85989cd39e1@coraid.com>
     [not found]         ` <20090905051735.GH18599@kernel.dk>
     [not found]           ` <366469f19c41e0150028b886f6859019@coraid.com>
     [not found]             ` <20090908193540.GB18599@kernel.dk>
2009-09-09 16:45               ` Ed Cashin [this message]
2009-09-09 16:50                 ` [PATCH] aoe: end barrier bios with EOPNOTSUPP Ed Cashin
2009-09-09 19:03                   ` Ed Cashin
2009-09-09 16:51                 ` Daniel Walker
2009-09-09 17:08                 ` Alan Cox
2009-09-09 18:00                   ` Ed Cashin
2009-09-09 20:58                     ` Jens Axboe
2009-09-09 21:23                       ` Ed Cashin
2009-09-10  7:48                         ` Jens Axboe
2009-09-10 15:16                           ` Ed Cashin
2009-09-10 19:50                             ` Jens Axboe
2009-09-10 20:03                               ` Ed Cashin
2009-09-10 20:07                                 ` Jens Axboe
2009-09-10 20:20                                   ` Ed Cashin
2009-09-10 20:27                                     ` Ed Cashin
2009-09-10 20:29                                       ` Jens Axboe

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=60772f633c524ba873f569966fccd6ce@coraid.com \
    --to=ecashin@coraid.com \
    --cc=akpm@linux-foundation.org \
    --cc=apw@canonical.com \
    --cc=bonbons@linux-vserver.org \
    --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 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.