questions about rbd_discard, python API

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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?



_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux