<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/scsi/scsi_tgt_lib.c, branch v2.6.39-rc2</title>
<subtitle>Linux Kernel (branches are rebased on master from time to time)</subtitle>
<id>https://sre.ring0.de/linux/atom?h=v2.6.39-rc2</id>
<link rel='self' href='https://sre.ring0.de/linux/atom?h=v2.6.39-rc2'/>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/'/>
<updated>2011-02-01T10:42:42Z</updated>
<entry>
<title>scsi/scsi_tgt_lib: scsi_tgtd isn't used in memory reclaim path</title>
<updated>2011-02-01T10:42:42Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2011-02-01T10:42:42Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=40f38ffb72cd58452dc5afc25ca5215bb90538a4'/>
<id>urn:sha1:40f38ffb72cd58452dc5afc25ca5215bb90538a4</id>
<content type='text'>
Workqueue scsi_tgtd isn't used during memory reclaim.  Convert to
alloc_workqueue() without WQ_MEM_RECLAIM.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Cc: FUJITA Tomonori &lt;tomof@acm.org&gt;
Cc: "James E.J. Bottomley" &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: linux-scsi@vger.kernel.org
</content>
</entry>
<entry>
<title>[SCSI] tgt: fix warning</title>
<updated>2010-08-11T04:55:42Z</updated>
<author>
<name>Joe Eykholt</name>
<email>jeykholt@cisco.com</email>
</author>
<published>2010-08-06T00:50:37Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=3deee42088ddcf5b23021aa089b53444797e565d'/>
<id>urn:sha1:3deee42088ddcf5b23021aa089b53444797e565d</id>
<content type='text'>
Using scsi_tgt_lib in a new target module, we were getting
the following warning and a stack traceback on every I/O completion:

WARNING: at block/blk-core.c:1108

Which is claiming we may be leaking a bio.
We don't leak bios (blk_rq_unmap_user should free them).

Set rq-&gt;bio to NULL before calling scsi_host_put_command().
This was as advised by Fujita Tomonori.

Signed-off-by: Joe Eykholt &lt;jeykholt@cisco.com&gt;
Acked-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@suse.de&gt;
</content>
</entry>
<entry>
<title>include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h</title>
<updated>2010-03-30T13:02:32Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2010-03-24T08:04:11Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=5a0e3ad6af8660be21ca98a971cd00f331318c05'/>
<id>urn:sha1:5a0e3ad6af8660be21ca98a971cd00f331318c05</id>
<content type='text'>
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -&gt; slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Guess-its-ok-by: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Ingo Molnar &lt;mingo@redhat.com&gt;
Cc: Lee Schermerhorn &lt;Lee.Schermerhorn@hp.com&gt;
</content>
</entry>
<entry>
<title>block: cleanup rq-&gt;data_len usages</title>
<updated>2009-05-11T07:50:55Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2009-05-07T13:24:42Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b0790410300abaaf4f25f702803beff701baebf1'/>
<id>urn:sha1:b0790410300abaaf4f25f702803beff701baebf1</id>
<content type='text'>
With recent unification of fields, it's now guaranteed that
rq-&gt;data_len always equals blk_rq_bytes().  Convert all non-IDE direct
users to accessors.  IDE will be converted in a separate patch.

Boaz: spotted incorrect data_len/resid_len conversion in osd.

[ Impact: convert direct rq-&gt;data_len usages to blk_rq_bytes() ]

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Acked-by: Sergei Shtylyov &lt;sshtylyov@ru.mvista.com&gt;
Cc: Pete Zaitcev &lt;zaitcev@redhat.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Markus Lidel &lt;Markus.Lidel@shadowconnect.com&gt;
Cc: Darrick J. Wong &lt;djwong@us.ibm.com&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Cc: Eric Moore &lt;Eric.Moore@lsi.com&gt;
Cc: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Cc: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6</title>
<updated>2008-10-10T17:53:26Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2008-10-10T17:53:26Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=ef5bef357cdf49f3a386c7102dbf3be5f7e5c913'/>
<id>urn:sha1:ef5bef357cdf49f3a386c7102dbf3be5f7e5c913</id>
<content type='text'>
* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (37 commits)
  [SCSI] zfcp: fix double dbf id usage
  [SCSI] zfcp: wait on SCSI work to be finished before proceeding with init dev
  [SCSI] zfcp: fix erp list usage without using locks
  [SCSI] zfcp: prevent fc_remote_port_delete calls for unregistered rport
  [SCSI] zfcp: fix deadlock caused by shared work queue tasks
  [SCSI] zfcp: put threshold data in hba trace
  [SCSI] zfcp: Simplify zfcp data structures
  [SCSI] zfcp: Simplify get_adapter_by_busid
  [SCSI] zfcp: remove all typedefs and replace them with standards
  [SCSI] zfcp: attach and release SAN nameserver port on demand
  [SCSI] zfcp: remove unused references, declarations and flags
  [SCSI] zfcp: Update message with input from review
  [SCSI] zfcp: add queue_full sysfs attribute
  [SCSI] scsi_dh: suppress comparison warning
  [SCSI] scsi_dh: add Dell product information into rdac device handler
  [SCSI] qla2xxx: remove the unused SCSI_QLOGIC_FC_FIRMWARE option
  [SCSI] qla2xxx: fix printk format warnings
  [SCSI] qla2xxx: Update version number to 8.02.01-k8.
  [SCSI] qla2xxx: Ignore payload reserved-bits during RSCN processing.
  [SCSI] qla2xxx: Additional residual-count corrections during UNDERRUN handling.
  ...
</content>
</entry>
<entry>
<title>block: introduce struct rq_map_data to use reserved pages</title>
<updated>2008-10-09T06:56:10Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-08-28T07:17:06Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=152e283fdfea0cd11e297d982378b55937842dde'/>
<id>urn:sha1:152e283fdfea0cd11e297d982378b55937842dde</id>
<content type='text'>
This patch introduces struct rq_map_data to enable bio_copy_use_iov()
use reserved pages.

Currently, bio_copy_user_iov allocates bounce pages but
drivers/scsi/sg.c wants to allocate pages by itself and use
them. struct rq_map_data can be used to pass allocated pages to
bio_copy_user_iov.

The current users of bio_copy_user_iov simply passes NULL (they don't
want to use pre-allocated pages).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Cc: Jens Axboe &lt;jens.axboe@oracle.com&gt;
Cc: Douglas Gilbert &lt;dougg@torque.net&gt;
Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>block: add gfp_mask argument to blk_rq_map_user and blk_rq_map_user_iov</title>
<updated>2008-10-09T06:56:10Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-08-28T07:17:05Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=a3bce90edd8f6cafe3f63b1a943800792e830178'/>
<id>urn:sha1:a3bce90edd8f6cafe3f63b1a943800792e830178</id>
<content type='text'>
Currently, blk_rq_map_user and blk_rq_map_user_iov always do
GFP_KERNEL allocation.

This adds gfp_mask argument to blk_rq_map_user and blk_rq_map_user_iov
so sg can use it (sg always does GFP_ATOMIC allocation).

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: Douglas Gilbert &lt;dougg@torque.net&gt;
Cc: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Cc: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
Signed-off-by: Jens Axboe &lt;jens.axboe@oracle.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] scsi_host_lookup: error returns and NULL pointers</title>
<updated>2008-10-03T16:46:12Z</updated>
<author>
<name>James Smart</name>
<email>James.Smart@Emulex.Com</email>
</author>
<published>2008-08-08T00:49:30Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=315cb0ad124575e75da2d0e0a95990587fc23485'/>
<id>urn:sha1:315cb0ad124575e75da2d0e0a95990587fc23485</id>
<content type='text'>
This patch cleans up the behavior of scsi_host_lookup().

The original implementation attempted to use the dual role of
either returning a pointer value, or a negative error code.
User's needed to use IS_ERR() to check the result. Additionally,
the IS_ERR() macro never checks for when a NULL pointer was
returned, so a NULL pointer actually passes with a success case.
Note: scsi_host_get(), used by scsi_host_lookup(), can return
a NULL pointer.

Talk about a mudhole for the unitiated to step into....

This patch converts scsi_host_lookup() to return either NULL
or a valid pointer. The consumers were updated for the change.

Signed-off-by: James Smart &lt;james.smart@emulex.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] Let scsi_cmnd-&gt;cmnd use request-&gt;cmd buffer</title>
<updated>2008-05-02T15:18:22Z</updated>
<author>
<name>Boaz Harrosh</name>
<email>bharrosh@panasas.com</email>
</author>
<published>2008-04-30T08:19:47Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=64a87b244b9297667ca80264aab849a36f494884'/>
<id>urn:sha1:64a87b244b9297667ca80264aab849a36f494884</id>
<content type='text'>
 - struct scsi_cmnd had a 16 bytes command buffer of its own.
   This is an unnecessary duplication and copy of request's
   cmd. It is probably left overs from the time that scsi_cmnd
   could function without a request attached. So clean that up.

 - Once above is done, few places, apart from scsi-ml, needed
   adjustments due to changing the data type of scsi_cmnd-&gt;cmnd.

 - Lots of drivers still use MAX_COMMAND_SIZE. So I have left
   that #define but equate it to BLK_MAX_CDB. The way I see it
   and is reflected in the patch below is.
   MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB
                      as per the SCSI standard and is not related
                      to the implementation.
   BLK_MAX_CDB.     - The allocated space at the request level

 - I have audit all ISA drivers and made sure none use -&gt;cmnd in a DMA
   Operation. Same audit was done by Andi Kleen.

(*)fixed-length here means commands that their size can be determined
   by their opcode and the CDB does not carry a length specifier, (unlike
   the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly
   true and the SCSI standard also defines extended commands and
   vendor specific commands that can be bigger than 16 bytes. The kernel
   will support these using the same infrastructure used for VARLEN CDB's.
   So in effect MAX_COMMAND_SIZE means the maximum size command
   scsi-ml supports without specifying a cmd_len by ULD's

Signed-off-by: Boaz Harrosh &lt;bharrosh@panasas.com&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
<entry>
<title>[SCSI] tgt: use KMEM_CACHE macro</title>
<updated>2008-04-16T14:22:19Z</updated>
<author>
<name>FUJITA Tomonori</name>
<email>fujita.tomonori@lab.ntt.co.jp</email>
</author>
<published>2008-04-10T14:48:14Z</published>
<link rel='alternate' type='text/html' href='https://sre.ring0.de/linux/commit/?id=b312bab3b961de21c5a98bd70e04070eaa61817c'/>
<id>urn:sha1:b312bab3b961de21c5a98bd70e04070eaa61817c</id>
<content type='text'>
This uses new KMEM_CACHE() macro instead of kmem_cache_create directly
to simplify slab cache creation.

Signed-off-by: FUJITA Tomonori &lt;fujita.tomonori@lab.ntt.co.jp&gt;
Signed-off-by: James Bottomley &lt;James.Bottomley@HansenPartnership.com&gt;
</content>
</entry>
</feed>
