Skip to content

Update patches

Takao Indoh lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4Update patchesarch/i386/kernel/nmi.c arch/i386/kernel/reboot.c arch/i386/kernel/smp.c +20 more+1558 -110 replies
2/4Update patchesdrivers/scsi/Kconfig drivers/scsi/Makefile drivers/scsi/scsi.c +5 more+659 -00 replies
3/4Update patchesdrivers/scsi/aic7xxx/aic7xxx_osm.c+39 -00 replies
4/4Update patchesdrivers/scsi/aic7xxx/aic79xx_osm.c+37 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4][Diskdump]Update patches

Hi all,

I improved the patches which I posted on 7th Jul.

- Improve sysfs interface code
- Bug fix related to eh_timeout of scsi_cmd

Source code can be downloaded from
http://sourceforge.net/projects/lkdump

Quoted 16 lines · Arjan van de Ven
Quoted 15 lines · Takao Indoh

Hi,

Now I am fixing diskdump according to comments by you and Christoph.

Quoted 6 lines · Arjan van de Ven
Quoted 3 lines
(quoted diff) +2 -0
+#ifdef CONFIG_PROC_FS
+static int proc_ioctl(struct inode *inode, struct file *file, unsigned 

int cmd, unsigned long param)

ehhh this looks evil

Do you mean I should use not ioctl but the following style?

Quoted 7 lines
Quoted 2 lines

echo "add /dev/hda1" > /proc/diskdump
echo "delete /dev/hda1" > /proc/diskdump

well no since /dev/hda is pointless; major/minor pairs maybe. But why in /proc???? it sounds like a sysfs job to me, where you probably want to represent a dump relationship with a symlink, and use "rm" to remove an entry..

As I wrote in the previous mail, I replaced proc interface with sysfs.

If you want to add a new dump device /dev/sda3,

  # echo 3 > /sys/block/sda/device/dump

If you want to remove the dump device /dev/sda3,

  # echo -3 > /sys/block/sda/device/dump

I added a new attribute "dump" to the /sys/block/sdX/device.

drivers/scsi/scsi_sysfs.c +3 -0
diff -Nur linux-2.6.7.org/drivers/scsi/scsi_sysfs.c linux-2.6.7/drivers/scsi/scsi_sysfs.c
@@ -11,6 +11,7 @@
 #include <linux/init.h>
 #include <linux/blkdev.h>
 #include <linux/device.h>
+#include <linux/diskdump.h>
 
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_transport.h>
@@ -375,6 +376,7 @@
 
 DEVICE_ATTR(state, S_IRUGO | S_IWUSR, show_state_field, store_state_field);
 
+DEVICE_ATTR(dump, S_IRUGO | S_IWUSR, diskdump_sysfs_show, diskdump_sysfs_store);
 
 /* Default template for device attributes.  May NOT be modified */
 static struct device_attribute *scsi_sysfs_sdev_attrs[] = {
@@ -389,6 +391,7 @@
 	&dev_attr_delete,
 	&dev_attr_state,
 	&dev_attr_timeout,
+	&dev_attr_dump,
 	NULL
 };
 

diskdump_sysfs_show/store is the sysfs handler of diskdump. These functions passes struct device to the diskdump module. Diskdump changes "struct device" to "struct scsi_device" like this:

+static void *scsi_dump_probe(struct device *dev)
+{
+ struct scsi_device *sdev;
+
+ if ((dev->bus == NULL) || (dev->bus->name == NULL) ||
+ strncmp(dev->bus->name, "scsi", 4))
+ return NULL;
+
+ sdev = to_scsi_device(dev);
+ if (!sdev->host->hostt->dump_poll)
+ return NULL;
+
+ return sdev;
+}

I used device->bus->name to confirm device is scsi device or not.

Please comment.

Best Regards,
Takao Indoh