lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080226013656.GE1788@agk.fab.redhat.com>
Date:	Tue, 26 Feb 2008 01:36:56 +0000
From:	Alasdair G Kergon <agk@...hat.com>
To:	Andrew Morton <akpm@...ux-foundation.org>,
	Anders Henke <anders.henke@...d1.de>,
	Jens Axboe <jens.axboe@...cle.com>
Cc:	device-mapper development <dm-devel@...hat.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [dm-devel] Re: device mapper not reporting no-barrier-support?

On Mon, Feb 25, 2008 at 03:20:50PM -0800, Andrew Morton wrote:
> On Mon, 25 Feb 2008 14:26:15 +0100 Anders Henke <anders.henke@...d1.de> wrote:
> > I'm currently stuck between Kernel LVM and DRBD, as I'm using Kernel
> > 2.6.24.2 with DRBD 8.2.5 on top of an LVM2 device (LV).
> > -LVM2/device mapper doesn't support write barriers

That's right.

> > -DRBD uses blkdev_issue_flush() to flush its metadata to disk.

Which won't work if device-mapper is underneath.

> >  On a no-barrier-device, DRBD should receive EOPNOTSUPP, but
> >  it really does receive an EIO. Promptly, DRBD gives the
> >  error message "drbd0: local disk flush failed with status -5".
> > I've posted a lengty summary of my findings to
> > http://lists.linbit.com/pipermail/drbd-user/2008-February/008665.html
> > ... that DRBD does catch the EOPNOTSUPP for blkdev_issue_flush and
> > BIO_RW_BARRIER, but the lvm implementation of blkdev_issue_flush in
> > 2.6.24.2 aparently does return EIO for blkdev_issue_flush.
> I'd say it's a DM bug.

The dm code is unchanged, but look at the limited endio handling in
ll_rw_blk.c:

static void bio_end_empty_barrier(struct bio *bio, int err)
{
        if (err)
                clear_bit(BIO_UPTODATE, &bio->bi_flags);

        complete(bio->bi_private);
}

int blkdev_issue_flush(struct block_device *bdev, sector_t *error_sector)
{
...
        wait_for_completion(&wait);
        if (error_sector)
                *error_sector = bio->bi_sector;
        ret = 0;
        if (!bio_flagged(bio, BIO_UPTODATE))
                ret = -EIO;

Alasdair
-- 
agk@...hat.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ