Skip to content

Commit

Permalink
Set zv->zv_objset for zil_replay() case
Browse files Browse the repository at this point in the history
For the case where we have a zil to replay we need to ensure that
zv->zv_objset contains the current objset.  Since the caller has
a hold on the object set it is safe to pass to zil_replay as part
of the zv.  Call path zvol_create_minor()->zil_replay()->
zil_parse()->zil_replay_log_record()->zvol_replay_write().
  • Loading branch information
behlendorf committed Aug 3, 2010
1 parent 640888e commit 3eff306
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions module/zfs/zvol.c
Original file line number Diff line number Diff line change
Expand Up @@ -1118,6 +1118,7 @@ __zvol_create_minor(const char *name)
zv->zv_flags |= ZVOL_RDONLY;

zv->zv_volblocksize = doi->doi_data_block_size;
zv->zv_objset = os;

if (zil_replay_disable)
zil_destroy(dmu_objset_zil(os), B_FALSE);
Expand All @@ -1130,6 +1131,7 @@ __zvol_create_minor(const char *name)

out_dmu_objset_disown:
dmu_objset_disown(os, zvol_tag);
zv->zv_objset = NULL;
out_doi:
kmem_free(doi, sizeof(dmu_object_info_t));
out:
Expand Down

0 comments on commit 3eff306

Please sign in to comment.