Re: [PATCH] lightnvm: remove duplicate include in lightnvm.h

2021-04-13 Thread Matias Bjørling
On 13/03/2021 12.22, menglong8.d...@gmail.com wrote: From: Zhang Yunkai 'linux/ioctl.h' included in 'lightnvm.h' is duplicated. It is also included in the 33th line. Signed-off-by: Zhang Yunkai --- include/uapi/linux/lightnvm.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/uap

Re: [PATCH] lightnvm: use kobj_to_dev()

2021-02-21 Thread Matias Bjørling
On 22/02/2021 07.06, Chaitanya Kulkarni wrote: This fixs coccicheck warning:- drivers/nvme//host/lightnvm.c:1243:60-61: WARNING opportunity for kobj_to_dev() Signed-off-by: Chaitanya Kulkarni --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] lightnvm: fix memory leak when submit fails

2021-01-21 Thread Matias Bjørling
On 21/01/2021 20.49, Heiner Litz wrote: there are a couple more, but again I would understand if those are deemed not important enough to keep it. device emulation of (non-ZNS) SSD block device That'll soon be available. We will be open-sourcing a new device mapper (dm-zap), which implements

Re: [PATCH] lightnvm: fix memory leak when submit fails

2021-01-21 Thread Matias Bjørling
rnel, it would still be maintained in the github repository and available for researchers. Given the few changes that have happened over the past year, it should be relatively easy to rebase for each kernel release for quite a while. Best, Matias On Thu, Jan 21, 2021 at 5:57 AM Matias Bjø

Re: [PATCH] lightnvm: fix memory leak when submit fails

2021-01-21 Thread Matias Bjørling
On 21/01/2021 13.47, Jens Axboe wrote: On 1/21/21 12:22 AM, Pan Bian wrote: The allocated page is not released if error occurs in nvm_submit_io_sync_raw(). __free_page() is moved ealier to avoid possible memory leak issue. Applied, thanks. General question for Matias - is lightnvm maintained a

Re: [PATCH v3] null_blk: add support for max open/active zone limit for zoned devices

2020-09-29 Thread Matias Bjørling
this queued up for 5.10? This is really helpful for e.g. the zonefs test suite or xfstests when btrfs HMZONED support lands. Thanks, Johannes Thanks, Niklas. Reviewed-by: Matias Bjørling

Re: [PATCH 2/2] nvme: add emulation for zone-append

2020-08-18 Thread Matias Bjørling
On 18/08/2020 11.50, Javier Gonzalez wrote: On 18.08.2020 09:12, Christoph Hellwig wrote: On Tue, Aug 18, 2020 at 10:59:36AM +0530, Kanchan Joshi wrote: If drive does not support zone-append natively, enable emulation using regular write. Make emulated zone-append cmd write-lock the zone, preve

[PATCH 1/2] block: add zone_desc_ext_bytes to sysfs

2020-06-28 Thread Matias Bjørling
Descriptor Extension size from the specific device. Signed-off-by: Matias Bjørling --- Documentation/block/queue-sysfs.rst | 6 ++ block/blk-sysfs.c | 15 ++- drivers/nvme/host/zns.c | 1 + drivers/scsi/sd_zbc.c | 1 + include/linux

[PATCH 0/2] Zone Descriptor Extension for Zoned Block Devices

2020-06-28 Thread Matias Bjørling
. Best, Matias Matias Bjørling (2): block: add zone_desc_ext_bytes to sysfs block: add BLKSETDESCZONE ioctl for Zoned Block Devices Documentation/block/queue-sysfs.rst | 6 ++ block/blk-sysfs.c | 15 +++- block/blk-zoned.c | 108

[PATCH 2/2] block: add BLKSETDESCZONE ioctl for Zoned Block Devices

2020-06-28 Thread Matias Bjørling
ength parameter. Signed-off-by: Matias Bjørling --- block/blk-zoned.c | 108 ++ block/ioctl.c | 2 + drivers/nvme/host/core.c | 3 + drivers/nvme/host/nvme.h | 9 +++ drivers/nvme/host/zns.c | 11 include/

Re: [PATCH 3/3] io_uring: add support for zone-append

2020-06-19 Thread Matias Bjørling
On 19/06/2020 16.18, Jens Axboe wrote: On 6/19/20 5:15 AM, Matias Bjørling wrote: On 19/06/2020 11.41, javier.g...@samsung.com wrote: Jens, Would you have time to answer a question below in this thread? On 18.06.2020 11:11, javier.g...@samsung.com wrote: On 18.06.2020 08:47, Damien Le Moal

Re: [PATCH 3/3] io_uring: add support for zone-append

2020-06-19 Thread Matias Bjørling
On 19/06/2020 17.20, Jens Axboe wrote: On 6/19/20 9:14 AM, Matias Bjørling wrote: On 19/06/2020 16.18, Jens Axboe wrote: On 6/19/20 5:15 AM, Matias Bjørling wrote: On 19/06/2020 11.41, javier.g...@samsung.com wrote: Jens, Would you have time to answer a question below in this thread? On

Re: [PATCH 3/3] io_uring: add support for zone-append

2020-06-19 Thread Matias Bjørling
On 19/06/2020 11.41, javier.g...@samsung.com wrote: Jens, Would you have time to answer a question below in this thread? On 18.06.2020 11:11, javier.g...@samsung.com wrote: On 18.06.2020 08:47, Damien Le Moal wrote: On 2020/06/18 17:35, javier.g...@samsung.com wrote: On 18.06.2020 07:39, Dam

Re: [PATCH 0/3] zone-append support in aio and io-uring

2020-06-18 Thread Matias Bjørling
On 18/06/2020 21.21, Kanchan Joshi wrote: On Thu, Jun 18, 2020 at 10:04:32AM +0200, Matias Bjørling wrote: On 17/06/2020 19.23, Kanchan Joshi wrote: This patchset enables issuing zone-append using aio and io-uring direct-io interface. For aio, this introduces opcode IOCB_CMD_ZONE_APPEND

Re: [PATCH 0/3] zone-append support in aio and io-uring

2020-06-18 Thread Matias Bjørling
On 18/06/2020 10.39, Javier González wrote: On 18.06.2020 10:32, Matias Bjørling wrote: On 18/06/2020 10.27, Javier González wrote: On 18.06.2020 10:04, Matias Bjørling wrote: On 17/06/2020 19.23, Kanchan Joshi wrote: This patchset enables issuing zone-append using aio and io-uring direct-io

Re: [PATCH 0/3] zone-append support in aio and io-uring

2020-06-18 Thread Matias Bjørling
On 18/06/2020 10.27, Javier González wrote: On 18.06.2020 10:04, Matias Bjørling wrote: On 17/06/2020 19.23, Kanchan Joshi wrote: This patchset enables issuing zone-append using aio and io-uring direct-io interface. For aio, this introduces opcode IOCB_CMD_ZONE_APPEND. Application uses

Re: [PATCH 0/3] zone-append support in aio and io-uring

2020-06-18 Thread Matias Bjørling
On 17/06/2020 19.23, Kanchan Joshi wrote: This patchset enables issuing zone-append using aio and io-uring direct-io interface. For aio, this introduces opcode IOCB_CMD_ZONE_APPEND. Application uses start LBA of the zone to issue append. On completion 'res2' field is used to return zone-relativ

Re: [PATCH] lightnvm: pblk: Fix reference count leak in pblk_sysfs_init.

2020-05-28 Thread Matias Bjørling
return ret; } Thanks, Quishi. Signed-off-by: Matias Bjørling Jens, would you kindly pick up the patch? Thank you, Matias

Re: [PATCH 2/4] null_blk: add zone open, close, and finish support

2019-06-25 Thread Matias Bjørling
On 6/25/19 2:36 PM, Damien Le Moal wrote: On 2019/06/25 20:06, Matias Bjørling wrote: On 6/22/19 3:02 AM, Damien Le Moal wrote: On 2019/06/21 22:07, Matias Bjørling wrote: From: Ajay Joshi Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control

Re: [PATCH 2/4] null_blk: add zone open, close, and finish support

2019-06-25 Thread Matias Bjørling
On 6/22/19 3:02 AM, Damien Le Moal wrote: On 2019/06/21 22:07, Matias Bjørling wrote: From: Ajay Joshi Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjørling

Re: [PATCH 1/4] block: add zone open, close and finish support

2019-06-24 Thread Matias Bjørling
On 6/22/19 2:51 AM, Damien Le Moal wrote: Matias, Some comments inline below. On 2019/06/21 22:07, Matias Bjørling wrote: From: Ajay Joshi Zoned block devices allows one to control zone transitions by using explicit commands. The available transitions are: * Open zone: Transition a zone

[PATCH 4/4] dm: add zone open, close and finish support

2019-06-21 Thread Matias Bjørling
From: Ajay Joshi Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Signed-off-by: Ajay Joshi --- drivers/md/dm-flakey.c| 7 +++ drivers/md/dm-linear.c| 2 +- drivers/md/dm.c | 5 +++-- include/linux/blk_

[GIT PULL 1/2] lightnvm: pblk: fix freeing of merged pages

2019-06-21 Thread Matias Bjørling
From: Heiner Litz bio_add_pc_page() may merge pages when a bio is padded due to a flush. Fix iteration over the bio to free the correct pages in case of a merge. Signed-off-by: Heiner Litz Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 16

[GIT PULL 03/26] lightnvm: pblk: reduce L2P memory footprint

2019-05-04 Thread Matias Bjørling
default op value it is approx. 110MB of DRAM less for every 1TB of media. Signed-off-by: Igor Konopko Reviewed-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 8 drivers/lightnvm/pblk-init.c | 7 +++ drivers

[GIT PULL 02/26] lightnvm: pblk: rollback on error during gc read

2019-05-04 Thread Matias Bjørling
Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-gc.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-gc.c b/drivers/lightnvm/pblk-gc.c index 901e49951ab5..65692e6d76e6 100644 --- a/drivers/lightnvm/pblk-gc.c +++ b/drivers/lightnvm/pblk-gc.c

[GIT PULL 24/26] lightnvm: do not remove instance under global lock

2019-05-04 Thread Matias Bjørling
easily get rid of this lock for a time when we are removing nvm targets. Signed-off-by: Igor Konopko Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 34 -- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a

Re: [PATCH] nvme: lightnvm: expose OC devices as zero size to OS

2019-03-25 Thread Matias Bjørling
On 3/18/19 2:32 PM, Marcin Dziegielewski wrote: On 3/14/19 2:56 PM, Matias Bjørling wrote: On 3/14/19 6:41 AM, Marcin Dziegielewski wrote: Open channel devices are not able to handle traditional IO requests addressed by LBA, so following current approach to exposing special nvme devices as

Re: [PATCH] nvme: lightnvm: expose OC devices as zero size to OS

2019-03-14 Thread Matias Bjørling
On 3/14/19 6:41 AM, Marcin Dziegielewski wrote: Open channel devices are not able to handle traditional IO requests addressed by LBA, so following current approach to exposing special nvme devices as zero size (e.g. with namespace formatted to use metadata) also open channel devices should be exp

Re: [PATCH] pblk: fix max_io calculation

2019-03-07 Thread Matias Bjørling
On 3/7/19 1:18 PM, Javier González wrote: When calculating the maximun I/O size allowed into the buffer, consider the write size (ws_opt) used by the write thread in order to cover the case in which, due to flushes, the mem and subm pointers are disaligned by (ws_opt - 1). This case currently tra

[GIT PULL 2/8] lightnvm: pblk: use vfree to free metadata on error path

2019-02-11 Thread Matias Bjørling
From: Hans Holmberg As chunk metadata is allocated using vmalloc, we need to free it using vfree. Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page") Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 2 +- 1 fi

[GIT PULL 7/8] lightnvm: pblk: prevent stall due to wb threshold

2019-02-11 Thread Matias Bjørling
above). Fixes: 766c8ceb16fc ("lightnvm: pblk: guarantee that backpointer is respected on writer stall") Signed-off-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-rb.c | 25 +++-- drivers/lightnvm/pblk

[GIT PULL 5/8] lightnvm: pblk: fix TRACE_INCLUDE_PATH

2019-02-11 Thread Matias Bjørling
)/arch/$(SRCARCH)/include as a header search path, but we should not rely on it. Signed-off-by: Masahiro Yamada Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-trace.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk

[GIT PULL 6/8] lightnvm: pblk: extend line wp balance check

2019-02-11 Thread Matias Bjørling
. This will render us a warning during recovery if something unexpected has happened to the chunk write pointers (i.e. powerloss, a spurious chunk reset, ..). Reported-by: Zhoujie Wu Tested-by: Zhoujie Wu Reviewed-by: Javier González Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling

[GIT PULL 8/8] lightnvm: pblk: fix race condition on GC

2019-02-11 Thread Matias Bjørling
L2P. Lines with a counter of greater than zero will not be selected for GC. Signed-off-by: Heiner Litz Reviewed-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 1 + drivers/lightnvm/pblk-gc.c| 22

[GIT PULL 4/8] lightnvm: pblk: Switch to use new generic UUID API

2019-02-11 Thread Matias Bjørling
From: Andy Shevchenko There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Signed-off-by: Andy Shevchenko Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers

[GIT PULL 3/8] lightnvm: Use u64 instead of __le64 for CPU visible side

2019-02-11 Thread Matias Bjørling
. Change types of lba_list_mem and lba_list_media members to be u64. Signed-off-by: Andy Shevchenko Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/pblk.h b/drivers

[GIT PULL 0/8] lightnvm updates for 5.1

2019-02-11 Thread Matias Bjørling
Hi Jens, Would you please pick up the following patches for 5.1? It is a bunch of misc patches this time. A couple of fixes and cleanups. Andy Shevchenko (2): lightnvm: Use u64 instead of __le64 for CPU visible side lightnvm: pblk: Switch to use new generic UUID API Hans Holmberg (3): lig

[GIT PULL 1/8] lightnvm: pblk: stop taking the free lock in in pblk_lines_free

2019-02-11 Thread Matias Bjørling
. Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index f9a3e47b6a93..eb0135c77805 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers

Re: [LSF/MM TOPIC] BPF for Block Devices

2019-02-08 Thread Matias Bjørling
On 2/7/19 6:12 PM, Stephen Bates wrote: Hi All A BPF track will join the annual LSF/MM Summit this year! Please read the updated description and CFP information below. Well if we are adding BPF to LSF/MM I have to submit a request to discuss BPF for block devices please! There has been qu

Re: [PATCH V2] lightnvm: pblk: fix race condition on GC

2019-02-05 Thread Matias Bjørling
On 2/1/19 3:38 AM, Heiner Litz wrote: This patch fixes a race condition where a write is mapped to the last sectors of a line. The write is synced to the device but the L2P is not updated yet. When the line is garbage collected before the L2P update is performed, the sectors are ignored by the GC

Re: [PATCH V3] lightnvm: pblk: prevent stall due to wb threshold

2019-02-05 Thread Matias Bjørling
On 2/5/19 7:50 AM, Javier González wrote: In order to respect mw_cuinits, pblk's write buffer maintains a backpointer to protect data not yet persisted; when writing to the write buffer, this backpointer defines a threshold that pblk's rate-limiter enforces. On small PU configurations, the follo

Re: [PATCH V2] lightnvm: pblk: prevent stall due to wb threshold

2019-01-30 Thread Matias Bjørling
On 1/30/19 11:26 AM, Javier González wrote: In order to respect mw_cuinits, pblk's write buffer maintains a backpointer to protect data not yet persisted; when writing to the write buffer, this backpointer defines a threshold that pblk's rate-limiter enforces. On small PU configurations, the fol

Re: [PATCH V2] lightnvm: pblk: extend line wp balance check

2019-01-30 Thread Matias Bjørling
On 1/30/19 9:18 AM, h...@owltronix.com wrote: From: Hans Holmberg pblk stripes writes of minimal write size across all non-offline chunks in a line, which means that the maximum write pointer delta should not exceed the minimal write size. Extend the line write pointer balance check to cover t

Re: [PATCH] lightnvm: pblk: prevent stall due to wb threshold

2019-01-25 Thread Matias Bjørling
On 1/25/19 11:09 AM, Javier González wrote: In order to respect mw_cuinits, pblk's write buffer maintains a backpointer to protect data not yet persisted; when writing to the write buffer, this backpointer defines a threshold that pblk's rate-limiter enforces. On small PU configurations, the fol

Re: [PATCH] lightnvm: pblk: fix TRACE_INCLUDE_PATH

2019-01-25 Thread Matias Bjørling
On 1/25/19 9:01 AM, Hans Holmberg wrote: On Fri, Jan 25, 2019 at 8:35 AM Masahiro Yamada wrote: As the comment block in include/trace/define_trace.h says, TRACE_INCLUDE_PATH should be a relative path to the define_trace.h ../../drivers/lightnvm is the correct relative path. ../../../drivers/

Re: [PATCH v2] lightnvm: pblk: Switch to use new generic UUID API

2019-01-24 Thread Matias Bjørling
On 1/24/19 3:31 PM, Andy Shevchenko wrote: There are new types and helpers that are supposed to be used in new code. As a preparation to get rid of legacy types and API functions do the conversion here. Signed-off-by: Andy Shevchenko --- v2: - convert instance_uuid to guid_t and get rid of pb

Re: [PATCH] lightnvm: pblk: stop taking the free lock in in pblk_lines_free

2019-01-22 Thread Matias Bjørling
On 1/22/19 11:15 AM, h...@owltronix.com wrote: From: Hans Holmberg pblk_line_meta_free might sleep (it can end up calling vfree, depending on how we allocate lba lists), and this can lead to a BUG() if we wake up on a different cpu and release the lock. As there is no point of grabbing the fre

Re: [PATCH] lightnvm: pblk: use vfree to free metadata on error path

2019-01-22 Thread Matias Bjørling
On 1/22/19 11:17 AM, h...@owltronix.com wrote: From: Hans Holmberg As chunk metadata is allocated using vmalloc, we need to free it using vfree. Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page") Signed-off-by: Hans Holmberg --- drivers/lightnvm/pblk-core.c | 2 +-

Re: [PATCH] lightnvm: pblk: fix use-after-free bug

2018-12-22 Thread Matias Bjørling
On 12/22/18 8:39 AM, Gustavo A. R. Silva wrote: Remove one of the calls to function bio_put(), so *bio* is only freed once. Notice that bio is being dereferenced in bio_put(), hence leading to a use-after-free bug once *bio* has already been freed. Addresses-Coverity-ID: 1475952 ("Use after fre

[GIT PULL 09/21] lightnvm: pblk: fix pblk_lines_init error handling path

2018-12-11 Thread Matias Bjørling
From: Hans Holmberg The chunk metadata is allocated with vmalloc, so we need to use vfree to free it. Fixes: 090ee26fd512 ("lightnvm: use internal allocation for chunk log page") Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- driver

[GIT PULL 02/21] lightnvm: Fix uninitialized return value in nvm_get_chunk_meta()

2018-12-11 Thread Matias Bjørling
("lightnvm: move bad block and chunk state logic to core") Fixes: a294c199455187d1 ("lightnvm: implement get log report chunk helpers") Signed-off-by: Geert Uytterhoeven Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 2 +- drivers/nvme/host/lightnvm.c | 3 ++-

[GIT PULL 03/21] lightnvm: pblk: fix chunk close trace event check

2018-12-11 Thread Matias Bjørling
From: Hans Holmberg The check for chunk closes suffers from an off-by-one issue, leading to chunk close events not being traced. Fixes: 4c44abf43d00 ("lightnvm: pblk: add trace events for chunk states") Signed-off-by: Hans Holmberg Signed-off-by: Matias Bjørling --- drivers/lig

[GIT PULL 08/21] lightnvm: pblk: remove unused macro

2018-12-11 Thread Matias Bjørling
From: Hans Holmberg ADDR_POOL_SIZE is not used anymore, so remove the macro. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers

[GIT PULL 05/21] lightnvm: pblk: account for write error sectors in emeta

2018-12-11 Thread Matias Bjørling
-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-write.c | 17 +++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/pblk-write.c b/drivers/lightnvm/pblk-write.c index 3ddd16f47106..750f04b8a227 100644 --- a/drivers/lightnvm

[GIT PULL 06/21] lightnvm: pblk: stop writes gracefully when running out of lines

2018-12-11 Thread Matias Bjørling
From: Hans Holmberg If mapping fails (i.e. when running out of lines), handle the error and stop writing. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-map.c | 47 +-- drivers/lightnvm

[GIT PULL 07/21] lightnvm: pblk: set conservative threshold for user writes

2018-12-11 Thread Matias Bjørling
the standard (11%) over provisioning. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 40 drivers/lightnvm/pblk-rl.c | 5 ++--- drivers/lightnvm/pblk.h | 12 ++- 3

[GIT PULL 01/21] lightnvm: pblk: ignore the smeta oob area scan

2018-12-11 Thread Matias Bjørling
From: Zhoujie Wu The smeta area l2p mapping is empty, and actually the recovery procedure only need to restore data sector's l2p mapping. So ignore the smeta oob scan. Signed-off-by: Zhoujie Wu Reviewed-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Matias Bjø

[GIT PULL 12/21] lightnvm: pblk: add lock protection to list operations

2018-12-11 Thread Matias Bjørling
From: Hua Su Protect the list_add on the pblk_line_init_bb() error path in case this code is used for some other purpose in the future. Signed-off-by: Hua Su Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 13 ++--- 1 file changed, 10

[GIT PULL 11/21] lightnvm: pblk: fix spelling in comment

2018-12-11 Thread Matias Bjørling
From: Hua Su Signed-off-by: Hua Su Updated description. Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-rb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c index b1f4b51783f4..9f7fa0fe9c77 100644 --- a

[GIT PULL 10/21] lightnvm: pblk: remove dead code in pblk_recov_l2p

2018-12-11 Thread Matias Bjørling
From: Hans Holmberg Remove the call to pblk_line_replace_data as it returns directly because we have not set l_mg->data_next yet. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-recovery.c | 1 - 1 file changed, 1 delet

[GIT PULL 14/21] lightnvm: simplify geometry enumeration

2018-12-11 Thread Matias Bjørling
-by: Matias Bjørling --- drivers/lightnvm/core.c | 12 +--- drivers/nvme/host/core.c | 18 +- drivers/nvme/host/lightnvm.c | 18 ++ drivers/nvme/host/nvme.h | 2 -- 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/drivers/lightnvm

[GIT PULL 15/21] lightnvm: pblk: avoid ref warning on cache creation

2018-12-11 Thread Matias Bjørling
is also more explicit about what actually happens on cache creation. In the process, do a small refactoring to use kref helpers. Fixes: 1864de94ec9d6 "lightnvm: pblk: stop recreating global caches" Signed-off-by: Javier González Reviewed-by: Hans Holmberg Signed-off-by: Matia

[GIT PULL 17/21] lightnvm: pblk: add helpers for OOB metadata

2018-12-11 Thread Matias Bjørling
supported. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 5 ++-- drivers/lightnvm/pblk-init.c | 6 drivers/lightnvm/pblk-map.c | 20 - drivers/lightnvm/pblk-read.c | 48

[GIT PULL 00/21] lightnvm updates for 4.21

2018-12-11 Thread Matias Bjørling
): lightnvm: pblk: add comments wrt locking in recovery path lightnvm: pblk: avoid ref warning on cache creation Matias Bjørling (1): lightnvm: simplify geometry enumeration Zhoujie Wu (1): lightnvm: pblk: ignore the smeta oob area scan drivers/lightnvm/core.c | 23 --- drivers

[GIT PULL 20/21] lightnvm: pblk: support packed metadata

2018-12-11 Thread Matias Bjørling
enables drives without per IO metadata to recover open lines. After this patch, drives with OOB size <16B will use packed metadata and metadata size larger than16B will continue to use the device per IO metadata. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørl

[GIT PULL 04/21] lightnvm: pblk: fix resubmission of overwritten write err lbas

2018-12-11 Thread Matias Bjørling
the mapping table (as the lba is marked as invalid). Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-write.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/pblk-write.c b/drivers

[GIT PULL 18/21] lightnvm: dynamic DMA pool entry size

2018-12-11 Thread Matias Bjørling
, such as 128 bytes, the static size does not cover this use-case. This patch adds support for I/O metadata above 56 bytes by changing DMA pool size based on device meta size and allows pblk to use OOB metadata >=16B. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Mat

[GIT PULL 13/21] lightnvm: pblk: add comments wrt locking in recovery path

2018-12-11 Thread Matias Bjørling
From: Javier González pblk's recovery path is single threaded and therefore a number of assumptions regarding concurrency can be made. To avoid confusion, make this explicit with a couple of comments in the code. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- dr

[GIT PULL 16/21] lightnvm: pblk: move lba list to partial read context

2018-12-11 Thread Matias Bjørling
: Matias Bjørling --- drivers/lightnvm/pblk-read.c | 20 +--- drivers/lightnvm/pblk.h | 2 ++ 2 files changed, 7 insertions(+), 15 deletions(-) diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c index 9fba614adeeb..19917d3c19b3 100644 --- a/drivers/lightnvm

[GIT PULL 21/21] lightnvm: pblk: do not overwrite ppa list with meta list

2018-12-11 Thread Matias Bjørling
done for pblk_get_sec_meta() since we also cannot point to the same memory address in meta buffer when we are using it for pblk recovery process Reported-by: Hans Holmberg Tested-by: Hans Holmberg Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk.h | 7

[GIT PULL 19/21] lightnvm: disable interleaved metadata

2018-12-11 Thread Matias Bjørling
IO operation. This patch prevents pblk to be instantiated in case device only supports interleaved metadata. Reviewed-by: Javier González Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 6 ++ drivers/nvme/host/lightnvm.c | 1 + include/linux

Re: [PATCH] ia64: export node_distance function

2018-11-20 Thread Matias Bjørling
On 11/03/2018 07:37 PM, Matias Bjørling wrote: The numa_slit variable used by node_distance is available to a module as long as it is linked at compile-time. However, it is not available to loadable modules. Leading to errors such as: ERROR: "numa_slit" [drivers/nvme/host/nv

Re: [PATCH v3 0/7] PBLK Bugfixes and cleanups

2018-11-07 Thread Matias Bjørling
On 11/06/2018 02:33 PM, Hans Holmberg wrote: From: Hans Holmberg This series is a slew of bugfixes and cleanups for PBLK, mostly fixing issues found during corner-case testing in QEMU. Changes since v1: Messed up from:, now the patches apply with the correct author Pardon the m

[PATCH] ia64: export node_distance function

2018-11-03 Thread Matias Bjørling
The numa_slit variable used by node_distance is available to a module as long as it is linked at compile-time. However, it is not available to loadable modules. Leading to errors such as: ERROR: "numa_slit" [drivers/nvme/host/nvme-core.ko] undefined! The error above is caused by the nvme multip

Re: [PATCH 2/2] lightnvm: pblk: retrieve chunk metadata on erase

2018-09-17 Thread Matias Bjørling
On 09/11/2018 01:35 PM, Javier González wrote: On the OCSSD 2.0 spec, the device populates the metadata pointer (if provided) when a chunk is reset. Implement this path in pblk and use it for sanity chunk checks. For 1.2, reset the write pointer and the state on core so that the erase path is tr

Re: [PATCH V3] lightnvm: pblk: fix mapping issue on failed writes

2018-09-04 Thread Matias Bjørling
On 09/04/2018 12:38 PM, Hans Holmberg wrote: From: Hans Holmberg On 1.2-devices, the mapping-out of remaning sectors in the failed-write's block can result in an infinite loop, stalling the write pipeline, fix this. Fixes: 6a3abf5beef6 ("lightnvm: pblk: rework write error recovery path") Sign

[PATCH] lightnvm: combine 1.2 and 2.0 command flags

2018-08-02 Thread Matias Bjørling
nd let the rest be dependent on the command opcode, which is trivial to detect and set. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 20 drivers/lightnvm/pblk-core.c | 13 - drivers/lightnvm/pblk-read.c | 8 +--- drivers/lig

[PATCH 2/2] null_blk: add zone support

2018-07-06 Thread Matias Bjørling
From: Matias Bjørling Adds support for exposing a null_blk device through the zone device interface. The interface is managed with the parameters zoned and zone_size. If zoned is set, the null_blk instance registers as a zoned block device. The zone_size parameter defines how big each zone will

[GIT PULL 14/18] lightnvm: pblk: fix smeta write error path

2018-06-01 Thread Matias Bjørling
From: Hans Holmberg Smeta write errors were previously ignored. Skip these lines instead and throw them back on the free list, so the chunks will go through a reset cycle before we attempt to use the line again. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias

[GIT PULL 04/20] lightnvm: pblk: improve error msg on corrupted LBAs

2018-05-28 Thread Matias Bjørling
From: Javier González In the event of a mismatch between the read LBA and the metadata pointer reported by the device, improve the error message to be able to detect the offending physical address (PPA) mapped to the corrupted LBA. Signed-off-by: Javier González Signed-off-by: Matias Bjørling

[GIT PULL 06/20] lightnvm: pblk: return NVM_ error on failed submission

2018-05-28 Thread Matias Bjørling
From: Javier González Return a meaningful error when the sanity vector I/O check fails. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 22 -- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/drivers/lightnvm

[GIT PULL 05/20] lightnvm: pblk: warn in case of corrupted write buffer

2018-05-28 Thread Matias Bjørling
lly be updated, thus hiding the issue. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-rb.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c index 52fdd85dbc97..58946ffebe81

[GIT PULL 07/20] lightnvm: pblk: remove unnecessary indirection

2018-05-28 Thread Matias Bjørling
From: Javier González Call nvm_submit_io directly and remove an unnecessary indirection on the read path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-read.c | 14 ++ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/drivers

[GIT PULL 08/20] lightnvm: pblk: remove unnecessary argument

2018-05-28 Thread Matias Bjørling
From: Javier González Remove unnecessary argument on pblk_line_free() Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 6 +++--- drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk.h | 2 +- 3 files changed, 5 insertions(+), 5

[GIT PULL 19/20] lightnvm: pblk: add possibility to set write buffer size manually

2018-05-28 Thread Matias Bjørling
-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 0f277744266b..25aa1e73984f 100644 --- a/drivers/lightnvm/pblk-init.c +++ b/drivers/lightnvm

[GIT PULL 09/20] lightnvm: pblk: check for chunk size before allocating it

2018-05-28 Thread Matias Bjørling
From: Javier González Do the check for the chunk state after making sure that the chunk type is supported. Fixes: 32ef9412c114 ("lightnvm: pblk: implement get log report chunk") Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 6 +++-

[GIT PULL 03/20] lightnvm: pblk: check read lba on gc path

2018-05-28 Thread Matias Bjørling
From: Javier González Check that the lba stored in the LBA metadata is correct in the GC path too. This requires a new helper function to check random reads in the vector read. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-read.c | 39

[GIT PULL 18/20] lightnvm: pblk: handle case when mw_cunits equals to 0

2018-05-28 Thread Matias Bjørling
mw_cunits in nvme_nvm_setup_12 function isn't longer necessary. Signed-off-by: Marcin Dziegielewski Signed-off-by: Igor Konopko Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 10 +- drivers/nvme/host/lightnvm.c | 1 - 2 files changed, 9 insertions(+), 2 deletions(-)

[GIT PULL 17/20] lightnvm: fix partial read error path

2018-05-28 Thread Matias Bjørling
From: Igor Konopko When error occurs during bio_add_page on partial read path, pblk tries to free pages twice. Signed-off-by: Igor Konopko Signed-off-by: Marcin Dziegielewski Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-read.c | 8 1 file changed, 4 insertions(+), 4

[GIT PULL 16/20] lightnvm: error handling when whole line is bad

2018-05-28 Thread Matias Bjørling
Igor Konopko Signed-off-by: Marcin Dziegielewski Updated title. Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/lightnvm/pblk-core.c b/drivers/lightnvm/pblk-core.c index a20b41c355c5..e3e883547198 100644 --- a/dr

[GIT PULL 15/20] lightnvm: proper error handling for pblk_bio_add_pages

2018-05-28 Thread Matias Bjørling
, that we are trying to free NULL pointer dma. This commit fix both issues. Signed-off-by: Igor Konopko Signed-off-by: Marcin Dziegielewski Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm

[GIT PULL 10/20] lightnvm: pass flag on graceful teardown to targets

2018-05-28 Thread Matias Bjørling
target to let it know when this happens. In the case of pblk, we pad the open line (close all open chunks) to improve data retention. In the event of an ungraceful shutdown, avoid this part and just clean up. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/light

[GIT PULL 11/20] lightnvm: pblk: remove dead function

2018-05-28 Thread Matias Bjørling
From: Javier González Remove dead function for manual sync. I/O Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 7 --- drivers/lightnvm/pblk.h | 1 - 2 files changed, 8 deletions(-) diff --git a/drivers/lightnvm/pblk-core.c b/drivers

[GIT PULL 20/20] lightnvm: pblk: sync RB and RL states during GC

2018-05-28 Thread Matias Bjørling
-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 2 ++ drivers/lightnvm/pblk-rb.c | 7 +++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/lightnvm/pblk-init.c b/drivers/lightnvm/pblk-init.c index 25aa1e73984f..9d7d9e3b8506 100644 --- a/drivers/lightnvm/pblk

[GIT PULL 13/20] lightnvm: pblk: garbage collect lines with failed writes

2018-05-28 Thread Matias Bjørling
: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 45 ++- drivers/lightnvm/pblk-gc.c| 102 +++--- drivers/lightnvm/pblk-init.c | 46 --- drivers/lightnvm/pblk

[GIT PULL 14/20] lightnvm: pblk: fix smeta write error path

2018-05-28 Thread Matias Bjørling
From: Hans Holmberg Smeta write errors were previously ignored. Skip these lines instead and throw them back on the free list, so the chunks will go through a reset cycle before we attempt to use the line again. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias

[GIT PULL 02/20] lightnvm: pblk: recheck for bad lines at runtime

2018-05-28 Thread Matias Bjørling
From: Javier González Bad blocks can grow at runtime. Check that the number of valid blocks in a line are within the sanity threshold before allocating the line for new writes. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 38

[GIT PULL 01/20] lightnvm: pblk: fail gracefully on line alloc. failure

2018-05-28 Thread Matias Bjørling
From: Javier González In the event of a line failing to allocate, fail gracefully and stop the pipeline to avoid more write failing in the same place. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 5 + drivers/lightnvm/pblk-map.c | 33

[GIT PULL 12/20] lightnvm: pblk: rework write error recovery path

2018-05-28 Thread Matias Bjørling
. The writer thread checks if there are any requests to resubmit, scans and invalidates any lbas that have been overwritten by later writes and resubmits the failed entries. Signed-off-by: Hans Holmberg Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c

[GIT PULL 00/20] lightnvm updates for 4.18

2018-05-28 Thread Matias Bjørling
Hi Jens, Please pick up the following patches. - Hans reworked the write error recovery path in pblk. - Igor added extra error handling for lines, and fixed a bug in the pblk ringbuffer during GC. - Javier refactored the pblk code a bit, added extra error handling, and added checks to ve

  1   2   3   4   5   6   7   8   9   10   >