From owner-freebsd-geom@FreeBSD.ORG Sun Dec 14 22:59:15 2008 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0845C106564A for ; Sun, 14 Dec 2008 22:59:15 +0000 (UTC) (envelope-from ulf.lilleengen@gmail.com) Received: from mta2.eidsiva.net (mta2.eidsiva.net [82.147.40.138]) by mx1.freebsd.org (Postfix) with ESMTP id 8C75D8FC1C for ; Sun, 14 Dec 2008 22:59:14 +0000 (UTC) (envelope-from ulf.lilleengen@gmail.com) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aj8sAEceRUlX+AYSPGdsb2JhbACMQIcJAQEBATWuGItQgn4 X-IronPort-AV: E=Sophos;i="4.36,220,1228086000"; d="diff'?scan'208";a="6698472" Received: from 18.6.erx-lhm.eidsiva.net (HELO @) ([87.248.6.18]) by mtc2.eidsiva.net with ESMTP; 14 Dec 2008 23:59:11 +0100 Date: Sun, 14 Dec 2008 22:59:13 +0100 From: Ulf Lilleengen To: John-Mark Gurney Message-ID: <20081214215913.GA3723@nobby> References: <20081212155023.GA82667@keira.kiwi-computer.com> <917871cf0812130559r6d423688q57287dd765d6edf4@mail.gmail.com> <20081214195649.GK34842@funkthat.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="huq684BweRXVnRxX" Content-Disposition: inline In-Reply-To: <20081214195649.GK34842@funkthat.com> User-Agent: Mutt/1.5.18 (2008-05-17) X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Michael Jung , freebsd-geom@freebsd.org Subject: Re: Encrypting raid5 volume with geli X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Dec 2008 22:59:15 -0000 --huq684BweRXVnRxX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, Dec 14, 2008 at 11:56:49AM -0800, John-Mark Gurney wrote: > Ulf Lilleengen wrote this message on Sat, Dec 13, 2008 at 14:59 +0100: > > Then, I discovered in geom userland code that it opens the disk where > > metadata should be written in write only mode. Then I discovered the reason: > > gvinum tries to write to the stripe in question, but has to read back the > > parity data from one of the other stripes. But, they are opened O_WRONLY, so > > the request fails. I tried opening the device as O_RDWR, and everything is > > find. > > Isn't this a bug in gvinum that it lets a disk be opened in O_WRONLY, > when it needs read permissions? Shouldn't it add the read permission > to it's provider open, and let the underlying fd still be O_WRONLY (so > the OS will prevent any reads) or it should be documented in the > gvinum man page that raid5 volumes cannot be opened in O_WRONLY mode.. > Yes, I agree. Michael, could you try the attached patch? It should fix the issue within gvinum itself. The previous change will have to be reverted too. -- Ulf Lilleengen --huq684BweRXVnRxX--