Re: rados_aio_get_return_value returning 0 on writes

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

 



On Thu, 6 May 2010, Christian Brunner wrote:

> Almost forgot to write this: When calling rados_aio_get_return_value
> on the callback of a write it is always returning 0.
> 
> I would have expected the number of bytes written (or a value <0 on error).

The OSD always writes the number of bytes you gave it, or nothing at all.  
Since there are no "short" writes, and an osd op can be something much 
more complicated than a write (write this here + write that there + set 
this xattr + remove that xattr) there isn't necessarily a byte count, so 
it returns a simple 0 for success.

> Qemu doesn't seem to care, so this isn't really a problem for me.

You can also just return the size you sent to the OSD when you get a 0 
back.

sage
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux