Date: Tue, 20 Mar 2012 21:02:34 +0100 From: rank1seeker@gmail.com To: "RW" <rwmaillists@googlemail.com>, hackers@freebsd.org Subject: Re: BUG: REL 9.0 - MD malloc of custom sector size Message-ID: <20120320.200234.909.1@DOMY-PC> In-Reply-To: <20120318134156.61d6db61@gumby.homeunix.com> References: <20120318.130139.003.1@DOMY-PC> <20120318134156.61d6db61@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
----- Original Message ----- From: RW <rwmaillists@googlemail.com> To: freebsd-hackers@freebsd.org Date: Sun, 18 Mar 2012 13:41:56 +0000 Subject: Re: BUG: REL 9.0 - MD malloc of custom sector size > On Sun, 18 Mar 2012 14:01:39 +0100 > rank1seeker@gmail.com wrote: > > > man mdconfig > > ---- > > -S sectorsize to use for malloc backed device > > ---- > > > > I want to create MD device, with sector size of 4 Kb. > > > > It is CRITICAL to NOT append ANY suffixes, when specifing size, via > > '-s' flag in order to use sectors, to set it's size. # mdconfig -a -t > > malloc -S 4096 -s 32768 > > > > This should created dev of 128 Mb in size. > > 32768 sectors * 4 Kb each = 131072 Kb = 128 Mb > > Not! It created dev of 16 Mb in size, because sector size remained at > > 512 bytes. > > > From mdconfig 8 > > "Size is the number of 512 byte sectors unless ..." > > Looks to me like it's doing what it said it would. > > BTW are you sure you want to use "-t malloc". This keeps the files > (even the deleted ones) in memory unconditionally while ordinary > process memory is paged-out. > My MAIN reason to hassle with MD here, is to test a custom sector size. This can be done with '-S' flag only, in order to set sectorsize of /dev/md* But as it is malloc ONLY option/flag, I must combine it with '-t malloc' Then I've defined it's size by amount of sectors and as I've redefined size of 1 sector, it simply isn't doing it's task. Because it enforces hardcoded size of 512 bytes, so documentation should not misleadingly refer to sector in any way, but a hardcode value of 0.5 Kb, no matter of real/actual sector size is. Domagoj Smolčić
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120320.200234.909.1>
