OSDN Git Service

dm writecache: add unlikely for getting two block with same LBA
authorHuaisheng Ye <yehs1@lenovo.com>
Sun, 25 Aug 2019 07:24:32 +0000 (15:24 +0800)
committerMike Snitzer <snitzer@redhat.com>
Mon, 26 Aug 2019 14:54:41 +0000 (10:54 -0400)
commit62421b3880c71da7ecbf9c4072dc64ef3e65ad0a
tree596013152e369e21cd0d41e34a1522c1b0ca1852
parent58912dbce6becd31c09b02a1a26b76a5ee23763b
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>
drivers/md/dm-writecache.c