Re: [PATCH v2 2/3] mm/swap: use swap_ops to register swap device's methods

From: Chris Li

Date: Wed Apr 08 2026 - 12:27:46 EST


On Wed, Apr 8, 2026 at 8:46 AM Baoquan He <bhe@xxxxxxxxxx> wrote:
> Both is fine to me. I will change to do the checking in
> setup_swap_ops(). By the way, I tend to rename setup_swap_ops() as
> init_swap_ops(), is it OK to you?

Sure. Eventually we will need a function to detect the swap device and
decide which type of swap ops to use. This is just like in the file
system after reading the super block. The kernel need to probe which
file system driver to load.

Chris