Skip to content

Commit

Permalink
CP-52620: enable local caching after opening all other images
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkSymsCtx committed Nov 15, 2024
1 parent dc60c25 commit e4713d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/tapdisk-vbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -619,12 +619,6 @@ tapdisk_vbd_open_vdi(td_vbd_t *vbd, const char *name, td_flag_t flags, int prt_d
goto fail;
}

if (td_flag_test(vbd->flags, TD_OPEN_LOCAL_CACHE)) {
err = tapdisk_vbd_add_local_cache(vbd);
if (err)
goto fail;
}

err = tapdisk_vbd_validate_chain(vbd);
if (err)
goto fail;
Expand All @@ -639,6 +633,12 @@ tapdisk_vbd_open_vdi(td_vbd_t *vbd, const char *name, td_flag_t flags, int prt_d
}
}

if (td_flag_test(vbd->flags, TD_OPEN_LOCAL_CACHE)) {
err = tapdisk_vbd_add_local_cache(vbd);
if (err)
goto fail;
}

err = vbd_stats_create(vbd);
if (err)
goto fail;
Expand Down

0 comments on commit e4713d6

Please sign in to comment.