From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Christoph Hellwig <hch@infradead.org>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [PATCH 2/2] target: remove dead DF_* flags
Date: Thu, 11 Nov 2010 03:07:10 -0800 [thread overview]
Message-ID: <1289473630.2867.110.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20101111104056.GB21472@infradead.org>
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
next prev parent reply other threads:[~2010-11-11 11:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1289473630.2867.110.camel@haakon2.linux-iscsi.org \
--to=nab@linux-iscsi.org \
--cc=hch@infradead.org \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox