From owner-freebsd-bugs Sat Nov 11 01:30:04 1995 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA09457 for bugs-outgoing; Sat, 11 Nov 1995 01:30:04 -0800 Received: (from gnats@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id BAA09451 ; Sat, 11 Nov 1995 01:30:01 -0800 Resent-Date: Sat, 11 Nov 1995 01:30:01 -0800 Resent-Message-Id: <199511110930.BAA09451@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, hsu@clinet.fi Received: from hauki.clinet.fi (root@hauki.clinet.fi [194.100.0.1]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id BAA09246 for ; Sat, 11 Nov 1995 01:20:32 -0800 Received: from katiska.clinet.fi (root@katiska.clinet.fi [194.100.0.4]) by hauki.clinet.fi (8.6.12/8.6.4) with ESMTP id LAA01202 for ; Sat, 11 Nov 1995 11:20:25 +0200 Received: (hsu@localhost) by katiska.clinet.fi (8.6.12/8.6.4) id LAA08775; Sat, 11 Nov 1995 11:20:33 +0200 Message-Id: <199511110920.LAA08775@katiska.clinet.fi> Date: Sat, 11 Nov 1995 11:20:33 +0200 From: Heikki Suonsivu Reply-To: hsu@clinet.fi To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/816: fsck -y ignores clean flag Sender: owner-bugs@freebsd.org Precedence: bulk >Number: 816 >Category: bin >Synopsis: fsck -y ignores clean flag >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Nov 11 01:30:01 PST 1995 >Last-Modified: >Originator: Heikki Suonsivu >Organization: Clinet, Espoo, Finland >Release: FreeBSD 2.1.0-950928-SNAP i386 >Environment: A news server, with news disk mounted with -o async and fsck -y in /etc/rc before other fsck's to clean up the mess after a panic. >Description: fsck -y causes clean bit to be ignored. This is nasty as fsck -y is necessary with -o async, and getting a full news feed needs -o async. But currently it takes forever to reboot the news server because it will do a forced check on the news spool. >How-To-Repeat: reboot a system cleanly, but boot into single user, and do an fsck for a clean disk with -y. It will do a forced check on the disk. >Fix: I think this ... if (preen && sblock.fs_clean && !fflag) { pwarn("clean, %ld free ", sblock.fs_cstotal.cs_nffree + sblock.fs_frag * sblock.fs_cstotal.cs_nbfree); printf("(%ld frags, %ld blocks, %.1f%% fragmentation)\n", ... should be changed into if (sblock.fs_clean && !fflag) { pwarn("clean, %ld free ", sblock.fs_cstotal.cs_nffree + sblock.fs_frag * sblock.fs_cstotal.cs_nbfree); printf("(%ld frags, %ld blocks, %.1f%% fragmentation)\n", ie. always check the clean flag unless -f has been specified. I don't know if there is any change a disk could look clean even if it has been modified, if there are they need to be fixed first (writing the clean flag off on first access?) >Audit-Trail: >Unformatted: