lkml.org 
[lkml]   [1999]   [Jul]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectA bug in MD under Linux 2.2.x
Hi,

I see a bug in MD under Linux 2.2.x. It is about using a device
more than once in many MDs simultaneously. In md.c, for each device,
that is added to a md-device, an inode is allocated to prevent it
from being used in mount and also more than once in any md-devices.

In Linux 2.0.X, it works well because the fs_may_mount() tries to
find the inode of the device and doesn't care if the inode structure
has any i_sb field set or not. But in Linux 2.2.x, this function is
changed and it DOES care about the inode->i_sb field. Because this
field is NULL in inodes of the devices added to md-device, the
fs_may_mount() returns non-zero and it means that the device can be
used.

For regenerating the bug, follow this scenario:

mdadd /dev/md0 /dev/hdc1 (or any other partition)
mdadd /dev/md1 /dev/hdc1
mdrun -pl /dev/md0
mdrun -pl /dev/md1

You'll see that in Linux 2.0.x, the second mdadd command will fail,
but in Linux 2.2.x, it won't and also the second mdrun command will
succeed too!

Because I don't know how this bug fix should be done and also if
I do it, I don't know how my changes will be included in formal
Linux releases, could you follow this bug?

Regards,
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.124 / U:1.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site