Commit a2c4e506 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] md: Print "deprecated" warning when START_ARRAY is used.

From: NeilBrown <neilb@cse.unsw.edu.au>

The "START_ARRAY" ioctl depends on major/minor numbers (as stored in the raid
superblock) are stable over reboots, which is increasingly untrue.

There are better ways to start an array (e.g.  with mdadm) so we mark the
ioctl as deprecated for 2.6, and will remove it in 2.7.
parent 67afcb4f
...@@ -2419,6 +2419,14 @@ static int md_ioctl(struct inode *inode, struct file *file, ...@@ -2419,6 +2419,14 @@ static int md_ioctl(struct inode *inode, struct file *file,
/* START_ARRAY doesn't need to lock the array as autostart_array /* START_ARRAY doesn't need to lock the array as autostart_array
* does the locking, and it could even be a different array * does the locking, and it could even be a different array
*/ */
static int cnt = 3;
if (cnt > 0 ) {
printk(KERN_WARNING
"md: %s(pid %d) used deprecated START_ARRAY ioctl. "
"This will not be supported beyond 2.6\n",
current->comm, current->pid);
cnt--;
}
err = autostart_array(new_decode_dev(arg)); err = autostart_array(new_decode_dev(arg));
if (err) { if (err) {
printk(KERN_WARNING "md: autostart %s failed!\n", printk(KERN_WARNING "md: autostart %s failed!\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment