blk/kernel: improve DiscardThread life cycle.
Reviewed-by: Yite Gu <guyite@bytedance.com>
virtual void _pre_close() { } // hook for child implementations
void _aio_thread();
- void _discard_thread(uint64_t tid);
+ void _discard_thread(DiscardThread* thr);
bool _queue_discard(interval_set<uint64_t> &to_release);
- bool try_discard(interval_set<uint64_t> &to_release, bool async = true) override;
+ bool try_discard(interval_set<uint64_t> &to_release,
+ bool async = true,
+ bool force = false) override;
int _aio_start();
void _aio_stop();