/trunk/uspace/srv/vfs/vfs.h |
---|
173,6 → 173,7 |
typedef struct { |
vfs_triplet_t triplet; |
size_t size; |
unsigned lnkcnt; |
} vfs_lookup_res_t; |
/** |
181,7 → 182,16 |
*/ |
typedef struct { |
VFS_TRIPLET; /**< Identity of the node. */ |
unsigned refcnt; /**< Usage counter. */ |
/** |
* Usage counter. This includes, but is not limited to, all vfs_file_t |
* structures that reference this node. |
*/ |
unsigned refcnt; |
/** Number of names this node has in the file system namespace. */ |
unsigned lnkcnt; |
link_t nh_link; /**< Node hash-table link. */ |
size_t size; /**< Cached size of the file. */ |
/trunk/uspace/srv/vfs/vfs_node.c |
---|
148,6 → 148,7 |
node->dev_handle = result->triplet.fs_handle; |
node->index = result->triplet.index; |
node->size = result->size; |
node->lnkcnt = result->lnkcnt; |
link_initialize(&node->nh_link); |
rwlock_initialize(&node->contents_rwlock); |
hash_table_insert(&nodes, key, &node->nh_link); |
156,6 → 157,7 |
} |
assert(node->size == result->size); |
assert(node->lnkcnt == result->lnkcnt); |
_vfs_node_addref(node); |
futex_up(&nodes_futex); |
/trunk/uspace/srv/vfs/vfs_lookup.c |
---|
168,6 → 168,7 |
result->triplet.dev_handle = (int) IPC_GET_ARG2(answer); |
result->triplet.index = (int) IPC_GET_ARG3(answer); |
result->size = (size_t) IPC_GET_ARG4(answer); |
result->lnkcnt = (unsigned) IPC_GET_ARG5(answer); |
} |
return rc; |