Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Lazy initialization #28

Closed
wants to merge 2 commits into
from

Conversation

Projects
None yet
3 participants

fishrot commented Sep 27, 2011

Lazy initialization simplifies the set up procedure when booting off of a Flashcache volume. It writes the superblock directly out to the cache device instead of using the kernel module to do it.

Contributor

mohans commented Sep 27, 2011

Hi

The cache_size computation does not seem correct to me.

  1. The cache size needs to be adjusted for the number of metadatablocks in use.
  2. The superblock is not necessarily 512b. If md blocksize is > 512, then the size of the superblock is md blocksize.

fishrot commented Sep 27, 2011

On 09/27/2011 03:45 PM, Mohan Srinivasan wrote:

Hi

The cache_size computation does not seem correct to me.

  1. The cache size needs to be adjusted for the number of metadatablocks in use.

I was wondering about that also; however, in my testing, I seemed to
always get the correct size when comparing against the normal way of
creating a writeback cache volume.

I'll do some more testing and figure it out.

  1. The superblock is not necessarily 512b. If md blocksize is> 512, then the size of the superblock is md blocksize.

From just a quick glance in flashcache_create.c:

    if (read(cache_fd, buf, 512) < 0) {
             fprintf(stderr, "Cannot read Flashcache superblock %s\n",
                     ssd_devname);
             exit(1);
     }
Contributor

mohans commented Sep 27, 2011

On (2), yes the read for the superblock is always 512b, but the start of the metadata section is at a "md blocksize" boundary. So, you need to factor in a 1 "md block" for the superblock.

fishrot commented Sep 27, 2011

On 09/27/2011 04:24 PM, Mohan Srinivasan wrote:

On (2), yes the read for the superblock is always 512b, but the start of the metadata section is at a "md blocksize" boundary. So, you need to factor in a 1 "md block" for the superblock.

I figured that is what you actually meant after I hit send.

I"ll fix this stuff up tonight.

Contributor

guilhem commented Aug 13, 2012

any news about Lazy initialization ?

Contributor

mohans commented Aug 13, 2012

I have not had the time to do this. If someone else wants to do this, I'd be
happy to commit.


From: Guilhem Lettron notifications@github.com
To: facebook/flashcache flashcache@noreply.github.com
Sent: Mon, August 13, 2012 9:34:06 AM
Subject: Re: [flashcache] Lazy initialization (#28)

any news about Lazy initialization ?

Reply to this email directly or view it on GitHub.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment