<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/target/target_core_file.c, branch linux-3.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-3.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2014-06-11T19:04:21Z</updated>
<entry>
<title>target/file: Fix 32-bit highmem breakage for SGL -&gt; iovec mapping</title>
<updated>2014-06-11T19:04:21Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2012-12-05T11:08:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=82b9ccd651eb90f28b4336554d82ea0ab9067c63'/>
<id>urn:sha1:82b9ccd651eb90f28b4336554d82ea0ab9067c63</id>
<content type='text'>
commit 40ff2c3b3da35dd3a00ac6722056a59b4b3f2caf upstream.

This patch changes vectored file I/O to use kmap + kunmap when mapping
incoming SGL memory -&gt; struct iovec in order to properly support 32-bit
highmem configurations.  This is because an extra bounce buffer may be
required when processing scatterlist pages allocated with GFP_KERNEL.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
[bwh: Backported to 3.2: use task-&gt;task_sg{,_nents} for iteration]
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Rui Xiang &lt;rui.xiang@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target/file: Re-enable optional fd_buffered_io=1 operation</title>
<updated>2014-02-20T18:45:33Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2012-09-30T00:15:37Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=230a0c3b5881b5493c06d382d799305b4ee603c5'/>
<id>urn:sha1:230a0c3b5881b5493c06d382d799305b4ee603c5</id>
<content type='text'>
commit b32f4c7ed85c5cee2a21a55c9f59ebc9d57a2463 upstream.

This patch re-adds the ability to optionally run in buffered FILEIO mode
(eg: w/o O_DSYNC) for device backends in order to once again use the
Linux buffered cache as a write-back storage mechanism.

This logic was originally dropped with mainline v3.5-rc commit:

commit a4dff3043c231d57f982af635c9d2192ee40e5ae
Author: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Date:   Wed May 30 16:25:41 2012 -0700

    target/file: Use O_DSYNC by default for FILEIO backends

This difference with this patch is that fd_create_virtdevice() now
forces the explicit setting of emulate_write_cache=1 when buffered FILEIO
operation has been enabled.

(v2: Switch to FDBD_HAS_BUFFERED_IO_WCE + add more detailed
     comment as requested by hch)

Reported-by: Ferry &lt;iscsitmp@bananateam.nl&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
Cc: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target/file: Use O_DSYNC by default for FILEIO backends</title>
<updated>2014-02-20T18:45:33Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2012-05-30T23:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45a0374fd5ee6c27349dc41e31db0bd0c87663ca'/>
<id>urn:sha1:45a0374fd5ee6c27349dc41e31db0bd0c87663ca</id>
<content type='text'>
commit a4dff3043c231d57f982af635c9d2192ee40e5ae upstream.

Convert to use O_DSYNC for all cases at FILEIO backend creation time to
avoid the extra syncing of pure timestamp updates with legacy O_SYNC during
default operation as recommended by hch.  Continue to do this independently of
Write Cache Enable (WCE) bit, as WCE=0 is currently the default for all backend
devices and enabled by user on per device basis via attrib/emulate_write_cache.

This patch drops the now unnecessary fd_buffered_io= token usage that was
originally signalling when to explictly disable O_SYNC at backend creation
time for buffered I/O operation.  This can end up being dangerous for a number
of reasons during physical node failure, so go ahead and drop this option
for now when O_DSYNC is used as the default.

Also allow explict FUA WRITEs -&gt; vfs_fsync_range() call to function in
fd_execute_cmd() independently of WCE bit setting.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Ben Hutchings &lt;ben@decadent.org.uk&gt;
[bwh: Backported to 3.2:
 - We have fd_do_task() and not fd_execute_cmd()
 - Various fields are in struct se_task rather than struct se_cmd
 - fd_create_virtdevice() flags initialisation hasn't been cleaned up]
Cc: Li Zefan &lt;lizefan@huawei.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix bug in handling of FILEIO + block_device resize ops</title>
<updated>2012-05-17T19:02:43Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2012-05-16T23:05:26Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58'/>
<id>urn:sha1:cd9323fd68aee3c1c6b5b21e5746c9d1b586fb58</id>
<content type='text'>
This patch fixes a bug in the handling of FILEIO w/ underlying block_device
resize operations where the original fd_dev-&gt;fd_dev_size was incorrectly being
used in fd_get_blocks() for READ_CAPACITY response payloads.

This patch avoids using fd_dev-&gt;fd_dev_size for FILEIO devices with
an underlying block_device, and instead changes fd_get_blocks() to
get the sector count directly from i_size_read() as recommended by hch.

Reported-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove useless casts</title>
<updated>2011-12-14T11:28:07Z</updated>
<author>
<name>Jörn Engel</name>
</author>
<published>2011-11-24T01:05:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8359cf43b9dccddeebb0d247146719a14ce6371a'/>
<id>urn:sha1:8359cf43b9dccddeebb0d247146719a14ce6371a</id>
<content type='text'>
A reader should spend an extra moment whenever noticing a cast,
because either something special is going on that deserves extra
attention or, as is all too often the case, the code is wrong.

These casts, afaics, have all been useless.  They cast a foo* to a
foo*, cast a void* to the assigned type, cast a foo* to void*, before
assigning it to a void* variable, etc.

In a few cases I also removed an additional &amp;...[0], which is equally
useless.

Lastly I added three FIXMEs where, to the best of my judgement, the
code appears to have a bug.  It would be good if someone could check
these.

Signed-off-by: Joern Engel &lt;joern@logfs.org&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: use \n as a separator for configuration</title>
<updated>2011-12-14T11:27:23Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-23T19:53:17Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=90c161b643d9531d271110876a14e68b49172d8a'/>
<id>urn:sha1:90c161b643d9531d271110876a14e68b49172d8a</id>
<content type='text'>
The command
| echo rd_pages=32768 &gt; ramdisk/control

Does not work because it writes "rd_pages=32768\n" and the parser which
matches for "rd_pages=%d" does not recognize it due to the \n. One way
of fixing this would be using "echo -n" instead.
This patch adds \n to the list of separators so we don't have to use the
-n argument which I find is more convinient.

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: header reshuffle, part2</title>
<updated>2011-12-14T11:26:05Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-11-16T14:46:48Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4795fb20edf2fe2c862c8fe9f8b681edeb79ac1'/>
<id>urn:sha1:c4795fb20edf2fe2c862c8fe9f8b681edeb79ac1</id>
<content type='text'>
This reorganized the headers under include/target into:

 - target_core_base.h stays as is with all target-wide data stuctures and defines
 - target_core_backend.h contains the whole interface to I/O backends
 - target_core_fabric.h contains the whole interface to fabric modules

Except for those only the various configfs macro headers stay around.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target/file: walk properly over sg list</title>
<updated>2011-12-06T06:00:57Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
</author>
<published>2011-11-28T11:33:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9649fa1b8764f64c8cc4293e197e14cd46fe7205'/>
<id>urn:sha1:9649fa1b8764f64c8cc4293e197e14cd46fe7205</id>
<content type='text'>
This patch changes fileio to use for_each_sg() when walking se_task-&gt;task_sg
memory passed into from loopback LLD struct scsi_cmnd scatterlist memory.

This addresses an issue where FILEIO backends with loopback where hitting the
following OOPs with mkfs.ext2:

|kernel BUG at include/linux/scatterlist.h:97!
|invalid opcode: 0000 [#1] PREEMPT SMP
|Modules linked in: sd_mod tcm_loop target_core_stgt scsi_tgt target_core_pscsi target_core_file target_core_iblock target_core_mod configfs scsi_mod
|
|Pid: 671, comm: LIO_fileio Not tainted 3.1.0-rc10+ #139 Bochs Bochs
|EIP: 0060:[&lt;e0afd746&gt;] EFLAGS: 00010202 CPU: 0
|EIP is at fd_do_task+0x396/0x420 [target_core_file]
| [&lt;e0aa7884&gt;] __transport_execute_tasks+0xd4/0x190 [target_core_mod]
| [&lt;e0aa797c&gt;] transport_execute_tasks+0x3c/0xf0 [target_core_mod]
|EIP: [&lt;e0afd746&gt;] fd_do_task+0x396/0x420 [target_core_file] SS:ESP 0068:dea47e90

Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: remove the t_tasks_fua se_cmd field</title>
<updated>2011-12-06T06:00:52Z</updated>
<author>
<name>Christoph Hellwig</name>
</author>
<published>2011-11-14T16:36:29Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d3a4b51df4db2ee0415f42a63b9629a7977b975'/>
<id>urn:sha1:2d3a4b51df4db2ee0415f42a63b9629a7977b975</id>
<content type='text'>
And use a SCF_FUA flag instead.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
<entry>
<title>target: Address legacy PYX_TRANSPORT_* return code breakage</title>
<updated>2011-12-06T06:00:49Z</updated>
<author>
<name>Nicholas Bellinger</name>
</author>
<published>2011-11-04T09:36:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=03e98c9eb916f3f0868c1dc344dde2a60287ff72'/>
<id>urn:sha1:03e98c9eb916f3f0868c1dc344dde2a60287ff72</id>
<content type='text'>
This patch removes legacy usage of PYX_TRANSPORT_* return codes in a number
of locations and addresses cases where transport_generic_request_failure()
was returning the incorrect sense upon CHECK_CONDITION status after the
v3.1 converson to use errno return codes.

This includes the conversion of transport_generic_request_failure() to
process cmd-&gt;scsi_sense_reason and handle extra TCM_RESERVATION_CONFLICT
before calling transport_send_check_condition_and_sense() to queue up
response status.  It also drops PYX_TRANSPORT_OUT_OF_MEMORY_RESOURCES legacy
usgae, and returns TCM_LOGICAL_UNIT_COMMUNICATION_FAILURE w/ a response
for these cases.

transport_generic_allocate_tasks(), transport_generic_new_cmd(), backend
SCF_SCSI_DATA_SG_IO_CDB -&gt;do_task(), and emulated -&gt;execute_task() have
all been updated to set se_cmd-&gt;scsi_sense_reason and return errno codes
universally upon failure.  This includes cmd-&gt;scsi_sense_reason assignment
in target_core_alua.c, target_core_pr.c and target_core_cdb.c emulation code.

Finally it updates fabric modules to remove the legacy usage, and for
TFO-&gt;new_cmd_map() callers forwards return values outside of fabric code.
iscsi-target has also been updated to remove a handful of special cases
related to the cleanup and signaling QUEUE_FULL handling w/ ft_write_pending()

(v2: Drop extra SCF_SCSI_CDB_EXCEPTION check during failure from
     transport_generic_new_cmd, and re-add missing task-&gt;task_error_status
     assignment in transport_complete_task)

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@kernel.org
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
</content>
</entry>
</feed>
