mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
blk: introduce REQ_SWAP
Just like REQ_META, it's important to know the IO coming down is swap in order to guard against potential IO priority inversion issues with cgroups. Add REQ_SWAP and use it for all swap IO, and add it to our bio_issue_as_root_blkg helper. Signed-off-by: Josef Bacik <jbacik@fb.com> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
903d23f0a3
commit
0d1e0c7cd5
3 changed files with 4 additions and 3 deletions
|
@ -254,7 +254,7 @@ static inline struct blkcg *bio_blkcg(struct bio *bio)
|
|||
*/
|
||||
static inline bool bio_issue_as_root_blkg(struct bio *bio)
|
||||
{
|
||||
return (bio->bi_opf & REQ_META);
|
||||
return (bio->bi_opf & (REQ_META | REQ_SWAP)) != 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue