From: "Heinz J. Mauelshagen" <Mauelshagen@sistina.com>
To: linux-lvm@sistina.com
Subject: Re: [linux-lvm] FW: LVM on Linux
Date: Wed, 18 Jul 2001 17:01:16 +0200 [thread overview]
Message-ID: <20010718170116.C24438@sistina.com> (raw)
In-Reply-To: <20010718091639.B382@btconnect.com>; from thornber@btconnect.com on Wed, Jul 18, 2001 at 09:16:39AM +0100
On Wed, Jul 18, 2001 at 09:16:39AM +0100, Joe Thornber wrote:
> On Tue, Jul 17, 2001 at 12:23:18PM -0700, Ralph Jennings wrote:
> > 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)?
>
> long long ?
u64 = unsigned long long :)
>
> >
> > u64 mod_64(u64 number, u64 modNum) {
> > while (number > modNum) {
> > number -= modNum;
> > }
> > return number;
> > }
>
> I'd like to see the flames if I put this into the driver :) The map
> function is called on every io block to an LVM device, it needs to be
> quick ! Since we know modNum is smallish, certainly less than 2^32,
> and 'number' is 64 bit we could be running around your loop a few
> times :)
Yep.
>
> On a more serious note this function should be provided by the
> compiler, since it supports the 64 bit type. I guess it is normally
> implemented in a function that gets linked automatically - it would still
> be good to get rid of it.
True.
>
> - Joe
> _______________________________________________
> linux-lvm mailing list
> linux-lvm@sistina.com
> http://lists.sistina.com/mailman/listinfo/linux-lvm
> read the LVM HOW-TO at http://www.sistina.com/lvm/Pages/howto.html
--
Regards,
Heinz -- The LVM Guy --
*** Software bugs are stupid.
Nevertheless it needs not so stupid people to solve them ***
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Heinz Mauelshagen Sistina Software Inc.
Senior Consultant/Developer Am Sonnenhang 11
56242 Marienrachdorf
Germany
Mauelshagen@Sistina.com +49 2626 141200
FAX 924446
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
next prev parent reply other threads:[~2001-07-18 15:01 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
2001-07-18 8:16 ` Joe Thornber
2001-07-18 15:01 ` Heinz J. Mauelshagen [this message]
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=20010718170116.C24438@sistina.com \
--to=mauelshagen@sistina.com \
--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