]> git.baikalelectronics.ru Git - kernel.git/commit
IB/fmr_pool: ib_fmr_pool_flush() should flush all dirty FMRs
authorOlaf Kirch <olaf.kirch@oracle.com>
Wed, 16 Jan 2008 17:37:16 +0000 (18:37 +0100)
committerRoland Dreier <rolandd@cisco.com>
Fri, 25 Jan 2008 22:15:43 +0000 (14:15 -0800)
commit9a23fab54734f95275c741c4b737c01c4bf19785
tree1576c829374700bb774ed6e560aa9be318240526
parent4a1bb4ad9db7388dcc0d02e5384711f37c51ddac
IB/fmr_pool: ib_fmr_pool_flush() should flush all dirty FMRs

When a FMR is released via ib_fmr_pool_unmap(), the FMR usually ends
up on the free_list rather than the dirty_list (because we allow a
certain number of remappings before actually requiring a flush).

However, ib_fmr_batch_release() only looks at dirty_list when flushing
out old mappings.  This means that when ib_fmr_pool_flush() is used to
force a flush of the FMR pool, some dirty FMRs that have not reached
their maximum remap count will not actually be flushed.

Fix this by flushing all FMRs that have been used at least once in
ib_fmr_batch_release().

Signed-off-by: Olaf Kirch <olaf.kirch@oracle.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/infiniband/core/fmr_pool.c