Kernel: Set max io size limit for all disk devices
authorFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 2 Apr 2012 06:34:35 +0000 (08:34 +0200)
committerFrançois Tigeot <ftigeot@wolfpond.org>
Mon, 2 Apr 2012 06:34:35 +0000 (08:34 +0200)
* Prior to this change, slice and partition devices did not inherit their
  parent maximum IO size limit

* IO transactions on these devices could thus never be bigger than the
  old 64KB DFLTPHYS defaul kernel limit

sys/kern/subr_disk.c

index 1793dd4..acbc71b 100644 (file)
@@ -238,6 +238,7 @@ disk_probe_slice(struct disk *dp, cdev_t dev, int slice, int reprobe)
                                                UID_ROOT, GID_OPERATOR, 0640,
                                                "%s%c", dev->si_name, 'a'+ i);
                                        ndev->si_parent = dev;
+                                       ndev->si_iosize_max = dev->si_iosize_max;
                                        ndev->si_disk = dp;
                                        udev_dict_set_cstr(ndev, "subsystem", "disk");
                                        /* Inherit parent's disk type */
@@ -401,6 +402,7 @@ disk_probe(struct disk *dp, int reprobe)
                                        (info->d_dsflags & DSO_DEVICEMAPPER)?
                                        "%s.s%d" : "%ss%d", dev->si_name, sno);
                        ndev->si_parent = dev;
+                       ndev->si_iosize_max = dev->si_iosize_max;
                        udev_dict_set_cstr(ndev, "subsystem", "disk");
                        /* Inherit parent's disk type */
                        if (dp->d_disktype) {