mirror of
https://github.com/ceph/ceph
synced 2025-03-04 23:40:07 +00:00
osd: return EINVAL when snapc is invalid and trying to write
This commit is contained in:
parent
e74250d82c
commit
1a3fac44f2
@ -1019,8 +1019,11 @@ int ReplicatedPG::do_osd_ops(OpContext *ctx, vector<OSDOp>& ops,
|
||||
}
|
||||
|
||||
// make writeable (i.e., clone if necessary)
|
||||
if (is_modify)
|
||||
if (is_modify) {
|
||||
if (!ctx->snapc.is_valid())
|
||||
return -EINVAL;
|
||||
make_writeable(ctx);
|
||||
}
|
||||
|
||||
// munge ZERO -> TRUNCATE? (don't munge to DELETE or we risk hosing attributes)
|
||||
if (op.op == CEPH_OSD_OP_ZERO &&
|
||||
|
Loading…
Reference in New Issue
Block a user