lightnvm: control life of nvm_dev in driver
LightNVM compatible device drivers does not have a method to expose LightNVM specific sysfs entries. To enable LightNVM sysfs entries to be exposed, lightnvm device drivers require a struct device to attach it to. To allow both the actual device driver and lightnvm sysfs entries to coexist, the device driver tracks the lifetime of the nvm_dev structure. This patch refactors NVMe and null_blk to handle the lifetime of struct nvm_dev, which eliminates the need for struct gendisk when a lightnvm compatible device is provided. Signed-off-by:Matias Bjørling <m@bjorling.me> Signed-off-by:
Jens Axboe <axboe@fb.com>
Showing
- drivers/block/null_blk.c 20 additions, 2 deletionsdrivers/block/null_blk.c
- drivers/lightnvm/core.c 8 additions, 27 deletionsdrivers/lightnvm/core.c
- drivers/nvme/host/core.c 15 additions, 21 deletionsdrivers/nvme/host/core.c
- drivers/nvme/host/lightnvm.c 24 additions, 7 deletionsdrivers/nvme/host/lightnvm.c
- drivers/nvme/host/nvme.h 7 additions, 5 deletionsdrivers/nvme/host/nvme.h
- include/linux/lightnvm.h 9 additions, 6 deletionsinclude/linux/lightnvm.h
Please register or sign in to comment