Date: Tue, 26 Aug 2008 13:20:23 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: "Poul-Henning Kamp" <phk@phk.freebsd.dk> Cc: freebsd-fs@freebsd.org Subject: Re: Sector size of 4096 bytes (not 512) Message-ID: <86vdxo10qw.fsf@ds4.des.no> In-Reply-To: <86zln011dz.fsf@ds4.des.no> ("Dag-Erling =?utf-8?Q?Sm=C3=B8rg?= =?utf-8?Q?rav=22's?= message of "Tue, 26 Aug 2008 13:06:32 %2B0200") References: <35438.1219736614@critter.freebsd.dk> <86zln011dz.fsf@ds4.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Sm=C3=B8rgrav <des@des.no> writes: > Doesn't newfs figure this out on its own, based on the parameters > reported by ata / cam? It does, actually: if (sectorsize =3D=3D 0) if (ioctl(disk.d_fd, DIOCGSECTORSIZE, §orsize) =3D=3D -= 1) sectorsize =3D 0; /* back out on error for safety */ /* ... */ if (fsize <=3D 0) fsize =3D MAX(DFL_FRAGSIZE, sectorsize); if (bsize <=3D 0) bsize =3D MIN(DFL_BLKSIZE, 8 * fsize); If I read the sysinstall code correctly, it won't specify a block and fragment size unless you actually press 'N' to set custom options - at which point it will initialize them to "-b 16384 -f 2048" (which are the newfs defaults for disks with sector sizes <=3D 2048) before displaying the dialog box where you can edit them. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86vdxo10qw.fsf>