]> git.baikalelectronics.ru Git - kernel.git/commit
tcmu: fix free block calculation
authorMike Christie <mchristi@redhat.com>
Tue, 28 Nov 2017 18:40:35 +0000 (12:40 -0600)
committerNicholas Bellinger <nab@linux-iscsi.org>
Fri, 12 Jan 2018 23:07:16 +0000 (15:07 -0800)
commitf57db09481f84a5a53d873100eb616ab0f9b4c31
treec0297332b86f96377f21745e40668c33710c5bfd
parent468740232c2b24f2284d3d86cc6502ac4c7271c9
tcmu: fix free block calculation

The blocks_left calculation does not account for free blocks
between 0 and thresh, so we could be queueing/waiting when
there are enough blocks free.

This has us add in the blocks between 0 and thresh as well as
at the end from thresh to DATA_BLOCK_BITS.

Signed-off-by: Mike Christie <mchristi@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_user.c