git: DragonFly_RELEASE_5_0 kernel - Refuse to swapoff under certain conditions

Matthew Dillon dillon at crater.dragonflybsd.org
Thu Oct 5 23:29:53 PDT 2017


commit e57bf7ed301cbf4c99ecb0cbec9c899eee0ea156
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Thu Oct 5 22:59:40 2017 -0700

    kernel - Refuse to swapoff under certain conditions
    
    * Both tmpfs and vn can't handle swapoff's method of bringing pages
      back in from the swap partition being decomissioned.
    
    * Fixing this properly is fairly involved. The normal swapoff procedure
      is to page swap into the related VM object, but tmpfs and vn use their
      VM objects ONLY to track swap blocks and not for vm_page manipulation,
      so that just won't work.  In addition, the swap code may associate
      a swap block with a VM object before issuing the write I/O to page
      out the data, and the swapoff code's asynchronous pagein might cause
      problems.
    
      For now, just make sure that swapoff refuses to remove the partition
      under these conditions, so it doesn't blow up tmpfs or vn.

Summary of changes:
 sys/dev/disk/vn/vn.c       |  1 +
 sys/vfs/tmpfs/tmpfs_subr.c |  1 +
 sys/vm/swap_pager.c        | 11 +++++++++++
 sys/vm/vm_object.h         | 15 ++++++++++-----
 4 files changed, 23 insertions(+), 5 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/e57bf7ed301cbf4c99ecb0cbec9c899eee0ea156


-- 
DragonFly BSD source repository



More information about the Commits mailing list