target: simplify backend driver registration
authorChristoph Hellwig <hch@lst.de>
Sun, 10 May 2015 16:14:56 +0000 (18:14 +0200)
committerNicholas Bellinger <nab@linux-iscsi.org>
Mon, 1 Jun 2015 07:25:34 +0000 (00:25 -0700)
commit0a06d4309dc168dfa70cec3cf0cd9eb7fc15a2fd
tree38dda3f7dc5e049761c80b55796e48cacbb6924c
parent4624773765699ac3f4e0b918306b638cba385713
target: simplify backend driver registration

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>
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