]> www.infradead.org Git - users/jedix/linux-maple.git/commit
target: simplify backend driver registration
authorChristoph Hellwig <hch@lst.de>
Sun, 10 May 2015 16:14:56 +0000 (18:14 +0200)
committerChuck Anderson <chuck.anderson@oracle.com>
Sun, 28 May 2017 02:43:51 +0000 (19:43 -0700)
commite297eea82a9b8ed8d724df8da34486700038a619
tree0aeb832be3286c4be7bfa9abb9c9f9cb3b3b607a
parentc7ca2f1ead4a106d846fff626b7f9a06ff9e8729
target: simplify backend driver registration

Orabug: 25791789

Rewrite the backend driver registration based on what we did to the fabric
drivers:  introduce a read-only struct target_bakckend_ops that the driver
registers, which is then instanciate as a struct target_backend by the
core.  This allows the ops vector to be smaller and allows us to mark it
const.  At the same time the registration function can set up the
configfs attributes, avoiding the need to add additional boilerplate code
for that to the drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
(cherry picked from commit 0a06d4309dc168dfa70cec3cf0cd9eb7fc15a2fd)
Reviewed-by: Ethan Zhao <ethan.zhao@oracle.com>
Signed-off-by: Shan Hai <shan.hai@oracle.com>
drivers/target/target_core_configfs.c
drivers/target/target_core_device.c
drivers/target/target_core_file.c
drivers/target/target_core_hba.c
drivers/target/target_core_iblock.c
drivers/target/target_core_internal.h
drivers/target/target_core_pscsi.c
drivers/target/target_core_rd.c
drivers/target/target_core_user.c
include/target/target_core_backend.h
include/target/target_core_base.h