[haiku-bugs] Re: [Haiku] #8971: When moving swap file locations, old swap file is left on each device

  • From: "kallisti5" <trac@xxxxxxxxxxxx>
  • Date: Mon, 10 Sep 2012 11:57:39 -0000

#8971: When moving swap file locations, old swap file is left on each device
-----------------------------+----------------------------
   Reporter:  kallisti5      |      Owner:  axeld
       Type:  bug            |     Status:  new
   Priority:  normal         |  Milestone:  R1
  Component:  System/Kernel  |    Version:  R1/Development
 Resolution:                 |   Keywords:
 Blocked By:                 |   Blocking:
Has a Patch:  0              |   Platform:  All
-----------------------------+----------------------------
Description changed by kallisti5:

Old description:

> When you move swap locations, an old swap file is left on the previous
> device. This file can be erased by hand post-reboot, however it should be
> cleaned up automatically.
>
> Process:
>  * Swap file location changed by user
>  * Swap file is in use by os... so it can't be erased
>  * After reboot, kernel uses new swap file specified.
>  * Old swap file still exists.
>
> This is generally a problem of knowing where the old swap file *was* on
> reboot.  a syscall may be a good solution (not requiring a reboot for
> swapfile changes, maybe a _kern_swap_reprovision call that will:
>  * Make the kernel erase the flush the swap file into memory (if
> possible)
>  * Make the kernel erase the current swap file from disk, and re-read the
> virtual_memory config to set up the new swap file.

New description:

 When you move swap locations, an old swap file is left on the previous
 device. This file can be erased by hand post-reboot, however it should be
 cleaned up automatically.

 Process:
  * Swap file location changed by user
  * Swap file is in use by os... so it can't be erased
  * After reboot, kernel uses new swap file specified.
  * Old swap file still exists.

 This is generally a problem of knowing where the old swap file *was* on
 reboot.  a syscall may be a good solution (not requiring a reboot for
 swapfile changes, maybe a _kern_swap_reprovision call that will:
  * Make the kernel flush the swap file into memory (if possible or return
 a failure)
  * Make the kernel erase the current swap file from disk, and re-read the
 virtual_memory config to set up the new swap file.

--

-- 
Ticket URL: <http://dev.haiku-os.org/ticket/8971#comment:1>
Haiku <http://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: