BUG: REL 9.0 - MD malloc of custom sector size

RW rwmaillists at googlemail.com
Sun Mar 18 13:42:06 UTC 2012


On Sun, 18 Mar 2012 14:01:39 +0100
rank1seeker at 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. 





More information about the freebsd-hackers mailing list