From: Daniel Phillips <phillips@bonn-fries.net>
To: Andries.Brouwer@cwi.nl, torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] size-in-bytes
Date: Mon, 18 Feb 2002 23:43:38 +0100 [thread overview]
Message-ID: <E16cwVW-0000jf-00@starship.berlin> (raw)
In-Reply-To: <UTC200202161609.QAA31164.aeb@cwi.nl>
In-Reply-To: <UTC200202161609.QAA31164.aeb@cwi.nl>
On February 16, 2002 05:09 pm, Andries.Brouwer@cwi.nl wrote:
> I just rediffed the size-in-bytes patch against 2.5.5pre1.
> The result is found at ftp.kernel.org
> (under 02-2.5.5pre1-sizeinbytes-bsd), and below.
>
> Comment:
> Disk and partition size is kept several places, sometimes
> in sectors (of 512 bytes), sometimes in blocks (of 1024 bytes).
> This is ugly, one finds a lot of shifting left and right, as in
> limit = (size << BLOCK_SIZE_BITS) >> sector_bits;
We want to stay with the shift counts. They should be the primary currency
of size measurement. You can add shift counts together and get nice, compact
code, whereas with absolute size you often have to ugly things - e.g., it's a
pain to divide by blocksize when you have it as an absolute number, it's easy
when you have it as a shift.
If you are going to the trouble of fixing this, please don't use absolute
size as the primary measure, use a shift count.
--
Daniel
next prev parent reply other threads:[~2002-02-18 22:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-16 16:09 Andries.Brouwer
2002-02-16 21:09 ` Martin Dalecki
2002-02-18 22:43 ` Daniel Phillips [this message]
2002-02-21 7:04 ` Benjamin LaHaise
2002-02-16 21:41 Andries.Brouwer
2002-02-16 22:05 ` Martin Dalecki
2002-02-16 22:45 Andries.Brouwer
2002-02-16 23:10 ` Martin Dalecki
2002-02-18 23:29 Andries.Brouwer
2002-02-18 23:38 ` Daniel Phillips
2002-02-21 9:54 Andries.Brouwer
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=E16cwVW-0000jf-00@starship.berlin \
--to=phillips@bonn-fries.net \
--cc=Andries.Brouwer@cwi.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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
all inboxes | Powered by JetHome®