mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 18:23:53 +08:00
dm writecache: add unlikely for getting two block with same LBA
In function writecache_writeback, entries g and f has same original sector only happens at entry f has been committed, but entry g has NOT yet. The probability of this happening is very low in the following 256 blocks at most of entry e. Signed-off-by: Huaisheng Ye <yehs1@lenovo.com> Acked-by: Mikulas Patocka <mpatocka@redhat.com> Signed-off-by: Mike Snitzer <snitzer@redhat.com>
This commit is contained in:
parent
58912dbce6
commit
62421b3880
@ -1628,8 +1628,8 @@ restart:
|
||||
if (unlikely(!next_node))
|
||||
break;
|
||||
g = container_of(next_node, struct wc_entry, rb_node);
|
||||
if (read_original_sector(wc, g) ==
|
||||
read_original_sector(wc, f)) {
|
||||
if (unlikely(read_original_sector(wc, g) ==
|
||||
read_original_sector(wc, f))) {
|
||||
f = g;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user