lkml.org 
[lkml]   [2022]   [Jun]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 2/2] mm/swapfile: release swap info when swap device is unpluged
From
Date
On 2022/6/15 19:22, Christoph Hellwig wrote:
> Sorry, but this is simply broken. We can't just do d_path magic
> here. That being said the problem is real, and I think the right
> answer is to offer a swapoff variant that doesn't need to open the
> underlying device or file, but useѕ some kind of handle. I'm just

When swap device is unplugged, the swap_file->f_path.dentry will be in the
d_unlinked() status. Could we use it to detect the problem instead? IMHO, we
can found the unplugged swap devices this way and further get the right swap
device to swapoff through comparing the swap device name with @specialfile.
Or am I miss something?

> not sure what would be a good handle here.

Using handle sounds like a good idea too. :) But can the above solution be acceptable?

> .
>

Thanks!


\
 
 \ /
  Last update: 2022-06-16 09:02    [W:0.257 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site