Commit 096386a5 authored by Kent Overstreet's avatar Kent Overstreet

bcachefs: discard path uses unlock_long()

Some (bad) devices can have really terrible discard latency; we don't
want them blocking memory reclaim and causing warnings.
Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
parent 3e44f325
...@@ -1715,7 +1715,7 @@ static int bch2_discard_one_bucket(struct btree_trans *trans, ...@@ -1715,7 +1715,7 @@ static int bch2_discard_one_bucket(struct btree_trans *trans,
* This works without any other locks because this is the only * This works without any other locks because this is the only
* thread that removes items from the need_discard tree * thread that removes items from the need_discard tree
*/ */
bch2_trans_unlock(trans); bch2_trans_unlock_long(trans);
blkdev_issue_discard(ca->disk_sb.bdev, blkdev_issue_discard(ca->disk_sb.bdev,
k.k->p.offset * ca->mi.bucket_size, k.k->p.offset * ca->mi.bucket_size,
ca->mi.bucket_size, ca->mi.bucket_size,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment