public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Bristow <paul@paulbristow.net>
To: Borsenkow Andrej <Andrej.Borsenkow@mow.siemens.ru>
Cc: rgooch@ras.ucalgary.ca, linux-kernel@vger.kernel.org
Subject: Re: ide-floppy.c vs devfs
Date: Mon, 26 Nov 2001 18:44:26 +0100	[thread overview]
Message-ID: <3C027F7A.1070406@paulbristow.net> (raw)
In-Reply-To: <000301c17661$c9ff6db0$21c9ca95@mow.siemens.ru>

The problem is one of making it user-comprehensible.

If I just use grok_partitions I get no disc nodes created in devfs.  If 
I do my thing I get a floppy node created, regardless of wether a disk 
is inserted at load time.  This gives something for you to attempt to 
mount after inserting a disk, that causes a revalidate, and gets the 
correct disk nodes created.

This is made somewhat more complicated by the fact that ide-floppy disks 
can use either the whole disk, with no partition table or, more 
commonly, partition4.  So a user-friendly solution would be to create a 
floppy node that pointed to the partition, if it existed, or the whole 
disk if it didn't.  With appropriate code to handle that fact that 
anyone can partition these disks in any way they like.

Note this doesn't take account of the nice ATAPI command that sets the 
disk into "ignore track 0" mode, making a partition 4 look like an 
entire floppy with 1 less track.

Anyone up to telling me how this is handled in the SCSI layer?

Borsenkow Andrej wrote:

>>>Try the devfs test version that I just uploaded to 
>>>
>>>http://paulbristow.net/linux/idefloppy.html 
>>>
>>>This is early days, and I'm not sure what the best approach is... 
>>>
>>>Feedback is greatly appreaciated. 
>>>
> 
> On this page you mention that Mandrake includes this patch, but your
> driver (link on the above patch) differs from Mandrake one. In patch I
> sent to Mandrake I just fake drive capacity in case
> CAPACITY_NO_CARTRIDGE is returned.


Sorry, not trying to detract from anyone's work.  That line refers to 

mandrake having the clik support way before it was included in the stock 

kernel.  I'll clarify the web page.
 
>>I haven't had time to look at this closely, but I question why you're 
>>trying to prevent grok_partitions() from doing it's thing. There's 
>>supposed to be a flag set for removable media which ensures media 
>>revalidation on scanning the parent directory or looking up an entry. 
>>I'd rather see that mechanism fixed. 
>>
> 
> Currently grok_partitions() silently ignores any media with size == 0,
> irrespectively of whether removable is set or not. It means that *no*
> entries for drive (either disc or part?) are created at all and there is
> nothing that later on triggers revalidation.
> 
> I still believe grok_partitions() should create disc node for removables
> even if current capacity == 0 (that for removable just means there is no
> media inserted). Then it would work the way you describe and faking
> drive capacity for empty drives could be removed (IIRC it happens for
> other removables like SCSI disks as well).
> 



-- 

Paul

Email: 
paul@paulbristow.net
Web: 
http://paulbristow.net
ICQ: 
11965223


  reply	other threads:[~2001-11-26 17:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-26 10:04 ide-floppy.c vs devfs Borsenkow Andrej
2001-11-26 17:44 ` Paul Bristow [this message]
2001-11-27 12:34   ` Borsenkow Andrej
2001-11-27 17:47     ` Paul Bristow
2001-11-27 20:38       ` Mike Fedyk
2001-11-28 18:36         ` [PATCH] ide-floppy real devfs support for testing Paul Bristow
  -- strict thread matches above, loose matches on Subject: below --
2001-11-12  6:48 ide-floppy.c vs devfs Borsenkow Andrej
2001-11-11  4:39 Jack Howarth
2001-11-23  5:13 ` Richard Gooch
2001-11-25 22:07 ` Paul Bristow
2001-11-25 22:31   ` Richard Gooch

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=3C027F7A.1070406@paulbristow.net \
    --to=paul@paulbristow.net \
    --cc=Andrej.Borsenkow@mow.siemens.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rgooch@ras.ucalgary.ca \
    /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