[lc-checkins] CVS: linux/include/linux comp_cache.h,1.97,1.98
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@us...> - 2002-07-31 12:31:08
|
Update of /cvsroot/linuxcompressed/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv23025/include/linux Modified Files: comp_cache.h Log Message: Bug fixes o Fixed "kernel BUG at inode.c:518". That bug happened when, after truncating all the pages from an inode, there are still pending pages in that mapping. That scenario could occur if a certain fragment happens to waiting to lock its comp_page in order to be effectively freed. In this case, the fragment got removed from comp cache data structures, but not from the mapping data structures while waiting for its fragment->comp_page lock, so it was taken as being in the mapping (well, as a clean mapped page actually) in spite of having a zero counter. That was fixed by removing the fragment from the mapping structures too. o Fixed "oops in ext2_check_page()" bug. That bug could happen because a page, after being compressed in compress_clean_page(), could be removed from page cache (in shrink_cache()) even if it is not freeable (!is_page_cache_freeable()). So, ext2_check_page(), which assumes that the page wouldn't be removed since it has a reference on the page, accesses directly the page->mapping pointer and oopses, because that pointer is set to NULL after removing from page cache. The fix was very simple. We check, with the pagecache lock held, if the page is freeable after compressing it. In this case, it is not removed from page cache and is kept on the inactive list. Cleanup o Cleanup in lookup_comp_pages() o find_and_dirty_page() renamed to find_or_add_page() o __find_lock_page() does not read pages from comp cache if the page is not found in page cache. Index: comp_cache.h =================================================================== RCS file: /cvsroot/linuxcompressed/linux/include/linux/comp_cache.h,v retrieving revision 1.97 retrieving revision 1.98 diff -C2 -r1.97 -r1.98 *** comp_cache.h 28 Jul 2002 15:47:04 -0000 1.97 --- comp_cache.h 31 Jul 2002 12:31:05 -0000 1.98 *************** *** 2,6 **** * linux/mm/comp_cache.h * ! * Time-stamp: <2002-07-28 10:08:41 rcastro> * * Linux Virtual Memory Compressed Cache --- 2,6 ---- * linux/mm/comp_cache.h * ! * Time-stamp: <2002-07-29 09:43:00 rcastro> * * Linux Virtual Memory Compressed Cache *************** *** 63,68 **** unsigned short offset; - /* index != 0 && compressed_size == 0 => page stored uncompressed */ - /* index == 0 && compressed_size != 0 => compressed_size = free_space */ unsigned short compressed_size; unsigned long flags; --- 63,66 ---- |