From owner-freebsd-bugs Fri Mar 3 3:10:25 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id C82BA37C006 for ; Fri, 3 Mar 2000 03:10:15 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id DAA33147; Fri, 3 Mar 2000 03:10:04 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 2FC8C37BFBC for ; Fri, 3 Mar 2000 03:03:51 -0800 (PST) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id DAA32613; Fri, 3 Mar 2000 03:03:50 -0800 (PST) (envelope-from nobody@FreeBSD.org) Message-Id: <200003031103.DAA32613@freefall.freebsd.org> Date: Fri, 3 Mar 2000 03:03:50 -0800 (PST) From: peter.edwards@ireland.com To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: misc/17143: [PATCH] make "tunefs -p" work for mounted filesytems Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 17143 >Category: misc >Synopsis: [PATCH] make "tunefs -p" work for mounted filesytems >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Mar 3 03:10:03 PST 2000 >Closed-Date: >Last-Modified: >Originator: Peter Edwards >Release: -current >Organization: >Environment: FreeBSD rocklobster 4.0-CURRENT FreeBSD 4.0-CURRENT #3: Fri Jan 21 09:42:06 GMT 2000 petere@rocklobster:/usr/src/sys/compile/PME2 i386 >Description: tunefs -p won't work on a mounted filesystem. Here's a patch that works for me >How-To-Repeat: # tunefs -p /usr tunefs: cannot work on read-write mounted file system # >Fix: There's a check at the moment to check that a filesystem is mounted R/W. If it is, tunefs exits prematurely. We need to avoid bailing out at this point, and instead open the raw device in readonly mode (otherwise we won't be able to open the device file, 'cause its busy) Patch for /usr/src/sbin/tunefs/tunefs.c included (uuencoded to keep whitespace for my cut-and-paste-to-web-browser) begin 644 tunefs.patch M*BHJ('1U;F5F7-T96T@ M:7,@;6]U;G1E9"!2+U<*(2`)"0D@*B\*(2`)"0EI9B`H*F-P("$]("=P)R`F M)B!O<&5N;6]D92`A/2!/7U)$5U(I"B$@"0D)"65R7-T M96TB*3L*("`)"0ES=VET8V@@*"IC<"D@>PH@(`H@(`D)"6-APH@(`HA(`EF:2`](&]P96XH M9FEL92P@;6]D92D["B`@"6EF("AF:2`\(#`I"B`@"0EE