Linux LVM users
 help / color / mirror / Atom feed
From: Ralph Jennings <ralph@oro.net>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] FW: LVM on Linux
Date: Tue, 17 Jul 2001 12:23:18 -0700	[thread overview]
Message-ID: <20010717122318.A20564@d3.front> (raw)
In-Reply-To: <20010717174008.A1000@btconnect.com>

On Tue, Jul 17, 2001 at 05:40:08PM +0100, Joe Thornber wrote:
[snip]
>    Here there's one % that we can't get rid of (we could also do chunk = 
>    sector - (pe_size * index)), for the simple fact that the number of
>    stripes is not a power of 2, so we can't replace with shifts and masks.
> 
>    I just had a chat with one of the EVMS guys, EVMS *does* have this
>    exact same problem.
> 
>    Should we restrict stripes sets to powers of 2 ?
[snip]

Why not just make a mod function?

Preceeding code not tested, but should work?
It's been a while since I wrote C code.

BTW, what is a u64 (unsigned 64bit integer) in C called?
Is there any uniform cross platform way to say it (like
u64 perhaps)?

u64 mod_64(u64 number, u64 modNum) {
    while (number > modNum) {
        number -= modNum;
    }
    return number;
}

  parent reply	other threads:[~2001-07-17 19:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-16 20:42 [linux-lvm] FW: LVM on Linux Gonyou, Austin
2001-07-16 21:10 ` Ragnar Kjørstad
2001-07-17 16:40 ` Joe Thornber
2001-07-17 18:10   ` Ragnar Kjørstad
2001-07-17 19:23   ` Ralph Jennings [this message]
2001-07-18  8:16     ` Joe Thornber
2001-07-18 15:01       ` Heinz J. Mauelshagen
2001-07-18 16:58       ` Steven Lembark
  -- strict thread matches above, loose matches on Subject: below --
2001-07-16 23:26 Gonyou, Austin
2001-07-16 23:58 ` Ragnar Kjørstad
2001-07-16 20:35 Gonyou, Austin
2001-07-17 11:27 ` Heinz J. Mauelshagen

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=20010717122318.A20564@d3.front \
    --to=ralph@oro.net \
    --cc=linux-lvm@sistina.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox