Linux RAID subsystem development
 help / color / mirror / Atom feed
* raid0 hashing funtion
@ 2009-05-03 13:29 Raz
  2009-05-12 22:12 ` Neil Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Raz @ 2009-05-03 13:29 UTC (permalink / raw)
  To: Neil Brown; +Cc: Linux RAID Mailing List

Neil Hello
I am reading the raid0 code, and I do not understand what is the
rational behind this hashing and spacing ?
I am asking because I am working on the chunk size restrictions.
in raid0_make_request the zone calculation is as follows:

      {
              sector_t x = sector >> conf->sector_shift;
              sector_div(x, (u32)conf->spacing);
              zone = conf->hash_table[x];
      }
        while (sector >= zone->zone_start + zone->sectors)
                zone++;

I replaced it with the code :
        zone = &conf->strip_zone[0];
        while (sector >= zone->zone_start + zone->sectors)
                zone++;
and all is fine .  why do we need the hashing/spacing complication ?
thank you
raz

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

end of thread, other threads:[~2009-05-13 13:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-03 13:29 raid0 hashing funtion Raz
2009-05-12 22:12 ` Neil Brown
2009-05-13 13:18   ` Andre Noll

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox