From owner-freebsd-hackers@FreeBSD.ORG Thu May 13 05:29:25 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E2A516A4CE for ; Thu, 13 May 2004 05:29:25 -0700 (PDT) Received: from darkness.comp.waw.pl (darkness.comp.waw.pl [195.117.238.236]) by mx1.FreeBSD.org (Postfix) with ESMTP id 533E343D3F for ; Thu, 13 May 2004 05:29:24 -0700 (PDT) (envelope-from pjd@darkness.comp.waw.pl) Received: by darkness.comp.waw.pl (Postfix, from userid 1009) id 062B6ACAF1; Thu, 13 May 2004 14:29:20 +0200 (CEST) Date: Thu, 13 May 2004 14:29:20 +0200 From: Pawel Jakub Dawidek To: Mike Bristow Message-ID: <20040513122919.GQ845@darkness.comp.waw.pl> References: <1084367285.88529.35.camel@singsing> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="K5roPakIqCb4O6y8" Content-Disposition: inline In-Reply-To: <1084367285.88529.35.camel@singsing> User-Agent: Mutt/1.4.2i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 5.2.1-RC2 i386 cc: freebsd-hackers@freebsd.org Subject: Re: md(8) panic X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 May 2004 12:29:25 -0000 --K5roPakIqCb4O6y8 Content-Type: text/plain; charset=iso-8859-2 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 12, 2004 at 02:08:05PM +0100, Mike Bristow wrote: +> Hi, +>=20 +> I am trying to access some ancient 5 1/4" floppies, with 256 byte +> sectors. Leaving aside the interesting hardware problems, the +> filesystem on these disks is (surprisingly enough) not supported on +> -CURRENT. While attempting to write one, I ran: +>=20 +> # mdconfig -a -t malloc -S 256 -s 20 +>=20 +> Thinking that this would give me some fake media to play with. Instead, +> it panics the box. +>=20 +> This happens at line 809 of md.c version 1.222 which says: +>=20 +> sc->nsect /=3D (sc->secsize / DEV_BSIZE); +>=20 +> (where sc->secsize has been initialised to 256, as per=20 +> my request). +>=20 +> It would be easy to check for, and reject, such requests, but should +> md(8) allow people to create such devices? Or am I being silly in even +> asking for it? This sector size is valid and shouldn't be rejected. This patch works for me: http://people.freebsd.org/~pjd/patches/md.c.3.patch --=20 Pawel Jakub Dawidek http://www.FreeBSD.org pjd@FreeBSD.org http://garage.freebsd.pl FreeBSD committer Am I Evil? Yes, I Am! --K5roPakIqCb4O6y8 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAo2ofForvXbEpPzQRAsAQAKClrEzzjh+heOQufIHQs48qGmZrWQCfYkhl 1+4BQwKydKSHvUpHXHdoF2M= =VFX7 -----END PGP SIGNATURE----- --K5roPakIqCb4O6y8--