linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* enhancements to the raid1 driver
@ 2003-02-15  1:24 Paul Clements
  2003-02-17  2:51 ` Neil Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Clements @ 2003-02-15  1:24 UTC (permalink / raw)
  To: linux-raid; +Cc: jejb, neilb

[-- Attachment #1: Type: text/plain, Size: 1475 bytes --]

Hi,

I'm just beginning a project to add some new features to the raid1
driver. The planned features include:

intent log - a disk-backed bitmap to allow for quick resyncs (Peter T.
Breuer's fr1 code looks very promising)

asynchronous replication - to get acceptable performance when the backup
leg of the raid1 mirror is slow (e.g., nbd over a LAN or WAN)


I'm pretty familiar with the md and raid1 code and I've gotten far
enough along in planning to realize that I think the right approach for
making these additions to raid1 is to try, at least, not to be invasive
to the md driver itself. The existing framework of these drivers mostly
allows for that, but the one thing that would be very helpful is an
md_ioctl passthrough. By this I mean that an additional ioctl method
could be defined in the lower level raid drivers. This ioctl would be
called whenever an unrecognizable ioctl command is sent to the md
driver. It's a very simple addition (only a handful of lines). In fact,
I have already tested a patch (against 2.4.20) to do this (attached).

So, I'm wondering if the various kernel and driver maintainers would be
willing to integrate such a patch, in order to allow for work to
continue in the raid1 driver without impacting the md code, with the
ultimate goal of getting all of the raid1 changes (if the maintainers
are willing) into the mainline kernel? 

And, of course, if you have any other ideas or feedback, I'd like to
hear those, too.

Thanks,
Paul

[-- Attachment #2: md_ioctl_passthrough_2_4_20.diff --]
[-- Type: text/plain, Size: 900 bytes --]

--- include/linux/raid/md_k.h.ORIG	2003-01-10 13:14:35.000000000 -0500
+++ include/linux/raid/md_k.h	2003-01-10 13:17:26.000000000 -0500
@@ -241,6 +241,8 @@
 	int (*stop_resync)(mddev_t *mddev);
 	int (*restart_resync)(mddev_t *mddev);
 	int (*sync_request)(mddev_t *mddev, unsigned long block_nr);
+	int (*ioctl)(struct inode *inode, struct file *file, unsigned int cmd, 
+			unsigned long arg);
 };
 
 
--- drivers/md/md.c.ORIG	2003-01-10 13:05:06.000000000 -0500
+++ drivers/md/md.c	2003-01-10 13:10:01.000000000 -0500
@@ -2860,6 +2860,12 @@
 		}
 
 		default:
+			/* callout to lower level raid driver ioctl method */
+			if (mddev->pers->ioctl) {
+				err = mddev->pers->ioctl(inode, file, cmd, arg);
+				goto done_unlock;
+			}
+
 			printk(KERN_WARNING "md: %s(pid %d) used obsolete MD ioctl, "
 			       "upgrade your software to use new ictls.\n",
 			       current->comm, current->pid);

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

end of thread, other threads:[~2003-02-17 20:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-02-15  1:24 enhancements to the raid1 driver Paul Clements
2003-02-17  2:51 ` Neil Brown
2003-02-17 20:09   ` Paul Clements

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).