Please enable JavaScript.
Coggle requires JavaScript to display documents.
how to support raid1 in libublk - Coggle Diagram
how to support raid1 in libublk
motvion
support raid1 with basic function
resync
write consistence
bitmap or journal
mark chunk bit dirty first
write data to member disks after all markings are done
clear chunk dirty bit
bitmap dirty flushing is done in unplug for one whole batch
superblock
problems
liubblk doesn't have batch concept
each task is just standalone
now we need to know which batch one ublk io command belongs to
then communicate among tasks in this batch
pre-allocate batch bg task
how to associate the batch bg task with io task?
dynamic batch id
allocate by slab
when is the batch released?
all commands in this batch are completed
how does each io task get the batch id?
define batch_id as thread_local!(cell), and set it before calling try_tick()
get batch_id when ublk io command comes, can't be retrieved from then on
how/when is the batch built?
call something after while exe.try_tick(){}, and use one semaphore to notify io tasks
journal abstract
buffer
LBA range
multiple entries
each entry size is one lbs
use sbitmap to allocate entry or entries