[dm-devel] dm: add swap_slot_free_notify handler

Mike Snitzer snitzer at redhat.com
Thu Sep 22 00:14:28 UTC 2016


On Wed, Sep 21 2016 at  7:09pm -0400,
Wonhong Kwon <wonhong.kwon at lge.com> wrote:

> swap_slot_free_notify callback has been added to block_device_operations to
> allow freeing memory allocated by RAM-based swap device like zram or zswap
> more aggressively.
> 
> In case of device mapper, it is also required if mapped target is being
> used as swap device and it uses some in-memory metadata for swap entries.
> This patch introduces swap_slot_free_notify callback into dm_blk_ops and
> target device can implement its own handler to handle this via
> slot_free_notify in target_type.
> 
> Signed-off-by: Wonhong Kwon <wonhong.kwon at lge.com>

This change to DM core only makes sense once we have an upstream DM
target that implements slot_free_notify hook.




More information about the dm-devel mailing list