Changeset ea28272 in mainline for uspace/srv/vfs/vfs_ops.c


Ignore:
Timestamp:
2010-12-30T13:43:27Z (14 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
d770deb
Parents:
d70d80ed (diff), f418e51 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    rd70d80ed rea28272  
    7979        size_t rsize;
    8080        unsigned rlnkcnt;
    81         ipcarg_t rc;
     81        sysarg_t rc;
    8282        int phone;
    8383        aid_t msg;
     
    126126                        phone = vfs_grab_phone(fs_handle);
    127127                        msg = async_send_1(phone, VFS_OUT_MOUNTED,
    128                             (ipcarg_t) devmap_handle, &answer);
     128                            (sysarg_t) devmap_handle, &answer);
    129129                        /* send the mount options */
    130130                        rc = async_data_write_start(phone, (void *)opts,
     
    188188        phone = vfs_grab_phone(mp_res.triplet.fs_handle);
    189189        msg = async_send_4(phone, VFS_OUT_MOUNT,
    190             (ipcarg_t) mp_res.triplet.devmap_handle,
    191             (ipcarg_t) mp_res.triplet.index,
    192             (ipcarg_t) fs_handle,
    193             (ipcarg_t) devmap_handle, &answer);
     190            (sysarg_t) mp_res.triplet.devmap_handle,
     191            (sysarg_t) mp_res.triplet.index,
     192            (sysarg_t) fs_handle,
     193            (sysarg_t) devmap_handle, &answer);
    194194       
    195195        /* send connection */
     
    309309        ipc_call_t data;
    310310        ipc_callid_t callid = async_get_call(&data);
    311         if (IPC_GET_METHOD(data) != IPC_M_PING) {
     311        if (IPC_GET_IMETHOD(data) != IPC_M_PING) {
    312312                ipc_answer_0(callid, ENOTSUP);
    313313                ipc_answer_0(rid, ENOTSUP);
     
    716716
    717717        /* Wait for reply from the FS server. */
    718         ipcarg_t rc;
     718        sysarg_t rc;
    719719        async_wait_for(msg, &rc);
    720720       
     
    747747               
    748748                /* Wait for reply from the FS server. */
    749                 ipcarg_t rc;
     749                sysarg_t rc;
    750750                async_wait_for(msg, &rc);
    751751               
     
    781781static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read)
    782782{
     783        vfs_info_t *vi;
    783784
    784785        /*
     
    807808        fibril_mutex_lock(&file->lock);
    808809
     810        vi = fs_handle_to_info(file->node->fs_handle);
     811        assert(vi);
     812
    809813        /*
    810814         * Lock the file's node so that no other client can read/write to it at
    811          * the same time.
    812          */
    813         if (read)
     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))
    814819                fibril_rwlock_read_lock(&file->node->contents_rwlock);
    815820        else
     
    834839         * don't have to bother.
    835840         */
    836         ipcarg_t rc;
     841        sysarg_t rc;
    837842        ipc_call_t answer;
    838843        if (read) {
     
    857862       
    858863        /* Unlock the VFS node. */
    859         if (read)
     864        if (read || (vi->concurrent_read_write && vi->write_retains_size))
    860865                fibril_rwlock_read_unlock(&file->node->contents_rwlock);
    861866        else {
     
    968973    fs_index_t index, aoff64_t size)
    969974{
    970         ipcarg_t rc;
     975        sysarg_t rc;
    971976        int fs_phone;
    972977       
    973978        fs_phone = vfs_grab_phone(fs_handle);
    974         rc = async_req_4_0(fs_phone, VFS_OUT_TRUNCATE, (ipcarg_t) devmap_handle,
    975             (ipcarg_t) index, LOWER32(size), UPPER32(size));
     979        rc = async_req_4_0(fs_phone, VFS_OUT_TRUNCATE, (sysarg_t) devmap_handle,
     980            (sysarg_t) index, LOWER32(size), UPPER32(size));
    976981        vfs_release_phone(fs_handle, fs_phone);
    977982        return (int)rc;
     
    10001005
    10011006        fibril_mutex_unlock(&file->lock);
    1002         ipc_answer_0(rid, (ipcarg_t)rc);
     1007        ipc_answer_0(rid, (sysarg_t)rc);
    10031008}
    10041009
     
    10061011{
    10071012        int fd = IPC_GET_ARG1(*request);
    1008         ipcarg_t rc;
     1013        sysarg_t rc;
    10091014
    10101015        vfs_file_t *file = vfs_file_get(fd);
     
    10791084        ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME);
    10801085       
    1081         ipcarg_t rv;
     1086        sysarg_t rv;
    10821087        async_wait_for(msg, &rv);
    10831088        vfs_release_phone(node->fs_handle, fs_phone);
Note: See TracChangeset for help on using the changeset viewer.