public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* NFTL problems
@ 2000-07-10 18:45 Patrick Higgins
  2000-07-11  7:32 ` David Woodhouse
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick Higgins @ 2000-07-10 18:45 UTC (permalink / raw)
  To: mtd


I think I've found a bug in NFTL, but since some things aren't working
after applying my "fix" I haven't committed it.

I found the bug while trying to fdisk /dev/nftla to change the partition
type from 4 to 83 after using dformat on the DoC.  I was getting a kernel
oops when fdisk calls the BLKRRPART ioctl.  I think the problem is that
the code is calling resetup_one_dev on the wrong disk:

resetup_one_dev(&nftl_gendisk, MINOR(inode->i_dev) / 16);

when the line should read:

resetup_one_dev(&nftl_gendisk, MINOR(inode->i_rdev) / 16);
                                              ^
                                              |
                                              |

The grok_partitions call probably needs a similar fix.  After making this
change, the kernel oops went away and the fdisk completed normally.  I was
also able to run mke2fs on /dev/nftla1, but after all this, nothing seemed
to change.  The partition still showed itself as a type 4, and it still
had a FAT filesystem on it.  It's as if CONFIG_NFTL_RW wasn't defined (but
wouldn't all writes fail with -1 then?).  Anyone know what's going on?

-Patrick


To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: NFTL problems
  2000-07-10 18:45 NFTL problems Patrick Higgins
@ 2000-07-11  7:32 ` David Woodhouse
  0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2000-07-11  7:32 UTC (permalink / raw)
  To: Patrick Higgins; +Cc: mtd


phiggins@transzap.com said:
>   Anyone know what's going on? 

Don't ask me - I'm the person who screwed it up in the first place :)

cf. the comments in the code:

/* Linux-specific block device functions */

/* I _HATE_ the Linux block device setup more than anything else I've ever
 *  encountered, except ...
 */

static int nftl_sizes[256]={0,};
static int nftl_blocksizes[256] = {0,};

/* .. for the Linux partition table handling. */

struct hd_struct part_table[256] = {{0,0},};



--
dwmw2




To unsubscribe, send "unsubscribe mtd" to majordomo@infradead.org

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-07-11  7:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-07-10 18:45 NFTL problems Patrick Higgins
2000-07-11  7:32 ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox