@yangdongsheng Thanks for your patch, for the situation 1.from empty to full and 2. full to empty, we can use it, but the question is that in my third test environment I use a larger minimum option so that the map result will not change after fstrim. Then in the script, it will return directly without wait. But that's not the real result. So how can I deal with this kinds of situations with wait_for?