Displaying 9 results from an estimated 9 matches for "disk_add_ev".
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
...disk_release()
> @@ -644,10 +653,20 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
>
> retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> "bdi");
> + if (retval)
> + goto fail;
> +
> + retval = disk_add_events(disk);
> + if (retval)
> + goto fail;
> +
> + retval = blk_integrity_add(disk);
> + if (retval)
> + goto fail;
> + return 0;
> +fail:
> WARN_ON(retval);
> -
> - disk_add_events(disk);
> - blk_integrity_add(disk);
> + return retval;
> }
Noticed thi...
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
...disk_release()
> @@ -644,10 +653,20 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
>
> retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> "bdi");
> + if (retval)
> + goto fail;
> +
> + retval = disk_add_events(disk);
> + if (retval)
> + goto fail;
> +
> + retval = blk_integrity_add(disk);
> + if (retval)
> + goto fail;
> + return 0;
> +fail:
> WARN_ON(retval);
> -
> - disk_add_events(disk);
> - blk_integrity_add(disk);
> + return retval;
> }
Noticed thi...
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
...device *parent, struct gendisk *disk)
> > >
> > > retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> > > "bdi");
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = disk_add_events(disk);
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = blk_integrity_add(disk);
> > > + if (retval)
> > > + goto fail;
> > > + return 0;
> > > +fail:
> > > WARN_ON(retval);
> > > -
>...
2016 Aug 17
2
[PATCH 06/15] genhd: Add return code to device_add_disk
...device *parent, struct gendisk *disk)
> > >
> > > retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> > > "bdi");
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = disk_add_events(disk);
> > > + if (retval)
> > > + goto fail;
> > > +
> > > + retval = blk_integrity_add(disk);
> > > + if (retval)
> > > + goto fail;
> > > + return 0;
> > > +fail:
> > > WARN_ON(retval);
> > > -
>...
2016 Aug 17
0
[PATCH 06/15] genhd: Add return code to device_add_disk
...,20 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
> >
> > retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> > "bdi");
> > + if (retval)
> > + goto fail;
> > +
> > + retval = disk_add_events(disk);
> > + if (retval)
> > + goto fail;
> > +
> > + retval = blk_integrity_add(disk);
> > + if (retval)
> > + goto fail;
> > + return 0;
> > +fail:
> > WARN_ON(retval);
> > -
> > - disk_add_events(disk);
> > - blk_int...
2016 Aug 17
0
[PATCH 06/15] genhd: Add return code to device_add_disk
...xtra ref on queue which will be put on disk_release()
@@ -644,10 +653,20 @@ void device_add_disk(struct device *parent, struct gendisk *disk)
retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
"bdi");
+ if (retval)
+ goto fail;
+
+ retval = disk_add_events(disk);
+ if (retval)
+ goto fail;
+
+ retval = blk_integrity_add(disk);
+ if (retval)
+ goto fail;
+ return 0;
+fail:
WARN_ON(retval);
-
- disk_add_events(disk);
- blk_integrity_add(disk);
+ return retval;
}
EXPORT_SYMBOL(device_add_disk);
diff --git a/include/linux/genhd.h b/include/li...
2016 Aug 17
0
[PATCH 06/15] genhd: Add return code to device_add_disk
...k)
> > > >
> > > > retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj,
> > > > "bdi");
> > > > + if (retval)
> > > > + goto fail;
> > > > +
> > > > + retval = disk_add_events(disk);
> > > > + if (retval)
> > > > + goto fail;
> > > > +
> > > > + retval = blk_integrity_add(disk);
> > > > + if (retval)
> > > > + goto fail;
> > > > + return 0;
> > > > +fail:
> > >...
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not
ready at the time its KOBJ_ADD event is sent.
The symptom is during device hotplug, udev may fail to find certain attributes,
such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are
not created.
The cause is device_add_disk emits the uevent before returning, and the callers
have to create
2016 Aug 17
20
[PATCH 00/15] Fix issue with KOBJ_ADD uevent versus disk attributes
This is an attempt to fix the issue that some disks' sysfs attributes are not
ready at the time its KOBJ_ADD event is sent.
The symptom is during device hotplug, udev may fail to find certain attributes,
such as serial or wwn, of the disk. As a result the /dev/disk/by-id entries are
not created.
The cause is device_add_disk emits the uevent before returning, and the callers
have to create