mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andries.Brouwer@cwi.nl
To: torvalds@transmeta.com, viro@math.psu.edu
Cc: axboe@suse.de, linux-kernel@vger.kernel.org
Subject: Re: [RFC] change of ->bd_op->open() semantics
Date: Sat, 25 May 2002 02:24:22 +0200 (MEST)	[thread overview]
Message-ID: <UTC200205250024.g4P0OM005850.aeb@smtp.cwi.nl> (raw)

Al writes:

    4) moving the call of partition-reading code into do_open() (for cases when
    ->bd_contains is non-NULL), killing the "set block_device fields by hand"
    mess in check_partitions()

Hmm. I probably misunderstand some things.

There must be a data structure with the information that belongs
to a disk, opened or not. The size, the sectorsize, the partitions, ...
The structure that I made kdev_t point at.

What are you working towards? There is a struct block_device.
But it is not permanent. It is created when the device is opened
and disappears when it is closed.
So it doesnt help in replacing kdev_t - the permanent data must still
be somewhere. There is a struct gendisk. That is better.
It is not difficult to make sure that all devices that have array data
also get a struct gendisk.
Then there is struct request_queue. I see that it got hardsect_size,
but it seems a less suitable place for general disk info.

[So, let me repeat: Question: where do you plan to put permanent
disk data?]

Now about this partition-reading code. It requires a partitiontable type,
just like mounting requires a filesystem type. Now mount() has a
parameter that specifies the filesystem type. But open() does not
have a parameter that specifies a partitiontable type.
It seems to me that doing partitiontable reading in do_open()
is a really bad idea.

Maybe you have a "do it only once" kludge in mind?
To get something ugly, equivalent to the present situation?

Andries

             reply	other threads:[~2002-05-25  0:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-25  0:24 Andries.Brouwer [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-24 20:12 Alexander Viro
2002-05-24 20:25 ` Linus Torvalds
2002-05-24 21:15   ` Martin Dalecki
2002-05-24 22:47   ` Alexander Viro
2002-05-24 22:17     ` Martin Dalecki

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=UTC200205250024.g4P0OM005850.aeb@smtp.cwi.nl \
    --to=andries.brouwer@cwi.nl \
    --cc=axboe@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.com \
    --cc=viro@math.psu.edu \
    /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®