ideas

来自「create raid tool at linux」· 代码 · 共 24 行

TXT
24
字号
On Speeding up RAID5 ReconfigurationPass 1:if we're adding disks	for each new disk		for each block			if it's not a parity block				convert it to a global block # & wish for itPass 2:for each block not yet wished for	wish for itIn general:	The routine that attempts to find a large contiguous read for each disk needs work.  When adding wished-for blocks, we need a way to determineif block N-1 or N+1 is already present.  A bit-map could work for this.Later, when we're looking for the largest contiguous stretch, we need thelengths of each run.  Again, using a bit-map, a single pass through the mapcould give us the beginning block # and length.  Sorting that, we just stepthrough the resulting array, reading/writing the runs.  We also need to clearthe bits as they're processed, in preperation for the next pass.

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?