mirror of https://github.com/schoebel/mars
mapfree: compute dirty regions when unshared
This commit is contained in:
parent
ab6036de76
commit
98b4599986
|
@ -478,8 +478,10 @@ loff_t mf_get_any_dirty(const char *filename, int stage)
|
||||||
tmp = tmp->next) {
|
tmp = tmp->next) {
|
||||||
struct mapfree_info *mf = container_of(tmp, struct mapfree_info, mf_head);
|
struct mapfree_info *mf = container_of(tmp, struct mapfree_info, mf_head);
|
||||||
if (!strcmp(mf->mf_name, filename)) {
|
if (!strcmp(mf->mf_name, filename)) {
|
||||||
res = mf_dirty_length(mf, stage);
|
loff_t len = mf_dirty_length(mf, stage);
|
||||||
break;
|
|
||||||
|
if (len > res)
|
||||||
|
res = len;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
up_read(&mf_table[hash].hash_mutex);
|
up_read(&mf_table[hash].hash_mutex);
|
||||||
|
|
Loading…
Reference in New Issue