Revision tags: v3.7-rc7 |
|
#
3a41d85f |
| 17-Nov-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target/iblock: Forward declare bio helpers Go ahead and forward declare the handful of helper functions required for bio submission code in order to avoid the extra function prototypes.
target/iblock: Forward declare bio helpers Go ahead and forward declare the handful of helper functions required for bio submission code in order to avoid the extra function prototypes. Reported-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.7-rc6, v3.7-rc5 |
|
#
fd9a11d7 |
| 09-Nov-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target: Update copyright information to 2012 v2: Use correct target_core_stat.c 2006 copyright year v3: Drop extra unnessary legal verbage from header (hch) Cc: Christoph Hellwi
target: Update copyright information to 2012 v2: Use correct target_core_stat.c 2006 copyright year v3: Drop extra unnessary legal verbage from header (hch) Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
f6970ad3 |
| 07-Nov-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within iblock_execute_write_same() backend code. The em
target/iblock: Add WRITE_SAME w/ UNMAP=0 emulation support This patch adds support for emulation of WRITE_SAME w/ UNMAP=0 within iblock_execute_write_same() backend code. The emulation uses a bio_add_page() call for each sector, and by default enforces a limit of max_write_same_len=0xFFFF (65536) sectors following what scsi_debug reports per default for MAXIMUM WRITE SAME LENGTH. It also sets max_write_same_len to the operational default at setup -> iblock_configure_device() time. (hch: Move unmap logic into iblock_execute_write_same_unmap + add check for single sector SGLs in iblock_execute_write_same) (mkp: Update comment for 0xFFFF magic constant) (nab: drop left-over max_write_same_len check in iblock_execute_write_same) Cc: Christoph Hellwig <hch@lst.de> Cc: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
de103c93 |
| 06-Nov-2012 |
Christoph Hellwig <hch@lst.de> |
target: pass sense_reason as a return value Pass the sense reason as an explicit return value from the I/O submission path instead of storing it in struct se_cmd and using negative retur
target: pass sense_reason as a return value Pass the sense reason as an explicit return value from the I/O submission path instead of storing it in struct se_cmd and using negative return values. This cleans up a lot of the code pathes, and with the sparse annotations for the new sense_reason_t type allows for much better error checking. (nab: Convert spc_emulate_modesense + spc_emulate_modeselect to use sense_reason_t with Roland's MODE SELECT changes) Signed-off-by: Christoph Hellwig <hch@lst.de> Cc: Roland Dreier <roland@purestorage.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.7-rc4, v3.7-rc3, v3.7-rc2, v3.7-rc1 |
|
#
48c2567d |
| 10-Oct-2012 |
Christoph Hellwig <hch@infradead.org> |
target: remove ->get_device_rev Now that the reservations and ALUA code have been cleaned up there is no need for the get_device_rev method, as we only need the standards revision in the
target: remove ->get_device_rev Now that the reservations and ALUA code have been cleaned up there is no need for the get_device_rev method, as we only need the standards revision in the inquiry data, where we can hardcode it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
6f23ac8a |
| 07-Oct-2012 |
Christoph Hellwig <hch@infradead.org> |
target: provide generic sbc device type/revision helpers Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
|
#
9e999a6c |
| 07-Oct-2012 |
Christoph Hellwig <hch@infradead.org> |
target: rename spc_ops These really are sbc_ops, so name them correctly. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
|
#
0fd97ccf |
| 07-Oct-2012 |
Christoph Hellwig <hch@infradead.org> |
target: kill struct se_subsystem_dev Simplify the code a lot by killing the superflous struct se_subsystem_dev. Instead se_device is allocated early on by the backend driver, which alloc
target: kill struct se_subsystem_dev Simplify the code a lot by killing the superflous struct se_subsystem_dev. Instead se_device is allocated early on by the backend driver, which allocates it as part of its own per-device structure, borrowing the scheme that is for example used for inode allocation. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
ce40be7a |
| 10-Oct-2012 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge branch 'for-3.7/core' of git://git.kernel.dk/linux-block Pull block IO update from Jens Axboe: "Core block IO bits for 3.7. Not a huge round this time, it contains: -
Merge branch 'for-3.7/core' of git://git.kernel.dk/linux-block Pull block IO update from Jens Axboe: "Core block IO bits for 3.7. Not a huge round this time, it contains: - First series from Kent cleaning up and generalizing bio allocation and freeing. - WRITE_SAME support from Martin. - Mikulas patches to prevent O_DIRECT crashes when someone changes the block size of a device. - Make bio_split() work on data-less bio's (like trim/discards). - A few other minor fixups." Fixed up silent semantic mis-merge as per Mikulas Patocka and Andrew Morton. It is due to the VM no longer using a prio-tree (see commit 6b2dbba8b6ac: "mm: replace vma prio_tree with an interval tree"). So make set_blocksize() use mapping_mapped() instead of open-coding the internal VM knowledge that has changed. * 'for-3.7/core' of git://git.kernel.dk/linux-block: (26 commits) block: makes bio_split support bio without data scatterlist: refactor the sg_nents scatterlist: add sg_nents fs: fix include/percpu-rwsem.h export error percpu-rw-semaphore: fix documentation typos fs/block_dev.c:1644:5: sparse: symbol 'blkdev_mmap' was not declared blockdev: turn a rw semaphore into a percpu rw semaphore Fix a crash when block device is read and block size is changed at the same time block: fix request_queue->flags initialization block: lift the initial queue bypass mode on blk_register_queue() instead of blk_init_allocated_queue() block: ioctl to zero block ranges block: Make blkdev_issue_zeroout use WRITE SAME block: Implement support for WRITE SAME block: Consolidate command flag and queue limit checks for merges block: Clean up special command handling logic block/blk-tag.c: Remove useless kfree block: remove the duplicated setting for congestion_threshold block: reject invalid queue attribute values block: Add bio_clone_bioset(), bio_clone_kmalloc() block: Consolidate bio_alloc_bioset(), bio_kmalloc() ...
show more ...
|
Revision tags: v3.6, v3.6-rc7, v3.6-rc6, v3.6-rc5 |
|
#
e0de4457 |
| 07-Sep-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
target: do not submit a zero-bio I/O request scsi_setup_fs_cmnd does not like to receive requests with no bios attached to it. Special-case zero-length reads and writes, by not subm
target: do not submit a zero-bio I/O request scsi_setup_fs_cmnd does not like to receive requests with no bios attached to it. Special-case zero-length reads and writes, by not submitting any bio. Testcase: sg_raw /dev/sdb 28 00 00 00 00 00 00 00 00 00 should not fail panics with the rest of the series but not this patch behaves correctly without or with this series Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.6-rc4 |
|
#
fd30e931 |
| 26-Aug-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target: Drop se_subsystem_api->[write_cache,fua_write]_emulated flags This patch drops se_subsystem_api->[write_cache,fua_write]_emulated flags set by viritual FILEIO/IBLOCK/RD_MCP backe
target: Drop se_subsystem_api->[write_cache,fua_write]_emulated flags This patch drops se_subsystem_api->[write_cache,fua_write]_emulated flags set by viritual FILEIO/IBLOCK/RD_MCP backend drivers in favor of explict TRANSPORT_PLUGIN_PHBA_PDEV checks to know when to fail if userspace is attempting to set virtual emulation bits for an pSCSI (passthrough) backend device. Reported-by: Christoph Hellwig <hch@lst.de> Cc: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
852b6ed1 |
| 22-Aug-2012 |
Nicholas Bellinger <nab@linux-iscsi.org> |
target/iblock: Use match_strlcpy for Opt_udev_path string assignment Following commit dbc6e0222 from Al Viro for fileio, go ahead and make Opt_udev_path within iblock_set_configfs_dev_pa
target/iblock: Use match_strlcpy for Opt_udev_path string assignment Following commit dbc6e0222 from Al Viro for fileio, go ahead and make Opt_udev_path within iblock_set_configfs_dev_params use match_strlcpy instead of the match_strdup -> snprintf -> kfree equivalent. Reported-by: Al Viro <viro@zeniv.linux.org.uk> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
395c72a7 |
| 06-Sep-2012 |
Kent Overstreet <koverstreet@google.com> |
block: Generalized bio pool freeing With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio w
block: Generalized bio pool freeing With the old code, when you allocate a bio from a bio pool you have to implement your own destructor that knows how to find the bio pool the bio was originally allocated from. This adds a new field to struct bio (bi_pool) and changes bio_alloc_bioset() to use it. This makes various bio destructors unnecessary, so they're then deleted. v6: Explain the temporary if statement in bio_put Signed-off-by: Kent Overstreet <koverstreet@google.com> CC: Jens Axboe <axboe@kernel.dk> CC: NeilBrown <neilb@suse.de> CC: Alasdair Kergon <agk@redhat.com> CC: Nicholas Bellinger <nab@linux-iscsi.org> CC: Lars Ellenberg <lars.ellenberg@linbit.com> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: Nicholas Bellinger <nab@linux-iscsi.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
0d7f1299 |
| 07-Sep-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
target: report too-small parameter lists everywhere Several places were not checking that the parameter list length was large enough, and thus accessing invalid memory. Zero-length
target: report too-small parameter lists everywhere Several places were not checking that the parameter list length was large enough, and thus accessing invalid memory. Zero-length parameter lists are just a special case of this. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.6-rc3, v3.6-rc2, v3.6-rc1, v3.5 |
|
#
7409a665 |
| 16-Jul-2012 |
Roland Dreier <roland@purestorage.com> |
target: Check number of unmap descriptors against our limit Fail UNMAP commands that have more than our reported limit on unmap descriptors. Signed-off-by: Roland Dreier <roland
target: Check number of unmap descriptors against our limit Fail UNMAP commands that have more than our reported limit on unmap descriptors. Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
b7fc7f37 |
| 16-Jul-2012 |
Roland Dreier <roland@purestorage.com> |
target: Fix possible integer underflow in UNMAP emulation It's possible for an initiator to send us an UNMAP command with a descriptor that is less than 8 bytes; in that case it's really
target: Fix possible integer underflow in UNMAP emulation It's possible for an initiator to send us an UNMAP command with a descriptor that is less than 8 bytes; in that case it's really bad for us to set an unsigned int to that value, subtract 8 from it, and then use that as a limit for our loop (since the value will wrap around to a huge positive value). Fix this by making size be signed and only looping if size >= 16 (ie if we have at least a full descriptor available). Also remove offset as an obfuscated name for the constant 8. Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
1a5fa457 |
| 16-Jul-2012 |
Roland Dreier <roland@purestorage.com> |
target: Fix reading of data length fields for UNMAP commands The UNMAP DATA LENGTH and UNMAP BLOCK DESCRIPTOR DATA LENGTH fields are in the unmap descriptor (the payload transferred to o
target: Fix reading of data length fields for UNMAP commands The UNMAP DATA LENGTH and UNMAP BLOCK DESCRIPTOR DATA LENGTH fields are in the unmap descriptor (the payload transferred to our data out buffer), not in the CDB itself. Read them from the correct place in target_emulated_unmap. Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
2594e298 |
| 16-Jul-2012 |
Roland Dreier <roland@purestorage.com> |
target: Add range checking to UNMAP emulation When processing an UNMAP command, we need to make sure that the number of blocks we're asked to UNMAP does not exceed our reported maximum
target: Add range checking to UNMAP emulation When processing an UNMAP command, we need to make sure that the number of blocks we're asked to UNMAP does not exceed our reported maximum number of blocks per UNMAP, and that the range of blocks we're unmapping doesn't go past the end of the device. Signed-off-by: Roland Dreier <roland@purestorage.com> Cc: stable@vger.kernel.org Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.5-rc7, v3.5-rc6, v3.5-rc5, v3.5-rc4 |
|
#
14150a6b |
| 17-Jun-2012 |
Christoph Hellwig <hch@infradead.org> |
target: move unmap to struct spc_ops Having all the unmap payload parsing in the backed is a bit ugly, but until more drivers support it and we can find a good interface for all of them
target: move unmap to struct spc_ops Having all the unmap payload parsing in the backed is a bit ugly, but until more drivers support it and we can find a good interface for all of them that seems the way to go. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
6f974e8c |
| 17-Jun-2012 |
Christoph Hellwig <hch@infradead.org> |
target: move write_same to struct spc_ops Add spc_ops->execute_write_same() caller for ->execute_cmd() setup, and update IBLOCK backends to use it. (nab: add export of spc_get_w
target: move write_same to struct spc_ops Add spc_ops->execute_write_same() caller for ->execute_cmd() setup, and update IBLOCK backends to use it. (nab: add export of spc_get_write_same_sectors symbol) (roland: Carry forward: Fix range calculation in WRITE SAME emulation when num blocks == 0) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
ad67f0d9 |
| 17-Jun-2012 |
Christoph Hellwig <hch@infradead.org> |
target: move sync_cache to struct spc_ops Add spc_ops->execute_sync_cache() caller for ->execute_cmd() setup, and update IBLOCK + FILEIO backends to use it. Signed-off-by: Chris
target: move sync_cache to struct spc_ops Add spc_ops->execute_sync_cache() caller for ->execute_cmd() setup, and update IBLOCK + FILEIO backends to use it. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
#
0c2ad7d1 |
| 17-Jun-2012 |
Christoph Hellwig <hch@infradead.org> |
target: add struct spc_ops + initial ->execute_rw pointer usage Remove the execute_cmd method in struct se_subsystem_api, and always use the one directly in struct se_cmd. To make life
target: add struct spc_ops + initial ->execute_rw pointer usage Remove the execute_cmd method in struct se_subsystem_api, and always use the one directly in struct se_cmd. To make life simpler for SBC virtual backends a struct spc_ops that is passed to sbc_parse_cmd is added. For now it only contains an execute_rw member, but more will follow with the subsequent commits. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.5-rc3, v3.5-rc2 |
|
#
44bfd018 |
| 07-Jun-2012 |
Andy Grover <agrover@redhat.com> |
target/iblock: Add parameter to specify read-only devices see https://bugzilla.redhat.com/show_bug.cgi?id=818855 Adds a parameter so read-only block devices may be registered as
target/iblock: Add parameter to specify read-only devices see https://bugzilla.redhat.com/show_bug.cgi?id=818855 Adds a parameter so read-only block devices may be registered as LIO backstores. Signed-off-by: Andy Grover <agrover@redhat.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.5-rc1, v3.4 |
|
#
d6e0175c |
| 20-May-2012 |
Christoph Hellwig <hch@infradead.org> |
target: add a parse_cdb method to the backend drivers Instead of trying to handle all SCSI command sets in one function (transport_generic_cmd_sequencer) call out to the backend driver t
target: add a parse_cdb method to the backend drivers Instead of trying to handle all SCSI command sets in one function (transport_generic_cmd_sequencer) call out to the backend driver to perform this functionality. For pSCSI a copy of the existing code is used, but for all virtual backends we can use a new parse_sbc_cdb helper is used to provide a simple SBC emulation. For now this setups means a fair amount of duplication between pSCSI and the SBC library, but patches later in this series will sort out that problem. (nab: Fix up build failure in target_core_pscsi.c) Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|
Revision tags: v3.4-rc7, v3.4-rc6, v3.4-rc5 |
|
#
5787cacd |
| 23-Apr-2012 |
Christoph Hellwig <hch@infradead.org> |
target: remove struct se_task We can use struct se_cmd for everything it did. Make sure to pass the S/G list and data direction to the execution function to ease adding back BIDI su
target: remove struct se_task We can use struct se_cmd for everything it did. Make sure to pass the S/G list and data direction to the execution function to ease adding back BIDI support later on. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
show more ...
|