hail-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: hail-devel@vger.kernel.org
Subject: [hail patch 0/3] chunkd: on-disk checksumming and get-partial operation
Date: Tue, 14 Sep 2010 23:14:58 -0400	[thread overview]
Message-ID: <20100915031458.GA20525@havoc.gtf.org> (raw)


This patchset is just about ready to go upstream.  Just need to write a
couple tests (familiar refrain eh?:)).

These changes add a new Get-Partial-Object (GET_PART) chunkd operation.

GET_PART permits partial retrieval of an object, by adding an
(offset,length) pair to the standard Get-Object (GET) operation.
length==0 is special-cased as meaning "retrieve until end of object."

The maximum number of bytes that may be requested in a single GET_PART
request is 4 x 64k blocks (256k).  Larger lengths will be truncated
down to the maximum.

Because we currently only store whole-object SHA1 checksums, we are left
without an ability to verify on-disk data is valid, when retrieving a
subset of an object.  Thus, a necessary pre-req of GET_PART is changing
the checksum scheme, which is done as follows:

	* objects are defined as runs of 64k logical blocks
	* checksums are stored on-disk for each 64k in an object
	* Rather than returning the stored SHA1 checksum, which serves
	  to verify both on-disk and network integrity, we break this
	  into two steps,
		* verify per-64k checksums at GET_PART time
		* generate on-the-fly SHA1 checksum for GET_PART
		  returned data

The chunkd network protocol supports any offset/length, including
not-64k-aligned values.  However, failure to align GET_PART requests on
64k boundaries will result in reduced performance, due to additional
work chunkd must perform [and then throw away], because chunkd now works
in 64k chunks internally.

This is a major protocol milestone, and should immediately enable sane
usage by nfs4d and itd (see wiki if unfamiliar), as well as hopefully
providing useful benefits to tabled as well.

             reply	other threads:[~2010-09-15  3:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-15  3:14 Jeff Garzik [this message]
2010-09-15  3:15 ` [hail patch 1/3] chunkd: Add checksum table to on-disk format Jeff Garzik
2010-09-15  3:16 ` [hail patch 2/3] chunkd: checksum data prior to returning via GET Jeff Garzik
2010-09-15  3:16 ` [hail patch 3/3] chunkd: new get-partial operation Jeff Garzik
2010-09-16  4:04 ` [hail patch 0/3] chunkd: on-disk checksumming and " Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100915031458.GA20525@havoc.gtf.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).