Changeset 51db5aeb in mainline
- Timestamp:
- 2011-07-17T12:15:17Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 1dd3e81
- Parents:
- 44799a0
- Location:
- uspace/srv/fs/minixfs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/fs/minixfs/mfs.c
r44799a0 r51db5aeb 127 127 mfs_destroy(callid, &call); 128 128 break; 129 case VFS_OUT_UNMOUNTED: 130 mfs_unmounted(callid, &call); 131 break; 132 case VFS_OUT_UNMOUNT: 133 mfs_unmount(callid, &call); 134 break; 135 case VFS_OUT_SYNC: 136 mfs_sync(callid, &call); 137 break; 129 138 default: 130 139 async_answer_0(callid, ENOTSUP); -
uspace/srv/fs/minixfs/mfs.h
r44799a0 r51db5aeb 177 177 mfs_destroy(ipc_callid_t rid, ipc_call_t *request); 178 178 179 extern void 180 mfs_unmounted(ipc_callid_t rid, ipc_call_t *request); 181 182 extern void 183 mfs_unmount(ipc_callid_t rid, ipc_call_t *request); 184 185 extern void 186 mfs_sync(ipc_callid_t rid, ipc_call_t *request); 187 179 188 /*mfs_inode.c*/ 180 189 extern int -
uspace/srv/fs/minixfs/mfs_ops.c
r44799a0 r51db5aeb 250 250 } 251 251 252 void mfs_unmount(ipc_callid_t rid, ipc_call_t *request) 253 { 254 libfs_unmount(&mfs_libfs_ops, rid, request); 255 } 256 257 void mfs_unmounted(ipc_callid_t rid, ipc_call_t *request) 258 { 259 devmap_handle_t devmap = (devmap_handle_t) IPC_GET_ARG1(*request); 260 261 (void) block_cache_fini(devmap); 262 block_fini(devmap); 263 264 async_answer_0(rid, EOK); 265 } 266 252 267 devmap_handle_t mfs_device_get(fs_node_t *fsnode) 253 268 { … … 826 841 assert(!has_children); 827 842 843 if (mnode->ino_i->i_nlinks > 0) { 844 mfsdebug("nlinks = %d", mnode->ino_i->i_nlinks); 845 r = EOK; 846 goto out; 847 } 848 828 849 /*Free the entire inode content*/ 829 850 r = inode_shrink(mnode, mnode->ino_i->i_size); … … 832 853 on_error(r, return r); 833 854 855 out: 834 856 free(mnode->ino_i); 835 857 free(mnode); … … 935 957 } 936 958 959 void 960 mfs_sync(ipc_callid_t rid, ipc_call_t *request) 961 { 962 devmap_handle_t devmap = (devmap_handle_t) IPC_GET_ARG1(*request); 963 fs_index_t index = (fs_index_t) IPC_GET_ARG2(*request); 964 965 fs_node_t *fn; 966 int rc = mfs_node_get(&fn, devmap, index); 967 if (rc != EOK) { 968 async_answer_0(rid, rc); 969 return; 970 } 971 if (!fn) { 972 async_answer_0(rid, ENOENT); 973 return; 974 } 975 976 struct mfs_node *mnode = fn->data; 977 mnode->ino_i->dirty = true; 978 979 rc = mfs_node_put(fn); 980 async_answer_0(rid, rc); 981 } 982 937 983 /** 938 984 * @}
Note:
See TracChangeset
for help on using the changeset viewer.