summaryrefslogtreecommitdiff
path: root/isofs/isofs.h
diff options
context:
space:
mode:
authorJustus Winter <4winter@informatik.uni-hamburg.de>2015-04-15 16:26:31 +0200
committerJustus Winter <4winter@informatik.uni-hamburg.de>2015-04-17 22:16:14 +0200
commit4266bb02b1f3342d3fc4920c07c71592a14acdd9 (patch)
treea8312d2209709d962cd3f71cc3cf0b3641a6b951 /isofs/isofs.h
parentc234e34ad80801acd902c6d4892a7722fd084a87 (diff)
isofs: port to libdiskfs' node cache
* isofs/inode.c: Drop all cache-related code. (diskfs_user_make_node): New function. (calculate_file_start): Check for `record' being null. (cache_id): New function. (read_node): Rename to diskfs_user_read_node and adopt accordingly. (diskfs_try_dropping_softrefs): Rename to diskfs_user_try_dropping_softrefs. * isofs/isofs.h (struct lookup_context): New definition. (cache_id): New declaration. * isofs/lookup.c (diskfs_lookup_hard): Adjust accordingly. * isofs/main.c (fetch_root): Likewise.
Diffstat (limited to 'isofs/isofs.h')
-rw-r--r--isofs/isofs.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/isofs/isofs.h b/isofs/isofs.h
index 68a94e93..3f6690be 100644
--- a/isofs/isofs.h
+++ b/isofs/isofs.h
@@ -56,6 +56,15 @@ struct user_pager_info
struct pager *p;
};
+struct lookup_context
+{
+ /* The directory record. Points somewhere into the disk_image. */
+ struct dirrect *dr;
+
+ /* The results of an rrip_scan_lookup call for this node. */
+ struct rrip_lookup rr;
+};
+
/* The physical media */
extern struct store *store;
@@ -87,7 +96,9 @@ void drop_pager_softrefs (struct node *);
void allow_pager_softrefs (struct node *);
void create_disk_pager (void);
-error_t load_inode (struct node **, struct dirrect *, struct rrip_lookup *);
+/* Given RECORD and RR, calculate the cache id. */
+error_t cache_id (struct dirrect *record, struct rrip_lookup *rr, ino_t *idp);
+
error_t calculate_file_start (struct dirrect *, off_t *, struct rrip_lookup *);
char *isodate_915 (char *, struct timespec *);