Thread: [lc-checkins] CVS: linux/include/linux comp_cache.h,1.54,1.55 fs.h,1.2,1.3
Status: Beta
Brought to you by:
nitin_sf
|
From: Rodrigo S. de C. <rc...@us...> - 2002-02-26 20:59:07
|
Update of /cvsroot/linuxcompressed/linux/include/linux
In directory usw-pr-cvs1:/tmp/cvs-serv20377/include/linux
Modified Files:
comp_cache.h fs.h
Log Message:
- Update to 2.4.18
- Some minor changes to make the code compile when CONFIG_COMP_CACHE is
disabled
Index: comp_cache.h
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/include/linux/comp_cache.h,v
retrieving revision 1.54
retrieving revision 1.55
diff -C2 -r1.54 -r1.55
*** comp_cache.h 26 Feb 2002 16:01:10 -0000 1.54
--- comp_cache.h 26 Feb 2002 20:59:01 -0000 1.55
***************
*** 2,6 ****
* linux/mm/comp_cache.h
*
! * Time-stamp: <2002-02-25 17:18:28 rcastro>
*
* Linux Virtual Memory Compressed Cache
--- 2,6 ----
* linux/mm/comp_cache.h
*
! * Time-stamp: <2002-02-26 13:48:02 rcastro>
*
* Linux Virtual Memory Compressed Cache
***************
*** 292,310 ****
void truncate_comp_pages(struct address_space *, unsigned long, unsigned);
void lookup_all_comp_pages(struct address_space *);
#else
! static inline int lookup_comp_cache(swp_entry_t entry) { return 0; }
static inline void invalidate_comp_page(struct address_space * mapping, unsigned long offset, struct page * page) { };
static inline void invalidate_comp_pages(struct address_space * mapping) { };
static inline void truncate_comp_pages(struct address_space * mapping, unsigned long start, unsigned partial) { };
static inline void lookup_all_comp_pages(struct address_space * mapping) { };
#endif
/* main.c */
#ifdef CONFIG_COMP_CACHE
! int compress_page(struct page *, int, unsigned int);
void comp_cache_init(void);
inline void init_comp_page(comp_cache_t **,struct page *);
#else
static inline void comp_cache_init(void) {};
#endif
--- 292,314 ----
void truncate_comp_pages(struct address_space *, unsigned long, unsigned);
void lookup_all_comp_pages(struct address_space *);
+ #define there_are_dirty_comp_pages(mapping) (!list_empty(&(mapping)->dirty_comp_pages))
#else
! static inline int lookup_comp_cache(struct address_space * mapping, unsigned long offset, struct page * page) { return -ENOENT; }
static inline void invalidate_comp_page(struct address_space * mapping, unsigned long offset, struct page * page) { };
static inline void invalidate_comp_pages(struct address_space * mapping) { };
static inline void truncate_comp_pages(struct address_space * mapping, unsigned long start, unsigned partial) { };
static inline void lookup_all_comp_pages(struct address_space * mapping) { };
+ #define there_are_dirty_comp_pages(mapping) 0
#endif
/* main.c */
#ifdef CONFIG_COMP_CACHE
! int compress_page(struct page *, int, unsigned int);
void comp_cache_init(void);
inline void init_comp_page(comp_cache_t **,struct page *);
+ inline int compress_clean_page(struct page *, unsigned int);
#else
static inline void comp_cache_init(void) {};
+ static inline int compress_clean_page(struct page * page, unsigned int gfp_mask) { return 0; }
#endif
***************
*** 366,375 ****
static inline void comp_cache_swp_duplicate(swp_entry_t entry) {};
! static inline int comp_cache_swp_free_generic(swp_entry_t entry, int free_fragment) { return 0; }
! static inline int comp_cache_swp_count(swp_entry_t entry) { return 0; }
static inline int comp_cache_available_space(void) { return 0; }
! static inline swp_entry_t get_virtual_swap_page(struct page * page, unsigned short count) { return ((swp_entry_t) { 0 }); }
static inline void remap_vswap_ptes(swp_entry_t entry, struct page * page) {};
--- 370,379 ----
static inline void comp_cache_swp_duplicate(swp_entry_t entry) {};
! static inline int comp_cache_swp_free(swp_entry_t entry) { return 0; }
! static inline int comp_cache_swp_count(swp_entry_t entry) { return 0; }
static inline int comp_cache_available_space(void) { return 0; }
! static inline swp_entry_t get_virtual_swap_page(void) { return (swp_entry_t) { 0 }; }
static inline void remap_vswap_ptes(swp_entry_t entry, struct page * page) {};
***************
*** 431,437 ****
/* aux.c */
unsigned long long big_division(unsigned long long, unsigned long long);
- inline int find_comp_page(struct address_space *, unsigned long, comp_cache_fragment_t **);
- comp_cache_t * find_and_lock_comp_page(swp_entry_t, comp_cache_fragment_t **);
inline void check_all_fragments(comp_cache_t *);
--- 435,439 ----
***************
*** 487,492 ****
--- 489,496 ----
#ifdef CONFIG_COMP_CACHE
inline int comp_cache_free_space(void);
+ inline int find_comp_page(struct address_space *, unsigned long, comp_cache_fragment_t **);
#else
static inline int comp_cache_free_space(void) { return 0; }
+ static inline int find_comp_page(struct address_space * mapping, unsigned long offset, comp_cache_fragment_t ** fragment) { return -ENOENT; }
#endif
Index: fs.h
===================================================================
RCS file: /cvsroot/linuxcompressed/linux/include/linux/fs.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** fs.h 25 Feb 2002 19:34:40 -0000 1.2
--- fs.h 26 Feb 2002 20:59:01 -0000 1.3
***************
*** 109,112 ****
--- 109,113 ----
#define MS_NODIRATIME 2048 /* Do not update directory access times */
#define MS_BIND 4096
+ #define MS_MOVE 8192
#define MS_REC 16384
#define MS_VERBOSE 32768
***************
*** 1217,1222 ****
extern int fsync_inode_data_buffers(struct inode *);
extern int inode_has_buffers(struct inode *);
! extern void filemap_fdatasync(struct address_space *);
! extern void filemap_fdatawait(struct address_space *);
extern void sync_supers(kdev_t);
extern int bmap(struct inode *, int);
--- 1218,1223 ----
extern int fsync_inode_data_buffers(struct inode *);
extern int inode_has_buffers(struct inode *);
! extern int filemap_fdatasync(struct address_space *);
! extern int filemap_fdatawait(struct address_space *);
extern void sync_supers(kdev_t);
extern int bmap(struct inode *, int);
***************
*** 1370,1373 ****
--- 1371,1386 ----
extern int set_blocksize(kdev_t, int);
extern struct buffer_head * bread(kdev_t, int, int);
+ static inline struct buffer_head * sb_bread(struct super_block *sb, int block)
+ {
+ return bread(sb->s_dev, block, sb->s_blocksize);
+ }
+ static inline struct buffer_head * sb_getblk(struct super_block *sb, int block)
+ {
+ return getblk(sb->s_dev, block, sb->s_blocksize);
+ }
+ static inline struct buffer_head * sb_get_hash_table(struct super_block *sb, int block)
+ {
+ return get_hash_table(sb->s_dev, block, sb->s_blocksize);
+ }
extern void wakeup_bdflush(void);
extern void put_unused_buffer_head(struct buffer_head * bh);
***************
*** 1389,1392 ****
--- 1402,1406 ----
extern int cont_prepare_write(struct page*, unsigned, unsigned, get_block_t*,
unsigned long *);
+ extern int generic_cont_expand(struct inode *inode, loff_t size) ;
extern int block_commit_write(struct page *page, unsigned from, unsigned to);
extern int block_sync_page(struct page *);
***************
*** 1396,1401 ****
int block_truncate_page(struct address_space *, loff_t, get_block_t *);
extern int generic_direct_IO(int, struct inode *, struct kiobuf *, unsigned long, int, get_block_t *);
- extern int waitfor_one_page(struct page*);
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
--- 1410,1416 ----
int block_truncate_page(struct address_space *, loff_t, get_block_t *);
extern int generic_direct_IO(int, struct inode *, struct kiobuf *, unsigned long, int, get_block_t *);
+ extern int waitfor_one_page(struct page *);
+ extern int writeout_one_page(struct page *);
extern int generic_file_mmap(struct file *, struct vm_area_struct *);
extern int file_read_actor(read_descriptor_t * desc, struct page *page, unsigned long offset, unsigned long size);
|