block: add cond_resched() to potentially long running ioctl discard loop