Changeset 630 for trunk/kernel/fs
- Timestamp:
- May 21, 2019, 6:00:06 PM (6 years ago)
- Location:
- trunk/kernel/fs
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/kernel/fs/fatfs.c
r628 r630 1404 1404 1405 1405 #if (DEBUG_FATFS_ADD_DENTRY & 1) 1406 cycle = (uint32_t)hal_get_cycles(); 1406 1407 if( DEBUG_FATFS_ADD_DENTRY < cycle ) 1407 printk("\n[%s] FSM step = %d / offset = %x / nb_lfn = %d \n",1408 __FUNCTION__, step, offset, nb_lfn );1408 printk("\n[%s] FSM step = %d / offset = %x / nb_lfn = %d / cycle %d\n", 1409 __FUNCTION__, step, offset, nb_lfn, cycle ); 1409 1410 #endif 1410 1411 … … 1533 1534 } // exit while 1534 1535 1536 #if (DEBUG_FATFS_ADD_DENTRY & 1) 1537 cycle = (uint32_t)hal_get_cycles(); 1538 if( DEBUG_FATFS_ADD_DENTRY < cycle ) 1539 printk("\n[%s] thread[%x,%x] before IOC access / cycle %d\n", 1540 __FUNCTION__, this->process->pid, this->trdid, cycle ); 1541 #endif 1542 1535 1543 // copy the modified page to the IOC device 1536 1544 fatfs_move_page( page_xp , IOC_SYNC_WRITE ); -
trunk/kernel/fs/vfs.c
r629 r630 2915 2915 fs_type = hal_remote_l32( XPTR( child_cxy , &ctx_ptr->type ) ); 2916 2916 2917 //////////////////////////// create <.> 2917 //////////////////////////// create <.> dentry ////////////////////// 2918 2918 if( child_cxy == local_cxy ) 2919 2919 { … … 2941 2941 2942 2942 #if(DEBUG_VFS_ADD_SPECIAL & 1) 2943 cycle = (uint32_t)hal_get_cycles(); 2943 2944 if( DEBUG_VFS_ADD_SPECIAL < cycle ) 2944 printk("\n[%s] thread[%x,%x] created dentry <.> (%x,%x) \n",2945 __FUNCTION__, this->process->pid, this->trdid, child_cxy, dentry_ptr );2945 printk("\n[%s] thread[%x,%x] created dentry <.> (%x,%x) / cycle %d\n", 2946 __FUNCTION__, this->process->pid, this->trdid, child_cxy, dentry_ptr, cycle ); 2946 2947 #endif 2947 2948 … … 2969 2970 2970 2971 #if(DEBUG_VFS_ADD_SPECIAL & 1) 2972 cycle = (uint32_t)hal_get_cycles(); 2971 2973 if( DEBUG_VFS_ADD_SPECIAL < cycle ) 2972 printk("\n[%s] thread[%x,%x] linked dentry <.> to parent and child inodes \n",2973 __FUNCTION__, this->process->pid, this->trdid );2974 printk("\n[%s] thread[%x,%x] linked dentry <.> to parent and child inodes / cycle %d\n", 2975 __FUNCTION__, this->process->pid, this->trdid, cycle ); 2974 2976 #endif 2975 2977 2976 2978 // introduce <.> dentry into child directory mapper 2977 if( child_cxy == local_cxy ) 2978 { 2979 error = vfs_fs_add_dentry( child_ptr, 2980 dentry_ptr ); 2981 } 2982 else 2983 { 2984 rpc_vfs_fs_add_dentry_client( child_cxy, 2985 child_ptr, 2986 dentry_ptr, 2987 &error ); 2988 } 2989 if( error ) 2990 { 2991 printk("\n[ERROR] in %s : cannot introduce dentry <..> in mapper %x\n", 2992 __FUNCTION__ ); 2993 return -1; 2994 } 2979 // only if the target directory is not the root VFS 2980 if( child_xp != parent_xp ) 2981 { 2982 if( child_cxy == local_cxy ) 2983 { 2984 error = vfs_fs_add_dentry( child_ptr, 2985 dentry_ptr ); 2986 } 2987 else 2988 { 2989 rpc_vfs_fs_add_dentry_client( child_cxy, 2990 child_ptr, 2991 dentry_ptr, 2992 &error ); 2993 } 2994 if( error ) 2995 { 2996 printk("\n[ERROR] in %s : cannot introduce dentry <..> in mapper %x\n", 2997 __FUNCTION__ ); 2998 return -1; 2999 } 2995 3000 2996 3001 #if(DEBUG_VFS_ADD_SPECIAL & 1) 3002 cycle = (uint32_t)hal_get_cycles(); 2997 3003 if( DEBUG_VFS_ADD_SPECIAL < cycle ) 2998 printk("\n[%s] thread[%x,%x] registered dentry <.> in child mapper\n", 2999 __FUNCTION__, this->process->pid, this->trdid ); 3000 #endif 3001 3002 ///////////////////////////// create <..> dentry 3004 printk("\n[%s] thread[%x,%x] registered dentry <.> in child mapper / cycle %d\n", 3005 __FUNCTION__, this->process->pid, this->trdid, cycle ); 3006 #endif 3007 3008 } 3009 3010 ///////////////////////////// create <..> dentry /////////////////////// 3003 3011 if( child_cxy == local_cxy ) 3004 3012 { … … 3026 3034 3027 3035 #if(DEBUG_VFS_ADD_SPECIAL & 1) 3036 cycle = (uint32_t)hal_get_cycles(); 3028 3037 if( DEBUG_VFS_ADD_SPECIAL < cycle ) 3029 printk("\n[%s] thread[%x,%x] created dentry <..> (%x,%x) \n",3030 __FUNCTION__, this->process->pid, this->trdid, child_cxy, dentry_ptr );3038 printk("\n[%s] thread[%x,%x] created dentry <..> (%x,%x) / cycle %d\n", 3039 __FUNCTION__, this->process->pid, this->trdid, child_cxy, dentry_ptr, cycle ); 3031 3040 #endif 3032 3041 … … 3053 3062 3054 3063 #if(DEBUG_VFS_ADD_SPECIAL & 1) 3064 cycle = (uint32_t)hal_get_cycles(); 3055 3065 if( DEBUG_VFS_ADD_SPECIAL < cycle ) 3056 printk("\n[%s] thread[%x,%x] linked dentry <..> to parent and child inodes \n",3057 __FUNCTION__, this->process->pid, this->trdid );3066 printk("\n[%s] thread[%x,%x] linked dentry <..> to parent and child inodes / cycle %d\n", 3067 __FUNCTION__, this->process->pid, this->trdid, cycle ); 3058 3068 #endif 3059 3069 3060 3070 // introduce <..> dentry into child directory mapper 3061 if( child_cxy == local_cxy ) 3062 { 3063 error = vfs_fs_add_dentry( child_ptr, 3064 dentry_ptr ); 3065 } 3066 else 3067 { 3068 rpc_vfs_fs_add_dentry_client( child_cxy, 3069 child_ptr, 3070 dentry_ptr, 3071 &error ); 3072 } 3073 if( error ) 3074 { 3075 printk("\n[ERROR] in %s : cannot introduce dentry <..> in mapper %x\n", 3076 __FUNCTION__ ); 3077 return -1; 3078 } 3071 // only if the target directory is not the root VFS 3072 if( child_xp != parent_xp ) 3073 { 3074 if( child_cxy == local_cxy ) 3075 { 3076 error = vfs_fs_add_dentry( child_ptr, 3077 dentry_ptr ); 3078 } 3079 else 3080 { 3081 rpc_vfs_fs_add_dentry_client( child_cxy, 3082 child_ptr, 3083 dentry_ptr, 3084 &error ); 3085 } 3086 if( error ) 3087 { 3088 printk("\n[ERROR] in %s : cannot introduce dentry <..> in mapper %x\n", 3089 __FUNCTION__ ); 3090 return -1; 3091 } 3079 3092 3080 3093 #if(DEBUG_VFS_ADD_SPECIAL & 1) 3094 cycle = (uint32_t)hal_get_cycles(); 3081 3095 if( DEBUG_VFS_ADD_SPECIAL < cycle ) 3082 printk("\n[%s] thread[%x,%x] registered dentry <..> in child mapper\n", 3083 __FUNCTION__, this->process->pid, this->trdid ); 3084 #endif 3096 printk("\n[%s] thread[%x,%x] registered dentry <..> in child mapper / cycle %d\n", 3097 __FUNCTION__, this->process->pid, this->trdid, cycle ); 3098 #endif 3099 3100 } 3085 3101 3086 3102 #if DEBUG_VFS_ADD_SPECIAL
Note: See TracChangeset
for help on using the changeset viewer.