mirror of
https://github.com/ceph/ceph
synced 2025-03-11 02:39:05 +00:00
Merge pull request #8661 from runsisi/wip-fix-snapc-validation
librbd: put the validation of image snap context earlier Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
commit
dd459e701d
@ -245,6 +245,12 @@ Context *RefreshRequest<I>::handle_v2_get_mutable_metadata(int *result) {
|
||||
return m_on_finish;
|
||||
}
|
||||
|
||||
if (!m_snapc.is_valid()) {
|
||||
lderr(cct) << "image snap context is invalid!" << dendl;
|
||||
*result = -EIO;
|
||||
return m_on_finish;
|
||||
}
|
||||
|
||||
send_v2_get_flags();
|
||||
return nullptr;
|
||||
}
|
||||
@ -352,12 +358,6 @@ Context *RefreshRequest<I>::handle_v2_get_snapshots(int *result) {
|
||||
return m_on_finish;
|
||||
}
|
||||
|
||||
if (!m_snapc.is_valid()) {
|
||||
lderr(cct) << "image snap context is invalid!" << dendl;
|
||||
*result = -EIO;
|
||||
return m_on_finish;
|
||||
}
|
||||
|
||||
return send_v2_refresh_parent();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user