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

2017-01-26 Thread Javier González
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> --- include/linux/lightnvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 1

[PATCH] lightnvm: free properly on target creation error

2017-01-26 Thread Javier González
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> --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/li

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

2017-01-26 Thread Javier González
. Also, adapt rrpc to use the new erase path. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 29 drivers/lightnvm/rrpc.c | 64 ++-- drivers/nvme/host/lightnvm.

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

2017-02-24 Thread Javier González
According to the OCSSD 1.2 specification, the 0x200 hint enables the media scrambler for the read/write opcode, providing that the controller has been correctly configured by the firmware. Rename the macro to represent this meaning. Signed-off-by: Javier González <jav...@cnexlabs.com> Sign

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

2017-02-24 Thread Javier González
it internally. Also, adapt rrpc to use the new erase path. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/core.c | 54 +++- drivers/lightnvm/rrpc.c | 3 +-- drive

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

2017-02-24 Thread Javier González
Free the reverse mapping table correctly on target tear down Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index c

[RFC PATCH v2] lightnvm: pblk

2017-02-25 Thread Javier González
interface to query pblk's operation and statistics. * Implement a user - GC I/O rate-limiter * Various bug fixes Javier González (1): lightnvm: physical block device (pblk) target Documentation/lightnvm/pblk.txt | 21 + drivers/lightnvm/Kconfig | 18 + drivers/lightnvm/Makefile

[PATCH 6/7] lightnvm: add ECC error codes

2016-10-27 Thread Javier González
Add ECC error codes to enable the appropriate handling in the target. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index e3ccaff..33643ae

[PATCH 2/7] lightnvm: do not decide on device blocks

2016-10-27 Thread Javier González
Device blocks should be marked by the device and considered as bad blocks by the media manager. Thus, do not make assumptions on which blocks are going to be used by the device. In doing so we might lose valid blocks from the free list. Signed-off-by: Javier González <jav...@cnexlabs.

[PATCH 5/7] lightnvm: export set bad block table

2016-10-27 Thread Javier González
block management to rrpc. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 27 +++ drivers/lightnvm/gennvm.c | 25 + drivers/lightnvm/rrpc.c | 34 +- drivers/lightnvm/sysblk.

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

2016-10-27 Thread Javier González
which target exclusively owns each target and can therefore allocate and free all the necessary structures before initializing the target. Not exclusively owned LUNs belong to the media manager in any case. Adapt rrpc to not use the reserve_lun/release_lun callback functions. Signed-off-by: Javier

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

2016-10-27 Thread Javier González
rrpc cannot handle bios of size > 256kb due to NVME's 64 bit completion bitmap. If a larger bio comes, split it explicitly. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/lightnvm/rrpc.c

[PATCH 1/7] lightnvm: enable to send hint to erase command

2016-10-27 Thread Javier González
Erases might be subject to host hints. An example is multi-plane programming to erase blocks in parallel. Enable targets to specify this hints. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 9 ++--- drivers/lightnvm/gennvm.c| 5 ++--- d

[PATCH 3/7] lightnvm: manage block list on LUN owner

2016-10-27 Thread Javier González
, since LUNs are managed strictly by the target, there is no need for the media manager to reserve GC blocks. As a FTL, rrpc owns exclusively its LUNs. Therefore, adapt rrpc to use the new management interface. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c

[PATCH 2/7] lightnvm: do not decide on device blocks

2016-10-27 Thread Javier González
Device blocks should be marked by the device and considered as bad blocks by the media manager. Thus, do not make assumptions on which blocks are going to be used by the device. In doing so we might lose valid blocks from the free list. Signed-off-by: Javier González <jav...@cnexlabs.

[PATCH 0/7] LightNVM patchset V2

2016-10-27 Thread Javier González
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 callbacks lightnvm: export set bad block table lightnvm

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

2016-10-27 Thread Javier González
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> --- drivers/lightnvm/rrpc.c | 6 ++ 1 file changed, 6 insertions(+) diff --git

[PATCH 6/7] lightnvm: add ECC error codes

2016-10-27 Thread Javier González
Add ECC error codes to enable the appropriate handling in the target. Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index e3ccaff..33643ae

[PATCH 3/7] lightnvm: manage block list on LUN owner

2016-10-27 Thread Javier González
From: Javier González <jav...@javigon.com> LUNs can be exclusively owned by a target through the media manager's reserve_lun function. In this case, the target should implement its own provisioning and manage internally the free/used/bad block list. This patch introduces a LUN mana

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

2016-10-27 Thread Javier González
From: Javier González <jav...@javigon.com> 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 manager. By making use of the newly introdu

[PATCH 1/7] lightnvm: enable to send hint to erase command

2016-10-27 Thread Javier González
Erases might be subject to host hints. An example is multi-plane programming to erase blocks in parallel. Enable targets to specify this hints. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 9 ++--- drivers/lightnvm/gennvm.c| 5 ++--- d

Re: [PATCH 0/8] lightnvm: simplify media manager V2

2016-11-23 Thread Javier González
> On 23 Nov 2016, at 13.06, Matias Bjørling <m...@lightnvm.io> wrote: > > On 11/21/2016 01:10 PM, Javier González wrote: >> V2: >> - Fix 2 bad memory free on error rrpc init error handling. Reported by >>kbuild. >> >> This patchset simplifies

[PATCH 20/20] lightnvm: use target nvm on target-specific ops.

2016-11-18 Thread Javier González
On target-specific operations pass on nvm_tgt_dev instead of the generic nvm device. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 15 ++- drivers/lightnvm/rrpc.c | 14 +++--- drivers/lightnvm/rrpc.h | 2 +- include/linux/ligh

[PATCH 09/20] lightnvm: remove unnecessary variables in rrpc

2016-11-18 Thread Javier González
Before vectored I/Os were supported on rrpc, the physical address was stored as part of the nvm_rqd request. This variable become obsolete when the ppa_list was introduced. Cleanup this variable. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 6 -- d

[PATCH 00/20] lightnvm: simplify media manager

2016-11-18 Thread Javier González
. Patches apply to you for-4.10/core Javier González (20): lightnvm: enable to send hint to erase command lightnvm: do not protect block 0 lightnvm: export set bad block table lightnvm: add ECC error codes lightnvm: rrpc: split bios of size > 256kb lightnvm: remove sysfs configurat

[PATCH 03/20] lightnvm: export set bad block table

2016-11-18 Thread Javier González
From: Javier González <j...@lightnvm.io> Bad blocks should be managed by block owners. This would be either targets for data blocks or sysblk for system blocks. In order to support this, export two functions: One to mark a block as an specific type (e.g., bad block) and another to update t

[PATCH 07/20] lightnvm: cleanup unused target operations

2016-11-18 Thread Javier González
Cleanup definition leftovers from old gennvm interface Signed-off-by: Javier González <jav...@cnexlabs.com> --- include/linux/lightnvm.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 6b26a32..e598308 100644 --- a/include

[PATCH 06/20] lightnvm: remove sysfs configuration interface

2016-11-18 Thread Javier González
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> --- drivers/lightnvm/core.c

[PATCH 19/20] lightnvm: introduce max_phys_sects helper function

2016-11-18 Thread Javier González
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> --- drivers/lightnvm/core.c | 8 include

[PATCH 01/20] lightnvm: enable to send hint to erase command

2016-11-18 Thread Javier González
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 hints. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <m

[PATCH 05/20] lightnvm: rrpc: split bios of size > 256kb

2016-11-18 Thread Javier González
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 13/20] lightnvm: move block provisioning to targets

2016-11-18 Thread Javier González
from the media manager. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 95 ++--- drivers/lightnvm/gennvm.c| 145 +++- drivers/lightnvm/rrpc.c | 196 --- d

[PATCH 10/20] lightnvm: use constant name instead of value

2016-11-18 Thread Javier González
There is a constant to refer to free blocks. Use it when marking bad blocks instead of using a constant value Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/gennvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/gennvm.c b/d

[PATCH 08/20] lightnvm: make address conversion functions global

2016-11-18 Thread Javier González
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> --- drivers/lightnvm/rrpc.c | 30 -- include/linux/lightnvm.h | 30 ++ 2

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

2016-11-18 Thread Javier González
on the merge patch. General information on the Open-Channel SSD project can be seen in [3]. [1] https://github.com/OpenChannelSSD/linux [2] http://openchannelssd.readthedocs.io/en/latest/ [3] http://lightnvm.io Thanks, Javier > On 18 Nov 2016, at 16.03, Javier González <j...@lightnvm.io&

[PATCH 5/8] lightnvm: eliminate nvm_lun abstraction in mm

2016-11-21 Thread Javier González
the path for a partition manager to sit directly underneath LightNVM targets. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +- drivers/lightnvm/gennvm.c| 336 ++- drivers/lightnvm/gennvm.h

[PATCH 2/8] lightnvm: remove get_lun operation on gennvm

2016-11-21 Thread Javier González
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> --- drivers/lightnvm/gennvm.c | 13 + drivers/lightnvm/rrpc.c | 23 +++ include

[PATCH 1/8] lightnvm: move block provisioning to targets

2016-11-21 Thread Javier González
from the media manager. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 95 ++--- drivers/lightnvm/gennvm.c| 145 +++- drivers/lightnvm/rrpc.c | 196 --- d

[PATCH 0/8] lightnvm: simplify media manager V2

2016-11-21 Thread Javier González
. This is done in preparation for the pblk target. Javier González (8): lightnvm: move block provisioning to targets lightnvm: remove get_lun operation on gennvm lightnvm: remove debug lun statistics from gennvm lightnvm: eliminate nvm_block abstraction on mm lightnvm: eliminate nvm_lun

[PATCH 3/8] lightnvm: remove debug lun statistics from gennvm

2016-11-21 Thread Javier González
Since LUNs are managed internally on targets, the media manager has no access to the free LUN lists. Thus, debug functions that show LUN information on the device should not be implemented on the media manager, but rather on the target in itself. Signed-off-by: Javier González <

[PATCH 8/8] lightnvm: use target nvm on target-specific ops.

2016-11-21 Thread Javier González
On target-specific operations pass on nvm_tgt_dev instead of the generic nvm device. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 15 ++- drivers/lightnvm/rrpc.c | 14 +++--- drivers/lightnvm/rrpc.h | 2 +- include/linux/ligh

[PATCH 7/8] lightnvm: introduce max_phys_sects helper function

2016-11-21 Thread Javier González
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> --- drivers/lightnvm/core.c | 8 include

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

2017-04-09 Thread Javier González
Hi Bart, Thanks for reviewing the code. > On 8 Apr 2017, at 22.56, Bart Van Assche <bart.vanass...@sandisk.com> wrote: > > On 04/07/17 11:50, Javier González wrote: >> Documentation/lightnvm/pblk.txt | 21 + >> drivers/lightnvm/Kconfig | 19 + &

[PATCH 2/3] lightnvm: make nvm_free static

2017-04-10 Thread Javier González
Prefix the nvm_free static function with a missing static keyword. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index bdbb333..3e51a05

[PATCH v4] lightnvm: pblk

2017-04-10 Thread Javier González
nts on GC workqueue management and victim selection. * Implement sysfs interface to query pblk's operation and statistics. * Implement a user - GC I/O rate-limiter * Various bug fixes Javier González (1): lightnvm: physical block device (pblk) target Documentation/lightnvm/pblk.txt | 21 + driv

[PATCH 1/3] lightnvm: convert sprintf into snprintf

2017-04-10 Thread Javier González
Convert sprintf calls to snprintf in order to make possible buffer overflow more obvious. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/

[PATCH v5] lightnvn: pblk

2017-04-11 Thread Javier González
ine instead of per LUN. This allows for space optimizations. * Improvements on GC workqueue management and victim selection. * Implement sysfs interface to query pblk's operation and statistics. * Implement a user - GC I/O rate-limiter * Various bug fixes Javier González (1): lightnvm: physi

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

2017-04-11 Thread Javier González
Convert sprintf calls to strlcpy in order to make possible buffer overflow more obvious. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/

[PATCH 0/3] lightnvm: small fixes

2017-04-11 Thread Javier González
Last small lightnvm fixes for lightnvm core. These are motivated by Bart's comments on pblk's patch. Javier González (3): lightnvm: clean unused variable lightnvm: fix type checks on rrpc lightnvm: convert sprintf into strlcpy drivers/lightnvm/core.c | 9 +++-- drivers/lightnvm

[PATCH] lightnvm: convert sprintf into strlcpy

2017-04-11 Thread Javier González
Convert sprintf calls to strlcpy in order to make possible buffer overflow more obvious. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/

[PATCH 1/3] lightnvm: clean unused variable

2017-04-11 Thread Javier González
Clean unused variable on lightnvm core. Signed-off-by: Javier González <jav...@cnexlabs.com> --- 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 100644 --- a/drivers/lightnvm/core.c

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

2017-04-11 Thread Javier González
sector_t is always unsigned, therefore avoid < 0 checks on it. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/rrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/rrpc.c b/drivers/lightnvm/rrpc.c index 5dba544..cf0e2

Re: [PATCH v5] lightnvn: pblk

2017-04-12 Thread Javier González
> On 12 Apr 2017, at 00.23, Bart Van Assche <bart.vanass...@sandisk.com> wrote: > > On Wed, 2017-04-12 at 00:13 +0200, Javier González wrote: >> please point out to any other tools/concerns you may have. > > Hello Javier, > > Do you already have an account a

[PATCH v6] lightnvm: pblk

2017-04-12 Thread Javier González
ent and victim selection. * Implement sysfs interface to query pblk's operation and statistics. * Implement a user - GC I/O rate-limiter * Various bug fixes Javier González (1): lightnvm: physical block device (pblk) target Documentation/lightnvm/pblk.txt | 21 + drivers/lightnvm/Kcon

Re: [PATCH v5] lightnvn: pblk

2017-04-11 Thread Javier González
Hi Bart, > On 11 Apr 2017, at 17.19, Bart Van Assche <bart.vanass...@sandisk.com> wrote: > > On Tue, 2017-04-11 at 16:31 +0200, Javier González wrote: >> Changes since v4: >> * Rebase on top of Matias' for-4.12/core >> * Fix type implicit conversions reporte

Re: [PATCH 1/3] lightnvm: convert sprintf into snprintf

2017-04-11 Thread Javier González
> On 10 Apr 2017, at 20.56, Bart Van Assche <bart.vanass...@sandisk.com> wrote: > > On Mon, 2017-04-10 at 20:51 +0200, Javier González wrote: >> Convert sprintf calls to snprintf in order to make possible buffer >> overflow more obvious. >> >> Signed-off-b

Re: [PATCH 5/5] lightnvm: pblk: fix erase counters on error fail

2017-04-23 Thread Javier González
> On 23 Apr 2017, at 19.59, Matias Bjørling <m...@lightnvm.io> wrote: > > On 04/22/2017 11:31 AM, Javier González wrote: >>> On 22 Apr 2017, at 11.22, Matias Bjørling <m...@lightnvm.io> wrote: >>> >>> On 04/22/2017 01:32 AM, Javier González

Re: [PATCH 01/11] blk: remove bio_set arg from blk_queue_split()

2017-04-22 Thread Javier González
> On 20 Apr 2017, at 07.38, NeilBrown wrote: > > blk_queue_split() is always called with the last arg being q->bio_split, > where 'q' is the first arg. > > Also blk_queue_split() sometimes uses the passed-in 'bs' and sometimes uses > q->bio_split. > > This is inconsistent and

Re: [PATCH 5/5] lightnvm: pblk: fix erase counters on error fail

2017-04-22 Thread Javier González
> On 22 Apr 2017, at 11.22, Matias Bjørling <m...@lightnvm.io> wrote: > > On 04/22/2017 01:32 AM, Javier González wrote: >> When block erases fail, these blocks are marked bad. The number of valid >> blocks in the line was not updated, which could cause an infinit

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

2017-04-07 Thread Javier González
Reorder disk allocation such that the disk structure can be put safely. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c

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

2017-04-07 Thread Javier González
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> --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvm

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

2017-04-07 Thread Javier González
hen 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(+), 7 deletions(-) diff --git a/drivers/lightnvm/c

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

2017-04-07 Thread Javier González
at any moment in time without requiring a full-device erase. Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/core.c | 14 +++--- drivers/lightnvm/rrpc.c | 3 ++- include/linux/lightnvm.h | 3 ++- include/uapi/linux/lightnvm.h | 4 4

[PATCH v3] lightnvm: pblk

2017-04-07 Thread Javier González
. * Improvements on GC workqueue management and victim selection. * Implement sysfs interface to query pblk's operation and statistics. * Implement a user - GC I/O rate-limiter * Various bug fixes Javier González (1): lightnvm: physical block device (pblk) target Documentation/lightnvm/pblk.txt

[PATCH V2] lightnvm: pblk fix for 4.13

2017-07-28 Thread Javier González
make a backport when Greg makes 4.12 stable? Changes since V1: - Make advanced_bio a bool to improve readability, as suggested by Jens Thanks, Javier Javier González (1): lightnvm: pblk: advance bio according to lba index drivers/lightnvm/pblk-rb.c | 4 ++-- rivers/lightnvm/pblk-read.c

[PATCH] lightnvm: pblk: advance bio according to lba index

2017-07-28 Thread Javier González
bio. In the cases when the same I/O also contains a cache hit, data corresponding to this lba will be copied to the wrong bv_page. Fix this by advancing the bio as we do in the case of a cache hit. Fixes: a4bd217b4326 lightnvm: physical block device (pblk) target Signed-off-by: Javier González &

Re: [PATCH V2] lightnvm: pblk fix for 4.13

2017-07-28 Thread Javier González
> On 28 Jul 2017, at 16.06, Jens Axboe <ax...@kernel.dk> wrote: > > On 07/28/2017 07:13 AM, Javier González wrote: >> Hi Jens, >> >> Can you pick up this fix for 4.13? It is a fix to a read corruption in >> pblk that has been there form the beginning.

[PATCH 1/2] lightnvm: pblk: control I/O flow also on tear down

2017-07-07 Thread Javier González
When removing a pblk instance, control the write I/O flow to the controller as we do in the fast path. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-cor

[PATCH 0/2] LightNVM: Fixes for 4.13

2017-07-07 Thread Javier González
and can be found at: https://github.com/OpenChannelSSD/linux pblk.for-4.13 Thanks, Javier Javier González (2): lightnvm: pblk: control I/O flow also on tear down lightnvm: pblk: remove unnecessary checks drivers/lightnvm/pblk-core.c | 69 ++-- drivers

[PATCH 2/2] lightnvm: pblk: remove unnecessary checks

2017-07-07 Thread Javier González
Remove unnecessary checks when freeing dma memory in the completion path. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-write.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --g

[PATCH] lightnvm: pblk: advance bio according to lba index

2017-07-27 Thread Javier González
bio. In the cases when the same I/O also contains a cache hit, data corresponding to this lba will be copied to the wrong bv_page. Fix this by advancing the bio as we do in the case of a cache hit. Fixes: a4bd217b4326 lightnvm: physical block device (pblk) target Signed-off-by: Javier González &

Re: [PATCH] lightnvm: pblk: advance bio according to lba index

2017-07-27 Thread Javier González
> On 27 Jul 2017, at 18.31, Jens Axboe <ax...@kernel.dk> wrote: > > On 07/27/2017 08:49 AM, Javier González wrote: >> When a lba either hits the cache or corresponds to an empty entry in the >> L2P table, we need to advance the bio according to the position in

[PATCH 03/10] lightnvm: pblk: remove unused return variable

2017-06-30 Thread Javier González
Remove unused variable. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-sysfs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/lightnvm/pblk-sysfs.c b/drivers/l

[PATCH 02/10] lightnvm: pblk: fix double-free on pblk init

2017-06-30 Thread Javier González
Prevent pblk->lines being double freed in case of an error during pblk initialization. Fixes: dd2a43437337: "lightnvm: pblk: sched. metadata on write thread" Reported-by: Dan Carpenter <dan.carpen...@oracle.com> Signed-off-by: Javier González <jav...@cnexlabs.com> Signe

[PATCH 09/10] lightnvm: pblk: verify that cache read is still valid

2017-06-30 Thread Javier González
the L2P map right before reading the cache. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-rb.c | 15 --- drivers/lightnvm/pblk-read.c | 3 +-- drivers/lightnvm/pblk.h | 10 +++

[PATCH 05/10] lightnvm: pblk: use right metadata buffer for recovery

2017-06-30 Thread Javier González
Fix bad metadata buffer assignations introduced when refactoring the medatada write path. Fixes: dd2a43437337 lightnvm: pblk: sched. metadata on write thread Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/l

[PATCH 10/10] lightnvm: pblk: set line bitmap check under debug

2017-06-30 Thread Javier González
Do bitmap checks only when debug mode is enable. The line bitmap used for mapping to physical addresses is fairly large (~512KB) and it is expensive to do this checks on the fast path. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cne

[PATCH 04/10] lightnvm: pblk: schedule if data is not ready

2017-06-30 Thread Javier González
-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-rb.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-rb.c b/drivers/lightnvm/pblk-rb.c index 665a4ccfe7f5..2dda874af890 100644 -

[PATCH 07/10] lightnvm: pblk: remove target using async. I/Os

2017-06-30 Thread Javier González
When removing a pblk instance, pad the current line using asynchronous I/O. This reduces the removal time from ~1 minute in the worst case to a couple of seconds. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/l

[PATCH 01/10] lightnvm: pblk: fix bad le64 assignations

2017-06-30 Thread Javier González
Use the right types and conversions on le64 variables. Reported by sparse. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-core.c | 2 +- drivers/lightnvm/pblk-gc.c | 5 - drivers/l

[PATCH 08/10] lightnvm: pblk: add initialization check

2017-06-30 Thread Javier González
Add a sanity check to the pblk initialization sequence in order to ensure that enough LUNs have been allocated to store the line metadata. Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bjørling <mat...@cnexlabs.com> --- drivers/lightnvm/pblk-init.c | 6 ++

[PATCH 06/10] lightnvm: pblk: use vmalloc for GC data buffer

2017-06-30 Thread Javier González
For now, we allocate a per I/O buffer for GC data. Since the potential size of the buffer is 256KB and GC is not in the fast path, do this allocation with vmalloc. This puts lets pressure on the memory allocator at no performance cost. Signed-off-by: Javier González <jav...@cnexlabs.com>

[PATCH 00/10] lightnvm: pblk fixes for 4.13

2017-06-30 Thread Javier González
that we can make in pblk. The patches apply on top of your for-4.13/block and can be found at: https://github.com/OpenChannelSSD pblk.for-4.13 Please pull. Thanks, Javier Javier González (10): lightnvm: pblk: fix bad le64 assignations lightnvm: pblk: fix double-free on pblk init

Re: [bug report] lightnvm: pblk: sched. metadata on write thread

2017-06-28 Thread Javier González
> On 28 Jun 2017, at 16.26, Dan Carpenter <dan.carpen...@oracle.com> wrote: > > Hello Javier González, > > The patch dd2a43437337: "lightnvm: pblk: sched. metadata on write > thread" from Jun 26, 2017, leads to the following static checker > warning: >

Re: [bug report] lightnvm: pblk: sched. metadata on write thread

2017-06-28 Thread Javier González
> On 28 Jun 2017, at 17.03, Dan Carpenter <dan.carpen...@oracle.com> wrote: > > On Wed, Jun 28, 2017 at 04:46:02PM +0200, Javier González wrote: >>> On 28 Jun 2017, at 16.26, Dan Carpenter <dan.carpen...@oracle.com> wrote: >>> >>> Hello Javier Gonz

[PATCH 5/5] lightnvm: pblk: fix erase counters on error fail

2017-04-21 Thread Javier González
htnvm: physical block device (pblk) target" Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/pblk-core.c | 28 +++- drivers/lightnvm/pblk-gc.c| 2 +- drivers/lightnvm/pblk-init.c | 9 ++--- drivers/lightnvm/pblk-map.c | 4 ++--

[PATCH 2/5] lightnvm: pblk: fix bad error check

2017-04-21 Thread Javier González
Fix bad error check Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/pblk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/pblk-core.c b/drive

[PATCH 3/5] lightnvm: pblk: fix memory leak on error path

2017-04-21 Thread Javier González
When write recovery fails, Free memory for the recovery structure. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/pblk-write.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/

Re: [PATCH 1/2] lightnvm: potential underflow in pblk_read_rq()

2017-04-21 Thread Javier González
bio_init_idx; Thanks Dan. While you are at it, can you also modify the type on the other 2 calls to pblk_get_secs in pblk-cache and pblk-core? Otherwise, it is a good catch. Reviewed-by: Javier González <jav...@cnexlabs.com> Javier signature.asc Description: Message signed with OpenPGP

Re: [PATCH 2/2] lightnvm: don't print a warning for ADDR_EMPTY

2017-04-21 Thread Javier González
oto out; > } > > - if (lba == ADDR_EMPTY) > - goto out; > - > spin_lock(>trans_lock); > ppa = pblk_trans_map_get(pblk, lba); > spin_unlock(>trans_lock); Thanks Dan. Reviewed-by: Javier González <jav...@cnexlabs.com> signature.asc Description: Message signed with OpenPGP

[PATCH 1/5] lightnvm: pblk: fix race condition on line retry

2017-04-21 Thread Javier González
When a pblk line fails (or is recovered), make sure to take the line management lock. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/pblk-core.c | 6 +++--- 1 file changed, 3

[PATCH 4/5] lightnvm: pblk: free metadata on line alloc failure

2017-04-21 Thread Javier González
When a line allocation fails, for example, due to having too many bad blocks, free its metadata correctly. Fixes: a4bd217b4326 "lightnvm: physical block device (pblk) target" Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/pblk-core.c | 16

Re: [PATCH 1/2] lightnvm: potential underflow in pblk_read_rq()

2017-04-24 Thread Javier González
> On 24 Apr 2017, at 12.24, Dan Carpenter <dan.carpen...@oracle.com> wrote: > > On Sat, Apr 22, 2017 at 12:24:50AM +0200, Javier González wrote: >>> On 21 Apr 2017, at 22.53, Dan Carpenter <dan.carpen...@oracle.com> wrote: >>> >>> This is

Re: [PATCH -next] lightnvm: fix possible memory leak in pblk_bb_discovery()

2017-04-25 Thread Javier González
e it will cause memory leak. Also skip assign blks to > rlun->bb_list when error. > > Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") > Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> > --- > Thanks Wei. Looks good. Reviewed-by: Javie

Re: [PATCH 09/13] lightnvm/pblk-read: use bio_clone_fast()

2017-05-03 Thread Javier González
> On 2 May 2017, at 23.51, NeilBrown wrote: > >> >> Hi Neil, >> >> Looks good. Thanks for fixing this. I did not know that bio_clone_bioset >> was not supposed to be used on drivers. > > Prior to my patchset, using bio_clone_bioset() wasn't wrong in drivers, > though it was a

[PATCH] lightnvm: pblk: fix bad free seq. on error path

2017-05-12 Thread Javier González
Braces around the error patch for metadata pre-allocation are wrongly placed. This causes a memory leak in case of a memory allocation failure. Fix it Signed-off-by: Javier González <jav...@cnexlabs.com> --- drivers/lightnvm/pblk-init.c | 30 +++--- 1 file chang

Re: Large latency on blk_queue_enter

2017-05-09 Thread Javier González
> On 8 May 2017, at 18.39, Javier González <j...@lightnvm.io> wrote: > >> On 8 May 2017, at 18.06, Jens Axboe <ax...@kernel.dk> wrote: >> >> On 05/08/2017 09:49 AM, Javier González wrote: >>>> On 8 May 2017, at 17.40, Jens Axboe <ax...@kernel.d

Re: Large latency on blk_queue_enter

2017-05-09 Thread Javier González
> On 9 May 2017, at 12.58, Ming Lei <ming@redhat.com> wrote: > > On Tue, May 09, 2017 at 12:34:42PM +0200, Javier González wrote: >>> On 8 May 2017, at 18.39, Javier González <j...@lightnvm.io> wrote: >>> >>>> On 8 May 2017, at 18.06, Jens

Re: Large latency on blk_queue_enter

2017-05-09 Thread Javier González
> On 9 May 2017, at 13.21, Javier González <j...@lightnvm.io> wrote: > >> On 9 May 2017, at 12.58, Ming Lei <ming@redhat.com> wrote: >> >> On Tue, May 09, 2017 at 12:34:42PM +0200, Javier González wrote: >>>> On 8 May 2017, at 18.39, Javier Gon

[PATCH 07/20] lightnvm: pblk: rename read request pool

2017-06-26 Thread Javier González
Read requests allocate some extra memory to store its per I/O context. Instead of requiring yet another memory pool for other type of requests, generalize this context allocation (and change naming accordingly). Signed-off-by: Javier González <jav...@cnexlabs.com> Signed-off-by: Matias Bj

  1   2   3   4   >