-by: Christoph Hellwig
[Damien]
* Changed method block_device argument to gendisk
* Various bug fixes and improvements
* Added support for null_blk, dm-linear and dm-flakey.
Signed-off-by: Damien Le Moal
---
block/blk-core.c | 1 -
block/blk-mq-debugfs.c | 1 -
block/blk-zoned.c
(e.g. blktests).
Signed-off-by: Damien Le Moal
---
block/blk-sysfs.c | 11 +++
include/linux/blkdev.h | 2 +-
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/block/blk-sysfs.c b/block/blk-sysfs.c
index 3772671cf2bc..f7060a938bf9 100644
--- a/block/blk-sysfs.c
+++ b
bitmaps allocated and initialized with
blk_revalidate_disk_zones() are freed automatically from
__blk_release_queue() using the block internal function
blk_queue_free_zone_bitmaps().
Signed-off-by: Damien Le Moal
---
block/blk-sysfs.c | 2 +
block/blk-zoned.c | 136
blkdev_reset_zones() to operate similarly to
blkdev_issue_discard() using the next_bio() helper for chaining BIOs. To
avoid code duplication of that function in blk_zoned.c, rename
next_bio() into blk_next_bio() and declare it as a block internal
function in blk.h.
Signed-off-by: Damien Le Moal
about 3.5s down to about 900ms. Disk revalidate times are also
reduced from about 450ms down to 230ms.
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
---
drivers/scsi/sd_zbc.c | 94 ++-
1 file changed, 40 insertions(+), 54 deletions(-)
Get a zoned block device zone size in number of 512 B sectors.
The zone size is always 0 for regular block devices.
Signed-off-by: Damien Le Moal
---
block/ioctl.c | 2 ++
include/uapi/linux/blkzoned.h | 2 ++
2 files changed, 4 insertions(+)
diff --git a/block/ioctl.c b/block
nd fix sd_zbc_check_zones()
error return to -EFBIG instead of -ENODEV if the zone size is too large.
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
---
drivers/scsi/sd_zbc.c | 15 ++-
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/d
including the most recent dm patches
Christoph Hellwig (1):
block: add a report_zones method
Damien Le Moal (10):
scsi: sd_zbc: Rearrange code
scsi: sd_zbc: Reduce boot device scan and revalidate time
scsi: sd_zbc: Fix sd_zbc_check_zones() error checks
block: Introduce blkdev_nr_zones
There is no point in allocating more zone descriptors than the number of
zones a block device has for doing a zone report. Avoid doing that in
blkdev_report_zones_ioctl() by limiting the number of zone decriptors
allocated internally to process the user request.
Signed-off-by: Damien Le Moal
().
Also fix the error message displayed when reading that VPD page fails.
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
---
drivers/scsi/sd_zbc.c | 39 +++
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers
Get a zoned block device total number of zones. The device can be a
partition of the whole device. The number of zones is always 0 for
regular block devices.
Signed-off-by: Damien Le Moal
---
block/ioctl.c | 2 ++
include/uapi/linux/blkzoned.h | 1 +
2 files changed, 3
all to this helper.
Signed-off-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
---
block/blk-zoned.c| 27 +++
drivers/md/dm-zoned-target.c | 3 +--
include/linux/blkdev.h | 5 +
3 files changed, 33 insertions(+), 2 deletions(-)
diff --git a/block/blk-zoned.
gt; - sd_config_write_same(sdkp);
> - req->__data_len = blk_rq_bytes(req);
> - req->rq_flags |= RQF_QUIET;
> - }
> - break;
> - }
> - }
> - break;
> - default:
> - break;
> - }
> -
> - out:
> if (sd_is_zoned(sdkp))
> sd_zbc_complete(SCpnt, good_bytes, );
>
>
--
Damien Le Moal
Western Digital Research
scmd_printk(KERN_ERR, cmd,
> + "request not aligned to logical block size\n");
> + ret = BLKPREP_KILL;
> + goto out;
> + }
> }
>
> /*
> diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h
> index 392c7d078ae3..6f58d130fb75 100644
> --- a/drivers/scsi/sd.h
> +++ b/drivers/scsi/sd.h
> @@ -117,6 +117,7 @@ struct scsi_disk {
> unsignedurswrz : 1;
> unsignedsecurity : 1;
> unsignedignore_medium_access_errors : 1;
> + unsignedbounds_check : 1;
> };
> #define to_scsi_disk(obj) container_of(obj,struct scsi_disk,dev)
>
>
--
Damien Le Moal
Western Digital Research
stants. Place check here because only need to check
> + * early and once.
> + */
> + if (REQ_OP_READ + REQ_OP_WRITE > 1)
> + pr_err("%s: REQ_OP_READ=%d REQ_OP_WRITE=%d %s.\n", __func__,
> +REQ_OP_READ, REQ_OP_WRITE,
> +"expected 0 and 1. Logic ERROR");
>
> for (i = 0; i < SD_MAJORS; i++) {
> if (register_blkdev(sd_major(i), "sd") != 0)
>
--
Damien Le Moal
Western Digital Research
(sense_valid && (!scsi_sense_is_deferred(
> + good_bytes = sd_done_sense(SCpnt, good_bytes, );
> }
> - sdkp->medium_access_timed_out = 0;
>
> - if (unlikely(driver_byte(result) == DRIVER_SENSE ||
> - (sense_valid && !sense_deferred)))
> - good_bytes = sd_done_sense(SCpnt, good_bytes, );
> + sdkp->medium_access_timed_out = 0;
>
> if (sd_is_zoned(sdkp))
> sd_zbc_complete(SCpnt, good_bytes, );
>
--
Damien Le Moal
Western Digital Research
"ret" type to s64.
Fixes: ccce20fc79 ("sd_zbc: Avoid that resetting a zone fails sporadically")
Signed-off-by: Damien Le Moal
Cc: Bart Van Assche
Cc: sta...@kernel.org
---
drivers/scsi/sd_zbc.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/sd
If the ALL bit is set in the ZBC_OUT command, the command zone ID field
(block) should be ignored.
Reported-by: David Butterfield
Signed-off-by: Damien Le Moal
Cc: sta...@vger.kernel.org
---
drivers/ata/libata-scsi.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git
a zone start
LBA should be ILLEGAL REQUEST, regardless if the bad LBA is out of
range.
Reported-by: David Butterfield
Signed-off-by: Damien Le Moal
Cc: sta...@vger.kernel.org
---
drivers/ata/libata-scsi.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/ata
but incorrect) LBA OUT OF RANGE.
The second patch disables the ZBC_OUT command block address check if the ALL
bit is set, as defined by the ZBC specifications.
Thank you for considering these patches for inclusion in 4.18 fixes (and CC
stable).
Damien Le Moal (2):
ata: Fix ZBC_OUT command block check
but incorrect) LBA OUT OF RANGE.
The second patch disables the ZBC_OUT command block address check if the ALL
bit is set, as defined by the ZBC specifications.
Thank you for considering these patches for inclusion in 4.18 fixes (and CC
stable).
Damien Le Moal (2):
ata: Fix ZBC_OUT command block check
a zone start
LBA should be ILLEGAL REQUEST, regardless if the bad LBA is out of
range.
Reported-by: David Butterfield
Signed-off-by: Damien Le Moal
---
drivers/ata/libata-scsi.c | 13 +++--
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/a
If the ALL bit is set in the ZBC_OUT command, the command zone ID field
(block) should be ignored.
Reported-by: David Butterfield
Signed-off-by: Damien Le Moal
---
drivers/ata/libata-scsi.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/drivers/ata/libata
but incorrect) LBA OUT OF RANGE.
The second patch disables the ZBC_OUT command block address check if the ALL
bit is set, as defined by the ZBC specifications.
Thank you for considering these patches for inclusion in 4.18 fixes (and CC
stable).
Damien Le Moal (2):
ata: Fix ZBC_OUT command block check
setting a zone fails sporadically
Damien Le Moal (1):
scsi: sd_zbc: Fix potential memory leak
drivers/scsi/sd_zbc.c | 128 +-
1 file changed, 76 insertions(+), 52 deletions(-)
Changes from v1:
* Fixed upstream commit reference in the first patch commit message
--
2.17.0
[Backport of upstream commit 4b433924b2755a94f99258c178684a0e05c344de]
Rework sd_zbc_check_zone_size() to avoid a memory leak due to an early
return if sd_zbc_report_zones() fails.
Signed-off-by: Damien Le Moal
Cc: sta...@vger.kernel.org # 4.14
---
drivers/scsi/sd_zbc.c | 34
t;)
Signed-off-by: Bart Van Assche
[Damien]
* Backport for 4.14-stable
* Updated this commit message
Signed-off-by: Damien Le Moal
Cc: sta...@vger.kernel.org # 4.14
---
drivers/scsi/sd_zbc.c | 98 +++
1 file changed, 63 insertions(+), 35 deletions(-)
di
setting a zone fails sporadically
Damien Le Moal (1):
scsi: sd_zbc: Fix potential memory leak
drivers/scsi/sd_zbc.c | 128 +-
1 file changed, 76 insertions(+), 52 deletions(-)
--
2.17.0
[Backport of upstream commit 0aa3fdb8b3a6df3c2e3b61dbfe079db9d30e03cd]
Rework sd_zbc_check_zone_size() to avoid a memory leak due to an early
return if sd_zbc_report_zones() fails.
Signed-off-by: Damien Le Moal
Cc: sta...@vger.kernel.org # 4.14
---
drivers/scsi/sd_zbc.c | 34
t;)
Signed-off-by: Bart Van Assche
[Damien]
* Backport for 4.14-stable
* Updated this commit message
Signed-off-by: Damien Le Moal
Cc: sta...@vger.kernel.org # 4.14
---
drivers/scsi/sd_zbc.c | 98 +++
1 file changed, 63 insertions(+), 35 deletions(-)
di
.
Fixes: ccce20fc7968 ("scsi: sd_zbc: Avoid that resetting a zone fails
sporadically")
Signed-off-by: Damien Le Moal
Cc: Bart Van Assche
---
drivers/scsi/sd_zbc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
index 32
)
> Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com>
> Cc: Jens Axboe <ax...@kernel.dk>
> Cc: Damien Le Moal <damien.lem...@wdc.com>
> Cc: Christoph Hellwig <h...@lst.de>
> Cc: Hannes Reinecke <h...@suse.com>
> Cc: sta...@vger.kernel.org #
ode that resets cmd->allowed from
> sd_zbc_complete().
>
> Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com>
> Cc: Damien Le Moal <damien.lem...@wdc.com>
> Cc: Christoph Hellwig <h...@lst.de>
> Cc: Hannes Reinecke <h...@suse.com>
> ---
> dri
On 2018/04/16 18:04, Bart Van Assche wrote:
> This patch does not change any functionality but makes it clear
> that it is on purpose that these fields are 32 bits wide.
>
> Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com>
> Cc: Damien Le Moal <damien.lem...@
csi_error_from_host_byte()
> by only translating good status values into BLK_STS_OK.
>
> Fixes: e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in
> __scsi_error_from_host_byte()")
> Reported-by: Damien Le Moal <damien.lem...@wdc.com>
> Signed-off-by: Bart
Bart,
On 4/5/18 00:22, Bart Van Assche wrote:
> On Wed, 2018-04-04 at 17:54 +0900, Damien Le Moal wrote:
>> Since SCSI scanning occurs asynchronously, since sd_revalidate_disk()
>> is called from sd_probe_async() and since sd_revalidate_disk() calls
>> sd_zbc_read_
Bart,
On 4/5/18 00:08, Bart Van Assche wrote:
> On 04/04/18 01:54, Damien Le Moal wrote:
>> static int sd_zbc_check_zone_size(struct scsi_disk *sdkp)
>> {
>> +u64 sdkp_zone_blocks = sdkp->zone_blocks;
>
> Shouldn't this variable be initialized to zero
ff-by: Bart Van Assche <bart.vanass...@wdc.com>
[Damien] Updated commit message and changed nr_zones/bitmap swap order.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Cc: Christoph Hellwig <h...@lst.de>
Cc: Hannes Reinecke <h...@suse.com>
Cc: sta...@vger.ker
series introduces fix these problems by avoiding any change to
the disk information unless a change is detected by revalidate.
Bart Van Assche (1):
sd_zbc: Avoid errors due to sd_zbc_setup() execution
Damien Le Moal (1):
sd_zbc: Avoid errors due to sd_zbc_check_zone_size() execution
drivers
ne_blocks.
This change is valid for both revalidate as well as for the first scan
of the device.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Cc: <sta...@vger.kernel.org>
---
drivers/scsi/sd_zbc.c | 13 ++---
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git a/drivers/sc
On 4/4/18 16:39, Damien Le Moal wrote:
> Hannes,
>
> On 4/4/18 16:35, Hannes Reinecke wrote:
>> On Wed, 4 Apr 2018 07:06:58 +0000
>> Damien Le Moal <damien.lem...@wdc.com> wrote:
>>
>>> Hannes,
>>>
>>> On 4/4/18 15:57, Hannes Reineck
Hannes,
On 4/4/18 16:35, Hannes Reinecke wrote:
> On Wed, 4 Apr 2018 07:06:58 +
> Damien Le Moal <damien.lem...@wdc.com> wrote:
>
>> Hannes,
>>
>> On 4/4/18 15:57, Hannes Reinecke wrote:
>>> On Wed, 4 Apr 2018 15:51:38 +0900
>&g
Hannes,
On 4/4/18 15:57, Hannes Reinecke wrote:
> On Wed, 4 Apr 2018 15:51:38 +0900
> Damien Le Moal <damien.lem...@wdc.com> wrote:
>
>> With the introduction of commit e39a97353e53 ("scsi: core: return
>> BLK_STS_OK for DID_OK in __scsi_error_from_host_by
o be taken for a failed
command is to not retry it and terminate it immediately (ACTION_FAIL) .
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Fixes: e39a97353e53 ("scsi: core: return BLK_STS_OK for DID_OK in
__scsi_error_from_host_byte()")
Cc: Hannes Reineck
Replicating the code is of course trivial
but rather dirty.
Best regards.
--
Damien Le Moal
Western Digital Research
Tejun,
On 2018/03/05 5:33, Tejun Heo wrote:
> On Fri, Mar 02, 2018 at 04:40:18AM +0900, Damien Le Moal wrote:
>> This series introduces changes to scsi and libata error handling for ZBC and
>> ZAC
>> devices.
>>
>> The first patch moves ZBC specific
Rework sd_zbc_check_zone_size() to avoid a memory leak due to an early
return if sd_zbc_report_zones() fails.
Reported-by: David.butterfield <david.butterfi...@wdc.com>
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Cc: sta...@vger.kernel.org
---
drivers/scsi/s
Improve decisions regarding command retry worthiness by calling
the funtion scsi_zbc_noretry_cmd() in ata_eh_worth_retry() if the
command target is a ZAC device.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/ata/libata-eh.c | 4
1 file changed, 4 insertions(+)
in scsi_noretry_cmd(). This allows simplifying
sd_zbc_complete() which now only has to deal with report zones command
reply.
scsi_zbc_noretry_cmd() is also exported so that it can be used from
libata.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/scsi/scsi_error.
Add proper error string output for ATA_ERR_NCQ and ATA_ERR_NODEV_HINT
instead of returning "unknown error".
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/ata/libata-eh.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/ata/libata-eh.c b/drivers
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/ata/libata-eh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 504272b18e75..d6264235c3d7 100644
--- a/drivers/ata/libata-eh.c
+++ b/drive
For a successful setting of the device transfer speed mode in
ata_dev_set_mode(), do not print the message
"ataX.XX: configured for xxx" if the EH context has the quiet flag set.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/ata/libata-core.c | 7 ---
1
and irq_stat messages printed.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/ata/libata-eh.c | 26 +-
drivers/ata/libata-scsi.c | 3 +++
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libat
are improvements in libata error handling verbosity.
Damien Le Moal (6):
scsi: Introduce scsi_zbc_noretry_cmd()
libata: Use scsi_zbc_noretry_cmd() for ZAC devices
libata: Fix comment typo in ata_eh_analyze_tf()
libata: Fix ata_err_string()
libata: Honor RQF_QUIET flag
libata: Be quiet when asked
ltiple users have confirmed independently
> that this patch fixes the double call_rcu() issue for them.
>
> Thanks,
>
> Bart.
Please feel free to add:
Reviewed-by: Damien Le Moal <damien.lem...@wdc.com>
Tested-by: Damien Le Moal <damien.lem...@wdc.com>
--
Damien Le Moal
Western Digital Research
On 2/22/18 14:08, Damien Le Moal wrote:
> Bart,
>
> On 2/22/18 12:53, Bart Van Assche wrote:
>> On Thu, 2018-02-22 at 02:23 +0000, Damien Le Moal wrote:
>>> On Wed, 2018-02-21 at 09:23 -0800, Bart Van Assche wrote:
>>>> [ ... ]
>>> This does not
Bart,
On 2/22/18 12:53, Bart Van Assche wrote:
> On Thu, 2018-02-22 at 02:23 +0000, Damien Le Moal wrote:
>> On Wed, 2018-02-21 at 09:23 -0800, Bart Van Assche wrote:
>>> [ ... ]
>> This does not compile.
>
> This patch depends on another patch that is not yet in M
Bart,
On 2/22/18 13:39, Bart Van Assche wrote:
> On Thu, 2018-02-22 at 04:39 +, Bart Van Assche wrote:
>> On Thu, 2018-02-22 at 04:19 +0000, Damien Le Moal wrote:
>>> It looks OK to me, at least if CONFIG_DEBUG_OBJECTS_RCU_HEAD is turned
>>> off since the init_rcu_
d object", yes, but that
does not match the use of the object done in scsi (i.e. alloc before use
+ free after use).
Because of this doubt, No reviewed-by from me. I will miss fame and
fortune this time :)
Best regards.
--
Damien Le Moal,
Western Digital
Bart,
On Wed, 2018-02-21 at 09:23 -0800, Bart Van Assche wrote:
> Avoid that the recently introduced call_rcu() call in the SCSI core
> causes the RCU core to complain about double call_rcu() calls.
>
> Reported-by: Natanael Copa <nc...@alpinelinux.org>
> Reported-by: Damie
ite spaces at the *beginning*
of lines, and that is only for what your patches touched and the lines around
them.
If I run in the drivers/scsi directory the command:
grep -r '^ [[ ]]*' *.[ch] | wc -l
I get 8795 lines. I guess you could make your patch even bigger:)
If we exclude leading spaces, applying the patch and doing a "diff -rb" of the
patched scsi files against the original unpatched files leads to no differences
at all. So it looks good.
Best regards.
--
Damien Le Moal
Western Digital Research
-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
block/mq-deadline.c | 89 +++--
1 file changed, 86 insertions(+), 3 deletions(-)
The block layer now handles zone write locking.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
drivers/scsi/sd.c| 41 +++-
-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
block/deadline-iosched.c | 71 ++--
1 file changed, 68 insertions(+), 3 deletions(-)
capacity (number of zones) changes.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/scsi/sd_zbc.c | 152 +++---
1 file changed, 144 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
Avoid directly referencing the next_rq and fifo_list arrays using the
helper functions deadline_next_request() and deadline_fifo_request() to
facilitate changes in the dispatch request selection in
__dd_dispatch_request() for zoned block devices.
Signed-off-by: Damien Le Moal <damien.
forward declaration of the
function deadline_move_request().
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
block/deadl
y introducing
scsi_disk_from_queue()
Christoph Hellwig (1):
block: introduce zoned block devices zone write locking
Damien Le Moal (6):
mq-deadline: Introduce dispatch helpers
mq-deadline: Introduce zone locking support
deadline-iosched: Introduce dispatch helpers
deadline-iosched: Introduc
dering by limiting to at most a single write request per zone
outside of the scheduler at any time.
Based on previous patches from Damien Le Moal.
Signed-off-by: Christoph Hellwig <h...@lst.de>
[Damien]
* Fixed comments and identation in blkdev.h
* Changed helper functions
* Fixed this commit messag
touch a
line near one with whitespaces (which can happen a lot...) ?
Best regards.
--
Damien Le Moal,
Western Digital
Jens,
On Fri, 2017-11-24 at 16:54 -0700, Jens Axboe wrote:
> On 11/24/2017 04:48 PM, Damien Le Moal wrote:
> > [Full quote deleted]
> >
> > Hi Jens,
> >
> > Any comment regarding this series ?
> > I understand that this would be for the 4.16 merge wi
.
--
Damien Le Moal
Western Digital Research
Avoid directly referencing the next_rq and fifo_list arrays using the
helper functions deadline_next_request() and deadline_fifo_request() to
facilitate changes in the dispatch request selection in
__dd_dispatch_request() for zoned block devices.
Signed-off-by: Damien Le Moal <damien.
forward declaration of the
function deadline_move_request().
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
block/deadl
capacity (number of zones) changes.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/scsi/sd_zbc.c | 152 +++---
1 file changed, 144 insertions(+), 8 deletions(-)
diff --git a/drivers/scsi/sd_zbc.c b/drivers/scsi/sd_zbc.c
lk-mq patches (declarations files)
* Split (former) patch 4 into multiple patches to facilitate review
* Fixed scsi disk lookup from io scheduler by introducing
scsi_disk_from_queue()
Christoph Hellwig (1):
block: introduce zoned block devices zone write locking
Damien Le Moal (6):
mq-deadline:
-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
block/deadline-iosched.c | 71 ++--
1 file changed, 68 insertions(+), 3 deletions(-)
dering by limiting to at most a single write request per zone
outside of the scheduler at any time.
Based on previous patches from Damien Le Moal.
Signed-off-by: Christoph Hellwig <h...@lst.de>
[Damien]
* Fixed comments and identation in blkdev.h
* Changed helper functions
* Fixed this commit messag
The block layer now handles zone write locking.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
drivers/scsi/sd.c| 41 +++-
-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Martin K. Petersen <martin.peter...@oracle.com>
---
block/mq-deadline.c | 89 +++--
1 file changed, 86 insertions(+), 3 deletions(-)
fter the first report zones...
In any case, as you suggested, patch 8 should be merged with this one.
I will fix that and post a v8.
Thank you for the review.
--
Damien Le Moal,
Western Digital
-by: Damien Le Moal <damien.lem...@wdc.com>
---
block/mq-deadline.c | 89 +++--
1 file changed, 86 insertions(+), 3 deletions(-)
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 8bd6db9e69c7..d56972e8ebda 100644
--- a/block/mq-dead
Make sure that the device request queue zone information (number of
zones and zone bitmaps) are reinitialized if the number of zones
changes (e.g. on a drive capacity change on revalidate).
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/scsi/sd_zbc.
dering by limiting to at most a single write request per zone
outside of the scheduler at any time.
Based on previous patches from Damien Le Moal.
Signed-off-by: Christoph Hellwig <h...@lst.de>
[Damien]
* Fixed comments and identation in blkdev.h
* Changed helper functions
* Fixed this commit messag
The block layer now handles zone write locking.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/scsi/sd.c| 41 +++---
drivers/scsi/sd.h| 11 -
drivers/scsi/sd_zbc.c| 105 +++
includ
forward declaration of the
function deadline_move_request().
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
block/deadline-iosched.c | 47 +--
1 file changed, 37 insertions(+), 10 deletions(-)
diff --git a/block/deadline-iosched.c b
of zones to stabilize on the second
revalidation pass to allocate and initialize the bitmaps.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
drivers/scsi/sd_zbc.c | 138 --
1 file changed, 133 insertions(+), 5 deletions(-)
diff
Avoid directly referencing the next_rq and fifo_list arrays using the
helper functions deadline_next_request() and deadline_fifo_request() to
facilitate changes in the dispatch request selection in
__dd_dispatch_request() for zoned block devices.
Signed-off-by: Damien Le Moal <damien.
cilitate review
* Fixed scsi disk lookup from io scheduler by introducing
scsi_disk_from_queue()
Christoph Hellwig (1):
block: introduce zoned block devices zone write locking
Damien Le Moal (7):
blokc: mq-deadline: Introduce dispatch helpers
block: mq-deadline: Introduce zone locking suppor
-by: Damien Le Moal <damien.lem...@wdc.com>
---
block/deadline-iosched.c | 71 ++--
1 file changed, 68 insertions(+), 3 deletions(-)
diff --git a/block/deadline-iosched.c b/block/deadline-iosched.c
index 81e3f0897457..9de9f156e203 100644
--- a/block/de
pages+0x9/0x10
> do_writepages+0x34/0xc0
> __filemap_fdatawrite_range+0x6c/0x90
> file_write_and_wait_range+0x31/0x90
> blkdev_fsync+0x16/0x40
> vfs_fsync_range+0x44/0xa0
> do_fsync+0x38/0x60
> SyS_fsync+0xb/0x10
> entry_SYSCALL_64_fastpath+0x13/0x94
> ---[ end trace 86e
er.kernel.org>
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
drivers/scsi/sd_zbc.c | 6 +++---
1 file change
instead of open coding, use the min() macro to calculate a report zones
reply buffer length in sd_zbc_check_zone_size() and the round_up()
macro for calculating the number of zones in sd_zbc_setup().
No functional change is introduced by this patch.
Signed-off-by: Damien Le Moal <damien.
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw
assignments and move the calculation of sdkp->zone_shift together
with the assignment of the verified zone_blocks value in
sd_zbc_check_zone_size().
No functional change is introduced by this patch.
Signed-off-by: Damien Le M
Fix comments style (use kernel-doc style) and content to clarify some
functions. Also fix some functions signature indentation and remove a
useless blank line in sd_zbc_read_zones().
No functional change is introduced by this patch.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Re
ll
ongoing and will be sent later.
Please consider these for addition to 4.15.
Damien Le Moal (5):
scsi: sd_zbc: Move ZBC declarations to scsi_proto.h
scsi: sd_zbc: Fix comments and indentation
scsi: sd_zbc: Rearrange code
scsi: sd_zbc: Use well defined macros
scsi: s
by this patch.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
Reviewed-by: Bart Van Assche <bart.vanass...@wdc.com>
Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
drivers/scsi/sd_zbc.c | 24 --
Bart,
On 10/4/17 05:56, Bart Van Assche wrote:
> On Tue, 2017-10-03 at 09:19 +0900, Damien Le Moal wrote:
>> On 10/3/17 08:44, Bart Van Assche wrote:
>>> On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote:
>>>> static void deadline_wunlock
Bart,
On 10/3/17 08:44, Bart Van Assche wrote:
> On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote:
>> When dispatching write requests to a zoned block device, only allow
>> requests targeting an unlocked zone. Requests targeting a locked zone
>> are left in the schedu
private data to store the value
RQ_ZONE_WLOCKED. Testing for this value allows quick decision in
dd_insert_request() and dd_completed_request() regarding the need for
unlocking the target zone of a request.
Signed-off-by: Damien Le Moal <damien.lem...@wdc.com>
---
block/mq-deadline.c
1 - 100 of 392 matches
Mail list logo