<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/drivers/target, branch v3.1-rc5</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>target: Convert acl_node_lock to be IRQ-disabling</title>
<updated>2011-08-22T19:28:36+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-08-16T16:40:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=28638887f351d11867562322b7abaa014dd5528a'/>
<id>28638887f351d11867562322b7abaa014dd5528a</id>
<content type='text'>
With qla2xxx, acl_node_lock is taken inside qla2xxx's hardware_lock,
which is taken in hardirq context.  This means acl_node_lock must become
an IRQ-disabling lock; in particular this fixes lockdep warnings along
the lines of

    ======================================================
    [ INFO: HARDIRQ-safe -&gt; HARDIRQ-unsafe lock order detected ]

     (&amp;(&amp;se_tpg-&gt;acl_node_lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa026f872&gt;] transport_deregister_session+0x92/0x140 [target_core_mod]

    and this task is already holding:
     (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}, at: [&lt;ffffffffa017c5e7&gt;] qla_tgt_stop_phase1+0x57/0x2c0 [qla2xxx]
    which would create a new lock dependency:
     (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...} -&gt; (&amp;(&amp;se_tpg-&gt;acl_node_lock)-&gt;rlock){+.....}

    but this new dependency connects a HARDIRQ-irq-safe lock:
     (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}

    to a HARDIRQ-irq-unsafe lock:
     (&amp;(&amp;se_tpg-&gt;acl_node_lock)-&gt;rlock){+.....}

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
With qla2xxx, acl_node_lock is taken inside qla2xxx's hardware_lock,
which is taken in hardirq context.  This means acl_node_lock must become
an IRQ-disabling lock; in particular this fixes lockdep warnings along
the lines of

    ======================================================
    [ INFO: HARDIRQ-safe -&gt; HARDIRQ-unsafe lock order detected ]

     (&amp;(&amp;se_tpg-&gt;acl_node_lock)-&gt;rlock){+.....}, at: [&lt;ffffffffa026f872&gt;] transport_deregister_session+0x92/0x140 [target_core_mod]

    and this task is already holding:
     (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}, at: [&lt;ffffffffa017c5e7&gt;] qla_tgt_stop_phase1+0x57/0x2c0 [qla2xxx]
    which would create a new lock dependency:
     (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...} -&gt; (&amp;(&amp;se_tpg-&gt;acl_node_lock)-&gt;rlock){+.....}

    but this new dependency connects a HARDIRQ-irq-safe lock:
     (&amp;(&amp;ha-&gt;hardware_lock)-&gt;rlock){-.-...}

    to a HARDIRQ-irq-unsafe lock:
     (&amp;(&amp;se_tpg-&gt;acl_node_lock)-&gt;rlock){+.....}

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Make locking in transport_deregister_session() IRQ safe</title>
<updated>2011-08-22T19:26:33+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-08-12T23:01:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e63a8e1933a2218cf801e46dd01bd8cca4a555ec'/>
<id>e63a8e1933a2218cf801e46dd01bd8cca4a555ec</id>
<content type='text'>
At least the tcm_qla2xxx fabric driver calls into transport_deregister_session()
while holding an IRQ-disabled spinlock, so the inner locking needs to
use spin_lock_irqsave() instead of spin_lock_bh().

This fixes warnings seen with tcm_qla2xxx like:

    WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x98/0xb0()
    Call Trace:
     [&lt;ffffffff8104e65f&gt;] warn_slowpath_common+0x7f/0xc0
     [&lt;ffffffff8104e6ba&gt;] warn_slowpath_null+0x1a/0x20
     [&lt;ffffffff81055368&gt;] local_bh_enable_ip+0x98/0xb0
     [&lt;ffffffff814d5284&gt;] _raw_spin_unlock_bh+0x14/0x20
     [&lt;ffffffffa027b7f6&gt;] transport_deregister_session+0x96/0x180 [target_core_mod]
     [&lt;ffffffffa00f7731&gt;] tcm_qla2xxx_free_session+0xd1/0x170 [tcm_qla2xxx]
     [&lt;ffffffffa01b9173&gt;] qla_tgt_sess_put+0xc3/0x140 [qla2xxx]
     [&lt;ffffffffa01bf40f&gt;] qla_tgt_stop_phase1+0x8f/0x2c0 [qla2xxx]
     [&lt;ffffffffa00f735e&gt;] tcm_qla2xxx_tpg_store_enable+0x6e/0xd0 [tcm_qla2xxx]
     [&lt;ffffffffa026ca29&gt;] target_fabric_tpg_attr_store+0x39/0x40 [target_core_mod]
     [&lt;ffffffffa00a575d&gt;] configfs_write_file+0xbd/0x120 [configfs]
     [&lt;ffffffff811464a6&gt;] vfs_write+0xc6/0x180
     [&lt;ffffffff811467c1&gt;] sys_write+0x51/0x90
     [&lt;ffffffff814dd382&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At least the tcm_qla2xxx fabric driver calls into transport_deregister_session()
while holding an IRQ-disabled spinlock, so the inner locking needs to
use spin_lock_irqsave() instead of spin_lock_bh().

This fixes warnings seen with tcm_qla2xxx like:

    WARNING: at kernel/softirq.c:159 local_bh_enable_ip+0x98/0xb0()
    Call Trace:
     [&lt;ffffffff8104e65f&gt;] warn_slowpath_common+0x7f/0xc0
     [&lt;ffffffff8104e6ba&gt;] warn_slowpath_null+0x1a/0x20
     [&lt;ffffffff81055368&gt;] local_bh_enable_ip+0x98/0xb0
     [&lt;ffffffff814d5284&gt;] _raw_spin_unlock_bh+0x14/0x20
     [&lt;ffffffffa027b7f6&gt;] transport_deregister_session+0x96/0x180 [target_core_mod]
     [&lt;ffffffffa00f7731&gt;] tcm_qla2xxx_free_session+0xd1/0x170 [tcm_qla2xxx]
     [&lt;ffffffffa01b9173&gt;] qla_tgt_sess_put+0xc3/0x140 [qla2xxx]
     [&lt;ffffffffa01bf40f&gt;] qla_tgt_stop_phase1+0x8f/0x2c0 [qla2xxx]
     [&lt;ffffffffa00f735e&gt;] tcm_qla2xxx_tpg_store_enable+0x6e/0xd0 [tcm_qla2xxx]
     [&lt;ffffffffa026ca29&gt;] target_fabric_tpg_attr_store+0x39/0x40 [target_core_mod]
     [&lt;ffffffffa00a575d&gt;] configfs_write_file+0xbd/0x120 [configfs]
     [&lt;ffffffff811464a6&gt;] vfs_write+0xc6/0x180
     [&lt;ffffffff811467c1&gt;] sys_write+0x51/0x90
     [&lt;ffffffff814dd382&gt;] system_call_fastpath+0x16/0x1b

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tcm_fc: init/exit functions should not be protected by "#ifdef MODULE"</title>
<updated>2011-08-22T19:26:32+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-08-12T17:16:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=4e0f05297ff615a9a4e269da301ff77f660a3ab0'/>
<id>4e0f05297ff615a9a4e269da301ff77f660a3ab0</id>
<content type='text'>
There's no need for the #ifdef protection when building into the kernel,
and in fact we need the module_init() for the initialization function to
be called.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's no need for the #ifdef protection when building into the kernel,
and in fact we need the module_init() for the initialization function to
be called.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Print subpage too for unhandled MODE SENSE pages</title>
<updated>2011-08-22T19:26:31+00:00</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2011-08-12T17:01:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=f15ea5780d08e4c96930c0d607d05e480ec588c8'/>
<id>f15ea5780d08e4c96930c0d607d05e480ec588c8</id>
<content type='text'>
Make a log message more useful by printing both the page and subpage
that an initiator is requesting.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make a log message more useful by printing both the page and subpage
that an initiator is requesting.

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: Fix iscsit_allocate_se_cmd_for_tmr failure path bugs</title>
<updated>2011-08-22T19:26:30+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>error27@gmail.com</email>
</author>
<published>2011-08-14T05:35:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=ba7736696341ad4253125055c0c85aa9f42959a0'/>
<id>ba7736696341ad4253125055c0c85aa9f42959a0</id>
<content type='text'>
This patch fixes two bugs in allocation failure handling in
iscsit_allocate_se_cmd_for_tmr():

This first reported by DanC is a free-after call to transport_free_se_cmd(), this
patch drops the transport_free_se_cmd() call all together, as iscsit_release_cmd()
will release existing allocations as expected.

The second is a bug where iscsi_cmd_t was being leaked on a cmd-&gt;tmr_req allocation
failure, so make this jump to iscsit_release_cmd() as well.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes two bugs in allocation failure handling in
iscsit_allocate_se_cmd_for_tmr():

This first reported by DanC is a free-after call to transport_free_se_cmd(), this
patch drops the transport_free_se_cmd() call all together, as iscsit_release_cmd()
will release existing allocations as expected.

The second is a bug where iscsi_cmd_t was being leaked on a cmd-&gt;tmr_req allocation
failure, so make this jump to iscsit_release_cmd() as well.

Signed-off-by: Dan Carpenter &lt;error27@gmail.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>iscsi-target: Implement iSCSI target IPv6 address printing.</title>
<updated>2011-08-22T19:26:29+00:00</updated>
<author>
<name>Chris Boot</name>
<email>bootc@bootc.net</email>
</author>
<published>2011-08-14T05:10:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=6626a0572657a0945a7b9ccf4a6d6ad1750f9adc'/>
<id>6626a0572657a0945a7b9ccf4a6d6ad1750f9adc</id>
<content type='text'>
The iSCSI target configfs code to print out an initiator's IPv6 address
is not fully implemented. This patch uses snprintf() with the "%pI6c"
format string to format the IPv6 address for display purposes.

Signed-off-by: Chris Boot &lt;bootc@bootc.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The iSCSI target configfs code to print out an initiator's IPv6 address
is not fully implemented. This patch uses snprintf() with the "%pI6c"
format string to format the IPv6 address for display purposes.

Signed-off-by: Chris Boot &lt;bootc@bootc.net&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Fix task SGL chaining breakage with transport_allocate_data_tasks</title>
<updated>2011-08-22T19:26:28+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-08-13T12:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=c3c74c7a33d837be391ab61aaae39bb21f16736a'/>
<id>c3c74c7a33d837be391ab61aaae39bb21f16736a</id>
<content type='text'>
This patch fixes two bugs associated with transport_do_task_sg_chain()
operation where transport_allocate_data_tasks() was incorrectly setting
task_padded_sg for all tasks, and causing bogus task-&gt;task_sg_nents
assignments + OOPsen with fabrics depending upon this code.  The first bit
here adds a task_sg_nents_padded check in transport_allocate_data_tasks()
to include an extra SGL vector when necessary for tasks that expect to
be linked using sg_chain().

The second change involves making transport_do_task_sg_chain() properly
account for the extra SGL vector when task-&gt;task_padded_sg is set for
the non trailing -&gt;task_sg or single -&gt;task_sg allocations.  Note this
patch also removes the BUG_ON(!task-&gt;task_padded_sg) check within
transport_do_task_sg_chain() as we expect this to happen normally
with the updated logic in transport_allocate_data_tasks(), along with
being bogus for CONTROL_SG_IO_CDB type payloads.

So far this bugfix has been tested with tcm_qla2xxx and iblock backends
in (task_count &gt; 1)( and (task_count == 1) operation.

Reported-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes two bugs associated with transport_do_task_sg_chain()
operation where transport_allocate_data_tasks() was incorrectly setting
task_padded_sg for all tasks, and causing bogus task-&gt;task_sg_nents
assignments + OOPsen with fabrics depending upon this code.  The first bit
here adds a task_sg_nents_padded check in transport_allocate_data_tasks()
to include an extra SGL vector when necessary for tasks that expect to
be linked using sg_chain().

The second change involves making transport_do_task_sg_chain() properly
account for the extra SGL vector when task-&gt;task_padded_sg is set for
the non trailing -&gt;task_sg or single -&gt;task_sg allocations.  Note this
patch also removes the BUG_ON(!task-&gt;task_padded_sg) check within
transport_do_task_sg_chain() as we expect this to happen normally
with the updated logic in transport_allocate_data_tasks(), along with
being bogus for CONTROL_SG_IO_CDB type payloads.

So far this bugfix has been tested with tcm_qla2xxx and iblock backends
in (task_count &gt; 1)( and (task_count == 1) operation.

Reported-by: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Fix task count &gt; 1 handling breakage and use max_sector page alignment</title>
<updated>2011-08-22T19:26:27+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-08-13T09:11:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=525a48a21da259d00d6ebc5b60563b5bcf022c26'/>
<id>525a48a21da259d00d6ebc5b60563b5bcf022c26</id>
<content type='text'>
This patch addresses recent breakage with multiple se_task (task_count &gt; 1)
operation following backend dev-&gt;se_sub_dev-&gt;se_dev_attrib.max_sectors in new
transport_allocate_data_tasks() code.  The initial bug here was a bogus
task-&gt;task_sg_nents assignment in transport_allocate_data_tasks() based on
the passed parameter, which now uses DIV_ROUND_UP(task_size, PAGE_SIZE) to
determine the proper number of per task SGL entries for the (task_count &gt; 1)
case.

This also means we now need to enforce a PAGE_SIZE aligned max_sector count
value for this to work as expected without bringing back the pre v3.1
transport_map_mem_to_sg() logic to handle SGL offsets across multiple tasks.
So this patch adds se_dev_align_max_sectors() to round down max_sectors as
necessary to ensure this alignment via se_dev_set_default_attribs() and
se_dev_align_max_sectors() and keeps it simple for (task_count &gt; 1)
operation.

So far this bugfix has been tested with (task_count &gt; 1) operation
using iscsi-target and iblock backends.

Reported-by: Chris Boot &lt;bootc@bootc.net&gt;
Cc: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch addresses recent breakage with multiple se_task (task_count &gt; 1)
operation following backend dev-&gt;se_sub_dev-&gt;se_dev_attrib.max_sectors in new
transport_allocate_data_tasks() code.  The initial bug here was a bogus
task-&gt;task_sg_nents assignment in transport_allocate_data_tasks() based on
the passed parameter, which now uses DIV_ROUND_UP(task_size, PAGE_SIZE) to
determine the proper number of per task SGL entries for the (task_count &gt; 1)
case.

This also means we now need to enforce a PAGE_SIZE aligned max_sector count
value for this to work as expected without bringing back the pre v3.1
transport_map_mem_to_sg() logic to handle SGL offsets across multiple tasks.
So this patch adds se_dev_align_max_sectors() to round down max_sectors as
necessary to ensure this alignment via se_dev_set_default_attribs() and
se_dev_align_max_sectors() and keeps it simple for (task_count &gt; 1)
operation.

So far this bugfix has been tested with (task_count &gt; 1) operation
using iscsi-target and iblock backends.

Reported-by: Chris Boot &lt;bootc@bootc.net&gt;
Cc: Kiran Patil &lt;kiran.patil@intel.com&gt;
Cc: Andy Grover &lt;agrover@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Add missing DATA_SG_IO transport_cmd_get_valid_sectors check</title>
<updated>2011-08-22T19:26:26+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-08-10T07:59:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=01cde4d54327884a0b61ce8666092f5703557d4b'/>
<id>01cde4d54327884a0b61ce8666092f5703557d4b</id>
<content type='text'>
This patch adds the missing transport_cmd_get_valid_sectors() check for
SCF_SCSI_DATA_SG_IO_CDB type payloads to ensure that a received LBA + range
does not exeed past the end of associated backend struct se_device.

This patch also fixes a bug in the failure path of transport_new_cmd_obj()
where this check can fail, so change to use a signed 'rc' and return '-EINVAL'
to signal proper transport_generic_request_failure() handling.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch adds the missing transport_cmd_get_valid_sectors() check for
SCF_SCSI_DATA_SG_IO_CDB type payloads to ensure that a received LBA + range
does not exeed past the end of associated backend struct se_device.

This patch also fixes a bug in the failure path of transport_new_cmd_obj()
where this check can fail, so change to use a signed 'rc' and return '-EINVAL'
to signal proper transport_generic_request_failure() handling.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>target: Fix SYNCHRONIZE_CACHE zero LBA + range breakage</title>
<updated>2011-08-22T19:26:25+00:00</updated>
<author>
<name>Nicholas Bellinger</name>
<email>nab@linux-iscsi.org</email>
</author>
<published>2011-08-11T01:41:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7abbe7f3e4243e28a9169ee1b8d76f10a6f5d37c'/>
<id>7abbe7f3e4243e28a9169ee1b8d76f10a6f5d37c</id>
<content type='text'>
This patch fixes a SYNCHRONIZE_CACHE CDB handling bug with IBLOCK/FILEIO
backends where transport_cmd_get_valid_sectors() was incorrectly rejecting
a zero LBA + range CDB from being processed, and returning CHECK_CONDITION.

This includes changing transport_cmd_get_valid_sectors() to return '0' on
success and '-EINVAL' on failure (this makes more sense than sectors),
and to only check transport_cmd_get_valid_sectors() when a non zero LBA +
range SYNCHRONIZE_CACHE operation has been receieved for the non passthrough
case.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch fixes a SYNCHRONIZE_CACHE CDB handling bug with IBLOCK/FILEIO
backends where transport_cmd_get_valid_sectors() was incorrectly rejecting
a zero LBA + range CDB from being processed, and returning CHECK_CONDITION.

This includes changing transport_cmd_get_valid_sectors() to return '0' on
success and '-EINVAL' on failure (this makes more sense than sectors),
and to only check transport_cmd_get_valid_sectors() when a non zero LBA +
range SYNCHRONIZE_CACHE operation has been receieved for the non passthrough
case.

Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
