[RFC PATCH v2 4/7] fs: dedup file range to use a compare function