Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v2)

2011-08-26 Thread Christian Brunner
2011/8/25 Yehuda Sadeh Weinraub : > +  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); > +    } >>>

[PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Christian Brunner
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

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Tommi Virtanen
On Fri, Aug 26, 2011 at 11:51, Christian Brunner 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 10

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Yehuda Sadeh Weinraub
On Fri, Aug 26, 2011 at 11:51 AM, Christian Brunner 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 useless, y

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Yehuda Sadeh Weinraub
On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen wrote: > On Fri, Aug 26, 2011 at 11:51, Christian Brunner wrote: >> +  if (!buf) { >> +    len = ofs-lastofs; >> +    tempbuf = (byte *) malloc(len); >> +    if (!tempbuf) >> +      return -ENOMEM; >> +    hashbuf = tempbuf; >> +  } >> +  Hash->Upd

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Christian Brunner
2011/8/26 Yehuda Sadeh Weinraub : > On Fri, Aug 26, 2011 at 11:51 AM, Christian Brunner 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

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Yehuda Sadeh Weinraub
On Fri, Aug 26, 2011 at 12:52 PM, Christian Brunner wrote: > 2011/8/26 Yehuda Sadeh Weinraub : >> On Fri, Aug 26, 2011 at 11:51 AM, Christian Brunner wrote: >>> +static int hash_read_cb(uint64_t ofs, size_t len, const char *buf, void >>> *arg) >>> +{ >>> +  ceph::crypto::Digest *Hash = (ceph::cr

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Tommi Virtanen
On Fri, Aug 26, 2011 at 12:25, Yehuda Sadeh Weinraub wrote: > On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen > 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, and then >> you can use a static buffer

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Christian Brunner
2011/8/26 Tommi Virtanen : > On Fri, Aug 26, 2011 at 12:25, Yehuda Sadeh Weinraub > wrote: >> On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen >> 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, and

Re: [PATCH 2/2] rbd: add an option for md5 checksumming (v3)

2011-08-26 Thread Yehuda Sadeh Weinraub
On Fri, Aug 26, 2011 at 1:03 PM, Tommi Virtanen wrote: > On Fri, Aug 26, 2011 at 12:25, Yehuda Sadeh Weinraub > wrote: >> On Fri, Aug 26, 2011 at 12:10 PM, Tommi Virtanen >> 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

[PATCH 2/2] rbd: add an option for md5 checksumming (v4)

2011-08-26 Thread Christian Brunner
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

Re: ceph/rbd benchmarks

2011-08-26 Thread Marcus Sorensen
I applied the patches to the client's existing kernel version, here are the results with respect to the pre-patch: seq char write 100.60% seq blk write 97.18% seq blk rewrite 120.07% seq char read 161.52% seq blk read162.30% seeks 141.93% seq create 76.02% seq read186.78% s

suscribe

2011-08-26 Thread XMundo Networks - Soporte Tecnico
-- 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