Changeset ea28272 in mainline for uspace/srv/vfs/vfs_ops.c
- Timestamp:
- 2010-12-30T13:43:27Z (14 years ago)
- 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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/vfs/vfs_ops.c
rd70d80ed rea28272 79 79 size_t rsize; 80 80 unsigned rlnkcnt; 81 ipcarg_t rc;81 sysarg_t rc; 82 82 int phone; 83 83 aid_t msg; … … 126 126 phone = vfs_grab_phone(fs_handle); 127 127 msg = async_send_1(phone, VFS_OUT_MOUNTED, 128 ( ipcarg_t) devmap_handle, &answer);128 (sysarg_t) devmap_handle, &answer); 129 129 /* send the mount options */ 130 130 rc = async_data_write_start(phone, (void *)opts, … … 188 188 phone = vfs_grab_phone(mp_res.triplet.fs_handle); 189 189 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); 194 194 195 195 /* send connection */ … … 309 309 ipc_call_t data; 310 310 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) { 312 312 ipc_answer_0(callid, ENOTSUP); 313 313 ipc_answer_0(rid, ENOTSUP); … … 716 716 717 717 /* Wait for reply from the FS server. */ 718 ipcarg_t rc;718 sysarg_t rc; 719 719 async_wait_for(msg, &rc); 720 720 … … 747 747 748 748 /* Wait for reply from the FS server. */ 749 ipcarg_t rc;749 sysarg_t rc; 750 750 async_wait_for(msg, &rc); 751 751 … … 781 781 static void vfs_rdwr(ipc_callid_t rid, ipc_call_t *request, bool read) 782 782 { 783 vfs_info_t *vi; 783 784 784 785 /* … … 807 808 fibril_mutex_lock(&file->lock); 808 809 810 vi = fs_handle_to_info(file->node->fs_handle); 811 assert(vi); 812 809 813 /* 810 814 * 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)) 814 819 fibril_rwlock_read_lock(&file->node->contents_rwlock); 815 820 else … … 834 839 * don't have to bother. 835 840 */ 836 ipcarg_t rc;841 sysarg_t rc; 837 842 ipc_call_t answer; 838 843 if (read) { … … 857 862 858 863 /* Unlock the VFS node. */ 859 if (read )864 if (read || (vi->concurrent_read_write && vi->write_retains_size)) 860 865 fibril_rwlock_read_unlock(&file->node->contents_rwlock); 861 866 else { … … 968 973 fs_index_t index, aoff64_t size) 969 974 { 970 ipcarg_t rc;975 sysarg_t rc; 971 976 int fs_phone; 972 977 973 978 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)); 976 981 vfs_release_phone(fs_handle, fs_phone); 977 982 return (int)rc; … … 1000 1005 1001 1006 fibril_mutex_unlock(&file->lock); 1002 ipc_answer_0(rid, ( ipcarg_t)rc);1007 ipc_answer_0(rid, (sysarg_t)rc); 1003 1008 } 1004 1009 … … 1006 1011 { 1007 1012 int fd = IPC_GET_ARG1(*request); 1008 ipcarg_t rc;1013 sysarg_t rc; 1009 1014 1010 1015 vfs_file_t *file = vfs_file_get(fd); … … 1079 1084 ipc_forward_fast(callid, fs_phone, 0, 0, 0, IPC_FF_ROUTE_FROM_ME); 1080 1085 1081 ipcarg_t rv;1086 sysarg_t rv; 1082 1087 async_wait_for(msg, &rv); 1083 1088 vfs_release_phone(node->fs_handle, fs_phone);
Note:
See TracChangeset
for help on using the changeset viewer.