On 09/12/2014 06:43 AM, Miao Xie wrote: > This patchset implement the data repair function for the direct read, it > is implemented like buffered read: > 1.When we find the data is not right, we try to read the data from the other > mirror. > 2.When the io on the mirror ends, we will insert the endio work into the > dedicated btrfs workqueue, not common read endio workqueue, because the > original endio work is still blocked in the btrfs endio workqueue, if we > insert the endio work of the io on the mirror into that workqueue, deadlock > would happen. > 3.If We get right data, we write it back to repair the corrupted mirror. > 4.If the data on the new mirror is still corrupted, we will try next > mirror until we read right data or all the mirrors are traversed. > 5.After the above work, we set the uptodate flag according to the result. > > The difference is that the direct read may be splited to several small io, > in order to get the number of the mirror on which the io error happens. we > have to do data check and repair on the end IO function of those sub-IO > request. > > Besides that, we also fixed some bugs of direct io. > > Changelog v3 -> v4: > - Remove the 1st patch which has been applied into the upstream kernel. > - Use a dedicated btrfs workqueue instead of the system workqueue to > deal with the completed repair bio, this suggest was from Chris. > - Rebase the patchset to integration branch of Chris's git tree.
Perfect, thank you. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html