Date: Mon, 21 Jan 2013 12:00:01 GMT From: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JLQvtC70LrQvtCy?= <Alexei.Volkov@softlynx.ru> To: freebsd-bugs@FreeBSD.org Subject: Re: kern/175323: Fail to use ZVOL as a gmirror component Message-ID: <201301211200.r0LC01nr066100@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/175323; it has been noted by GNATS.
From: =?UTF-8?B?0JDQu9C10LrRgdC10Lkg0JLQvtC70LrQvtCy?=
<Alexei.Volkov@softlynx.ru>
To: bug-followup@FreeBSD.org, Andriy Gapon <avg@FreeBSD.org>
Cc:
Subject: Re: kern/175323: Fail to use ZVOL as a gmirror component
Date: Mon, 21 Jan 2013 15:47:32 +0400
Andriy, many thanks for the suggestion. I am trying to rebuild and test
the kernel with the following patch:
--- sys/geom/mirror/g_mirror.c (revision 245741)
+++ sys/geom/mirror/g_mirror.c (working copy)
@@ -456,7 +456,7 @@
disk->d_flags = md->md_dflags;
error = g_getattr("GEOM::candelete", disk->d_consumer, &i);
if (error != 0)
- goto fail;
+ i=0;
if (i)
disk->d_flags |= G_MIRROR_DISK_FLAG_CANDELETE;
if (md->md_provider[0] != '\0')
It seems to correct if assume G_MIRROR_DISK_FLAG_CANDELETE is always off
unless successfully reported by GEOM::candelete attribute.
--
Best regards
21.01.2013 13:47, Andriy Gapon пишет:
> This
>> GEOM_MIRROR: Cannot add disk zvol/tank0/vol0 to mirror0 (error=45).
> seems to be triggered by the following code in sys/geom/mirror/g_mirror.c:
>
> error = g_getattr("GEOM::candelete", disk->d_consumer, &i);
> if (error != 0)
> goto fail;
>
> plus the fact that ZFS zvol does the following:
> case BIO_GETATTR:
> case BIO_DELETE:
> default:
> g_io_deliver(bp, EOPNOTSUPP);
> break;
>
> Perhaps, the gmirror code should be more flexible with respect to EOPNOTSUPP
> from g_getattr?
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301211200.r0LC01nr066100>
