Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
In between, I've posted my findings to lkml, from where it went
to devicemapper-devel.
Jens Axboe created a patch which fixes the kernel not to loose
the EOPNOTSUPP (which in turn results in EIO, the "status -5").
A 2.6.24.2-ready version of Jens Axboe's patch follows:
---cut
--- linux-2.6.24.2/block/ll_rw_blk.c.prepatch 2008-02-11 06:51:11.000000000 +0100
+++ linux-2.6.24.2/block/ll_rw_blk.c 2008-02-26 20:58:05.552467940 +0100
@@ -2667,8 +2667,11 @@
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 @@
*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);
---cut
Note: using this patch, you'll see a single warning from DRBD:
"drbd0: local disk flush failed with status -95"
According to the DRBD source, this is intended behaviour.
Anders
--
1&1 Internet AG System Architect
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