* 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
Previously, all users of libdiskfs implemented a node cache on their
own. Move the node cache from ext2fs into libdiskfs. We preserve the
previous API by marking all functions that we pull from ext2fs as
weak, so that users like tmpfs can still implement their own node
cache.
* ext2fs/dir.c
Previously, ext2fs used diskfs_node_refcnt_lock to serialize access to
the nodehash.
Use a separate lock to protect nodehash. Adjust the reference
counting accordingly. Every node in the nodehash carries a light
reference. When we are asked to give up that light reference, we
reacquire our
* libdiskfs/diskfs.h (struct node): Drop unused fields from struct
node.
---
libdiskfs/diskfs.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 18df0eb..7a21dff 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@ -80,8 +80,6 @@ struct
* libdiskfs/diskfs.h (struct node): Turn flags into a bit field.
---
libdiskfs/diskfs.h | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/libdiskfs/diskfs.h b/libdiskfs/diskfs.h
index 535fb39..18df0eb 100644
--- a/libdiskfs/diskfs.h
+++ b/libdiskfs/diskfs.h
@@
* libdiskfs/diskfs.h (struct node): Use refcounts_t for reference counting.
(diskfs_node_refcnt_lock): Remove.
(diskfs_node_norefs,diskfs_drop_node): Change comments accordingly.
* libdiskfs/init-init.c: Adjust accordingly.
* libdiskfs/node-drop.c: Likewise.
* libdiskfs/node-make.c: Likewise.
*
* libdiskfs/diskfs.h (diskfs_node_disknode, diskfs_disknode_node):
Declare functions as `extern inline' so that we can use them in other
functions declared as `extern inline'.
---
libdiskfs/diskfs.h | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/libdiskfs/diskfs.h
Previously, fatfs used diskfs_node_refcnt_lock to serialize access to
the nodehash.
Use a separate lock to protect nodehash. Adjust the reference
counting accordingly. Every node in the nodehash carries a light
reference. When we are asked to give up that light reference, we
reacquire our lock