[RFC/Feature Request] bcache: support io priority
yangliming <[email protected]> Fri, 6 Feb 2026 10:38:44 +0800
| Newsgroups | org.kernel.vger.linux-bcache |
|---|---|
| Message-ID | <[email protected]> |
Hi bcache developers,
Many business scenarios require different IO priorities. After setting IO priorities, the goal is to have high-priority writes go to the SSD cache, while low-priority requests are bypassed to the HDD. Currently, the logic is:
```
if ((bio->bi_opf & (REQ_RAHEAD|REQ_BACKGROUND))) {
if (!(bio->bi_opf & (REQ_META|REQ_PRIO)) &&
(dc->cache_readahead_policy != BCH_CACHE_READA_ALL))
goto skip;
}
```
This logic allows IO requests to bypass, but the request type cannot be controlled in user space.
Could you support setting bypass based on IO request priority? Is such a requirement reasonable?