int librados::IoCtxImpl::aio_read(const object_t oid, AioCompletionImpl *c,
bufferlist *pbl, size_t len, uint64_t off)
{
+ if (len > (size_t) INT_MAX)
+ return -EDOM;
Context *onack = new C_aio_Ack(c);
eversion_t ver;
int librados::IoCtxImpl::aio_read(const object_t oid, AioCompletionImpl *c,
char *buf, size_t len, uint64_t off)
{
+ if (len > (size_t) INT_MAX)
+ return -EDOM;
+
Context *onack = new C_aio_Ack(c);
c->is_read = true;
bufferlist *data_bl, size_t len,
uint64_t off)
{
+ if (len > (size_t) INT_MAX)
+ return -EDOM;
C_aio_sparse_read_Ack *onack = new C_aio_sparse_read_Ack(c);
onack->m = m;
int librados::IoCtxImpl::read(const object_t& oid,
bufferlist& bl, size_t len, uint64_t off)
{
+ if (len > (size_t) INT_MAX)
+ return -EDOM;
+
Mutex mylock("IoCtxImpl::read::mylock");
Cond cond;
bool done;
Context *onack = new C_SafeCond(&mylock, &cond, &done, &r);
eversion_t ver;
+
::ObjectOperation op;
::ObjectOperation *pop = prepare_assert_ops(&op);
bufferlist& data_bl, size_t len,
uint64_t off)
{
+ if (len > (size_t) INT_MAX)
+ return -EDOM;
+
bufferlist bl;
Mutex mylock("IoCtxImpl::read::mylock");
// non-blocking. async.
+
+ /**
+ * @note total read size must be <= INT_MAX, since
+ * the return value is total bytes read
+ */
int readx(OSDRead *rd, ObjectSet *oset, Context *onfinish);
int writex(OSDWrite *wr, ObjectSet *oset, Mutex& wait_on_lock);
bool is_cached(ObjectSet *oset, vector<ObjectExtent>& extents, snapid_t snapid);