mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: viro@parcelfarce.linux.theplanet.co.uk
To: William Lee Irwin III <wli@holomorphy.com>,
	Stewart Smith <stewartsmith@mac.com>,
	linux-kernel@vger.kernel.org, trivial@rustcorp.com.au
Subject: Re: buffer_head.b_bsize type
Date: Thu, 29 May 2003 12:15:17 +0100	[thread overview]
Message-ID: <20030529111517.GP14138@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030529103503.GZ8978@holomorphy.com>

On Thu, May 29, 2003 at 03:35:03AM -0700, William Lee Irwin III wrote:
> On Thu, May 29, 2003 at 08:29:40PM +1000, Stewart Smith wrote:
> > The buffer_head structure (include/linux/buffer_head.h) uses a u32 type 
> > while everywhere else (e.g. bread) the size parameter is of type int.
> > Currently on all architectures u32 is defined as unsigned int. We 
> > should probably not be doing unsigned and signed swaps. And you should 
> > never really have a negative size of a buffer.
> > So, there are two solutions: either change the buffer_head struct to be 
> > int so it matches everywhere else, or change everywhere else.
> > The attached patch does the change in one place. Although perhaps 
> > changing everywhere else would be better. Thoughts? I'm happy to make 
> > up the patch if needed.
> > Applies cleanly to 2.5.69 and 2.5.70 and has been tested on i386 
> > without causing any further problems (that I can see at least).
> 
> Could we go the other way and make all users of b_size use unsigned?

Who the hell cares?  Size of buffer does not exceed the page size.
Unless you can show a platform with 2Gb pages...

  reply	other threads:[~2003-05-29 11:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-29 10:29 Stewart Smith
2003-05-29 10:35 ` William Lee Irwin III
2003-05-29 11:15   ` viro [this message]
2003-05-29 11:28     ` William Lee Irwin III
2003-05-30 14:24       ` Andries Brouwer
2003-05-30 14:43         ` Andries Brouwer
2003-05-31  2:20         ` William Lee Irwin III
2003-05-29 14:19     ` Stewart Smith

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=20030529111517.GP14138@parcelfarce.linux.theplanet.co.uk \
    --to=viro@parcelfarce.linux.theplanet.co.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stewartsmith@mac.com \
    --cc=trivial@rustcorp.com.au \
    --cc=wli@holomorphy.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®