linux内核md源代码解读 七 阵列同步一 :先容阵列同步
发布时间:2016-10-29 13:22:29 所属栏目:Linux 来源:站长网
导读:副标题#e# 阵列同步在md_do_sync,那么入口在哪里呢?就是说阵列同步触发点在哪里呢?听说过md_check_recovery吧,,但这还不是同步的入口点。那raid5d函数是入口点吧?如果要认真分析起来还不算是。 真正的同步入口点在do_md_run函数,就是在运行阵列run函
7780行,设置同步运行状态。同步状态有如下: /* recovery/resync flags * NEEDED: we might need to start a resync/recover * RUNNING: a thread is running, or about to be started * SYNC: actually doing a resync, not a recovery * RECOVER: doing recovery, or need to try it. * INTR: resync needs to be aborted for some reason * DONE: thread is done and is waiting to be reaped * REQUEST: user-space has requested a sync (used with SYNC) * CHECK: user-space request for check-only, no repair * RESHAPE: A reshape is happening * * If neither SYNC or RESHAPE are set, then it is a recovery. */ #define MD_RECOVERY_RUNNING 0 #define MD_RECOVERY_SYNC 1 #define MD_RECOVERY_RECOVER 2 #define MD_RECOVERY_INTR 3 #define MD_RECOVERY_DONE 4 #define MD_RECOVERY_NEEDED 5 #define MD_RECOVERY_REQUESTED 6 #define MD_RECOVERY_CHECK 7 #define MD_RECOVERY_RESHAPE 8 #define MD_RECOVERY_FROZEN 9 * NEEDED: 需要启动同步线程 * RUNNING: 准备启动或已经有同步线程有运行 * SYNC: 做同步操作 * RECOVER: 尝试或已经在重建操作 * INTR: 同步中断 * DONE: 同步完成 * REQUEST: 用户请求同步 * CHECK: 用户请求检查 * RESHAPE: reshape操作 查看本栏目更多精彩内容:http://www.bianceng.cn/OS/Linux/ (编辑:PHP编程网 - 黄冈站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |