chunkd on-disk and network protocol format change

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

 




The following commit introduces an incompatible chunkd change, which breaks compatibility with (a) existing on-disk chunkd databases, and (b) existing chunkd network protocol entities.

Prior to commit ea5d20bc22aeed077312c9c1824e84651af17a16, chunkd stored SHA1 checksums as ASCII, and sent them across the wire in each message in ASCII.

Converting these to directly store and use SHA1 binary checksums on-disk saves several memory allocations, and more importantly, shaves 44 bytes off each chunkd message. ASCII is only needed in the XML-based list-objects output, so we only perform the conversion at list-objects time.

	Jeff



commit ea5d20bc22aeed077312c9c1824e84651af17a16
Author: Jeff Garzik <jeff@xxxxxxxxxx>
Date:   Wed Jul 7 00:51:48 2010 -0400

[chunk] protocol, disk fmt: Replace ASCII checksum representation with binary

    Rather than converting SHA1 checksums back and forth between ASCII
    and binary, always store and compare binary checksums.  Only convert
    to ASCII when performing a list-objects request, which requires
    XML output.

    Among other savings, this decreases the size of the per-message
    fixed-length header by 44 bytes.

    Signed-off-by: Jeff Garzik <jgarzik@xxxxxxxxxx>

 chunkd/be-fs.c     | 47 +++++++++++++++--------------------------------
 chunkd/chunkd.h    |  9 +++++----
 chunkd/object.c    | 14 ++++----------
 chunkd/selfcheck.c | 19 +++++++++++--------
 include/chunk_msg.h|  4 ++--
 5 files changed, 37 insertions(+), 56 deletions(-)


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


[Index of Archives]     [Fedora Clound]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux