linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: Re: Hardsector size support in 2.4 and 2.5
@ 2001-11-12 20:05 Mark Peloquin
  2001-11-12 20:27 ` [Evms-devel] " Christoph Hellwig
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Peloquin @ 2001-11-12 20:05 UTC (permalink / raw)
  To: dalecki; +Cc: linux-kernel, evms-devel

Martin Dalecki wrote:
> > I was wondering if 2.5 will *really* support different hard sector
> > sizes. Today the hardsect array in the kernel seems to serve
> > little purpose. Drivers fill it in, but then what? It does not appear
> > to be used in any io path computations as illustrated by code
> > in submit_bh and generic_make_request which use a few
> > hardcoded shifts by 9 when dealing with sector sizes.
> >
> > Is the hardsect array on the way *in* or the way *out* of the
> > kernel? Will 2.5 take the real hardsector value into account?
> > Or can we expect everything to be handled in 512 byte
> > multiples  (as we do today)?

> It is on it's way out, since:

That is good, then the code should be less confusing.

> 1. Most hardware sec sizes are obscelny lower that the minimal logical
> sizes those days (512 ver. 4096 page size),
> so the tuning there doesn't matter.

> 2. All of it is "tuning", which can be handled generically on higher
> levels. (Like setting FS blocksize....)

> 3. The hard limits are handled on device driver level anyway (best
> example here are the odd fs block sizes for iso9660 filesystem).

So any block device, can always expect to receive buffer heads
whose b_rsector value represents the offset from the beginning
of that device in 512 byte multiples? And this will continue
to hold true in 2.5 as well?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Evms-devel] Re: Re: Hardsector size support in 2.4 and 2.5
  2001-11-12 20:05 Re: Hardsector size support in 2.4 and 2.5 Mark Peloquin
@ 2001-11-12 20:27 ` Christoph Hellwig
  2001-11-13  9:02   ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2001-11-12 20:27 UTC (permalink / raw)
  To: Mark Peloquin; +Cc: dalecki, linux-kernel, evms-devel

On Mon, Nov 12, 2001 at 02:05:19PM -0600, Mark Peloquin wrote:
> So any block device, can always expect to receive buffer heads
> whose b_rsector value represents the offset from the beginning
> of that device in 512 byte multiples? And this will continue
> to hold true in 2.5 as well?

There is a good chance that no 2.5 block driver will ever see a buffer_head,
take a look at http://www.kernel.org/pub/linux/kernel/people/axboe/v2.5/ for
details.

	Christoph

-- 
Of course it doesn't work. We've performed a software upgrade.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Evms-devel] Re: Re: Hardsector size support in 2.4 and 2.5
  2001-11-12 20:27 ` [Evms-devel] " Christoph Hellwig
@ 2001-11-13  9:02   ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2001-11-13  9:02 UTC (permalink / raw)
  To: Christoph Hellwig, Mark Peloquin, dalecki, linux-kernel, evms-devel

On Mon, Nov 12 2001, Christoph Hellwig wrote:
> On Mon, Nov 12, 2001 at 02:05:19PM -0600, Mark Peloquin wrote:
> > So any block device, can always expect to receive buffer heads
> > whose b_rsector value represents the offset from the beginning
> > of that device in 512 byte multiples? And this will continue
> > to hold true in 2.5 as well?
> 
> There is a good chance that no 2.5 block driver will ever see a buffer_head,
> take a look at http://www.kernel.org/pub/linux/kernel/people/axboe/v2.5/ for
> details.

To expand on the specific point -- in 2.5, what will change is that
b_rsector (or equiv field, bi_sector in bio) will be offset from the
beginning of the disk, not the beginning of the partition. This moves
toe partion remaps out of the driver itself.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Evms-devel] Re: Re: Hardsector size support in 2.4 and 2.5
  2001-11-13 14:24 Mark Peloquin
@ 2001-11-13 14:39 ` Jens Axboe
  0 siblings, 0 replies; 5+ messages in thread
From: Jens Axboe @ 2001-11-13 14:39 UTC (permalink / raw)
  To: Mark Peloquin; +Cc: Christoph Hellwig, dalecki, linux-kernel, evms-devel

On Tue, Nov 13 2001, Mark Peloquin wrote:
> On Tue, Nov 13 2001, Jens Axboe wrote:
> > On Mon, Nov 12 2001, Christoph Hellwig wrote:
> > > On Mon, Nov 12, 2001 at 02:05:19PM -0600, Mark Peloquin wrote:
> > > > So any block device, can always expect to receive buffer heads
> > > > whose b_rsector value represents the offset from the beginning
> > > > of that device in 512 byte multiples? And this will continue
> > > > to hold true in 2.5 as well?
> > >
> > > There is a good chance that no 2.5 block driver will ever see a
> buffer_head,
> > > take a look at
> http://www.kernel.org/pub/linux/kernel/people/axboe/v2.5/ for
> > > details.
> 
> > To expand on the specific point -- in 2.5, what will change is that
> > b_rsector (or equiv field, bi_sector in bio) will be offset from the
> > beginning of the disk, not the beginning of the partition. This moves
> > toe partion remaps out of the driver itself.
> 
> This is an important difference, so I'd like to make sure I fully
> understand the scope. Ok, so bi_sector for partitions will be
> disk relative, not partition relative. I'll assume that bi_sector

Well, know you have b_rdev == MKDEV(3, 5) and b_rsector = 0 for the
first sector of /dev/hda5 -- with the new remapped approach, this would
be b_rdev = MKDEV(3, 0) b_rsector 123456 (imagined value, of course).

> will be set inside of submit_bh. So top level block devices always
> see something that is disk relative. Is this change ONLY for
> partitions? And if not, how will this affect what top and

Inside generic_make_request currentl, so stacking works.

> intermediate levels of stacked block devices receive for a
> bi_sector value? If I had MD on LVM on partitions, what would
> bi_sector value initially be relative to? The MD device, the
> LVM device, or the disk underlying the partitions? It seems it

Nothing changes for stacking. The only difference is that the remapping
for partition offset is now done above the driver. Drivers can still
remap b_rdev and b_rsector as they see fit.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Evms-devel] Re: Re: Hardsector size support in 2.4 and 2.5
@ 2001-11-13 14:24 Mark Peloquin
  2001-11-13 14:39 ` Jens Axboe
  0 siblings, 1 reply; 5+ messages in thread
From: Mark Peloquin @ 2001-11-13 14:24 UTC (permalink / raw)
  To: Jens Axboe; +Cc: Christoph Hellwig, dalecki, linux-kernel, evms-devel

On Tue, Nov 13 2001, Jens Axboe wrote:
> On Mon, Nov 12 2001, Christoph Hellwig wrote:
> > On Mon, Nov 12, 2001 at 02:05:19PM -0600, Mark Peloquin wrote:
> > > So any block device, can always expect to receive buffer heads
> > > whose b_rsector value represents the offset from the beginning
> > > of that device in 512 byte multiples? And this will continue
> > > to hold true in 2.5 as well?
> >
> > There is a good chance that no 2.5 block driver will ever see a
buffer_head,
> > take a look at
http://www.kernel.org/pub/linux/kernel/people/axboe/v2.5/ for
> > details.

> To expand on the specific point -- in 2.5, what will change is that
> b_rsector (or equiv field, bi_sector in bio) will be offset from the
> beginning of the disk, not the beginning of the partition. This moves
> toe partion remaps out of the driver itself.

This is an important difference, so I'd like to make sure I fully
understand the scope. Ok, so bi_sector for partitions will be
disk relative, not partition relative. I'll assume that bi_sector
will be set inside of submit_bh. So top level block devices always
see something that is disk relative. Is this change ONLY for
partitions? And if not, how will this affect what top and
intermediate levels of stacked block devices receive for a
bi_sector value? If I had MD on LVM on partitions, what would
bi_sector value initially be relative to? The MD device, the
LVM device, or the disk underlying the partitions? It seems it
would need to be set relative to the MD device. If so, then either
partitions or MD/LVM (non-partition devices) would seem to have to
be special cased. I could continue going on making assumptions and
theorizing the affects, but I'll stop here and wait for your
clarification on how you see things working.

Mark


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-11-13 14:39 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-12 20:05 Re: Hardsector size support in 2.4 and 2.5 Mark Peloquin
2001-11-12 20:27 ` [Evms-devel] " Christoph Hellwig
2001-11-13  9:02   ` Jens Axboe
2001-11-13 14:24 Mark Peloquin
2001-11-13 14:39 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).