All of lore.kernel.org
 help / color / mirror / Atom feed
* Erasure coding library API
@ 2013-07-01 23:00 Loic Dachary
  2013-07-02 14:07 ` Atchley, Scott
  0 siblings, 1 reply; 16+ messages in thread
From: Loic Dachary @ 2013-07-01 23:00 UTC (permalink / raw)
  To: Ceph Development

[-- Attachment #1: Type: text/plain, Size: 1634 bytes --]

Hi,

Today Sam pointed out that the API for LRC ( Xorbas Hadoop Project Page, Locally Repairable Codes (LRC) http://smahesh.com/HadoopUSC/ for instance ) would need to be different from the one initialy proposed:

    context(k, m, reed-solomon|...) => context* c 
    encode(context* c, void* data) => void* chunks[k+m]
    decode(context* c, void* chunk[k+m], int* indices_of_erased_chunks) => void* data // erased chunks are
not used
    repair(context* c, void* chunk[k+m], int* indices_of_erased_chunks) => void* chunks[k+m] // erased
chunks are rebuilt

The decode function must allow for partial read:

    decode(context* c, int offset, int length, void* chunk[k+m], int* indices_of_erased_chunks, int* missing_chunks) => void* data 

If there are not enough chunks to recover the desired data range [offset, offset+length) the function returns NULL and sets missing_chunks to the list of chunks that must be retrieved in order to be able to read the desired data.

If decode is called to read just 1 chunk and it is missing, reed-solomon would return on error and ask for all other chunks to repair. If the underlying library implements LRC, it would ask for a subset of the chunks. 

An implementation allowing only full reads and using jerasure ( which does not do LRC ) requires that offset is always zero, length is the size of the object and returns a copy of indices_of_erased_chunks if there are not enough chunks to rebuild the missing ones. 

Comments are welcome :-)

-- 
Loïc Dachary, Artisan Logiciel Libre
All that is necessary for the triumph of evil is that good people do nothing.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 261 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2013-07-05 16:55 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-01 23:00 Erasure coding library API Loic Dachary
2013-07-02 14:07 ` Atchley, Scott
2013-07-02 17:14   ` Atchley, Scott
2013-07-02 21:33     ` Samuel Just
2013-07-03  2:12       ` Paul Von-Stamwitz
2013-07-03 11:53         ` Atchley, Scott
2013-07-03 18:19           ` Paul Von-Stamwitz
2013-07-04  3:06           ` Paul Von-Stamwitz
2013-07-04 13:24             ` Loic Dachary
2013-07-05 12:13               ` Atchley, Scott
2013-07-05 14:06                 ` Loic Dachary
2013-07-05 15:02                   ` Atchley, Scott
2013-07-05 16:34                     ` Loic Dachary
2013-07-05 16:55                       ` Atchley, Scott
2013-07-05 12:39             ` Atchley, Scott
2013-07-05 16:50       ` Loic Dachary

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.