public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
From: Vitaly Wool <vwool@ru.mvista.com>
To: Josh Boyer <jwboyer@linux.vnet.ibm.com>
Cc: linux-mtd@lists.infradead.org, kbaidarov <kbaidarov@dev.rtsoft.ru>
Subject: Re: [PATCH] [MTD] BLOCK_RO: Readonly Block Device Layer Over MTD
Date: Tue, 21 Nov 2006 13:30:15 +0300	[thread overview]
Message-ID: <4562D537.5080908@ru.mvista.com> (raw)
In-Reply-To: <1164034364.3574.6.camel@zod.rchland.ibm.com>

Josh Boyer wrote:

<snip>
>> +static struct mtd_blktrans_ops mtdblock_tr = {
>> +	.name		= "mtdblock",
>> +	.major		= 258,
>> +	.part_bits	= 0,
>> +	.readsect	= mtdblock_readsect,
>> +	.writesect	= mtdblock_writesect,
>> +	.add_mtd	= mtdblock_add_mtd,
>> +	.remove_dev	= mtdblock_remove_dev,
>> +	.owner		= THIS_MODULE,
>> +};
>>     
>
> You went to the trouble of getting a new major number assigned... why
> not call it something other than mtdblock?
>   
Agree.
>   
>> Index: mips-kernel-2.6/drivers/mtd/Kconfig
>> ===================================================================
>> --- mips-kernel-2.6.orig/drivers/mtd/Kconfig
>> +++ mips-kernel-2.6/drivers/mtd/Kconfig
>> @@ -197,6 +197,13 @@ config MTD_BLOCK_RO
>>  	  You do not need this option for use with the DiskOnChip devices. For
>>  	  those, enable NFTL support (CONFIG_NFTL) instead.
>>
>> +config MTD_BLOCK_RO_BBFREE
>> +	tristate "Readonly bad block free block device access to MTD devices"
>> +	depends on MTD_BLOCK!=y && MTD && MTD_BLOCK_RO!=y
>> +	help
>> +	  Same as readonly block driver, but this allow you to mount read-only file
>> +	  systems from an MTD device, containing bad blocks.
>> +
>>     
>
> This part seems hacky to me...  why can't use use mtdblock or
> mtdblock_ro when this is enabled?  And what happens in the module case?
>   
I guess this line is borrowed from MTD_BLOCK_RO:

config MTD_BLOCK_RO
        tristate "Readonly block device access to MTD devices"
        depends on MTD_BLOCK!=y && MTD && BLOCK

I think though that these limitations are redundant at least for 
MTD_BLOCK_RO_BBFREE b/c there might be the cases where there're both 
NAND and NOR chips in the system so MTD_BLOCK_RO and MTD_BLOCK_RO_BBFREE 
might be needed to be present in the system at the same time.

Vitaly

  reply	other threads:[~2006-11-21 10:30 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-17 15:40 [PATCH] [MTD] BLOCK_RO: Readonly Block Device Layer Over MTD kbaidarov
2006-11-18 13:15 ` Artem Bityutskiy
2006-11-18 13:33   ` Josh Boyer
2006-11-18 13:35     ` Artem Bityutskiy
2006-11-18 13:40       ` Artem Bityutskiy
2006-11-20 12:15       ` Vitaly Wool
2006-11-20 12:46         ` Artem Bityutskiy
2006-11-20 13:06           ` Vitaly Wool
2006-11-20 13:39             ` Artem Bityutskiy
2006-11-20 13:20           ` Konstantin Baydarov
2006-11-20 12:11   ` Vitaly Wool
2006-11-20 12:05 ` Vitaly Wool
2006-11-20 14:52 ` Josh Boyer
2006-11-21 10:30   ` Vitaly Wool [this message]
2006-11-22 16:56     ` Konstantin Baydarov
2006-12-02 16:41       ` Konstantin Baydarov
2007-09-27 15:05         ` Gregory CLEMENT

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=4562D537.5080908@ru.mvista.com \
    --to=vwool@ru.mvista.com \
    --cc=jwboyer@linux.vnet.ibm.com \
    --cc=kbaidarov@dev.rtsoft.ru \
    --cc=linux-mtd@lists.infradead.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