Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759592AbYB1MF4 (ORCPT ); Thu, 28 Feb 2008 07:05:56 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757939AbYB1MFr (ORCPT ); Thu, 28 Feb 2008 07:05:47 -0500 Received: from mxintern.schlund.de ([212.227.126.205]:50917 "EHLO mxintern.schlund.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757658AbYB1MFo (ORCPT ); Thu, 28 Feb 2008 07:05:44 -0500 Date: Thu, 28 Feb 2008 13:05:38 +0100 From: Anders Henke To: Jens Axboe , Andrew Morton , device-mapper development , linux-kernel@vger.kernel.org Subject: Re: [dm-devel] Re: device mapper not reporting no-barrier-support? Message-ID: <20080228120538.GG13026@1und1.de> Mail-Followup-To: Anders Henke , Jens Axboe , Andrew Morton , device-mapper development , linux-kernel@vger.kernel.org References: <20080225132615.GA21990@1und1.de> <20080225152050.94788622.akpm@linux-foundation.org> <20080226013656.GE1788@agk.fab.redhat.com> <20080226161741.GN6704@kernel.dk> <20080226193349.GQ13026@1und1.de> <20080226194122.GQ6704@kernel.dk> <20080226202030.GR13026@1und1.de> <20080226222556.GU6704@kernel.dk> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="GyRA7555PLgSTuth" Content-Disposition: inline In-Reply-To: <20080226222556.GU6704@kernel.dk> Organization: 1&1 Internet AG User-Agent: Mutt/1.5.13 (2006-08-11) X-UI-Msg-Verification: f8c6484e2a69dede347d3aaeaca4b6ee Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2321 Lines: 73 --GyRA7555PLgSTuth Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --GyRA7555PLgSTuth Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="ll_rw_blk-eopnotsup-2.6.24.2.patch" --- 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); --GyRA7555PLgSTuth-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/