Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Dec 2004 20:39:20 +0100
From:      "Poul-Henning Kamp" <phk@phk.freebsd.dk>
To:        des@des.no (=?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=)
Cc:        geom@freebsd.org
Subject:   Re: GEOM_VOL panics when audio CD is present 
Message-ID:  <47024.1104435560@critter.freebsd.dk>
In-Reply-To: Your message of "Thu, 30 Dec 2004 20:28:24 %2B0100." <xzpsm5nvb53.fsf@dwp.des.no> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <xzpsm5nvb53.fsf@dwp.des.no>, =?iso-8859-1?q?Dag-Erling_Sm=F8rgrav?=
 writes:
>--=-=-=
>Content-Type: text/plain; charset=iso-8859-1
>Content-Transfer-Encoding: quoted-printable
>
>Any objections to the attached patch?  It's not the most efficient
>solution, but it is the one least likely to give us surprises down the
>road.

I think the right check is to make sure the sectorsize is a power
of two && > DEV_BSIZE.


	if (!powerof2(cp->provider->sectorsize) || 
	    cp->provider->sectorsize < DEV_BSIZE)
		return (EINVAL)

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47024.1104435560>