Skip to contentSkip to conversation

ATA-Over-Ethernet Root device

PATCH New McMullan, Jason 1 participant 1 message May 13, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ATA-Over-Ethernet Root device

This patch allows you to use ATA Over Ethernet as your root device, with 'root=/dev/etherd/eX.Y/disc'

Limited testing, just for review.

Advantages:
1) Ext3 over AOE caches dirents, so it's faster and less network traffic than NFS root
2) Smaller than NFS root code (for embedded systems)
3) Proper locking semantics with Ext3, ReiserFS, etc.

Signature · 2 lines
Jason McMullan <[email protected]>
TimeSys Corporation

Description: ATA Over Ethernet root device
ie 'root=/dev/etherd/e0.0/disc' on the kernel command line

drivers/block/Kconfig +15 -0
@@ -506,4 +506,19 @@
 	This driver provides Support for ATA over Ethernet block
 	devices like the Coraid EtherDrive (R) Storage Blade.
 
+config ATA_OVER_ETH_ROOT
+	bool "ATA over Ethernet root device"
+	depends on ATA_OVER_ETH=y
+	help
+	  If you want to use ATA Over Ethernet as the root device,
+	  set this to 'y'
+
+config ATA_OVER_ETH_ROOT_SHELF
+	int "Shelf ID"
+	depends on ATA_OVER_ETH_ROOT
+	
+config ATA_OVER_ETH_ROOT_SLOT
+	int "Slot ID"
+	depends on ATA_OVER_ETH_ROOT
+
 endmenu
drivers/block/aoe/aoe.h +1 -0
@@ -153,6 +153,7 @@
 int aoedev_init(void);
 void aoedev_exit(void);
 struct aoedev *aoedev_bymac(unsigned char *);
+struct aoedev *aoedev_bymajor_minor(ulong major, ulong minor);
 void aoedev_downdev(struct aoedev *d);
 struct aoedev *aoedev_set(ulong, unsigned char *, struct net_device *, ulong);
 int aoedev_busy(void);
drivers/block/aoe/aoeblk.c +1 -0
@@ -229,6 +229,7 @@
 	gd->capacity = d->ssize;
 	snprintf(gd->disk_name, sizeof gd->disk_name, "etherd/e%ld.%ld",
 		d->aoemajor, d->aoeminor);
+	strncpy(gd->devfs_name, gd->disk_name, sizeof gd->devfs_name);
 
 	gd->queue = &d->blkq;
 	d->gd = gd;
drivers/block/aoe/aoedev.c +17 -0
@@ -28,6 +28,23 @@
 	return d;
 }
 
+struct aoedev *
+aoedev_bymajor_minor(ulong major, ulong minor)
+{
+	struct aoedev *d;
+	ulong flags;
+
+	spin_lock_irqsave(&devlist_lock, flags);
+
+	for (d=devlist; d; d=d->next)
+		if (d->aoemajor == major && d->aoeminor == minor)
+			break;
+
+	spin_unlock_irqrestore(&devlist_lock, flags);
+	return d;
+}
+
+
 /* called with devlist lock held */
 static struct aoedev *
 aoedev_newdev(ulong nframes)
drivers/block/aoe/aoemain.c +51 -0

87 lines not on this page · raw message