Changeset 7fff5eab in mainline for uspace/srv/vfs/vfs_node.c


Ignore:
Timestamp:
2008-01-08T20:38:59Z (16 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
67f63c4
Parents:
752ccee
Message:

Management of the cached VFS node size.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/vfs/vfs_node.c

    r752ccee r7fff5eab  
    4343#include <rwlock.h>
    4444#include <libadt/hash_table.h>
     45#include <assert.h>
    4546
    4647/** Futex protecting the VFS node hash table. */
     
    122123 *
    123124 * @param triplet       Triplet encoding the identity of the VFS node.
     125 * @param size          Size of the node as filled by vfs_lookup_internal().
    124126 *
    125127 * @return              VFS node corresponding to the given triplet.
    126128 */
    127 vfs_node_t *vfs_node_get(vfs_triplet_t *triplet)
     129vfs_node_t *vfs_node_get(vfs_triplet_t *triplet, size_t size)
    128130{
    129131        unsigned long key[] = {
     
    147149                node->dev_handle = triplet->fs_handle;
    148150                node->index = triplet->index;
     151                node->size = size;
    149152                link_initialize(&node->nh_link);
    150153                rwlock_initialize(&node->contents_rwlock);
     
    153156                node = hash_table_get_instance(tmp, vfs_node_t, nh_link);       
    154157        }
     158
     159        assert(node->size == size);
     160
    155161        _vfs_node_addref(node);
    156162        futex_up(&nodes_futex);
Note: See TracChangeset for help on using the changeset viewer.