All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: Michael E Brown <michael_e_brown@dell.com>
Cc: Andries.Brouwer@cwi.nl, Matt_Domsch@exchange.dell.com,
	linux-kernel@vger.kernel.org
Subject: Re: block ioctl to read/write last sector
Date: Wed, 14 Feb 2001 01:21:39 +0100	[thread overview]
Message-ID: <3A89CF93.A934C473@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.4.30.0102131718560.26922-100000@blap.linuxdev.us.dell.com>

Michael E Brown wrote:
> 
> >
> > Anyway, an ioctl just to read the last sector is too silly.
> > An ioctl to change the blocksize is more reasonable.
> 
> That may be better, I don't know. That's why this is an RFC. Are there any
> possible races with that method? It seems to me that you might adversely
> affect io in progress by changing the blocksize. The method demonstrated
> in this patch shouldn't do that.
>
block size changing is dangerous:
if you change the blocksize of a mounted partition you'll disrupt the
filesystem.
some kernels crash hard if you execute

	swapon /dev/<insert your root device>

swapon won't overwrite your root fs: it changes the blocksize to 4kB and
then notices that there is no swap signature.
But the blocksize change is fatal.

> > And I expect that this fixed blocksize will go soon.
>
that's 2.5.

> That may be, I don't know that much about the block layer. All I know is
> that, with the current structure, I cannot read or write to sectors where
> (sector #) > total-disk-blocks - (total-disk-blocks /
> (softblocksize/hardblocksize))
>
I have one additional user space only idea:
have you tried raw-io? bind a raw device to the partition, IIRC raw-io
is always in 512 byte units.

Probably an ioctl is the better idea, but I'd use absolute sector
numbers (not relative to the end), and obviously 64-bit sector numbers -
2 TB isn't that far away.

--
	Manfred

  reply	other threads:[~2001-02-14  0:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-02-13 22:54 block ioctl to read/write last sector Andries.Brouwer
2001-02-13 19:24 ` Martin K. Petersen
2001-02-14  5:51   ` Michael E Brown
2001-02-14 14:23     ` Martin K. Petersen
2001-02-13 23:37 ` Michael E Brown
2001-02-14  0:21   ` Manfred Spraul [this message]
2001-02-14  5:47     ` Michael E Brown
  -- strict thread matches above, loose matches on Subject: below --
2001-02-13 23:49 Andries.Brouwer
2001-02-14 14:19 ` Michael E Brown
2001-02-14  1:00 Matt_Domsch
2001-02-14 12:31 David Balazic
2001-02-14 14:10 ` Michael E Brown
2001-02-17  7:29 ` Andre Hedrick
2001-02-14 13:26 Matt_Domsch
2001-02-14 15:43 Andries.Brouwer
2001-02-14 15:56 ` Michael E Brown
2001-02-14 15:59 ` Michael E Brown

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=3A89CF93.A934C473@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=Andries.Brouwer@cwi.nl \
    --cc=Matt_Domsch@exchange.dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael_e_brown@dell.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.