Update patches
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | Update patchesarch/ arch/ arch/ +20 more | +1558 | 0 replies | |
| 2/4 | Update patchesdrivers/ drivers/ drivers/ +5 more | +659 | 0 replies | |
| 3/4 | Update patchesdrivers/ | +39 | 0 replies | |
| 4/4 | Update patchesdrivers/ | +37 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
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, unsignedint 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/diskdumpwell no since
/dev/hdais 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
@@ -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