Allow librados users to opt to receive ENOSPC or EDQUOT when they submit
an operation against a full cluster. This should only be used if the
librados app can handle those errors gracefully (librbd, for example,
cannot).
Also note that this allows savvy librados users to send delete operations;
they will get either a success or EDQUOT, depending on whether the
operation results in a net drop in space utilization.
Signed-off-by: Sage Weil <sage@redhat.com>
v9.1.0
======
+* When a pool quota is reached, librados operations now block indefinitely,
+ the same way they do when the cluster fills up. (Previously they would return
+ -ENOSPC). By default, a full cluster or pool will now block. If your
+ librados application can handle ENOSPC or EDQUOT errors gracefully, you can
+ get error returns instead by using the new librados OPERATION_FULL_TRY flag.
+
+
v9.0.4
======
LIBRADOS_OPERATION_IGNORE_CACHE = 8,
LIBRADOS_OPERATION_SKIPRWLOCKS = 16,
LIBRADOS_OPERATION_IGNORE_OVERLAY = 32,
+ LIBRADOS_OPERATION_FULL_TRY = 64,
};
/** @} */
OPERATION_IGNORE_CACHE = LIBRADOS_OPERATION_IGNORE_CACHE,
OPERATION_SKIPRWLOCKS = LIBRADOS_OPERATION_SKIPRWLOCKS,
OPERATION_IGNORE_OVERLAY = LIBRADOS_OPERATION_IGNORE_OVERLAY,
+ OPERATION_FULL_TRY = LIBRADOS_OPERATION_FULL_TRY,
};
/*
op_flags |= CEPH_OSD_FLAG_SKIPRWLOCKS;
if (flags & librados::OPERATION_IGNORE_OVERLAY)
op_flags |= CEPH_OSD_FLAG_IGNORE_OVERLAY;
+ if (flags & librados::OPERATION_FULL_TRY)
+ op_flags |= CEPH_OSD_FLAG_FULL_TRY;
return op_flags;
}