]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r312694: Make CTL ramdisk backend a real RAM disk.
authormav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 7 Feb 2017 01:58:02 +0000 (01:58 +0000)
committermav <mav@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 7 Feb 2017 01:58:02 +0000 (01:58 +0000)
commit0a84df06eaf00bfa5f2447678b330adb03e351a0
tree8fdc8e50996e61ac89ce6a3d30c51b7bff883311
parent3337d979ddb1ad28e40aeb5e4b197ea397a4d203
MFC r312694: Make CTL ramdisk backend a real RAM disk.

If "capacity" LU option is set, ramdisk backend now implements featured
thin provisioned disk, storing data in malloc(9) allocated memory blocks
of pblocksize bytes (default PAGE_SIZE or 4KB).  Additionally ~0.2% of LU
size is used for indirection tree (bigger pblocksize reduce the overhead).
Backend supports all unmap and anchor operations.  If configured capacity
is overflowed, proper error conditions are reported.

If "capacity" LU option is not set, the backend operates mostly the same
as before without allocating real storage: writes go to nowhere, reads
return zeroes, reporting that all LBAs are unmapped.

This backend is still mostly oriented on testing and benchmarking (it is
still a volatile RAM disk), but now it should allow to run real FS tests,
not only simple dumb dd.

git-svn-id: svn://svn.freebsd.org/base/stable/10@313371 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/cam/ctl/ctl_backend_ramdisk.c
usr.sbin/ctladm/ctladm.8