All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: Pete Zaitcev <zaitcev@redhat.com>
Cc: Project Hail List <hail-devel@vger.kernel.org>
Subject: Re: Design challenges in chunkd self-checking
Date: Tue, 22 Dec 2009 22:36:16 -0500	[thread overview]
Message-ID: <4B319030.9070906@garzik.org> (raw)
In-Reply-To: <20091222184014.22c5d1c5@redhat.com>

On 12/22/2009 08:40 PM, Pete Zaitcev wrote:
> On Tue, 22 Dec 2009 17:43:58 -0500
> Jeff Garzik<jeff@garzik.org>  wrote:
>
>> It is normal and reasonable to maintain global information about all
>> in-progress operations.  Caching systems do that, for example, to ensure
>> multiple cache requests for object A do not initiate multiple
>> simultaneous back-end requests for object A.
>
> Unfortunately, this requires a data structure that permits searching.
> Since I lack the classical CS education, I cannot select an appropriate
> structure beyond "double-linked list and a hope that we'll never see
> more than 10 simultaneous I/Os".

What are the operational parameters?

* at beginning of object write, add entry to ADT (abstract data type, a 
list/table/whatever)

* at end of object write, remove entry from ADT

* lookup entry in ADT, where search key == object id.  if search 
succeeds, that object is guaranteed to be young and not need 
verification.  if search fails, the object (a) does not exist, or (b) 
has been completely written to disk.

Seems like a mutex-wrapped GLib hash table would work...

	Jeff



  reply	other threads:[~2009-12-23  3:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-22 21:41 Design challenges in chunkd self-checking Pete Zaitcev
2009-12-22 22:43 ` Jeff Garzik
2009-12-23  1:40   ` Pete Zaitcev
2009-12-23  3:36     ` Jeff Garzik [this message]
2010-01-05 20:47       ` Pete Zaitcev
2010-01-05 21:02         ` Jeff Garzik
2010-01-05 21:39           ` Pete Zaitcev
2010-01-05 21:53             ` Jeff Garzik
2010-01-05 22:10               ` Pete Zaitcev

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=4B319030.9070906@garzik.org \
    --to=jeff@garzik.org \
    --cc=hail-devel@vger.kernel.org \
    --cc=zaitcev@redhat.com \
    /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 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.