[committed hurd 12/13] isofs: port to libdiskfs' node cache

2015-04-17 Thread Justus Winter
* 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

[committed hurd 11/13] libdiskfs: implement a node cache

2015-04-17 Thread Justus Winter
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

[committed hurd 01/13] ext2fs: use a seperate lock to protect nodehash

2015-04-17 Thread Justus Winter
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

[committed hurd 07/13] libdiskfs: drop unused fields from struct node

2015-04-17 Thread Justus Winter
* 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

[committed hurd 06/13] libdiskfs: make struct node more compact

2015-04-17 Thread Justus Winter
* 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 @@

[committed hurd 05/13] libdiskfs: lock-less reference counting of nodes

2015-04-17 Thread Justus Winter
* 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. *

[committed hurd 09/13] libdiskfs: declare all inline functions as `extern inline'

2015-04-17 Thread Justus Winter
* 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

[committed hurd 02/13] fatfs: use a seperate lock to protect nodehash

2015-04-17 Thread Justus Winter
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