diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-04-15 16:26:31 +0200 |
---|---|---|
committer | Justus Winter <4winter@informatik.uni-hamburg.de> | 2015-04-17 22:16:14 +0200 |
commit | 4266bb02b1f3342d3fc4920c07c71592a14acdd9 (patch) | |
tree | a8312d2209709d962cd3f71cc3cf0b3641a6b951 /isofs/main.c | |
parent | c234e34ad80801acd902c6d4892a7722fd084a87 (diff) | |
download | hurd-4266bb02b1f3342d3fc4920c07c71592a14acdd9.tar.gz hurd-4266bb02b1f3342d3fc4920c07c71592a14acdd9.tar.bz2 hurd-4266bb02b1f3342d3fc4920c07c71592a14acdd9.zip |
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/main.c')
-rw-r--r-- | isofs/main.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/isofs/main.c b/isofs/main.c index 4f531f7e..95c90fe8 100644 --- a/isofs/main.c +++ b/isofs/main.c @@ -44,20 +44,23 @@ int diskfs_maxsymlinks = 8; static void fetch_root () { - struct rrip_lookup rl; - struct dirrect *dr; + struct lookup_context ctx; + ino_t id; error_t err; - dr = (struct dirrect *) sblock->root; + ctx.dr = (struct dirrect *) sblock->root; /* First check for SUSP and all relevant extensions */ - rrip_initialize (dr); + rrip_initialize (ctx.dr); /* Now rescan the node for real */ - rrip_lookup (dr, &rl, 1); + rrip_lookup (ctx.dr, &ctx.rr, 1); + + err = cache_id (ctx.dr, &ctx.rr, &id); + assert_perror (err); /* And fetch the node. */ - err = load_inode (&diskfs_root_node, dr, &rl); + err = diskfs_cached_lookup_context (id, &diskfs_root_node, &ctx); assert_perror (err); pthread_mutex_unlock (&diskfs_root_node->lock); |