From owner-freebsd-hackers@FreeBSD.ORG Wed Jan 19 15:12:15 2011 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 09E25106566C for ; Wed, 19 Jan 2011 15:12:15 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw03.mail.saunalahti.fi (gw03.mail.saunalahti.fi [195.197.172.111]) by mx1.freebsd.org (Postfix) with ESMTP id BA9CA8FC1B for ; Wed, 19 Jan 2011 15:12:14 +0000 (UTC) Received: from a91-153-123-205.elisa-laajakaista.fi (a91-153-123-205.elisa-laajakaista.fi [91.153.123.205]) by gw03.mail.saunalahti.fi (Postfix) with SMTP id 8FAF1216DE1; Wed, 19 Jan 2011 17:12:10 +0200 (EET) Date: Wed, 19 Jan 2011 17:12:10 +0200 From: Jaakko Heinonen To: Craig Rodrigues Message-ID: <20110119151210.GA2182@a91-153-123-205.elisa-laajakaista.fi> References: <20110114122454.GA4805@jh> <20110119083407.GA51372@crodrigues.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110119083407.GA51372@crodrigues.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-hackers@FreeBSD.org Subject: Re: [patch] nmount ro, rw and negated option handling X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Jan 2011 15:12:15 -0000 On 2011-01-19, Craig Rodrigues wrote: > I disagree with your patch and do not approve it. > > I prefer something simpler: Thanks for your reply. However, your patch doesn't fix the bug(s) I tried to resolve. See below. > ZFS can be changed to check for "rw" or "noro". It's possible but I don't like to support both "rw" and "noro". That makes the file system code unnecessary prone for bugs when someone forgets to test for both options. > > 1. Have mountd(8) running. > > 2. # mdconfig -a -t vnode -f ufsimg > > 3. # mount -o ro,rw /dev/md0 /mnt With your patch[1] after the third step the mount point has both "ro" and and "noro" active but the MNT_RDONLY flag is not set. Again, you will eventually get the "ffs_sync: rofs mod" (or similar) panic because the "ro" option is active during remount. Also, I didn't verify but I doubt that your patch will fix the problem described in PR kern/150206. [1] I had to comment vfs_mount.c line 622 "has_noro = 1;" and remove the noro_opt declaration to be able to compile kernel with your patch applied. -- Jaakko