From owner-freebsd-current@FreeBSD.ORG Mon Aug 29 20:56:38 2005 Return-Path: X-Original-To: freebsd-current@FreeBSD.org Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8BA2F16A420; Mon, 29 Aug 2005 20:56:38 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5745A43D4C; Mon, 29 Aug 2005 20:56:38 +0000 (GMT) (envelope-from csjp@FreeBSD.org) Received: from freefall.freebsd.org (csjp@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j7TKucaO002817; Mon, 29 Aug 2005 20:56:38 GMT (envelope-from csjp@freefall.freebsd.org) Received: (from csjp@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j7TKucGE002816; Mon, 29 Aug 2005 20:56:38 GMT (envelope-from csjp) Date: Mon, 29 Aug 2005 20:56:38 +0000 From: "Christian S.J. Peron" To: saturnero@freesbie.org Message-ID: <20050829205638.GA2458@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.1i Cc: freebsd-current@FreeBSD.org, pjd@FreeBSD.org Subject: Re: mdconfig recently broken? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Aug 2005 20:56:38 -0000 >Hi everybody, >due to limited connectivity in August, I've been able to >update my -CURRENT box only yesterday since the first days of August >(iirc). > >I noticed that mdconfig -a -t vnode -f ${myfile} isn't working anymore >when ${myfile} is on a read-only filesystem: > >sberta:/usr/local/freesbie-clone/uzip# mdconfig -a -t vnode -f usr.uzip >md0 >sberta:/usr/local/freesbie-clone/uzip# mdconfig -d -u 0 >sberta:/usr/local/freesbie-clone/uzip# mount -fru /usr >sberta:/usr/local/freesbie-clone/uzip# mdconfig -a -t vnode -f usr.uzip >mdconfig: ioctl(/dev/mdctl): Read-only file system > >This makes impossible to use compressed filesystems on devices like >cdrom or read-only diskless environment. Any idea? I'm using: > >FreeBSD sberta.saturnero.sat 7.0-CURRENT FreeBSD 7.0-CURRENT #2: Sat Aug 27 18:1 >5:39 CEST 2005 satu at sberta.saturnero.sat:/usr/obj/usr/src/sys/SBERTA i386 >sberta:/usr/local/freesbie-clone/uzip# > >Bye and thanks in advance, >Dario Yes, this is the expected result. I changed this after it was noted that it was possible to bypass schg flags through mdconfig. See kern/84635 for more details. As a result the user needs to specify -o readonly to mdconfig(8) when using read only files as backing stores. phk and pjd both have expressed some interests in having me revert to a graceful downgrade of access, which I am open to, provided we display this fact to the user. I am just thinking if we should downgrade the request in mdconfig instead of the kernel as it keeps the kernel code more clean. Here is a reference to the commit log, see revision 1.154 http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/dev/md/md.c Thoughts? -- Christian S.J. Peron csjp@FreeBSD.ORG FreeBSD Committer