Update of /cvsroot/linuxcompressed/linux/mm
In directory usw-pr-cvs1:/tmp/cvs-serv8044/mm
Modified Files:
filemap.c page_alloc.c
Log Message:
- Fixed a bug that caused FS corruption (hit under UML).
Details:
http://sourceforge.net/tracker/index.php?func=detail&aid=561171&group_id=13472&atid=113472
- Resizing compressed cache size now fix normal Zone Watermarks too
Index: filemap.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/filemap.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -r1.25 -r1.26
*** filemap.c 8 May 2002 20:24:34 -0000 1.25
--- filemap.c 28 May 2002 19:16:14 -0000 1.26
***************
*** 757,761 ****
int error = 0;
#ifdef CONFIG_COMP_PAGE_CACHE
! if (read_comp_cache(mapping, offset, page))
#endif
error = mapping->a_ops->readpage(file, page);
--- 757,763 ----
int error = 0;
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!read_comp_cache(mapping, offset, page))
! SetPageUptodate(page);
! else
#endif
error = mapping->a_ops->readpage(file, page);
***************
*** 1612,1617 ****
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!read_comp_cache(mapping, index, page))
goto page_ok;
#endif
goto readpage;
--- 1614,1621 ----
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!read_comp_cache(mapping, index, page)) {
! SetPageUptodate(page);
goto page_ok;
+ }
#endif
goto readpage;
***************
*** 2914,2918 ****
#ifdef CONFIG_COMP_PAGE_CACHE
! if (read_comp_cache(mapping, index, page))
#endif
err = filler(data, page);
--- 2918,2924 ----
#ifdef CONFIG_COMP_PAGE_CACHE
! if (!read_comp_cache(mapping, index, page))
! SetPageUptodate(page);
! else
#endif
err = filler(data, page);
Index: page_alloc.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/mm/page_alloc.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -r1.17 -r1.18
*** page_alloc.c 21 May 2002 18:49:06 -0000 1.17
--- page_alloc.c 28 May 2002 19:16:14 -0000 1.18
***************
*** 19,22 ****
--- 19,23 ----
#include <linux/slab.h>
#include <linux/compiler.h>
+ #include <linux/comp_cache.h>
int nr_swap_pages;
***************
*** 627,631 ****
#ifdef CONFIG_COMP_CACHE
! void comp_cache_fix_watermarks(int num_comp_pages)
{
unsigned long mask;
--- 628,633 ----
#ifdef CONFIG_COMP_CACHE
! void
! comp_cache_fix_watermarks(int num_comp_pages)
{
unsigned long mask;
***************
*** 646,657 ****
mask = zone_balance_max[j];
- printk("Compressed Cache: page watermarks (normal zone)\n"
- "Compressed Cache: (%lu, %lu, %lu) -> ",
- zone->pages_min, zone->pages_low, zone->pages_high);
zone->pages_min = mask;
zone->pages_low = mask*2;
zone->pages_high = mask*3;
printk("(%lu, %lu, %lu)\n", zone->pages_min, zone->pages_low, zone->pages_high);
}
#endif
--- 648,669 ----
mask = zone_balance_max[j];
zone->pages_min = mask;
zone->pages_low = mask*2;
zone->pages_high = mask*3;
+
+ zone_num_comp_pages = num_comp_pages;
+ }
+
+ void __init
+ comp_cache_init_fix_watermarks(int num_comp_pages)
+ {
+ zone_t *zone = contig_page_data.node_zones + ZONE_NORMAL;
+
+ printk("Compressed Cache: page watermarks (normal zone)\nCompressed Cache: (%lu, %lu, %lu) -> ",
+ zone->pages_min, zone->pages_low, zone->pages_high);
+ comp_cache_fix_watermarks(num_comp_pages);
printk("(%lu, %lu, %lu)\n", zone->pages_min, zone->pages_low, zone->pages_high);
}
+
#endif
|