]> git.baikalelectronics.ru Git - kernel.git/commit
md/raid1: introduce wait_for_serialization
authorGuoqing Jiang <guoqing.jiang@cloud.ionos.com>
Mon, 23 Dec 2019 09:49:02 +0000 (10:49 +0100)
committerSong Liu <songliubraving@fb.com>
Mon, 13 Jan 2020 19:44:10 +0000 (11:44 -0800)
commit85d1e360a1fff23d75a4979ce2176ea6d5fc0050
tree685b048c60c1bb7d88873645ebe3a46f0207eed7
parent17a00cedc2aafcad6be174ea267f2fbb14f21498
md/raid1: introduce wait_for_serialization

Previously, we call check_and_add_serial when serialization is
enabled for write IO, but it could allocate and free memory
back and forth.

Now, let's just get an element from memory pool with the new
function, then insert node to rb tree if no collision happens.

Signed-off-by: Guoqing Jiang <guoqing.jiang@cloud.ionos.com>
Signed-off-by: Song Liu <songliubraving@fb.com>
drivers/md/raid1.c