2011/8/25 Yehuda Sadeh Weinraub yehuda.sa...@dreamhost.com:
+ if (buf) {
+ dif = ofs-lastofs;
+ if (dif 0) {
+ byte *tempbuf = (byte *) malloc(dif);
+ memset(tempbuf, 0, dif);
+ Hash-Update((const byte *) tempbuf, dif);
+ free(tempbuf);
+ }
+
+
On Fri, Aug 26, 2011 at 11:51, Christian Brunner c...@muc.de wrote:
+ if (!buf) {
+ len = ofs-lastofs;
+ tempbuf = (byte *) malloc(len);
+ if (!tempbuf)
+ return -ENOMEM;
+ hashbuf = tempbuf;
+ }
+ Hash-Update((const byte *) hashbuf, len);
That'll still try to allocate
On Fri, Aug 26, 2011 at 11:51 AM, Christian Brunner c...@muc.de wrote:
+static int hash_read_cb(uint64_t ofs, size_t len, const char *buf, void *arg)
+{
+ ceph::crypto::Digest *Hash = (ceph::crypto::Digest *)arg;
+ byte *hashbuf = (byte *) buf;
Looking at it again, hashbuf is pretty much
On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen
tommi.virta...@dreamhost.com wrote:
On Fri, Aug 26, 2011 at 11:51, Christian Brunner c...@muc.de wrote:
+ if (!buf) {
+ len = ofs-lastofs;
+ tempbuf = (byte *) malloc(len);
+ if (!tempbuf)
+ return -ENOMEM;
+ hashbuf =
2011/8/26 Yehuda Sadeh Weinraub yehud...@gmail.com:
On Fri, Aug 26, 2011 at 11:51 AM, Christian Brunner c...@muc.de wrote:
+static int hash_read_cb(uint64_t ofs, size_t len, const char *buf, void
*arg)
+{
+ ceph::crypto::Digest *Hash = (ceph::crypto::Digest *)arg;
+ byte *hashbuf = (byte
On Fri, Aug 26, 2011 at 12:52 PM, Christian Brunner c...@muc.de wrote:
2011/8/26 Yehuda Sadeh Weinraub yehud...@gmail.com:
On Fri, Aug 26, 2011 at 11:51 AM, Christian Brunner c...@muc.de wrote:
+static int hash_read_cb(uint64_t ofs, size_t len, const char *buf, void
*arg)
+{
+
On Fri, Aug 26, 2011 at 12:25, Yehuda Sadeh Weinraub yehud...@gmail.com wrote:
On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen
tommi.virta...@dreamhost.com wrote:
e.g. 8kB at a time. And at that point you might as well just use read
and not read_iterate, that'll do the memsetting etc for you,
2011/8/26 Tommi Virtanen tommi.virta...@dreamhost.com:
On Fri, Aug 26, 2011 at 12:25, Yehuda Sadeh Weinraub yehud...@gmail.com
wrote:
On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen
tommi.virta...@dreamhost.com wrote:
e.g. 8kB at a time. And at that point you might as well just use read
On Fri, Aug 26, 2011 at 1:03 PM, Tommi Virtanen
tommi.virta...@dreamhost.com wrote:
On Fri, Aug 26, 2011 at 12:25, Yehuda Sadeh Weinraub yehud...@gmail.com
wrote:
On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen
tommi.virta...@dreamhost.com wrote:
e.g. 8kB at a time. And at that point you
We needed to get an md5 checksum of an rbd image. Since librbd is using a
lot of sparse operations, this was not possible without writing an image
to a local disk.
With this patch exporting the image is no longer needed. You can do
rbd md5 image and you will get the same output as you would call
--
To unsubscribe from this list: send the line unsubscribe ceph-devel in
the body of a message to majord...@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
11 matches
Mail list logo