public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <roland@topspin.com>
To: Kevin Corry <kevcorry@us.ibm.com>
Cc: linux-kernel@vger.kernel.org, Benjamin LaHaise <bcrl@kvack.org>,
	Alasdair G Kergon <agk@redhat.com>, Andrew Morton <akpm@osdl.org>
Subject: Re: device-mapper: fix TB stripe data corruption
Date: Fri, 21 Jan 2005 13:20:31 -0800	[thread overview]
Message-ID: <52651qqy1s.fsf@topspin.com> (raw)
In-Reply-To: <200501211512.45524.kevcorry@us.ibm.com> (Kevin Corry's message of "Fri, 21 Jan 2005 15:12:45 -0600")

    Kevin> We have to take a mod of the chunk value and the number of
    Kevin> stripes (which can be a non-power-of-2, so a shift won't
    Kevin> work). It's been my understanding that you couldn't mod a
    Kevin> 64-bit value with a 32-bit value in the kernel.

If I understand you correctly, do_div() (defined in <asm/div64.h>)
does what you need.  Look at asm-generic/div64.h for a good
description of the precise semantics of do_div().

 - Roland

  reply	other threads:[~2005-01-21 21:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-21 18:12 device-mapper: fix TB stripe data corruption Alasdair G Kergon
2005-01-21 20:33 ` Benjamin LaHaise
2005-01-21 21:12   ` Kevin Corry
2005-01-21 21:20     ` Roland Dreier [this message]
2005-01-21 21:57       ` Kevin Corry
2005-01-22 22:35         ` Alasdair G Kergon

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=52651qqy1s.fsf@topspin.com \
    --to=roland@topspin.com \
    --cc=agk@redhat.com \
    --cc=akpm@osdl.org \
    --cc=bcrl@kvack.org \
    --cc=kevcorry@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    /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