Thread (20 messages) 20 messages, 4 authors, 2016-09-01

Re: Time to make dynamically allocated devt the default for scsi disks?

From: Dan Williams <hidden>
Date: 2016-08-13 20:38:26
Also in: linux-scsi

On Sat, Aug 13, 2016 at 11:27 AM, Dan Williams [off-list ref] wrote:
On Sat, Aug 13, 2016 at 10:43 AM, James Bottomley
[..]
quoted
Um, so this patch doesn't fix the problem. It merely makes the lifetime
rules correct so the problem can then be fixed at the scsi level.
You're right that this patch does not fix the problem, I missed that
the scsi_disk is not the parent of the gendisk, so this patch does
nothing to delay scsi_disk_release.  What I think is the real fix is
to make the devt properly reference counted and prevent
ida_remove(&sd_index_ida, sdkp->index); from being called until all
objects derived from that allocation are done with it.
So, here's an RFC along these lines (only compile tested).   This
approach provides a generic way to coordinate the lifetime of the bdi
name versus the devt allocated by the block device driver.

Attachments

  • patch-v3 [application/octet-stream] 8923 bytes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help