函数逻辑报告 |
Source Code:fs\dcache.c |
Create Date:2022-07-29 10:37:30 |
Last Modify:2020-03-18 10:27:32 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:d_walk - walk the dentry tree*@parent: start of walk*@data: data passed to @enter() and @finish()*@enter: callback when first entering the dentry* The @enter() callbacks are called with d_lock held.
函数原型:static void d_walk(struct dentry *parent, void *data, enum d_walk_ret (*enter)(void *, struct dentry *))
返回类型:void
参数:
类型 | 参数 | 名称 |
---|---|---|
struct dentry * | parent | |
void * | data | |
enum d_walk_ret (* | enter |
1274 | seq等于0 |
1276 | bool retry = true |
1278 | again : |
1280 | this_parent等于parent |
1281 | 加自旋锁 |
1283 | ret等于enter(data, this_parent) |
1285 | 当:ret恒等于D_WALK_CONTINUE |
1286 | 退出 |
1287 | 当:ret恒等于D_WALK_QUIT |
1288 | 当:ret恒等于D_WALK_SKIP |
1289 | 转到:out_unlock |
1290 | 当:ret恒等于D_WALK_NORETRY |
1294 | repeat : |
1296 | resume : |
1297 | 当next不等于 our children 循环 |
1302 | 如果此条件成立可能性小(为编译器优化)( protected by d_lock & DCACHE_DENTRY_CURSOR)则继续下一循环 |
1305 | spin_lock_nested( & d_lock, DENTRY_D_LOCK_NESTED) |
1309 | 当:ret恒等于D_WALK_CONTINUE |
1310 | 退出 |
1311 | 当:ret恒等于D_WALK_QUIT |
1312 | 自旋锁解锁 |
1313 | 转到:out_unlock |
1314 | 当:ret恒等于D_WALK_NORETRY |
1317 | 当:ret恒等于D_WALK_SKIP |
1318 | 自旋锁解锁 |
1319 | 继续下一循环 |
1322 | 如果非链表为空则 |
1323 | 自旋锁解锁 |
1324 | spin_release( & dep_map, _RET_IP_) |
1325 | this_parent等于dentry |
1326 | spin_acquire( & dep_map, 0, 1, _RET_IP_) |
1327 | 转到:repeat |
1329 | 自旋锁解锁 |
1335 | ascend : |
1336 | 如果this_parent不等于parent则 |
1337 | child等于this_parent |
1338 | this_parent等于 parent directory |
1340 | 自旋锁解锁 |
1341 | 加自旋锁 |
1344 | 如果need_seqretry( & rename_lock, seq)则转到:rename_retry |
1347 | 循环 |
1349 | 如果next恒等于 our children 则转到:ascend |
1352 | 当此条件成立可能性小(为编译器优化)( protected by d_lock & Parent inode is watched by some fsnotify listener )循环 |
1354 | 转到:resume |
1356 | 如果need_seqretry( & rename_lock, seq)则转到:rename_retry |
1360 | out_unlock : |
1361 | 自旋锁解锁 |
1362 | done_seqretry( & rename_lock, seq) |
1363 | 返回 |
1365 | rename_retry : |
1366 | 自旋锁解锁 |
1369 | 如果非retry则返回 |
1371 | seq等于1 |
1372 | 转到:again |
名称 | 描述 |
---|---|
path_has_submounts | path_has_submounts - check for mounts over a dentry in the* current namespace.*@parent: path to check.* Return true if the parent or its subdirectories contain* a mount point in the current namespace. |
shrink_dcache_parent | 收缩高速缓存区 |
do_one_tree | |
d_invalidate | 废除目录项 |
d_genocide |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |