All of lore.kernel.org
 help / color / mirror / Atom feed
* questions about rbd_discard, python API
@ 2018-08-06  7:08 Will Zhao
  0 siblings, 0 replies; only message in thread
From: Will Zhao @ 2018-08-06  7:08 UTC (permalink / raw)
  To: ceph-devel-u79uwXL29TY76Z2rM5mHXA, Ceph-User


[-- Attachment #1.1: Type: text/plain, Size: 752 bytes --]

Hi all: extern "C" int rbd_discard(rbd_image_t image, uint64_t ofs, uint64_t
len)
{
librbd::ImageCtx *ictx = (librbd::ImageCtx *)image;
tracepoint(librbd, discard_enter, ictx, ictx->name.c_str(),
ictx->snap_name.c_str(), ictx->read_only, ofs, len);
if (len > std::numeric_limits<int>::max()) {
tracepoint(librbd, discard_exit, -EINVAL);
return -EINVAL;
}
int r = ictx->io_work_queue->discard(ofs, len, ictx->skip_partial_discard);
tracepoint(librbd, discard_exit, r);
return r;
} I tried to call rbd python api, rbd.Image.discard , and I found there is
limit to the parameter len , it is a uint64, but is limited by
std::numeric_limits<int>::max(), so that I can't discard too large space at
a time. So I wonder what the considerations are about this?

[-- Attachment #1.2: Type: text/html, Size: 14952 bytes --]

[-- Attachment #2: Type: text/plain, Size: 178 bytes --]

_______________________________________________
ceph-users mailing list
ceph-users-idqoXFIVOFJgJs9I8MT0rw@public.gmane.org
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-06  7:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-06  7:08 questions about rbd_discard, python API Will Zhao

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.