mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alasdair G Kergon <agk@redhat.com>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: mbroz@redhat.com, jens.axboe@oracle.com, neilb@suse.de,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] block: fix setting of max_segment_size and seg_boundary mask
Date: Wed, 3 Dec 2008 12:06:16 +0000	[thread overview]
Message-ID: <20081203120616.GM26097@agk.fab.redhat.com> (raw)
In-Reply-To: <20081203143112F.fujita.tomonori@lab.ntt.co.jp>

On Wed, Dec 03, 2008 at 02:32:00PM +0900, FUJITA Tomonori wrote:
> On Mon, 01 Dec 2008 00:42:09 +0100
> Milan Broz <mbroz@redhat.com> wrote:
 
> > @@ -314,6 +317,7 @@ void blk_queue_stack_limits(struct request_queue *t, struct request_queue *b)
> >  	/* zero is "infinity" */
> >  	t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
> >  	t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
> > +	t->seg_boundary_mask = min_not_zero(t->seg_boundary_mask, b->seg_boundary_mask);
> >  
> >  	t->max_phys_segments = min(t->max_phys_segments, b->max_phys_segments);
> >  	t->max_hw_segments = min(t->max_hw_segments, b->max_hw_segments);
 
> Theoretically, blk_queue_stack_limits() better use min_not_zero
> instead of min for max_phys_segments, max_hw_segments, and
> max_segment_size?

But does zero have any valid use there?
We left those alone for now, feeling that BUG_ON() might be more appropriate.
 
Alasdair
-- 
agk@redhat.com

  reply	other threads:[~2008-12-03 12:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-30 23:42 Milan Broz
2008-12-03  5:32 ` FUJITA Tomonori
2008-12-03 12:06   ` Alasdair G Kergon [this message]
2008-12-04  2:30     ` FUJITA Tomonori

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=20081203120616.GM26097@agk.fab.redhat.com \
    --to=agk@redhat.com \
    --cc=fujita.tomonori@lab.ntt.co.jp \
    --cc=jens.axboe@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbroz@redhat.com \
    --cc=neilb@suse.de \
    /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

Powered by JetHome