[lc-checkins] CVS: linux/fs buffer.c,1.13,1.14
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-05-02 16:31:40
|
Update of /cvsroot/linuxcompressed/linux/fs
In directory usw-pr-cvs1:/tmp/cvs-serv5957/fs
Modified Files:
buffer.c
Log Message:
- Fixed compilation error in buffer.c when compiling it without compressed
cache.
- Fixed oops caused when running fillmem due to a null pointer
- Fixed major/minor faults for compressed cache. Now we have correct data
about when we actually had to perform IO to service a page fault.
- Improved support for clean pages. Now the clean page is compressed and
right away freed in shrink_cache().
- When a pte in do_no_page() has write access to the page, it's already set
as dirty. So, in the same way done in do_swap_page(), we already remove the
its fragment from compressed cache since it will need to be compressed again
anyway.
Index: buffer.c
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/fs/buffer.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** buffer.c 28 Apr 2002 20:51:33 -0000 1.13
--- buffer.c 2 May 2002 16:31:36 -0000 1.14
***************
*** 48,51 ****
--- 48,52 ----
#include <linux/module.h>
#include <linux/completion.h>
+ #include <linux/comp_cache.h>
#include <asm/uaccess.h>
***************
*** 2695,2701 ****
write_unlock(&hash_table_lock);
spin_unlock(&lru_list_lock);
gfp_mask = pf_gfp_mask(gfp_mask);
if (gfp_mask & __GFP_IO) {
! if (((gfp_mask & __GFP_HIGHIO) || !PageHighMem(page)) && !comp_cache_skip_buffer_freeing()) {
if (sync_page_buffers(bh)) {
/* no IO or waiting next time */
--- 2696,2704 ----
write_unlock(&hash_table_lock);
spin_unlock(&lru_list_lock);
+ if (comp_cache_skip_buffer_freeing())
+ return 0;
gfp_mask = pf_gfp_mask(gfp_mask);
if (gfp_mask & __GFP_IO) {
! if ((gfp_mask & __GFP_HIGHIO) || !PageHighMem(page)) {
if (sync_page_buffers(bh)) {
/* no IO or waiting next time */
|