L版本osd 设置cache tire(经典模式WRITEBACK下)时读写流程分析,设置cache tire后跟新osd map,所以客户端计算target时会将io自动导向cache pool对应的osd,该osd接收到请求后处理io的流程(只分析到osd比较上层的逻辑 下层的读写事务的分析放在其他的文章)如下:
cache tire IO过程
当现有的hit_set命中对象时 在最近的min_read_recency_for_promote(或write)-1个hit_set连续命中时 则提升
当现有的hit_se没有t命中对象时 在最近的min_read_recency_for_promote(或write)个hit_set连续命中时 则提升
hit_set持久化时trim内存中的hit_set_map 以及在池中的hit_set对象 创建新的hit_set计算调整得到新的target_element_count_(判定hit_set是否满的参数)