2004-03-09 04:55:51

by Jinu M.

[permalink] [raw]
Subject: disable partitioning!

Hi All,

We are writing a block device driver for 2.4.x kernel.
I want to know how to indicate to the filesystem that our block driver does not support partitions.
I mean fdisk should not be allowed on disks supported by our block driver.

Regards,
-Jinu


2004-03-09 10:52:36

by Stefan Smietanowski

[permalink] [raw]
Subject: Re: disable partitioning!

Hello Jinu.

> We are writing a block device driver for 2.4.x kernel.
> I want to know how to indicate to the filesystem that our block driver does not support partitions.
> I mean fdisk should not be allowed on disks supported by our block driver.

You can run fdisk on a file if you want to, it doesn't care what type of
block device it is. What you're really asking for is a way to make the
kernel not read the partition table if it exists on the device and
that's something else.

That is also something that the filesystem doesn't handle. Filesystems
are systems that handle files (heh).

// Stefan

2004-03-09 12:17:10

by Jinu M.

[permalink] [raw]
Subject: RE: disable partitioning!



Hello Stefan.

> We are writing a block device driver for 2.4.x kernel.
> I want to know how to indicate to the filesystem that our block driver does not support partitions.
> I mean fdisk should not be allowed on disks supported by our block driver.

You can run fdisk on a file if you want to, it doesn't care what type of
block device it is. What you're really asking for is a way to make the
kernel not read the partition table if it exists on the device and
that's something else.

So then how do I stop kernel from reading the partition table?

-Jinu

2004-03-09 13:58:15

by Michael Clark

[permalink] [raw]
Subject: Re: disable partitioning!

On 03/09/04 20:13, Jinu M. wrote:
>
> Hello Stefan.
>
>
>>We are writing a block device driver for 2.4.x kernel.
>>I want to know how to indicate to the filesystem that our block driver does not support partitions.
>>I mean fdisk should not be allowed on disks supported by our block driver.
>
>
> You can run fdisk on a file if you want to, it doesn't care what type of
> block device it is. What you're really asking for is a way to make the
> kernel not read the partition table if it exists on the device and
> that's something else.
>
> So then how do I stop kernel from reading the partition table?

I believe you can do this by passing 1 as the number of minors
in your call to alloc_disk(int num_minors).

~mc

2004-03-09 14:05:12

by Matthias Urlichs

[permalink] [raw]
Subject: Re: disable partitioning!

Hi, Jinu M. wrote:

> We are writing a block device driver for 2.4.x kernel.
> I want to know how to indicate to the filesystem that our block driver does not support partitions.

Forgive me for asking a stupid question, but -- why? (Or rather, why not.)

--
Matthias Urlichs