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

[PATCH] mm/mmap.c: logic of find_vma_intersection repeated in __do_munmap

2021-04-09 Thread Gonzalo Matias Juarez Tello
eturns NULL if no vma is found, hence only the !vma check is needed in __do_munmap(). Signed-off-by: Gonzalo Matias Juarez Tello --- mm/mmap.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index 3f287599a7a3..59ceaa474a00 100644 --- a/mm/mmap.c

[PATCHv2] mm/mmap.c: lines in __do_munmap repeat logic of inlined find_vma_intersection

2021-04-07 Thread Gonzalo Matias Juarez Tello
Some lines in __do_munmap used the same logic as find_vma_intersection (which is inlined) instead of directly using that function. (Can't believe I made a typo in the first one, compiled this one, sorry first patch kinda nervous for some reason) Signed-off-by: Gonzalo Matias Juarez Tello

[PATCH] mm/mmap.c: lines in __do_munmap repeat logic of inlined find_vma_intersection

2021-04-07 Thread Gonzalo Matias Juarez Tello
Some lines in __do_munmap used the same logic as find_vma_intersection (which is inlined) instead of directly using that function. Signed-off-by: Gonzalo Matias Juarez Tello --- mm/mmap.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/mm/mmap.c b/mm/mmap.c index

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
ould 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ørling wro

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

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,

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

2020-07-07 Thread Matias Bjorling
> -Original Message- > From: Javier González > Sent: Tuesday, 7 July 2020 10.43 > To: Matias Bjorling > Cc: Damien Le Moal ; ax...@kernel.dk; > kbu...@kernel.org; h...@lst.de; s...@grimberg.me; > martin.peter...@oracle.com; Niklas Cassel ; Hans > Holmberg ; li

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

2020-07-03 Thread Matias Bjorling
> -Original Message- > From: Javier González > Sent: Monday, 29 June 2020 21.39 > To: Damien Le Moal > Cc: Matias Bjorling ; ax...@kernel.dk; > kbu...@kernel.org; h...@lst.de; s...@grimberg.me; > martin.peter...@oracle.com; Niklas Cassel ; Hans > Holmberg ; li

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

2020-06-30 Thread Matias Bjorling
> -Original Message- > From: Bart Van Assche > Sent: Monday, 29 June 2020 03.36 > To: Matias Bjorling ; ax...@kernel.dk; > kbu...@kernel.org; h...@lst.de; s...@grimberg.me; > martin.peter...@oracle.com; Damien Le Moal ; > Niklas Cassel ; Hans Holmberg > > Cc:

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

2020-06-29 Thread Matias Bjorling
> -Original Message- > From: Niklas Cassel > Sent: Monday, 29 June 2020 11.04 > To: Damien Le Moal > Cc: Matias Bjorling ; ax...@kernel.dk; > kbu...@kernel.org; h...@lst.de; s...@grimberg.me; > martin.peter...@oracle.com; Hans Holmberg ; > linux-s...@vger.

[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
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/linux

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

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

2020-06-19 Thread Matias Bjørling
can allocate the completion entries in a 32MB memory range, and then use base_address + index to get back to the completion data structure specified in the sqe. Best, Matias

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

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

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

[PATCH net-next v2] vsock/virtio: add support for MSG_PEEK

2019-09-30 Thread Matias Ezequiel Vara Larsen
This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen Reviewed-by: Stefano Garzarella Tested-by: Stefano Garzarella --- net/vmw_vsock/virtio_transport_common.c | 55

[PATCH v2] vsock/virtio: add support for MSG_PEEK

2019-09-27 Thread Matias Ezequiel Vara Larsen
This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen --- net/vmw_vsock/virtio_transport_common.c | 55 +++-- 1 file changed, 52 insertions(+), 3

Re: [PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-27 Thread Matias Ezequiel Vara Larsen
> > ... > > > > total += bytes; > > off += bytes; > > } > > } > > > > What do you think? > > > > Maybe, but I need to see a complete patch, evil is in the details :) > Thanks both for your comments, I will take them into account and submit a second version. Matias

[PATCH] vsock/virtio: add support for MSG_PEEK

2019-09-26 Thread Matias Ezequiel Vara Larsen
This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen --- net/vmw_vsock/virtio_transport_common.c | 50 +++-- 1 file changed, 47 insertions(+), 3

Re: [RFC] VSOCK: add support for MSG_PEEK

2019-09-23 Thread Matias Ezequiel Vara Larsen
On Mon, Sep 23, 2019 at 09:58:30AM +0200, Stefano Garzarella wrote: > Hi Matias, > thanks for this patch! > > Since this patch only concerns virtio_transport, > I'd use the 'vsock/virtio' prefix in the commit title: > "vsock/virtio: add support for MSG_PEEK" > >

[RFC] VSOCK: add support for MSG_PEEK

2019-09-22 Thread Matias Ezequiel Vara Larsen
This patch adds support for MSG_PEEK. In such a case, packets are not removed from the rx_queue and credit updates are not sent. Signed-off-by: Matias Ezequiel Vara Larsen --- net/vmw_vsock/virtio_transport_common.c | 59 +++-- 1 file changed, 56 insertions(+), 3

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 +++--

[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
- with 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

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

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

2019-03-14 Thread Matias Bjørling
be used as a traditional zoned block device, and use the existing infrastructure. Which is really neat. It is not upstream, since it depends on some features that we introduce with zoned namespaces, but in general, tools can read/write from a block device as any other, just honoring the special write rules that are for OCSSD/zoned block devices. -Matias

Re: [PATCH] pblk: fix max_io calculation

2019-03-07 Thread Matias Bjørling
translates into a stall when an I/O of the largest possible size is submitted. Fixes: f9f9d1ae2c66 ("lightnvm: pblk: prevent stall due to wb threshold") Signed-off-by: Javier González --- Matias: Can you apply this as a fix to 5.1. This is a case I missed when fixing the wb thresh

[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
: 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-rl.c | 5 ++--

[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
in the 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):

[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
sed by Dan and the " Zoned Block Devices" from Matias and Damien. Cheers Stephen [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/ethernet/netronome/nfp/bpf/offload.c?h=v5.0-rc5 If we're going down that road, we can also look at the bl

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

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

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

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

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

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.

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

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

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

[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
with 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ørling

[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

[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
. This 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
is 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
and write path. - Fix from Hua Su to fix a race condition in the pblk recovery code. - Scan optimization added to pblk recovery from Zhoujie. - Small geometry cleanup from me. Thank you, Matias Geert Uytterhoeven (1): lightnvm: Fix uninitialized return value in nvm_get_chunk_meta() Hans Holmberg

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

2018-12-11 Thread Matias Bjørling
and 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
in 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 --- drivers

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

2018-12-11 Thread Matias Bjørling
-by: 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] 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

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

[PATCH] ia64: export node_distance function

2018-11-03 Thread Matias Bjørling
ty into account when selecting a path" Fixes: 73569e11032f "lightnvm: remove dependencies on BLK_DEV_NVME and PCI" Signed-off-by: Matias Bjøring --- arch/ia64/include/asm/numa.h | 4 +++- arch/ia64/kernel/acpi.c | 6 +++--- arch/ia64/mm/numa.c | 6 ++ 3 files changed,

[PATCH] ia64: export node_distance function

2018-11-03 Thread Matias Bjørling
ty into account when selecting a path" Fixes: 73569e11032f "lightnvm: remove dependencies on BLK_DEV_NVME and PCI" Signed-off-by: Matias Bjøring --- arch/ia64/include/asm/numa.h | 4 +++- arch/ia64/kernel/acpi.c | 6 +++--- arch/ia64/mm/numa.c | 6 ++ 3 files changed,

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

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

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")

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")

[PATCH] lightnvm: combine 1.2 and 2.0 command flags

2018-08-02 Thread Matias Bjørling
r, and 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] lightnvm: combine 1.2 and 2.0 command flags

2018-08-02 Thread Matias Bjørling
r, and 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

[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

[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 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

  1   2   3   4   5   6   7   8   9   10   >