]> mj.ucw.cz Git - libucw.git/blobdiff - lib/pagecache.h
Generate index cards.
[libucw.git] / lib / pagecache.h
index 0c8b4d673a8e1499115749378d8fca53660c8f56..698177f0e026765e47c476d87de740eeb60d27b4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Sherlock Library -- File Page Cache
  *
 /*
  *     Sherlock Library -- File Page Cache
  *
- *     (c) 1999 Martin Mares <mj@atrey.karlin.mff.cuni.cz>
+ *     (c) 1999 Martin Mares <mj@ucw.cz>
  */
 
 #ifndef _SHERLOCK_PAGECACHE_H
  */
 
 #ifndef _SHERLOCK_PAGECACHE_H
@@ -14,7 +14,8 @@ struct page_cache;
 struct page {
   node n;                              /* Node in page list */
   node hn;                             /* Node in hash table */
 struct page {
   node n;                              /* Node in page list */
   node hn;                             /* Node in hash table */
-  sh_off_t key;                                /* Lower bits contain file handle */
+  sh_off_t pos;
+  uns fd;
   uns flags;
   uns lock_count;
   byte data[0];
   uns flags;
   uns lock_count;
   byte data[0];
@@ -34,6 +35,5 @@ struct page *pgc_get_zero(struct page_cache *, int fd, sh_off_t); /* ... and cle
 void pgc_put(struct page_cache *, struct page *);              /* Release page */
 void pgc_mark_dirty(struct page_cache *, struct page *);       /* Mark locked page as dirty */
 byte *pgc_read_data(struct page_cache *, int fd, sh_off_t, uns *);     /* Partial reading */
 void pgc_put(struct page_cache *, struct page *);              /* Release page */
 void pgc_mark_dirty(struct page_cache *, struct page *);       /* Mark locked page as dirty */
 byte *pgc_read_data(struct page_cache *, int fd, sh_off_t, uns *);     /* Partial reading */
-sh_off_t pgc_page_pos(struct page_cache *, struct page *);     /* Get page position */
 
 #endif
 
 #endif