Skip to contentSkip to conversation

2.6.18-mm3 pktcdvd: module parameters

PATCH In review Thomas Maier 1 participant 1 message Oct 3, 2006 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 10/11 2.6.18-mm3 pktcdvd: module parameters

Hello,

this patch exports some module parameters:

pktdev_major device major
write_congestion_on on/off marks of bio write congestion control
write_congestion_off
packet_buffers number of packet buffers per device

http://people.freenet.de/BalaGi/download/pktcdvd-10-module-params_2.6.18.patch

-Thomas Maier

drivers/block/pktcdvd.c +8 -1
diff -urpN 9-packet-buffers/drivers/block/pktcdvd.c 10-module-params/drivers/block/pktcdvd.c
@@ -86,11 +86,13 @@
 
 #define ZONE(sector, pd) (((sector) + (pd)->offset) & ~((pd)->settings.size - 1))
 
-static struct pktcdvd_device *pkt_devs[MAX_WRITERS];
+/* module parameters */
 static int pktdev_major = 0; /* default: dynamic major number */
 static int write_congestion_on  = PKT_WRITE_CONGESTION_ON;
 static int write_congestion_off = PKT_WRITE_CONGESTION_OFF;
 static int packet_buffers = PKT_BUFFERS_DEFAULT;
+
+static struct pktcdvd_device *pkt_devs[MAX_WRITERS];
 static struct mutex ctl_mutex;	/* Serialize open/close/setup/teardown */
 static mempool_t *psd_pool;
 
@@ -3277,3 +3279,8 @@ MODULE_LICENSE("GPL");
 
 module_init(pkt_init);
 module_exit(pkt_exit);
+
+module_param(pktdev_major, int, 0);
+module_param(write_congestion_on, int, 0);
+module_param(write_congestion_off, int, 0);
+module_param(packet_buffers, int, 0);