Skip to contentSkip to conversation

why does dm-cache use dm_deferred_entry_inc?

DISCUSSION 倪源江 1 participant 1 message Nov 15, 2014 Device mapper

lore
Share & tools
lore

倪源江

author
#0 lore raw

Hello,

I'm reading the dm-cache code.I notice that before a bio is remapped and sent to the "real" device.the function "dm_deferred_entry_inc" will be invoked.And when a migration initiated ,the function "dm_deferred_set_add_work" will be invoked to determine whether start the migration immediately.I guess those operation are used to ensure some sort of synchronization.But i'm not sure which kind of synchronization it can ensure and why.

Or my understanding is completely wrong . they are not at all used for synchronization?

Can anyone help me about this question?Thanks,

Yuanjiang Ni