* [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV
@ 2010-11-11 10:40 Christoph Hellwig
2010-11-11 10:40 ` [PATCH 2/2] target: remove dead DF_* flags Christoph Hellwig
2010-11-11 10:46 ` [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV Nicholas A. Bellinger
0 siblings, 2 replies; 6+ messages in thread
From: Christoph Hellwig @ 2010-11-11 10:40 UTC (permalink / raw)
To: nab; +Cc: linux-scsi
__iscsi_debug_dev doesn't compile and isn't actually used anywhere. Remove
it and the surrounding infrastructure.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: lio-core-2.6/drivers/target/lio-target/iscsi_target.c
===================================================================
--- lio-core-2.6.orig/drivers/target/lio-target/iscsi_target.c 2010-11-11 11:32:02.234831800 +0100
+++ lio-core-2.6/drivers/target/lio-target/iscsi_target.c 2010-11-11 11:32:57.778165134 +0100
@@ -939,10 +939,6 @@ static int iscsi_target_detect(void)
spin_lock_init(&iscsi_global->debug_erl_lock);
#endif /* DEBUG_ERL */
-#ifdef DEBUG_DEV
- spin_lock_init(&iscsi_global->debug_dev_lock);
-#endif
-
dir_entry = proc_mkdir("iscsi_target", 0);
if (!(dir_entry)) {
printk(KERN_ERR "proc_mkdir() failed.\n");
Index: lio-core-2.6/drivers/target/target_core_transport.c
===================================================================
--- lio-core-2.6.orig/drivers/target/target_core_transport.c 2010-11-11 11:32:33.221498468 +0100
+++ lio-core-2.6/drivers/target/target_core_transport.c 2010-11-11 11:32:57.781498467 +0100
@@ -413,71 +413,6 @@ void release_se_global(void)
se_global = NULL;
}
-#ifdef DEBUG_DEV
-
-/* warning FIXME: PLUGIN API TODO */
-int __iscsi_debug_dev(struct se_device *dev)
-{
- int fail_task = 0;
- fd_dev_t *fd_dev;
- iblock_dev_t *ib_dev;
- rd_dev_t *rd_dev;
- struct scsi_device *sd;
-
- spin_lock(&se_global->debug_dev_lock);
- switch (dev->se_hba->type) {
- case PSCSI:
- sd = (struct scsi_device *) dev->dev_ptr;
- if (dev->dev_flags & DF_DEV_DEBUG) {
- printk(KERN_INFO "HBA[%u] - Failing PSCSI Task for"
- " %d/%d/%d\n", dev->se_hba->hba_id,
- sd->channel, sd->id, sd->lun);
- fail_task = 1;
- }
- break;
- case IBLOCK:
- ib_dev = (iblock_dev_t *) dev->dev_ptr;
- if (dev->dev_flags & DF_DEV_DEBUG) {
- printk(KERN_INFO "HBA[%u] - Failing IBLOCK Task for"
- " %u/%u\n", dev->se_hba->hba_id,
- ib_dev->ibd_major, ib_dev->ibd_minor);
- fail_task = 1;
- }
- break;
- case FILEIO:
- fd_dev = (fd_dev_t *) dev->dev_ptr;
- if (dev->dev_flags & DF_DEV_DEBUG) {
- printk(KERN_INFO "HBA[%u] - Failing FILEIO Task for"
- " %u\n", dev->se_hba->hba_id,
- fd_dev->fd_dev_id);
- fail_task = 1;
- }
- break;
- case RAMDISK_DR:
- case RAMDISK_MCP:
- rd_dev = (rd_dev_t *) dev->dev_ptr;
- if (dev->dev_flags & DF_DEV_DEBUG) {
- printk(KERN_INFO "HBA[%u] - Failing RAMDISK Task for"
- " %u\n", dev->se_hba->hba_id,
- rd_dev->rd_dev_id);
- fail_task = 1;
- }
- break;
- default:
- if (dev->dev_flags & DF_DEV_DEBUG) {
- printk(KERN_INFO "HBA[%u] - Failing unknown Task\n",
- dev->se_hba->hba_id);
- fail_task = 1;
- }
- break;
- }
- spin_unlock(&se_global->debug_dev_lock);
-
- return fail_task;
-}
-
-#endif /* DEBUG_DEV */
-
void transport_init_queue_obj(struct se_queue_obj *qobj)
{
atomic_set(&qobj->queue_cnt, 0);
@@ -1229,17 +1164,6 @@ check_task_stop:
}
atomic_dec(&T_TASK(cmd)->t_task_cdbs_timeout_left);
-#ifdef DEBUG_DEV
- if (dev) {
- if (__iscsi_debug_dev(dev) != 0) {
- success = 0;
- task->task_scsi_status = 1;
- cmd->transport_error_status =
- PYX_TRANSPORT_LU_COMM_FAILURE;
- }
- }
-#endif /* DEBUG_DEV */
-
/*
* Decrement the outstanding t_task_cdbs_left count. The last
* struct se_task from struct se_cmd will complete itself into the
Index: lio-core-2.6/include/target/target_core_base.h
===================================================================
--- lio-core-2.6.orig/include/target/target_core_base.h 2010-11-11 11:32:02.000000000 +0100
+++ lio-core-2.6/include/target/target_core_base.h 2010-11-11 11:32:57.784831801 +0100
@@ -1057,9 +1057,6 @@ struct se_global {
spinlock_t se_tpg_lock;
spinlock_t lu_gps_lock;
spinlock_t plugin_class_lock;
-#ifdef DEBUG_DEV
- spinlock_t debug_dev_lock;
-#endif
} ____cacheline_aligned;
#endif /* TARGET_CORE_BASE_H */
Index: lio-core-2.6/include/target/target_core_transport.h
===================================================================
--- lio-core-2.6.orig/include/target/target_core_transport.h 2010-11-11 11:32:33.000000000 +0100
+++ lio-core-2.6/include/target/target_core_transport.h 2010-11-11 11:32:57.788165135 +0100
@@ -132,9 +132,6 @@ struct se_subsystem_api;
extern int init_se_global(void);
extern void release_se_global(void);
-#ifdef DEBUG_DEV
-extern int __iscsi_debug_dev(struct se_device *);
-#endif
extern void transport_init_queue_obj(struct se_queue_obj *);
extern int transport_subsystem_check_init(void);
extern int transport_subsystem_register(struct se_subsystem_api *);
Index: lio-core-2.6/drivers/target/Kbuild
===================================================================
--- lio-core-2.6.orig/drivers/target/Kbuild 2010-11-11 11:32:02.251498468 +0100
+++ lio-core-2.6/drivers/target/Kbuild 2010-11-11 11:32:57.798165135 +0100
@@ -16,10 +16,6 @@ target_core_mod-y := target_core_config
target_core_rd.o \
target_core_mib.o
-ifdef CONFIG_TCM_DEBUG_DEV
-EXTRA_CFLAGS += -DDEBUG_DEV
-endif
-
obj-$(CONFIG_TARGET_CORE) += target_core_mod.o
# Subsystem modules
Index: lio-core-2.6/drivers/target/Kconfig
===================================================================
--- lio-core-2.6.orig/drivers/target/Kconfig 2010-11-11 11:32:02.261498467 +0100
+++ lio-core-2.6/drivers/target/Kconfig 2010-11-11 11:32:57.801498468 +0100
@@ -5,13 +5,6 @@ config TARGET_CORE
---help---
Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled control path for target_core_mod. This includes built-in TCM RAMDISK subsystem logic for virtual LUN 0 access
-config TCM_DEBUG_DEV
- tristate "TCM Debug device code"
- depends on TARGET_CORE
- default n
- ---help---
- Say Y here to enable the TCM Debug device code
-
config TCM_IBLOCK
tristate "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK"
depends on TARGET_CORE
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 2/2] target: remove dead DF_* flags
2010-11-11 10:40 [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV Christoph Hellwig
@ 2010-11-11 10:40 ` Christoph Hellwig
2010-11-11 11:07 ` Nicholas A. Bellinger
2010-11-11 10:46 ` [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV Nicholas A. Bellinger
1 sibling, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-11-11 10:40 UTC (permalink / raw)
To: nab; +Cc: linux-scsi
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: lio-core-2.6/drivers/target/target_core_iblock.c
===================================================================
--- lio-core-2.6.orig/drivers/target/target_core_iblock.c 2010-11-11 11:32:33.198165135 +0100
+++ lio-core-2.6/drivers/target/target_core_iblock.c 2010-11-11 11:33:55.878165135 +0100
@@ -180,7 +180,6 @@ static struct se_device *iblock_create_v
dev_limits.hw_queue_depth = IBLOCK_MAX_DEVICE_QUEUE_DEPTH;
dev_limits.queue_depth = IBLOCK_DEVICE_QUEUE_DEPTH;
- dev_flags = DF_CLAIMED_BLOCKDEV;
ib_dev->ibd_major = MAJOR(bd->bd_dev);
ib_dev->ibd_minor = MINOR(bd->bd_dev);
ib_dev->ibd_bd = bd;
Index: lio-core-2.6/drivers/target/target_core_rd.c
===================================================================
--- lio-core-2.6.orig/drivers/target/target_core_rd.c 2010-11-11 11:32:33.214831800 +0100
+++ lio-core-2.6/drivers/target/target_core_rd.c 2010-11-11 11:33:55.878165135 +0100
@@ -272,9 +272,6 @@ static struct se_device *rd_create_virtd
memset(&dev_limits, 0, sizeof(struct se_dev_limits));
- if (rd_dev->rd_direct)
- dev_flags |= DF_TRANSPORT_DMA_ALLOC;
-
if (rd_build_device_space(rd_dev) < 0)
goto fail;
Index: lio-core-2.6/drivers/target/target_core_transport.c
===================================================================
--- lio-core-2.6.orig/drivers/target/target_core_transport.c 2010-11-11 11:32:57.781498467 +0100
+++ lio-core-2.6/drivers/target/target_core_transport.c 2010-11-11 11:33:55.881498468 +0100
@@ -1983,13 +1983,6 @@ static void core_setup_task_attr_emulati
TRANSPORT(dev)->get_device_rev(dev));
}
-/* transport_add_device_to_core_hba():
- *
- * Note that some plugins (IBLOCK) will pass device_flags ==
- * DF_CLAIMED_BLOCKDEV signifying OS that a dependent block_device
- * has been claimed. In exception cases we will release said
- * block_device ourselves.
- */
struct se_device *transport_add_device_to_core_hba(
struct se_hba *hba,
struct se_subsystem_api *transport,
Index: lio-core-2.6/include/target/target_core_transport.h
===================================================================
--- lio-core-2.6.orig/include/target/target_core_transport.h 2010-11-11 11:32:57.788165135 +0100
+++ lio-core-2.6/include/target/target_core_transport.h 2010-11-11 11:34:28.824831800 +0100
@@ -59,16 +59,9 @@
/*
* struct se_device->dev_flags
*/
-#define DF_READAHEAD_ACTIVE 0x00000001
-#define DF_TRANSPORT_DMA_ALLOC 0x00000002
-#define DF_TRANSPORT_BUF_ALLOC 0x00000004
-#define DF_DEV_DEBUG 0x00000008
-#define DF_CLAIMED_BLOCKDEV 0x00000010
-#define DF_PERSISTENT_CLAIMED_BLOCKDEV 0x00000020
-#define DF_READ_ONLY 0x00000040
-#define DF_SPC3_PERSISTENT_RESERVE 0x00000080
-#define DF_SPC2_RESERVATIONS 0x00000100
-#define DF_SPC2_RESERVATIONS_WITH_ISID 0x00000200
+#define DF_READ_ONLY 0x00000001
+#define DF_SPC2_RESERVATIONS 0x00000002
+#define DF_SPC2_RESERVATIONS_WITH_ISID 0x00000004
/*
* Used as return values from transport_generic_cmd_sequencer()
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV
2010-11-11 10:40 [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV Christoph Hellwig
2010-11-11 10:40 ` [PATCH 2/2] target: remove dead DF_* flags Christoph Hellwig
@ 2010-11-11 10:46 ` Nicholas A. Bellinger
1 sibling, 0 replies; 6+ messages in thread
From: Nicholas A. Bellinger @ 2010-11-11 10:46 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-scsi
On Thu, 2010-11-11 at 05:40 -0500, Christoph Hellwig wrote:
> __iscsi_debug_dev doesn't compile and isn't actually used anywhere. Remove
> it and the surrounding infrastructure.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
Commited as 67e05b3fde.
Thanks!
> Index: lio-core-2.6/drivers/target/lio-target/iscsi_target.c
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/lio-target/iscsi_target.c 2010-11-11 11:32:02.234831800 +0100
> +++ lio-core-2.6/drivers/target/lio-target/iscsi_target.c 2010-11-11 11:32:57.778165134 +0100
> @@ -939,10 +939,6 @@ static int iscsi_target_detect(void)
> spin_lock_init(&iscsi_global->debug_erl_lock);
> #endif /* DEBUG_ERL */
>
> -#ifdef DEBUG_DEV
> - spin_lock_init(&iscsi_global->debug_dev_lock);
> -#endif
> -
> dir_entry = proc_mkdir("iscsi_target", 0);
> if (!(dir_entry)) {
> printk(KERN_ERR "proc_mkdir() failed.\n");
> Index: lio-core-2.6/drivers/target/target_core_transport.c
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/target_core_transport.c 2010-11-11 11:32:33.221498468 +0100
> +++ lio-core-2.6/drivers/target/target_core_transport.c 2010-11-11 11:32:57.781498467 +0100
> @@ -413,71 +413,6 @@ void release_se_global(void)
> se_global = NULL;
> }
>
> -#ifdef DEBUG_DEV
> -
> -/* warning FIXME: PLUGIN API TODO */
> -int __iscsi_debug_dev(struct se_device *dev)
> -{
> - int fail_task = 0;
> - fd_dev_t *fd_dev;
> - iblock_dev_t *ib_dev;
> - rd_dev_t *rd_dev;
> - struct scsi_device *sd;
> -
> - spin_lock(&se_global->debug_dev_lock);
> - switch (dev->se_hba->type) {
> - case PSCSI:
> - sd = (struct scsi_device *) dev->dev_ptr;
> - if (dev->dev_flags & DF_DEV_DEBUG) {
> - printk(KERN_INFO "HBA[%u] - Failing PSCSI Task for"
> - " %d/%d/%d\n", dev->se_hba->hba_id,
> - sd->channel, sd->id, sd->lun);
> - fail_task = 1;
> - }
> - break;
> - case IBLOCK:
> - ib_dev = (iblock_dev_t *) dev->dev_ptr;
> - if (dev->dev_flags & DF_DEV_DEBUG) {
> - printk(KERN_INFO "HBA[%u] - Failing IBLOCK Task for"
> - " %u/%u\n", dev->se_hba->hba_id,
> - ib_dev->ibd_major, ib_dev->ibd_minor);
> - fail_task = 1;
> - }
> - break;
> - case FILEIO:
> - fd_dev = (fd_dev_t *) dev->dev_ptr;
> - if (dev->dev_flags & DF_DEV_DEBUG) {
> - printk(KERN_INFO "HBA[%u] - Failing FILEIO Task for"
> - " %u\n", dev->se_hba->hba_id,
> - fd_dev->fd_dev_id);
> - fail_task = 1;
> - }
> - break;
> - case RAMDISK_DR:
> - case RAMDISK_MCP:
> - rd_dev = (rd_dev_t *) dev->dev_ptr;
> - if (dev->dev_flags & DF_DEV_DEBUG) {
> - printk(KERN_INFO "HBA[%u] - Failing RAMDISK Task for"
> - " %u\n", dev->se_hba->hba_id,
> - rd_dev->rd_dev_id);
> - fail_task = 1;
> - }
> - break;
> - default:
> - if (dev->dev_flags & DF_DEV_DEBUG) {
> - printk(KERN_INFO "HBA[%u] - Failing unknown Task\n",
> - dev->se_hba->hba_id);
> - fail_task = 1;
> - }
> - break;
> - }
> - spin_unlock(&se_global->debug_dev_lock);
> -
> - return fail_task;
> -}
> -
> -#endif /* DEBUG_DEV */
> -
> void transport_init_queue_obj(struct se_queue_obj *qobj)
> {
> atomic_set(&qobj->queue_cnt, 0);
> @@ -1229,17 +1164,6 @@ check_task_stop:
> }
> atomic_dec(&T_TASK(cmd)->t_task_cdbs_timeout_left);
>
> -#ifdef DEBUG_DEV
> - if (dev) {
> - if (__iscsi_debug_dev(dev) != 0) {
> - success = 0;
> - task->task_scsi_status = 1;
> - cmd->transport_error_status =
> - PYX_TRANSPORT_LU_COMM_FAILURE;
> - }
> - }
> -#endif /* DEBUG_DEV */
> -
> /*
> * Decrement the outstanding t_task_cdbs_left count. The last
> * struct se_task from struct se_cmd will complete itself into the
> Index: lio-core-2.6/include/target/target_core_base.h
> ===================================================================
> --- lio-core-2.6.orig/include/target/target_core_base.h 2010-11-11 11:32:02.000000000 +0100
> +++ lio-core-2.6/include/target/target_core_base.h 2010-11-11 11:32:57.784831801 +0100
> @@ -1057,9 +1057,6 @@ struct se_global {
> spinlock_t se_tpg_lock;
> spinlock_t lu_gps_lock;
> spinlock_t plugin_class_lock;
> -#ifdef DEBUG_DEV
> - spinlock_t debug_dev_lock;
> -#endif
> } ____cacheline_aligned;
>
> #endif /* TARGET_CORE_BASE_H */
> Index: lio-core-2.6/include/target/target_core_transport.h
> ===================================================================
> --- lio-core-2.6.orig/include/target/target_core_transport.h 2010-11-11 11:32:33.000000000 +0100
> +++ lio-core-2.6/include/target/target_core_transport.h 2010-11-11 11:32:57.788165135 +0100
> @@ -132,9 +132,6 @@ struct se_subsystem_api;
>
> extern int init_se_global(void);
> extern void release_se_global(void);
> -#ifdef DEBUG_DEV
> -extern int __iscsi_debug_dev(struct se_device *);
> -#endif
> extern void transport_init_queue_obj(struct se_queue_obj *);
> extern int transport_subsystem_check_init(void);
> extern int transport_subsystem_register(struct se_subsystem_api *);
> Index: lio-core-2.6/drivers/target/Kbuild
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/Kbuild 2010-11-11 11:32:02.251498468 +0100
> +++ lio-core-2.6/drivers/target/Kbuild 2010-11-11 11:32:57.798165135 +0100
> @@ -16,10 +16,6 @@ target_core_mod-y := target_core_config
> target_core_rd.o \
> target_core_mib.o
>
> -ifdef CONFIG_TCM_DEBUG_DEV
> -EXTRA_CFLAGS += -DDEBUG_DEV
> -endif
> -
> obj-$(CONFIG_TARGET_CORE) += target_core_mod.o
>
> # Subsystem modules
> Index: lio-core-2.6/drivers/target/Kconfig
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/Kconfig 2010-11-11 11:32:02.261498467 +0100
> +++ lio-core-2.6/drivers/target/Kconfig 2010-11-11 11:32:57.801498468 +0100
> @@ -5,13 +5,6 @@ config TARGET_CORE
> ---help---
> Say Y or M here to enable the TCM Storage Engine and ConfigFS enabled control path for target_core_mod. This includes built-in TCM RAMDISK subsystem logic for virtual LUN 0 access
>
> -config TCM_DEBUG_DEV
> - tristate "TCM Debug device code"
> - depends on TARGET_CORE
> - default n
> - ---help---
> - Say Y here to enable the TCM Debug device code
> -
> config TCM_IBLOCK
> tristate "TCM/IBLOCK Subsystem Plugin for Linux/BLOCK"
> depends on TARGET_CORE
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] target: remove dead DF_* flags
2010-11-11 10:40 ` [PATCH 2/2] target: remove dead DF_* flags Christoph Hellwig
@ 2010-11-11 11:07 ` Nicholas A. Bellinger
2010-11-11 12:21 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Nicholas A. Bellinger @ 2010-11-11 11:07 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-scsi
On Thu, 2010-11-11 at 05:40 -0500, Christoph Hellwig wrote:
> Signed-off-by: Christoph Hellwig <hch@lst.de>
>
> Index: lio-core-2.6/drivers/target/target_core_iblock.c
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/target_core_iblock.c 2010-11-11 11:32:33.198165135 +0100
> +++ lio-core-2.6/drivers/target/target_core_iblock.c 2010-11-11 11:33:55.878165135 +0100
> @@ -180,7 +180,6 @@ static struct se_device *iblock_create_v
> dev_limits.hw_queue_depth = IBLOCK_MAX_DEVICE_QUEUE_DEPTH;
> dev_limits.queue_depth = IBLOCK_DEVICE_QUEUE_DEPTH;
>
> - dev_flags = DF_CLAIMED_BLOCKDEV;
> ib_dev->ibd_major = MAJOR(bd->bd_dev);
> ib_dev->ibd_minor = MINOR(bd->bd_dev);
> ib_dev->ibd_bd = bd;
> Index: lio-core-2.6/drivers/target/target_core_rd.c
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/target_core_rd.c 2010-11-11 11:32:33.214831800 +0100
> +++ lio-core-2.6/drivers/target/target_core_rd.c 2010-11-11 11:33:55.878165135 +0100
> @@ -272,9 +272,6 @@ static struct se_device *rd_create_virtd
>
> memset(&dev_limits, 0, sizeof(struct se_dev_limits));
>
> - if (rd_dev->rd_direct)
> - dev_flags |= DF_TRANSPORT_DMA_ALLOC;
> -
> if (rd_build_device_space(rd_dev) < 0)
> goto fail;
>
This is still required by RAMDISK_DR to allow the backend to perform the
se_task->task_sg[] mapping from the ramdisk provided struct scatterlists
using se_subsystem_api->allocate_dma()
So commited as b9f63304e9, w/o dropping DF_TRANSPORT_DMA_ALLOC..
> Index: lio-core-2.6/drivers/target/target_core_transport.c
> ===================================================================
> --- lio-core-2.6.orig/drivers/target/target_core_transport.c 2010-11-11 11:32:57.781498467 +0100
> +++ lio-core-2.6/drivers/target/target_core_transport.c 2010-11-11 11:33:55.881498468 +0100
> @@ -1983,13 +1983,6 @@ static void core_setup_task_attr_emulati
> TRANSPORT(dev)->get_device_rev(dev));
> }
>
> -/* transport_add_device_to_core_hba():
> - *
> - * Note that some plugins (IBLOCK) will pass device_flags ==
> - * DF_CLAIMED_BLOCKDEV signifying OS that a dependent block_device
> - * has been claimed. In exception cases we will release said
> - * block_device ourselves.
> - */
> struct se_device *transport_add_device_to_core_hba(
> struct se_hba *hba,
> struct se_subsystem_api *transport,
> Index: lio-core-2.6/include/target/target_core_transport.h
> ===================================================================
> --- lio-core-2.6.orig/include/target/target_core_transport.h 2010-11-11 11:32:57.788165135 +0100
> +++ lio-core-2.6/include/target/target_core_transport.h 2010-11-11 11:34:28.824831800 +0100
> @@ -59,16 +59,9 @@
> /*
> * struct se_device->dev_flags
> */
> -#define DF_READAHEAD_ACTIVE 0x00000001
> -#define DF_TRANSPORT_DMA_ALLOC 0x00000002
> -#define DF_TRANSPORT_BUF_ALLOC 0x00000004
Btw, just as a historical note for fun..
The DF_TRANSPORT_BUF_ALLOC flag was originally used by a now extinct
v2.2/v2.4 backend driver (iscsi_target_ata.c) for the old drivers/ide/
code that required a single contigious buffer to be setup on the non
cache coherent MIPS r5900 (the Playstation2 for non linux-mips.org
folks) -> r3000 IOP DMA to the single channel PATA expansion adapter.
Anyways, once some aspring MIPS kernel hacker can take the time to
figure out how to boot a modern Linux/MIPS kernel on the r5900 we can
revist this particular issue again, eg: supporting contigiously
allocated buffer for SCF_SCSI_DATA_SG_IO_CDB type descriptors, which
still is working the same today for modern iSCSI target fabric code.
Anyways this may still be useful for less obsecure cases than the r5900,
but none immediatedly come to mind. ;)
Thanks!
--nab
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] target: remove dead DF_* flags
2010-11-11 11:07 ` Nicholas A. Bellinger
@ 2010-11-11 12:21 ` Christoph Hellwig
2010-11-11 13:04 ` Nicholas A. Bellinger
0 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2010-11-11 12:21 UTC (permalink / raw)
To: Nicholas A. Bellinger; +Cc: Christoph Hellwig, linux-scsi
On Thu, Nov 11, 2010 at 03:07:10AM -0800, Nicholas A. Bellinger wrote:
> This is still required by RAMDISK_DR to allow the backend to perform the
> se_task->task_sg[] mapping from the ramdisk provided struct scatterlists
> using se_subsystem_api->allocate_dma()
It's not actually used anywhere at all. And if you mean fronted instead
of backend above and imply not yet merged - I don't think adding special
cases for the ramdisk driver into frontends is a good idea, as it's not
really a case worth optimizing for. And even then it's entirely dead
and untested code for now.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] target: remove dead DF_* flags
2010-11-11 12:21 ` Christoph Hellwig
@ 2010-11-11 13:04 ` Nicholas A. Bellinger
0 siblings, 0 replies; 6+ messages in thread
From: Nicholas A. Bellinger @ 2010-11-11 13:04 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-scsi
On Thu, 2010-11-11 at 07:21 -0500, Christoph Hellwig wrote:
> On Thu, Nov 11, 2010 at 03:07:10AM -0800, Nicholas A. Bellinger wrote:
> > This is still required by RAMDISK_DR to allow the backend to perform the
> > se_task->task_sg[] mapping from the ramdisk provided struct scatterlists
> > using se_subsystem_api->allocate_dma()
>
> It's not actually used anywhere at all. And if you mean fronted instead
> of backend above and imply not yet merged - I don't think adding special
> cases for the ramdisk driver into frontends is a good idea, as it's not
> really a case worth optimizing for. And even then it's entirely dead
> and untested code for now.
>
Whoops sorry, transport_dev_get_mem_SG() is simply checking for valid
se_subsystem_api->allocate_DMA() and ->free_DMA() function pointers for
the special RAMDISK_DR case. So dropping the unnecessary
DF_TRANSPORT_DMA_ALLOC flag now
Sorry for the extra noise. ;)
Thanks!
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2010-11-11 13:10 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-11 10:40 [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV Christoph Hellwig
2010-11-11 10:40 ` [PATCH 2/2] target: remove dead DF_* flags Christoph Hellwig
2010-11-11 11:07 ` Nicholas A. Bellinger
2010-11-11 12:21 ` Christoph Hellwig
2010-11-11 13:04 ` Nicholas A. Bellinger
2010-11-11 10:46 ` [PATCH 1/2] target: kill CONFIG_TCM_DEBUG_DEV Nicholas A. Bellinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox