]> www.infradead.org Git - users/jedix/linux-maple.git/commit
target/user: Allow user to set block size before enabling device
authorSheng Yang <sheng@yasker.org>
Mon, 28 Dec 2015 19:57:39 +0000 (11:57 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Fri, 23 Jun 2017 04:10:45 +0000 (21:10 -0700)
commit3878c613ff3f7cb2f207055ff1e928306df7abef
tree71cf777a742cf21259113aaff5f53247994fd4d4
parent8f4e0e4088d027e0ca06476eb746cbb72e2cf905
target/user: Allow user to set block size before enabling device

The capability of setting hw_block_size was added along with 9c1cd1b68
"target/user: Only support full command pass-through", though default
setting override the user specified value during the enabling of device,
which called by target_configure_device() to set block_size matching
hw_block_size, result in user not able to set different block size other
than default 512.

This patch would use existing hw_block_size value if already set, otherwise
it would be set to default value(512).

Update: Fix the coding style issue.

(Drop unnecessary re-export of dev->dev_attrib.block_size - nab)

Signed-off-by: Sheng Yang <sheng@yasker.org>
Cc: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Orabug: 25395066
(cherry picked from commit 81ee28de860095cc0c063b92eea53cb97771f796)
Signed-off-by: Kyle Fortin <kyle.fortin@oracle.com>
Reviewed-by: Shan Hai <shan.hai@oracle.com>
drivers/target/target_core_user.c