[dm-devel] dm-thin: delete device could take lots of time

Dennis Yang shinrairis at gmail.com
Thu Apr 2 10:28:57 UTC 2015


Hi,

I had noticed that deleting a large fully mapped thin device (> 10TB)
on a pool with small block size could take couple of minutes, for it
needs to traverse all the way down to the tree to decrement the
reference count of all mapped blocks. Since deleting device needs to
take "pmd->root_lock" write lock, I/O will hang since it also need to
held this lock for finding block mapping, provisioning blocks, or
breaking shared blocks. Some applications will treat the long I/O
response time as I/O error and the service will become offline. I had
traced the code and wished to find a way to release this lock every
couple of seconds when deleting a large thin device. However, since I
cannot figure out any elegant and formal way to do so. I am wondering
if someone can shed some light on this problem. Is there any way I can
pull this off nice and clean?

Any help would be grateful.
Thanks for your patience.

Dennis




More information about the dm-devel mailing list