Received: by mail.netbsd.org (Postfix, from userid 605) id 77E6114A409; Sat, 7 Nov 2015 20:31:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id A8B8F14A407 for ; Sat, 7 Nov 2015 20:30:57 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 0Tbj1RwdW9RW for ; Sat, 7 Nov 2015 20:30:56 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id 4429D14A405 for ; Sat, 7 Nov 2015 20:30:56 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 4198698; Sat, 7 Nov 2015 20:30:56 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sat, 7 Nov 2015 20:30:56 +0000 From: "Soren Jacobsen" Subject: CVS commit: [netbsd-5-1] src/sys/ufs/lfs To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20151107203056.4198698@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Soren Jacobsen" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: snj Date: Sat Nov 7 20:30:56 UTC 2015 Modified Files: src/sys/ufs/lfs [netbsd-5-1]: lfs_segment.c Log Message: Pull up following revision(s) (requested by dholland in ticket #1974): sys/ufs/lfs/lfs_segment.c: revision 1.247 via patch Fix catastrophic bug in lfs_rewind() that changed segment numbers (lfs_curseg/lfs_nextseg in the superblock) using the wrong units. These fields are for whatever reason the start addresses of segments (measured in frags) rather than the segment numbers 0..n. This only apparently affects dumping from a mounted fs; however, it trashes the fs. I would really, really like to have a static analysis tool that can keep track of the units things are measured in, since fs code is full of conversion macros and the macros are named inscrutable things like "sntod" whose letters don't necessarily even correspond to the units they convert. It is surprising that more of these are not wrong. To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.213.18.1 src/sys/ufs/lfs/lfs_segment.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.