mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sytse Wielinga <s.b.wielinga@student.utwente.nl>
To: Mario Holbe <Mario.Holbe@TU-Ilmenau.DE>, linux-kernel@vger.kernel.org
Subject: Re: 2.4: "access beyond end of device" after ext2 mount
Date: Tue, 18 Jan 2005 16:55:34 +0100	[thread overview]
Message-ID: <20050118155534.GA12050@speedy.student.utwente.nl> (raw)
In-Reply-To: <20050118152006.GJ2839@darkside.22.kls.lan>

On Tue, Jan 18, 2005 at 04:20:06PM +0100, Mario Holbe wrote:
> On Tue, Jan 18, 2005 at 03:17:07PM +0100, Sytse Wielinga wrote:
> > Why not just use dd if=/dev/xxx `blockdev --getbsz /dev/xxx` ...?
> 
> because it doesn't work, as I've demonstrated in
> Message-ID: <20050118082022.GA2839@darkside.22.kls.lan>
> 
> > root@darkside:~# dd if=/dev/hdg7 of=/dev/null bs=512
> > attempt to access beyond end of device
> > 22:07: rw=0, want=4996184, limit=4996183
> > dd: reading `/dev/hdg7': Input/output error
> > 9992360+0 records in
> > 9992360+0 records out
> > 5116088320 bytes transferred in 92,603241 seconds (55247400 bytes/sec)
> > root@darkside:~#
> > 
> > Fixing dd's blocksize to 512 doesn't help either.

That's not what I said; the block size of /dev/hdg7 there is 4096, not 512.
Besides, the blocksize of dd is 512 by default and independent of the blocksize
of the device.

Anyhow, the block size set for dd doesn't matter as even if the block size is
huge dd copies over the last partial block. The problem was that with the 2.4
kernel only whole blocks are usable, but it rounds off the device size to
multiples of the sector size (i.e., not; the device size is given in multiples
of the sector size, which, by default, is 512) instead of rounding off to
multiples of the block size. The 2.6 kernel does not have this problem; it
appears to accept partial blocks, and doesn't even appear to calculate the
device size (blockdev --getsz and --getsize return 0 on my machine.)

I think the fix could be as simple as rounding off the device size in one
location, but, as I haven't had a look at the source, I'm not sure, maybe every
driver needs a fix.

	Sytse

  reply	other threads:[~2005-01-18 15:58 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-18 13:42 Piszcz, Justin Michael
2005-01-18 14:02 ` Mario Holbe
2005-01-18 14:17   ` Sytse Wielinga
2005-01-18 15:20     ` Mario Holbe
2005-01-18 15:55       ` Sytse Wielinga [this message]
2005-01-18 16:12         ` Sytse Wielinga
     [not found] <fa.f2nt105.94e81t@ifi.uio.no>
     [not found] ` <fa.ihdogs4.bjglrq@ifi.uio.no>
2005-01-21 12:11   ` Bodo Eggert
  -- strict thread matches above, loose matches on Subject: below --
2005-01-18 15:07 Piszcz, Justin Michael
2005-01-18 15:42 ` Mario Holbe
2005-01-18 14:24 Piszcz, Justin Michael
2005-01-18 15:03 ` Andries Brouwer
2005-01-18 15:29 ` Mario Holbe
2005-01-18 14:05 Piszcz, Justin Michael
2005-01-18 14:15 ` Mario Holbe
2005-01-15 23:35 Mario Holbe
2005-01-17 19:46 ` Marcelo Tosatti
2005-01-18  8:20   ` Mario Holbe
2005-01-18 10:55   ` Andries Brouwer
2005-01-18  8:45     ` Marcelo Tosatti
2005-01-18 12:15       ` Mario Holbe
2005-01-18 12:37       ` Andries Brouwer
2005-01-18 10:20         ` Marcelo Tosatti
2005-01-18 11:47     ` Mario Holbe
2005-01-18 12:39       ` 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=20050118155534.GA12050@speedy.student.utwente.nl \
    --to=s.b.wielinga@student.utwente.nl \
    --cc=Mario.Holbe@TU-Ilmenau.DE \
    --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

all inboxes | Powered by JetHome®