svn commit: r261867 - head/sys/vm

2014-02-13 Thread Attilio Rao
Author: attilio
Date: Fri Feb 14 03:34:12 2014
New Revision: 261867
URL: http://svnweb.freebsd.org/changeset/base/261867

Log:
  Fix-up r254141: in the process of making a failing vm_page_rename()
  a call of pager_swap_freespace() was moved around, now leading to freeing
  the incorrect page because of the pindex changes after vm_page_rename().
  
  Get back to use the correct pindex when destroying the swap space.
  
  Sponsored by: EMC / Isilon storage division
  Reported by:  avg
  Tested by:pho
  MFC after:7 days

Modified:
  head/sys/vm/vm_object.c

Modified: head/sys/vm/vm_object.c
==
--- head/sys/vm/vm_object.c Fri Feb 14 03:30:55 2014(r261866)
+++ head/sys/vm/vm_object.c Fri Feb 14 03:34:12 2014(r261867)
@@ -1627,9 +1627,11 @@ vm_object_backing_scan(vm_object_t objec
p = TAILQ_FIRST(backing_object-memq);
continue;
}
+
+   /* Use the old pindex to free the right page. */
if (backing_object-type == OBJT_SWAP)
-   swap_pager_freespace(backing_object, p-pindex,
-   1);
+   swap_pager_freespace(backing_object,
+   new_pindex + backing_offset_index, 1);
 
 #if VM_NRESERVLEVEL  0
/*
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org


Re: svn commit: r261867 - head/sys/vm

2014-02-13 Thread Andriy Gapon
on 14/02/2014 05:34 Attilio Rao said the following:
 Author: attilio
 Date: Fri Feb 14 03:34:12 2014
 New Revision: 261867
 URL: http://svnweb.freebsd.org/changeset/base/261867
 
 Log:
   Fix-up r254141: in the process of making a failing vm_page_rename()
   a call of pager_swap_freespace() was moved around, now leading to freeing
   the incorrect page because of the pindex changes after vm_page_rename().
   
   Get back to use the correct pindex when destroying the swap space.
   
   Sponsored by:   EMC / Isilon storage division
   Reported by:avg
   Tested by:  pho
   MFC after:  7 days

Thank you!
I also have not seen any of my previous problems since I started using the 
patch.

 Modified:
   head/sys/vm/vm_object.c
 
 Modified: head/sys/vm/vm_object.c
 ==
 --- head/sys/vm/vm_object.c   Fri Feb 14 03:30:55 2014(r261866)
 +++ head/sys/vm/vm_object.c   Fri Feb 14 03:34:12 2014(r261867)
 @@ -1627,9 +1627,11 @@ vm_object_backing_scan(vm_object_t objec
   p = TAILQ_FIRST(backing_object-memq);
   continue;
   }
 +
 + /* Use the old pindex to free the right page. */
   if (backing_object-type == OBJT_SWAP)
 - swap_pager_freespace(backing_object, p-pindex,
 - 1);
 + swap_pager_freespace(backing_object,
 + new_pindex + backing_offset_index, 1);
  
  #if VM_NRESERVLEVEL  0
   /*
 


-- 
Andriy Gapon
___
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to svn-src-head-unsubscr...@freebsd.org