[lc-checkins] CVS: linux/include/linux comp_cache.h,1.103,1.104
Status: Beta
Brought to you by:
nitin_sf
From: Rodrigo S. de C. <rc...@us...> - 2002-11-26 21:42:34
|
Update of /cvsroot/linuxcompressed/linux/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv8394/include/linux Modified Files: comp_cache.h Log Message: Cleanup o Remove unused CF_End and related macros o Removed special cases in get_comp_cache_page() where there were the comp_page structure, but no page was set to it. o Removed set_comp_page() function, which is not needed any longer. Bug fixes o Fixed, at least partially, bug reported by Claudio Martella. The free space in compressed cache wasn't accounted correctly in compact_comp_cache(). Pages were removed from their original locations, increasing the comp_cache_free_space variable, but not decreasing when they were relocated. o Fixed bug that would account erroneously the number of allocated pages if any allocation (page or structure of the compressed cache) failed in the boot process. That can be worse when a static compressed cache is used. It would also oops if neither the page nor the fragment structure could be allocated. This bug is fixed too. Index: comp_cache.h =================================================================== RCS file: /cvsroot/linuxcompressed/linux/include/linux/comp_cache.h,v retrieving revision 1.103 retrieving revision 1.104 diff -C2 -r1.103 -r1.104 *** comp_cache.h 22 Nov 2002 16:01:33 -0000 1.103 --- comp_cache.h 26 Nov 2002 21:42:32 -0000 1.104 *************** *** 2,6 **** * linux/mm/comp_cache.h * ! * Time-stamp: <2002-11-21 16:46:32 rcastro> * * Linux Virtual Memory Compressed Cache --- 2,6 ---- * linux/mm/comp_cache.h * ! * Time-stamp: <2002-11-26 19:35:01 rcastro> * * Linux Virtual Memory Compressed Cache *************** *** 31,35 **** #include <linux/minilzo.h> ! #define COMP_CACHE_VERSION "0.24pre5" /* maximum compressed size of a page */ --- 31,35 ---- #include <linux/minilzo.h> ! #define COMP_CACHE_VERSION "0.24pre6" /* maximum compressed size of a page */ *************** *** 182,186 **** #define CF_ToBeFreed 1 #define CF_Active 2 - #define CF_End 3 #define CompFragmentDirty(fragment) test_bit(CF_Dirty, &(fragment)->flags) --- 182,185 ---- *************** *** 200,209 **** #define CompFragmentClearActive(fragment) clear_bit(CF_Active, &(fragment)->flags) - #define CompFragmentEnd(fragment) test_bit(CF_End, &(fragment)->flags) - #define CompFragmentSetEnd(fragment) set_bit(CF_End, &(fragment)->flags) - #define CompFragmentTestandSetEnd(fragment) test_and_set_bit(CF_End, &(fragment)->flags) - #define CompFragmentTestandClearEnd(fragment) test_and_clear_bit(CF_End, &(fragment)->flags) - #define CompFragmentClearEnd(fragment) clear_bit(CF_End, &(fragment)->flags) - /* general */ #define get_fragment(f) do { \ --- 199,202 ---- *************** *** 504,508 **** /* aux.c */ unsigned long long big_division(unsigned long long, unsigned long long); - inline void set_comp_page(struct comp_cache_page *, struct page *); inline void check_all_fragments(struct comp_cache_page *); void add_to_comp_page_list(struct comp_cache_page *, struct comp_cache_fragment *); --- 497,500 ---- |