Changes in / [b38dfd8:bea023b9] in mainline


Ignore:
Location:
uspace
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/c/include/ipc/vfs.h

    rb38dfd8 rbea023b9  
    3636#define LIBC_IPC_VFS_H_
    3737
     38#include <sys/types.h>
    3839#include <ipc/ipc.h>
    39 #include <sys/types.h>
    40 #include <bool.h>
    4140
    4241#define FS_NAME_MAXLEN  20
     
    5655        /** Unique identifier of the fs. */
    5756        char name[FS_NAME_MAXLEN + 1];
    58         bool concurrent_read_write;
    59         bool write_retains_size;
    6057} vfs_info_t;
    6158
  • uspace/srv/fs/devfs/devfs.c

    rb38dfd8 rbea023b9  
    5353static vfs_info_t devfs_vfs_info = {
    5454        .name = NAME,
    55         .concurrent_read_write = false,
    56         .write_retains_size = false,
    5755};
    5856
  • uspace/srv/fs/fat/fat.c

    rb38dfd8 rbea023b9  
    5252vfs_info_t fat_vfs_info = {
    5353        .name = NAME,
    54         .concurrent_read_write = false,
    55         .write_retains_size = false,   
    5654};
    5755
  • uspace/srv/fs/tmpfs/tmpfs.c

    rb38dfd8 rbea023b9  
    5757vfs_info_t tmpfs_vfs_info = {
    5858        .name = NAME,
    59         .concurrent_read_write = false,
    60         .write_retains_size = false,
    6159};
    6260
  • uspace/srv/vfs/vfs.h

    rb38dfd8 rbea023b9  
    172172
    173173extern fs_handle_t fs_name_to_handle(char *, bool);
    174 extern vfs_info_t *fs_handle_to_info(fs_handle_t);
    175174
    176175extern int vfs_lookup_internal(char *, int, vfs_lookup_res_t *,
  • uspace/srv/vfs/vfs_ops.c

    rb38dfd8 rbea023b9  
    781781static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read)
    782782{
    783         vfs_info_t *vi;
    784783
    785784        /*
     
    808807        fibril_mutex_lock(&file->lock);
    809808
    810         vi = fs_handle_to_info(file->node->fs_handle);
    811         assert(vi);
    812 
    813809        /*
    814810         * Lock the file's node so that no other client can read/write to it at
    815          * the same time unless the FS supports concurrent reads/writes and its
    816          * write implementation does not modify the file size.
    817          */
    818         if (read || (vi->concurrent_read_write && vi->write_retains_size))
     811         * the same time.
     812         */
     813        if (read)
    819814                fibril_rwlock_read_lock(&file->node->contents_rwlock);
    820815        else
     
    862857       
    863858        /* Unlock the VFS node. */
    864         if (read || (vi->concurrent_read_write && vi->write_retains_size))
     859        if (read)
    865860                fibril_rwlock_read_unlock(&file->node->contents_rwlock);
    866861        else {
  • uspace/srv/vfs/vfs_register.c

    rb38dfd8 rbea023b9  
    333333}
    334334
    335 /** Find the VFS info structure.
    336  *
    337  * @param handle        FS handle for which the VFS info structure is sought.
    338  * @return              VFS info structure on success or NULL otherwise.
    339  */
    340 vfs_info_t *fs_handle_to_info(fs_handle_t handle)
    341 {
    342         vfs_info_t *info = NULL;
    343         link_t *cur;
    344 
    345         fibril_mutex_lock(&fs_head_lock);
    346         for (cur = fs_head.next; cur != &fs_head; cur = cur->next) {
    347                 fs_info_t *fs = list_get_instance(cur, fs_info_t, fs_link);
    348                 if (fs->fs_handle == handle) {
    349                         info = &fs->vfs_info;
    350                         break;
    351                 }
    352         }
    353         fibril_mutex_unlock(&fs_head_lock);
    354 
    355         return info;
    356 }
    357 
    358335/**
    359336 * @}
Note: See TracChangeset for help on using the changeset viewer.