afr(auto file replication) 由於其有副本, 使得自修復(self heal)的特性得以實現。 self heal以下簡稱sh。副本數為n
1. afr_lookup觸發
在afr模組中的呼叫先後關係是 afr_lookup -> n次 afr_lookup_cbk -> afr_lookup_done -> afr_lookup_perform_self_heal -> afr_lookup_set_self_heal_params -> afr_can_self_heal_proceed? ->afr_launch_self_heal.
2. opendir 觸發
afr_opendir -> n次 afr_opendir_cbk -> afr_examine_dir -> 2*n(?) 次 afr_examine_dir_readdir_cbk -> __checksums_differ? ->afr_launch_self_heal.
3. 發現stale subvolume時,且data_self_heal設定為open
afr_open_ftruncate_cbk / afr_open_cbk -> afr_open_only_data_self_heal (priv->data_self_heal)? 只有在這個data_self_heal設定為open時,才返回true. -> afr_perform_data_self_heal ->afr_launch_self_heal.
4. 發現subvolume came online 時
在afr_open_fd_fix函式中,會比較當前subvolume與之前subvolume的個數,如果發現新增subvolume,就啟動自修復
if (fd_ctx->up_count < priv->up_count)....
if (need_self_heal)
afr_trigger_open_fd_self_heal (frame, this);
....
JS中的4種for迴圈
for i 0 i looptimes i for property in obj for element of iterable iterable.foreach function value,key,iterable arr 1,2,3,4 4 1,2,3,4 1.普通for迴圈 for i 0...
HTML中A標籤有4種狀態
例子 a link 未訪問的鏈結 a visited 已訪問的鏈結 a hover 當有滑鼠懸停在鏈結上 a active 被選擇的鏈結 以下 html中a標籤有4種狀態,link,visited,hover,active,不過如果寫css的時候排序錯誤就會導致狀態失效或錯亂,糾結。其實真正能生效的...
關於Android中的列舉 4種
context.mode private 為預設操作模式,代表該檔案是私有資料,只能被應用本身訪問,在該模式下,寫入的內容會覆蓋原檔案的內容。如果想把新寫入的內容追加到原檔案中。可以使用 模式會檢查檔案是否存在,存在就往檔案追加內容,否則就建立新檔案。context.mode world reada...