[PATCH 06/12] lightnvm: cleanup nvm transformation functions

2017-01-31 Thread Matias Bjørling
the calls to provide clean functions that now either take a list of ppas or a nvm_rq, and is exposed through: void nvm_ppa_* - target to/from device with a list of PPAs, void nvm_rq_* - target to/from device with a nvm_rq. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- d

[PATCH 07/12] lightnvm: reduce number of nvm_id groups to one

2017-01-31 Thread Matias Bjørling
The number of configuration groups has been limited to one in current code, even if there is support for up to four. With the introduction of the open-channel SSD 1.3 specification, only a single group is exposed onwards. Reflect this in the nvm_id structure. Signed-off-by: Matias Bjørling <

[PATCH 12/12] lightnvm: allow targets to use sysfs

2017-01-31 Thread Matias Bjørling
void pointer for exit. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 9 + include/linux/lightnvm.h | 6 ++ 2 files changed, 15 insertions(+) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index b2cd3d6..9bfe035 100644 ---

[PATCH 05/12] lightnvm: make nvm_map_* return void

2017-01-31 Thread Matias Bjørling
The only check there was done was a debugging check. Remove it and replace the return value with void to reduce error checking. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 41 + 1 file changed, 9 insertions(

[PATCH 01/12] lightnvm: merge gennvm with core

2017-01-31 Thread Matias Bjørling
block device, there is no longer a need for this. Therefore lets merge the gennvm code with core and simplify the stack. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/Kconfig | 9 - drivers/lightnvm/Makefile| 3 +- drivers/lightnvm/core.c

[PATCH 09/12] lightnvm: use end_io callback instead of instance

2017-01-31 Thread Matias Bjørling
target instance. Now that core and gennvm is merged, there is no longer a need for this, and a single end_io callback will do. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/block/null_blk.c | 3 ++- drivers/lightnvm/core.c | 7 +++ drivers/lightnvm/rrpc.c

[PATCH 11/12] lightnvm: free properly on target creation error

2017-01-31 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Fix a memory leak when target creation fails. More specifically, free the entire device structure given to the target (tgt_dev). Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.co

[PATCH 03/12] lightnvm: remove nvm_submit_ppa* functions

2017-01-31 Thread Matias Bjørling
The nvm_submit_ppa* functions are no longer needed after gennvm and core have been merged. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 109 --- include/linux/lightnvm.h | 4 -- 2 files changed, 113 del

[PATCH 10/12] lightnvm: Add CRC read error

2017-01-31 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Let the host differentiate between a read error and a CRC check error on the device side. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- include/linux/lightnvm.h | 1 +

[PATCH 04/12] lightnvm: remove nvm_get_bb_tbl and nvm_set_bb_tbl

2017-01-31 Thread Matias Bjørling
Since the merge of gennvm and core, there is no longer a need for the device specific bad block functions. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 40 include/linux/lightnvm.h | 2 -- 2 files chan

[PATCH 6/8] lightnvm: cleanup nvm transformation functions

2017-01-23 Thread Matias Bjørling
the calls to provide clean functions that now either take a list of ppas or a nvm_rq, and is exposed through: void nvm_ppa_* - target to/from device with a list of PPAs, void nvm_rq_* - target to/from device with a nvm_rq. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- d

[PATCH 5/8] lightnvm: make nvm_map_* return void

2017-01-23 Thread Matias Bjørling
The only check there was done was a debugging check. Remove it and replace the return value with void to reduce error checking. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 41 + 1 file changed, 9 insertions(

[PATCH 0/8] lightnvm: cleanups and support for vector ioctls

2017-01-23 Thread Matias Bjørling
, which enables liblightnvm to integrate without any kernel modifications. -Matias Matias Bjørling (8): lightnvm: merge gennvm with core lightnvm: collapse nvm_erase_ppa and nvm_erase_blk lightnvm: remove nvm_submit_ppa* functions lightnvm: remove nvm_get_bb_tbl and nvm_set_bb_tbl

[PATCH 3/8] lightnvm: remove nvm_submit_ppa* functions

2017-01-23 Thread Matias Bjørling
The nvm_submit_ppa* functions are no longer needed after gennvm and core have been merged. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 109 --- include/linux/lightnvm.h | 4 -- 2 files changed, 113 del

[PATCH 4/8] lightnvm: remove nvm_get_bb_tbl and nvm_set_bb_tbl

2017-01-23 Thread Matias Bjørling
Since the merge of gennvm and core, there is no longer a need for the device specific bad block functions. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 40 include/linux/lightnvm.h | 2 -- 2 files chan

[PATCH 8/8] lightnvm: add ioctls for vector I/Os

2017-01-23 Thread Matias Bjørling
SSD completion bits. The implementation covers the traditional use-cases of bad block management, and vectored read/write/erase. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> Metadata implementation, test, and fixes. Signed-off-by: Simon A.F. Lund <sl...@cnexlabs.com> Signed-of

BUG: KASAN: Use-after-free

2017-01-23 Thread Matias Bjørling
Hi, I could use some help verifying an use-after-free bug that I am seeing after the new direct I/O work went in. When issuing a direct write io using libaio, a bio is referenced in the blkdev_direct_IO path, and then put again in the blkdev_bio_end_io path. However, there is a case where the

Re: BUG: KASAN: Use-after-free

2017-01-24 Thread Matias Bjørling
On 01/24/2017 10:52 AM, Christoph Hellwig wrote: > On Tue, Jan 24, 2017 at 10:32:11AM +0100, Matias Bjørling wrote: >> *(gdb) list *blkdev_direct_IO+0x50c >> 0x8142ab8c is in blkdev_direct_IO (fs/block_dev.c:401). >> 396 submit_bio(bio); >&g

Re: BUG: KASAN: Use-after-free

2017-01-24 Thread Matias Bjørling
On 01/23/2017 06:20 PM, Christoph Hellwig wrote: > On Mon, Jan 23, 2017 at 05:07:52PM +0100, Matias Bjørling wrote: >> Hi, >> >> I could use some help verifying an use-after-free bug that I am seeing >> after the new direct I/O work went in. >> >> When issuin

[PATCH] lightnvm: use end_io callback instead of instance

2017-01-24 Thread Matias Bjørling
target instance. Now that core and gennvm is merged, there is no longer a need for this, and a single end_io callback will do. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 5 ++--- drivers/lightnvm/rrpc.c | 11 +-- drivers/lightnvm/rrpc.h | 3 ---

Re: [PATCH 3/3] lightnvm: Add CRC read error

2017-01-30 Thread Matias Bjørling
On 01/26/2017 12:47 PM, Javier González wrote: > Let the host differentiate between a read error and a CRC check error on > the device side. > > Signed-off-by: Javier González > --- > include/linux/lightnvm.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git

Re: [PATCH 2/3] lightnvm: allow targets to use sysfs

2017-01-30 Thread Matias Bjørling
On 01/26/2017 12:47 PM, Javier González wrote: > In order to register through the sysfs interface, a driver needs to know > its kobject. On a disk structure, this happens when the partition > information is added (device_add_disk), which for lightnvm takes place > after the target has been

Re: [PATCH 1/3] lightnvm: submit erases using the I/O path

2017-01-30 Thread Matias Bjørling
On 01/26/2017 12:47 PM, Javier González wrote: > Until now erases has been submitted as synchronous commands through a > dedicated erase function. In order to allow targets implementing > asynchronous erases, refactor the erase path so that it uses the normal > async I/O submission path. If a

Re: [PATCH] lightnvm: free properly on target creation error

2017-01-30 Thread Matias Bjørling
On 01/26/2017 04:57 PM, Javier González wrote: > Fix a memory leak when target creation fails. More specifically, free > the entire device structure given to the target (tgt_dev). > > Signed-off-by: Javier González > --- > drivers/lightnvm/core.c | 2 +- > 1 file changed, 1

Re: [PATCH] lightnvm: Fix error handling

2017-02-20 Thread Matias Bjørling
On 02/19/2017 03:09 PM, Christophe JAILLET wrote: According to error handling in this function, it is likely that going to 'out' was expected here. Signed-off-by: Christophe JAILLET --- drivers/lightnvm/rrpc.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH 3/3] lightnvm: free reverse device map

2017-02-24 Thread Matias Bjørling
On 02/24/2017 05:14 PM, Javier González wrote: Free the reverse mapping table correctly on target tear down Signed-off-by: Javier González --- drivers/lightnvm/core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

Re: [PATCH 2/3] lightnvm: rename scrambler controller hint

2017-02-24 Thread Matias Bjørling
-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- include/linux/lightnvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 6a3534b..bebea80 100644 --- a/i

[PATCH 2/2] lightnvm: fix assert fixes and enable checks

2017-02-24 Thread Matias Bjørling
.ba...@intel.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index e37b432..b6a67ad 100644 --- a/drivers/nvme/hos

[PATCH 1/2] lightnvm: add generic ocssd detection

2017-02-24 Thread Matias Bjørling
-specific strings to be near nil. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 4ea9c93..e37b432 100644 --- a/drivers/nvm

Re: [PATCH 1/2] lightnvm: add generic ocssd detection

2017-02-25 Thread Matias Bjørling
On 02/25/2017 07:21 PM, Christoph Hellwig wrote: On Fri, Feb 24, 2017 at 06:16:48PM +0100, Matias Bjørling wrote: More implementations of OCSSDs are becoming available. Adding each using pci ids are becoming a hassle. Instead, use a 16 byte string in the vendor-specific area

[PATCH 2/2] lightnvm: set default lun range when no luns are specified

2017-02-15 Thread Matias Bjørling
-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 6ce76c0..5262ba6 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -1102,6 +1102,11 @@

Re: [PATCH 0/2] Small fixes for LightNVM core

2017-02-15 Thread Matias Bjørling
On 02/15/2017 04:27 PM, Jens Axboe wrote: > On 02/15/2017 08:25 AM, Matias Bjørling wrote: >> Hi Jens, >> >> Would these two small patches be able to make it for the 4.11 window? If >> not it is totally fine, and I'll include them in the 4.12 drop. > > There

[PATCH 0/2] Small fixes for LightNVM core

2017-02-15 Thread Matias Bjørling
Hi Jens, Would these two small patches be able to make it for the 4.11 window? If not it is totally fine, and I'll include them in the 4.12 drop. Thank you, Matias Matias Bjørling (2): lightnvm: fix off-by-one error on target initialization lightnvm: set default lun range when no luns

Re: BUG: KASAN: Use-after-free

2017-01-24 Thread Matias Bjørling
On 01/24/2017 02:34 PM, Christoph Hellwig wrote: > On Tue, Jan 24, 2017 at 11:01:42AM +0100, Matias Bjørling wrote: >> Yup. That fixes it. Should I put together the patch, or will you take >> care of it? > > I'll send it out. Of course with proper reporting credits for you

Re: [PATCH] lightnvm: propagate device_add() error code

2016-09-16 Thread Matias Bjørling
On 09/15/2016 05:53 PM, Arnd Bergmann wrote: device_add() may fail, and all callers are supposed to check the return value, but one new user in lightnvm doesn't: drivers/lightnvm/sysfs.c: In function 'nvm_sysfs_register_dev': drivers/lightnvm/sysfs.c:184:2: error: ignoring return value of

[PATCH 6/7] lightnvm: expose device geometry through sysfs

2016-09-16 Thread Matias Bjørling
: gennvm ├── ppa_format: 0x380830082808001010102008 ├── vendor_opcode: 0 ├── max_phys_secs: 64 └── version: 1 Signed-off-by: Simon A. F. Lund <sl...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/Makefile| 2 +- drivers/lightnvm/cor

[PATCH 3/7] null_blk: refactor to support non-gendisk devices

2016-09-16 Thread Matias Bjørling
managed. Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/block/null_blk.c | 110 ++- 1 file changed, 61 insertions(+), 49 deletions(-) diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c index 75a7f88..895867a

[PATCH 1/7] lightnvm: NVM should depend on HAS_DMA

2016-09-16 Thread Matias Bjørling
l_create" [drivers/nvme/host/nvme-core.ko] undefined! Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/Kconfi

[GIT PULL 0/7] LightNVM pull request for 4.9

2016-09-16 Thread Matias Bjørling
): lightnvm: NVM should depend on HAS_DMA Matias Bjørling (4): nvme: refactor namespaces to support non-gendisk devices null_blk: refactor to support non-gendisk devices blk-mq: register device instead of disk lightnvm: control life of nvm_dev in driver Simon A. F. Lund (1): lightnvm: expose

[PATCH] LightNVM fix for 4.9-rc5

2016-11-10 Thread Matias Bjørling
Hi Jens, A small calculation bug sneaked into 4.9, which led to data loss using the rrpc FTL. Can the fix be picked up for next -rc, or should I mark it for stable after the 4.9 release? -Matias Matias Bjørling (1): lightnvm: invalid offset calculation for lba_shift drivers/nvme/host

[PATCH] lightnvm: invalid offset calculation for lba_shift

2016-11-10 Thread Matias Bjørling
...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index f5e3011..5daf2f4 100644 --- a/drivers/nvme/host/lightnvm.

[PATCH 16/23] lightnvm: remove get_lun operation on gennvm

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Since LUNs are managed internally on the target, there is no need for the media manager to implement a get_lun operation. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers

[PATCH 18/23] lightnvm: eliminate nvm_block abstraction on mm

2016-11-28 Thread Matias Bjørling
manage their blocks internally. This patch eliminates the nvm_block abstraction and moves block management to the target logic. The rrpc target is transformed. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/core.c

[PATCH 06/23] lightnvm: add ECC error codes

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Add ECC error codes to enable the appropriate handling in the target. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 inserti

[PATCH 19/23] lightnvm: eliminate nvm_lun abstraction in mm

2016-11-28 Thread Matias Bjørling
ioctl. This simplifies LUN management and clears the path for a partition manager to sit directly underneath LightNVM targets. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/core.c | 14 +- drivers

[PATCH 23/23] lightnvm: transform target get/set bad block

2016-11-28 Thread Matias Bjørling
xlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/core.c | 58 +++ drivers/lightnvm/gennvm.c | 19 +++- drivers/lightnvm/rrpc.c | 4 ++-- include/linux/lightnvm.h | 15 +--- 4 files chan

[PATCH 04/23] lightnvm: do not protect block 0

2016-11-28 Thread Matias Bjørling
ed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/gennvm.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/lightnvm/gennvm.c b/drivers/lightnvm/gennvm.c index 730d736..a7e17fa 100644 --- a/drivers/light

[PATCH 20/23] lightnvm: introduce helpers for generic ops in rrpc

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Avoid calling media manager and device-specific operations directly from rrpc. Create helper functions on lightnvm's core instead. Signed-off-by: Javier González <jav...@cnexlabs.com> Made it work with null_blk as well. Signed-off-by: Matias

[PATCH 00/23] LightNVM patches for 4.10

2016-11-28 Thread Matias Bjørling
rpc lightnvm: introduce max_phys_sects helper function lightnvm: use target nvm on target-specific ops. lightnvm: transform target get/set bad block Matias Bjørling (2): nvme: lightnvm: frees wrong cmd structure nvme: lightnvm: attach lightnvm sysfs to nvme block device drivers/lightnvm/Makef

[PATCH 01/23] nvme: lightnvm: frees wrong cmd structure

2016-11-28 Thread Matias Bjørling
Fixes: d49187e97e94 "nvme: introduce struct nvme_request" Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 442f677..de3dc8

[PATCH 02/23] nvme: lightnvm: attach lightnvm sysfs to nvme block device

2016-11-28 Thread Matias Bjørling
Previously, LBA read and write were not supported in the lightnvm specification. Now that it supports it, lets use the traditional NVMe gendisk, and attach the lightnvm sysfs geometry export. Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/Makefile| 2 +- d

[PATCH 21/23] lightnvm: introduce max_phys_sects helper function

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Target devices do not have access to the device driver operations. Introduce a helper function that exposes the max. number of physical sectors supported by the underlying device. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-of

[PATCH 03/23] lightnvm: enable to send hint to erase command

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Erases might be subject to host hints. An example is multi-plane programming to erase blocks in parallel. Enable targets to specify this hint. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m

[PATCH 07/23] lightnvm: rrpc: split bios of size > 256kb

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> rrpc cannot handle bios of size > 256kb due to NVMe using a 64 bit bitmap to signal I/O completion. If a larger bio comes, split it explicitly. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling &l

[PATCH 09/23] lightnvm: cleanup unused target operations

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Cleanup definition leftovers from old gennvm interface Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- include/linux/lightnvm.h | 6 -- 1 file changed, 6 deletions(-) di

[PATCH 15/23] lightnvm: move block provisioning to targets

2016-11-28 Thread Matias Bjørling
target and removes the get/put block interface from the media manager. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/core.c | 95 ++--- drivers/lightnvm

[PATCH 08/23] lightnvm: remove sysfs configuration interface

2016-11-28 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> LightNVM used to be managed and configured through sysfs. Since the introduction of management ioctls this interface is redundant and outdated. Get rid of it. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias

[PATCH 10/23] lightnvm: make address conversion functions global

2016-11-28 Thread Matias Bjørling
argets. This function will be needed by the media manager in order to do target mapping translations when targets are divided on different physical partitions. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lig

[PATCH 2/2] nvme: lightnvm: attach lightnvm sysfs to nvme block device

2016-11-18 Thread Matias Bjørling
Previously, LBA read and write were not supported in the lightnvm specification. Now that it supports it, lets use the traditional NVMe gendisk, and attach the lightnvm sysfs geometry export. Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/lightnvm/Makefile| 2 +- d

[PATCH 0/2] nvme: lightnvm: fix and wire up

2016-11-18 Thread Matias Bjørling
Hi all, The first patch is a small fix to the freeing of the cmd structure in lightnvm, and the second patch wires up the lightnvm sysfs interface to the nvme gendisk. -Matias Matias Bjørling (2): nvme: lightnvm: frees wrong cmd structure nvme: lightnvm: attach lightnvm sysfs to nvme block

[PATCH 1/2] nvme: lightnvm: frees wrong cmd structure

2016-11-18 Thread Matias Bjørling
Fixes: d49187e97e94 "nvme: introduce struct nvme_request" Signed-off-by: Matias Bjørling <m...@bjorling.me> --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 442f677..de3dc8

Re: [PATCH 00/20] lightnvm: simplify media manager

2016-11-21 Thread Matias Bjørling
On 11/18/2016 03:43 PM, Javier González wrote: > This patchset simplifies the generic media manager interface and moves > lun and block functionality to lightnvm targets. This makes that > rrpc-specific functionality is not exposed on the media manager. This is > done in preparation for the pblk

Re: [PATCH 4/7] lightnvm: drop reserve and release LUN callbacks

2016-10-31 Thread Matias Bjørling
On 10/31/2016 09:22 PM, Jens Axboe wrote: > On 10/31/2016 07:08 AM, Matias Bjørling wrote: >> On 10/27/2016 08:01 PM, Javier González wrote: >>> From: Javier González <jav...@javigon.com> >>> >>> On target initialization, targets use callbacks to t

Re: [PATCH 4/7] lightnvm: drop reserve and release LUN callbacks

2016-10-31 Thread Matias Bjørling
On 10/27/2016 08:01 PM, Javier González wrote: > From: Javier González > > On target initialization, targets use callbacks to the media manager to > configure the LUNs they use. In order to simplify the flow, drop this > callbacks and manage everything internally on the media

Re: [PATCH 0/7] LightNVM patchset V2

2016-11-02 Thread Matias Bjørling
On 10/27/2016 08:01 PM, Javier González wrote: > V2: Rebase patches on Matias' for-next > > Javier González (7): > lightnvm: enable to send hint to erase command > lightnvm: do not decide on device blocks > lightnvm: manage block list on LUN owner > lightnvm: drop reserve and release LUN

Re: [LSF/MM TOPIC][LSF/MM ATTEND] OCSSDs - SMR, Hierarchical Interface, and Vector I/Os

2017-01-06 Thread Matias Bjørling
On 01/05/2017 11:58 PM, Slava Dubeyko wrote: > Next point is read disturbance. If BER of physical page/block achieves some > threshold then > we need to move data from one page/block into another one. What subsystem > will be > responsible for this activity? The drive-managed case expects that

Re: [LSF/MM TOPIC][LSF/MM ATTEND] OCSSDs - SMR, Hierarchical Interface, and Vector I/Os

2017-01-06 Thread Matias Bjørling
On 01/06/2017 02:09 AM, Jaegeuk Kim wrote: > Hello, > > On 01/04, Damien Le Moal wrote: > > ... >> >>> Finally, if I really like to develop SMR- or NAND flash oriented file >>> system then I would like to play with peculiarities of concrete >>> technologies. And any unified interface will

Re: [LSF/MM TOPIC][LSF/MM ATTEND] OCSSDs - SMR, Hierarchical Interface, and Vector I/Os

2017-01-03 Thread Matias Bjørling
On 01/03/2017 12:12 AM, Viacheslav Dubeyko wrote: > On Mon, 2017-01-02 at 22:06 +0100, Matias Bjørling wrote: >> Hi, >> >> The open-channel SSD subsystem is maturing, and drives are beginning >> to >> become available on the market. > > What do you mean?

[LSF/MM TOPIC][LSF/MM ATTEND] OCSSDs - SMR, Hierarchical Interface, and Vector I/Os

2017-01-02 Thread Matias Bjørling
Hi, The open-channel SSD subsystem is maturing, and drives are beginning to become available on the market. The open-channel SSD interface is very similar to the one exposed by SMR hard-drives. They both have a set of chunks (zones) exposed, and zones are managed using open/close logic. The

Re: [LSF/MM TOPIC][LSF/MM ATTEND] OCSSDs - SMR, Hierarchical Interface, and Vector I/Os

2017-01-03 Thread Matias Bjørling
On 01/03/2017 06:35 PM, Viacheslav Dubeyko wrote: Hi Matias, On Tue, 2017-01-03 at 09:56 +0100, Matias Bjørling wrote: On 01/03/2017 12:12 AM, Viacheslav Dubeyko wrote: On Mon, 2017-01-02 at 22:06 +0100, Matias Bjørling wrote: Hi, The open-channel SSD subsystem is maturing, and drives

Re: [PATCH v3] lightnvm: physical block device (pblk) target

2017-04-10 Thread Matias Bjørling
On 04/10/2017 05:55 PM, Bart Van Assche wrote: On Sun, 2017-04-09 at 11:15 +0200, Javier González wrote: On 8 Apr 2017, at 22.56, Bart Van Assche wrote: On 04/07/17 11:50, Javier González wrote: struct ppa_addr, which is the physical address format is not

Re: [PATCH 2/3] lightnvm: fix type checks on rrpc

2017-04-11 Thread Matias Bjørling
On 04/11/2017 04:18 PM, Javier González wrote: sector_t is always unsigned, therefore avoid < 0 checks on it. Signed-off-by: Javier González --- drivers/lightnvm/rrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/rrpc.c

Re: [PATCH 1/3] lightnvm: clean unused variable

2017-04-11 Thread Matias Bjørling
On 04/11/2017 04:18 PM, Javier González wrote: Clean unused variable on lightnvm core. Signed-off-by: Javier González --- drivers/lightnvm/core.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index eb9ab1a..258007a

Re: [PATCH 3/3] lightnvm: convert sprintf into strlcpy

2017-04-11 Thread Matias Bjørling
On 04/11/2017 04:18 PM, Javier González wrote: Convert sprintf calls to strlcpy in order to make possible buffer overflow more obvious. Signed-off-by: Javier González --- drivers/lightnvm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

Re: [PATCH v5] lightnvm: physical block device (pblk) target

2017-04-11 Thread Matias Bjørling
- providing I/O isolation for each case. Finally, pblk also exposes a sysfs interface that allows user-space to peek into the internals of pblk. The interface is available at /dev/block/*/pblk/ where * is the block device name exposed. This work also contains contributions from: Matias Bjørling

Re: [PATCH] lightnvm: don't check for failure from mempool_alloc()

2017-04-10 Thread Matias Bjørling
On 04/10/2017 04:07 AM, NeilBrown wrote: mempool_alloc() cannot fail if the gfp flags allow it to sleep, and both GFP_KERNEL and GFP_NOIO allows for sleeping. So rrpc_move_valid_pages() and rrpc_make_rq() don't need to test the return value. Signed-off-by: NeilBrown ---

Re: [PATCH 2/4] lightnvm: fix cleanup order of disk on init error

2017-04-11 Thread Matias Bjørling
On 04/07/2017 08:31 PM, Javier González wrote: Reorder disk allocation such that the disk structure can be put safely. Signed-off-by: Javier González --- drivers/lightnvm/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git

Re: [PATCH 1/4] lightnvm: double-clear of dev->lun_map on target init error

2017-04-11 Thread Matias Bjørling
bit, such that clearing of bits can ignored when cleaning up a successful initialized target. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 16 +--- 1 file changed, 9 insertions(

Re: [PATCH 4/4] lightnvm: allow to init targets on factory mode

2017-04-11 Thread Matias Bjørling
On 04/07/2017 08:31 PM, Javier González wrote: Target initialization has two responsibilities: creating the target partition and instantiating the target. This patch enables to create a factory partition (e.g., do not trigger recovery on the given target). This is useful for target development

Re: [PATCH 3/4] lightnvm: bad type conversion for nvme control bits

2017-04-11 Thread Matias Bjørling
On 04/07/2017 08:31 PM, Javier González wrote: The NVMe I/O command control bits are 16 bytes, but is interpreted as 32 bytes in the lightnvm user I/O data path. Signed-off-by: Javier González --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH 2/3] lightnvm: make nvm_free static

2017-04-11 Thread Matias Bjørling
On 04/10/2017 08:51 PM, Javier González wrote: Prefix the nvm_free static function with a missing static keyword. Signed-off-by: Javier González --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c

Re: [PATCH v6] lightnvm: physical block device (pblk) target

2017-04-12 Thread Matias Bjørling
- providing I/O isolation for each case. Finally, pblk also exposes a sysfs interface that allows user-space to peek into the internals of pblk. The interface is available at /dev/block/*/pblk/ where * is the block device name exposed. This work also contains contributions from: Matias Bjørling

Re: [PATCH] lightnvm: pblk-gc: fix an error pointer dereference in init

2017-04-13 Thread Matias Bjørling
On 04/13/2017 09:32 PM, Dan Carpenter wrote: These labels are reversed so we could end up dereferencing an error pointer or leaking. Fixes: 7f347ba6bb3a ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter diff --git

Re: [PATCH] lightnvm: fix some WARN() messages

2017-04-13 Thread Matias Bjørling
On 04/13/2017 09:36 PM, Dan Carpenter wrote: WARN_ON() takes a condition, not an error message. I slightly tweaked some conditions so hopefully it's more clear. Signed-off-by: Dan Carpenter diff --git a/drivers/lightnvm/pblk-read.c b/drivers/lightnvm/pblk-read.c

Re: [PATCH] lightnvm: fix some error code in pblk-init.c

2017-04-13 Thread Matias Bjørling
On 04/13/2017 09:35 PM, Dan Carpenter wrote: There were a bunch of places in pblk_lines_init() where we didn't set an error code. And in pblk_writer_init() we accidentally return 1 instead of a correct error code, which would result in a Oops later. Fixes: 11a5d6fdf919 ("lightnvm: physical

Re: [PATCH] lightnvm: assume 64-bit lba numbers

2017-04-19 Thread Matias Bjørling
On 04/19/2017 07:39 PM, Arnd Bergmann wrote: The driver uses both u64 and sector_t to refer to offsets, and assigns between the two. This causes one harmless warning when sector_t is 32-bit: drivers/lightnvm/pblk-rb.c: In function 'pblk_rb_write_entry_gc': include/linux/lightnvm.h:215:20:

[GIT PULL 04/19] lightnvm: rename scrambler controller hint

2017-04-15 Thread Matias Bjørling
Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- include/linux/lightnvm.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index e11163f..eff7d1f 100644 --- a/include/linu

[GIT PULL 02/19] nvme/lightnvm: Prevent small buffer overflow in nvme_nvm_identify

2017-04-15 Thread Matias Bjørling
struct nvm_addr_format) $2 = 12 In the nvme_nvm_identify function we memcpy from the larger struct to the smaller struct. We incorrectly pass the length of the larger struct and overflow by 4 bytes, lets not do that. Signed-off-by: Scott Bauer <scott.ba...@intel.com> Signed-off-by: Matias B

[GIT PULL 03/19] lightnvm: submit erases using the I/O path

2017-04-15 Thread Matias Bjørling
target requires sync I/O, it can implement it internally. Also, adapt rrpc to use the new erase path. Signed-off-by: Javier González <jav...@cnexlabs.com> Fixed spelling error. Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com&g

[GIT PULL 00/19] LightNVM patches for 4.12.

2017-04-15 Thread Matias Bjørling
unused variable lightnvm: fix type checks on rrpc lightnvm: convert sprintf into strlcpy lightnvm: physical block device (pblk) target Matias Bjørling (1): lightnvm: enable nvme size compile asserts NeilBrown (1): lightnvm: don't check for failure from mempool_alloc() Scott Bauer (1): n

[GIT PULL 19/19] lightnvm: fix some error code in pblk-init.c

2017-04-15 Thread Matias Bjørling
m: physical block device (pblk) target") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-init.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/drivers/li

[GIT PULL 12/19] lightnvm: make nvm_free static

2017-04-15 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Prefix the nvm_free static function with a missing static keyword. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insert

[GIT PULL 18/19] lightnvm: fix some WARN() messages

2017-04-15 Thread Matias Bjørling
From: Dan Carpenter <dan.carpen...@oracle.com> WARN_ON() takes a condition, not an error message. I slightly tweaked some conditions so hopefully it's more clear. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> ---

[GIT PULL 17/19] lightnvm: pblk-gc: fix an error pointer dereference in init

2017-04-15 Thread Matias Bjørling
From: Dan Carpenter <dan.carpen...@oracle.com> These labels are reversed so we could end up dereferencing an error pointer or leaking. Fixes: 7f347ba6bb3a ("lightnvm: physical block device (pblk) target") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by

[GIT PULL 09/19] lightnvm: fix cleanup order of disk on init error

2017-04-15 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Reorder disk allocation such that the disk structure can be put safely. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +++---

[GIT PULL 07/19] lightnvm: don't check for failure from mempool_alloc()

2017-04-15 Thread Matias Bjørling
; Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 4e4c299..a8acf9e 100644 --- a/drivers/lightnvm/rrpc.c +++ b/drivers/lightnvm/rrpc.c @@ -318,10 +3

[GIT PULL 05/19] lightnvm: free reverse device map

2017-04-15 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> Free the reverse mapping table correctly on target tear down Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +- 1 file changed, 1

[GIT PULL 01/19] lightnvm: Fix error handling

2017-04-15 Thread Matias Bjørling
From: Christophe JAILLET <christophe.jail...@wanadoo.fr> According to error handling in this function, it is likely that going to 'out' was expected here. Signed-off-by: Christophe JAILLET <christophe.jail...@wanadoo.fr> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> ---

[GIT PULL 06/19] lightnvm: enable nvme size compile asserts

2017-04-15 Thread Matias Bjørling
.ba...@intel.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/nvme/host/lightnvm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 4ea9c93..12c5a40 100644 --- a/drivers/nvme/hos

[GIT PULL 10/19] lightnvm: bad type conversion for nvme control bits

2017-04-15 Thread Matias Bjørling
From: Javier González <j...@lightnvm.io> The NVMe I/O command control bits are 16 bytes, but is interpreted as 32 bytes in the lightnvm user I/O data path. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/nv

  1   2   3   4   5   >