diff options
author | Nicholas Bellinger | 2013-05-30 06:35:23 +0200 |
---|---|---|
committer | Nicholas Bellinger | 2013-05-31 02:46:27 +0200 |
commit | 21363ca873334391992f2f424856aa864345bb61 (patch) | |
tree | a3bf98065a2ae02afd26dce1b1c34e75a4c7ee5b /drivers/target/iscsi/iscsi_target_parameters.c | |
parent | ib_srpt: Call target_sess_cmd_list_set_waiting during shutdown_session (diff) | |
download | kernel-qcow2-linux-21363ca873334391992f2f424856aa864345bb61.tar.gz kernel-qcow2-linux-21363ca873334391992f2f424856aa864345bb61.tar.xz kernel-qcow2-linux-21363ca873334391992f2f424856aa864345bb61.zip |
target/file: Fix off-by-one READ_CAPACITY bug for !S_ISBLK export
This patch fixes a bug where FILEIO was incorrectly reporting the number
of logical blocks (+ 1) when using non struct block_device export mode.
It changes fd_get_blocks() to follow all other backend ->get_blocks() cases,
and reduces the calculated dev_size by one dev->dev_attrib.block_size
number of bytes, and also fixes initial fd_block_size assignment at
fd_configure_device() time introduced in commit 0fd97ccf4.
Reported-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reported-by: Badari Pulavarty <pbadari@us.ibm.com>
Tested-by: Badari Pulavarty <pbadari@us.ibm.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_parameters.c')
0 files changed, 0 insertions, 0 deletions