Re: [PATCH v2 08/11] block: sed-opal: ioctl for writing to shadow mbr

2018-03-29 Thread Jonas Rabenstein
Hi, On Wed, Mar 21, 2018 at 02:43:21AM +0100, Jonas Rabenstein wrote: > On Tue, Mar 20, 2018 at 04:09:08PM -0600, Scott Bauer wrote: > > On Tue, Mar 20, 2018 at 10:36:04AM +0100, Jonas Rabenstein wrote: > > > On Mon, Mar 19, 2018 at 08:52:24PM +0100, Christoph Hellwig wrote: > > > > On Mon, Mar

Re: Multi-Actuator SAS HDD First Look

2018-03-29 Thread Douglas Gilbert
On 2018-03-26 11:08 AM, Hannes Reinecke wrote: On Fri, 23 Mar 2018 08:57:12 -0600 Tim Walker wrote: Seagate announced their split actuator SAS drive, which will probably require some kernel changes for full support. It's targeted at cloud provider JBODs and RAID.

Re: [PATCH v2 08/11] block: sed-opal: ioctl for writing to shadow mbr

2018-03-29 Thread Scott Bauer
On Thu, Mar 29, 2018 at 07:30:02PM +0200, Jonas Rabenstein wrote: > Hi, > On Wed, Mar 21, 2018 at 02:43:21AM +0100, Jonas Rabenstein wrote: > > On Tue, Mar 20, 2018 at 04:09:08PM -0600, Scott Bauer wrote: > > > On Tue, Mar 20, 2018 at 10:36:04AM +0100, Jonas Rabenstein wrote: > > > > On Mon, Mar

[GIT PULL 29/37] lightnvm: make address conversions depend on generic device

2018-03-29 Thread Matias Bjørling
From: Javier González On address conversions, use the generic device, instead of the target device. This allows to use conversions outside of the target's realm. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 28/37] lightnvm: add support for 2.0 address format

2018-03-29 Thread Matias Bjørling
From: Javier González Add support for 2.0 address format. Also, align address bits for 1.2 and 2.0 to be able to operate on channel and luns without requiring a format conversion. Use a generic address format for this purpose. Also, convert the generic operations to the

[GIT PULL 23/37] lightnvm: simplify geometry structure

2018-03-29 Thread Matias Bjørling
From: Javier González Currently, the device geometry is stored redundantly in the nvm_id and nvm_geo structures at a device level. Moreover, when instantiating targets on a specific number of LUNs, these structures are replicated and manually modified to fit the instance

[GIT PULL 27/37] lightnvm: normalize geometry nomenclature

2018-03-29 Thread Matias Bjørling
From: Javier González Normalize nomenclature for naming channels, luns, chunks, planes and sectors as well as derivations in order to improve readability. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 22/37] lightnvm: pblk: refactor init/exit sequences

2018-03-29 Thread Matias Bjørling
From: Javier González Refactor init and exit sequences to eliminate dependencies among init modules and improve readability. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 415

[GIT PULL 26/37] lightnvm: complete geo structure with maxoc*

2018-03-29 Thread Matias Bjørling
From: Javier González Complete the generic geometry structure with the maxoc and maxocpu felds, present in the 2.0 spec. Also, expose them through sysfs. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 30/37] lightnvm: implement get log report chunk helpers

2018-03-29 Thread Matias Bjørling
From: Javier González The 2.0 spec provides a report chunk log page that can be retrieved using the stangard nvme get log page. This replaces the dedicated get/put bad block table in 1.2. This patch implements the helper functions to allow targets retrieve the chunk

[GIT PULL 34/37] lightnvm: pblk: implement 2.0 support

2018-03-29 Thread Matias Bjørling
From: Javier González Implement 2.0 support in pblk. This includes the address formatting and mapping paths, as well as the sysfs entries for them. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 31/37] lightnvm: pblk: check for supported version

2018-03-29 Thread Matias Bjørling
From: Javier González At this point, only 1.2 spec is supported, thus check for it. Also, since device-side L2P is only supported in the 1.2 spec, make sure to only check its value under 1.2. Signed-off-by: Javier González Signed-off-by: Matias

[GIT PULL 32/37] lightnvm: pblk: rename ppaf* to addrf*

2018-03-29 Thread Matias Bjørling
From: Javier González In preparation for 2.0 support in pblk, rename variables referring to the address format to addrf and reserve ppaf for the 1.2 path. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 33/37] lightnvm: pblk: implement get log report chunk

2018-03-29 Thread Matias Bjørling
From: Javier González In preparation of pblk supporting 2.0, implement the get log report chunk in pblk. Also, define the chunk states as given in the 2.0 spec. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 25/37] lightnvm: add shorten OCSSD version in geo

2018-03-29 Thread Matias Bjørling
From: Javier González Create a shorten version to use in the generic geometry. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 6 ++ include/linux/lightnvm.h | 8 2

[GIT PULL 20/37] lightnvm: centralize permission check for lightnvm ioctl

2018-03-29 Thread Matias Bjørling
From: Johannes Thumshirn Currently all functions for handling the lightnvm core ioctl commands do a check for CAP_SYS_ADMIN. Change this to fail early in nvm_ctl_ioctl(), so we don't have to duplicate the permission checks all over. Signed-off-by: Johannes Thumshirn

[GIT PULL 09/37] lightnvm: pblk: delete writer kick timer before stopping thread

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg Unless we delete the timer that wakes up the write thread before we stop the thread we risk re-starting the thread, so delete the timer first. Signed-off-by: Hans Holmberg Reviewed-by: Javier González

[GIT PULL 01/37] lightnvm/pblk-gc: Delete an error message for a failed memory allocation in pblk_gc_line_prepare_ws()

2018-03-29 Thread Matias Bjørling
From: Markus Elfring Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring Reviewed-by: Javier González

[GIT PULL 07/37] lightnvm: remove multiple groups in 1.2 data structure

2018-03-29 Thread Matias Bjørling
Only one id group from the 1.2 specification is supported. Make sure that only the first group is accessible. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c

[GIT PULL 08/37] lightnvm: pblk: add padding distribution sysfs attribute

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg When pblk receives a sync, all data up to that point in the write buffer must be comitted to persistent storage, and as flash memory comes with a minimal write size there is a significant cost involved both in terms of time for completing the sync

[GIT PULL 04/37] lightnvm: pblk: check data lines version on recovery

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg As a preparation for future bumps of data line persistent storage versions, we need to start checking the emeta line version during recovery. Also slit up the current emeta/smeta version into two bytes (major,minor). Recovering lines with the same

[GIT PULL 36/37] lightnvm: pblk: remove some unnecessary NULL checks

2018-03-29 Thread Matias Bjørling
From: Dan Carpenter Smatch complains that flush_workqueue() dereferences the work queue pointer but then we check if it's NULL on the next line when it's too late. These NULL checks can be removed because the module won't load if we can't allocate the work queues.

[GIT PULL 37/37] lightnvm: remove function name in strings

2018-03-29 Thread Matias Bjørling
For the sysfs functions, the function names are embedded into their error strings. If the function name later changes, the string may not be updated accordingly. Update the strings to use __func__ to avoid this. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c |

[GIT PULL 35/37] lightnvm: pblk: don't recover unwritten lines

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg If the line has not been written to, we should not try to recover any data from it, so check the state of the chunks in the line before attempting to read smeta. Signed-off-by: Hans Holmberg Signed-off-by: Javier

[GIT PULL 14/37] lightnvm: flatten nvm_id_group into nvm_id

2018-03-29 Thread Matias Bjørling
There are no groups in the 2.0 specification, make sure that the nvm_id structure is flattened before 2.0 data structures are added. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 25 ++- drivers/nvme/host/lightnvm.c | 100

[GIT PULL 12/37] lightnvm: pblk: refactor bad block identification

2018-03-29 Thread Matias Bjørling
From: Javier González In preparation for the OCSSD 2.0 spec. bad block identification, refactor the current code to generalize bad block get/set functions and structures. Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

[GIT PULL 19/37] lightnvm: fix bad block initialization

2018-03-29 Thread Matias Bjørling
From: Heiner Litz fix reading bad block device information to correctly setup the per line blk_bitmap during lightnvm initialization Signed-off-by: Heiner Litz Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 3 ++- 1 file

[GIT PULL 11/37] lightnvm: pblk: prevent race in pblk_rb_flush_point_set

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg Make sure that we are not advancing the sync pointer while we're adding bios to the write buffer entry completion list. This race condition results in bios not completing and was identified by a hang when running xfstest generic/113.

[GIT PULL 15/37] lightnvm: add 2.0 geometry identification

2018-03-29 Thread Matias Bjørling
Implement the geometry data structures for 2.0 and enable a drive to be identified as one, including exposing the appropriate 2.0 sysfs entries. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 8 +- drivers/nvme/host/lightnvm.c | 334

[GIT PULL 10/37] lightnvm: pblk: allow allocation of new lines during shutdown

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg When shutting down pblk the write buffer is flushed and if the current line can't fit the data in the write buffer we need to allocate a new line, so remove the check that prevents this. Signed-off-by: Hans Holmberg

[GIT PULL 05/37] lightnvm: pblk: export write amplification counters to sysfs

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg In a SSD, write amplification, WA, is defined as the average number of page writes per user page write. Write amplification negatively affects write performance and decreases the lifetime of the disk, so it's a useful metric to add to sysfs. In

[GIT PULL 02/37] lightnvm: remove chnl_offset in nvme_nvm_identity

2018-03-29 Thread Matias Bjørling
The identity structure is initialized to zero in the beginning of the nvme_nvm_identity function. The chnl_offset is separately set to zero. Since both the variable and assignment is never changed, remove them. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c |

[GIT PULL 24/37] lightnvm: add minor version to generic geometry

2018-03-29 Thread Matias Bjørling
From: Javier González Separate the version between major and minor on the generic geometry and represent it through sysfs in the 2.0 path. The 1.2 path only shows the major version to preserve the existing user space interface. Signed-off-by: Javier González

[GIT PULL 21/37] lightnvm: Avoid validation of default op value

2018-03-29 Thread Matias Bjørling
From: Heiner Litz Fixes: 38401d231de65 ("lightnvm: set target over-provision on create ioctl") Signed-off-by: Heiner Litz Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 6 ++

[GIT PULL 13/37] lightnvm: make 1.2 data structures explicit

2018-03-29 Thread Matias Bjørling
Make the 1.2 data structures explicit, so it will be easy to identify the 2.0 data structures. Also fix the order of which the nvme_nvm_* are declared, such that they follow the nvme_nvm_command order. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 82

[GIT PULL 16/37] lightnvm: remove max_rq_size

2018-03-29 Thread Matias Bjørling
The field is no longer used. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 1 - include/linux/lightnvm.h | 2 -- 2 files changed, 3 deletions(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 521f520a1bb4..a59ad29600c3 100644 ---

[GIT PULL 18/37] nvme: lightnvm: add late setup of block size and metadata

2018-03-29 Thread Matias Bjørling
The nvme driver sets up the size of the nvme namespace in two steps. First it initializes the device with standard logical block and metadata sizes, and then sets the correct logical block and metadata size. Due to the OCSSD 2.0 specification relies on the namespace to expose these sizes for

[GIT PULL 17/37] lightnvm: remove nvm_dev_ops->max_phys_sect

2018-03-29 Thread Matias Bjørling
The value of max_phys_sect is always static. Instead of defining it in the nvm_dev_ops structure, declare it as a global value. Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 28 +++- drivers/lightnvm/pblk-init.c | 9

[GIT PULL 00/37] lightnvm patches for 4.17

2018-03-29 Thread Matias Bjørling
Hi Jens, Here is a bunch of patches for 4.17. They include: - Open-Channel 2.0 support by Javier and I. - Lots of refactoring patches to enable 2.0 support. - Fixes to pblk from Hans, Markus, and Dan. - Introduction of write amplication and padding counters. From Hans. - Fix from Johannes

[GIT PULL 06/37] lightnvm: remove mlc pairs structure

2018-03-29 Thread Matias Bjørling
From: Matias Bjørling The known implementations of the 1.2 specification, and upcoming 2.0 implementation all expose a sequential list of pages to write. Remove the data structure, as it is no longer needed. Signed-off-by: Matias Bjørling ---

[GIT PULL 03/37] lightnvm: pblk: handle bad sectors in the emeta area correctly

2018-03-29 Thread Matias Bjørling
From: Hans Holmberg Unless we check if there are bad sectors in the entire emeta-area we risk ending up with valid bitmap / available sector count inconsistency. This results in lines with a bad chunk at the last LUN marked as bad, so go through the whole emeta area

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Ming Lei
On Thu, Mar 29, 2018 at 05:52:16PM +0800, Ming Lei wrote: > On Thu, Mar 29, 2018 at 09:23:10AM +0200, Christian Borntraeger wrote: > > > > > > On 03/29/2018 04:00 AM, Ming Lei wrote: > > > On Wed, Mar 28, 2018 at 05:36:53PM +0200, Christian Borntraeger wrote: > > >> > > >> > > >> On 03/28/2018

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Christian Borntraeger
On 03/29/2018 12:11 PM, Christian Borntraeger wrote: > > > On 03/29/2018 11:52 AM, Ming Lei wrote: >> From the debugfs log, hctx0 is mapped to lots of CPU, so it shouldn't be >> unmapped, could you check if it is hctx0 which is unmapped when the >> warning is triggered? If not, what is the

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Ming Lei
On Thu, Mar 29, 2018 at 11:09:08AM +0200, Christian Borntraeger wrote: > > > On 03/29/2018 09:23 AM, Christian Borntraeger wrote: > > > > > > On 03/29/2018 04:00 AM, Ming Lei wrote: > >> On Wed, Mar 28, 2018 at 05:36:53PM +0200, Christian Borntraeger wrote: > >>> > >>> > >>> On 03/28/2018

Re: General protection fault with use_blk_mq=1.

2018-03-29 Thread Zephaniah E. Loss-Cutler-Hull
On 03/28/2018 10:13 PM, Paolo Valente wrote: > > >> Il giorno 29 mar 2018, alle ore 05:22, Jens Axboe ha >> scritto: >> >> On 3/28/18 9:13 PM, Zephaniah E. Loss-Cutler-Hull wrote: >>> On 03/28/2018 06:02 PM, Jens Axboe wrote: On 3/28/18 5:03 PM, Zephaniah E.

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Ming Lei
On Thu, Mar 29, 2018 at 09:23:10AM +0200, Christian Borntraeger wrote: > > > On 03/29/2018 04:00 AM, Ming Lei wrote: > > On Wed, Mar 28, 2018 at 05:36:53PM +0200, Christian Borntraeger wrote: > >> > >> > >> On 03/28/2018 05:26 PM, Ming Lei wrote: > >>> Hi Christian, > >>> > >>> On Wed, Mar 28,

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Christian Borntraeger
On 03/29/2018 11:52 AM, Ming Lei wrote: > From the debugfs log, hctx0 is mapped to lots of CPU, so it shouldn't be > unmapped, could you check if it is hctx0 which is unmapped when the > warning is triggered? If not, what is the unmapped hctx? And you can do > that by adding one extra line: > >

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Christian Borntraeger
On 03/29/2018 09:23 AM, Christian Borntraeger wrote: > > > On 03/29/2018 04:00 AM, Ming Lei wrote: >> On Wed, Mar 28, 2018 at 05:36:53PM +0200, Christian Borntraeger wrote: >>> >>> >>> On 03/28/2018 05:26 PM, Ming Lei wrote: Hi Christian, On Wed, Mar 28, 2018 at 09:45:10AM

RE: query on blk_rq_timed_out

2018-03-29 Thread Muneendra Kumar M
Hi , If we call submit_bio/blk_execute_rq and due to some target issues we hit the blk_rq_timed_out. In blk_rq_timed_out    __blk_complete_request  gets called only in BLK_EH_HANDLED case and if q->rq_timed_out_fn doesn’t return BLK_EH_HANDLED and returns only BLK_EH_NOT_HANDLED/

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Christian Borntraeger
On 03/29/2018 11:40 AM, Ming Lei wrote: > On Thu, Mar 29, 2018 at 11:09:08AM +0200, Christian Borntraeger wrote: >> >> >> On 03/29/2018 09:23 AM, Christian Borntraeger wrote: >>> >>> >>> On 03/29/2018 04:00 AM, Ming Lei wrote: On Wed, Mar 28, 2018 at 05:36:53PM +0200, Christian Borntraeger

RE: query on blk_rq_timed_out

2018-03-29 Thread Muneendra Kumar M
Hi , If we call submit_bio/blk_execute_rq and due to some target issues we hit the blk_rq_timed_out. In blk_rq_timed_out    __blk_complete_request  gets called only in BLK_EH_HANDLED case and if q->rq_timed_out_fn doesn’t return BLK_EH_HANDLED and returns only BLK_EH_NOT_HANDLED/

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Ming Lei
On Thu, Mar 29, 2018 at 12:10:11PM +0200, Christian Borntraeger wrote: > > > On 03/29/2018 11:40 AM, Ming Lei wrote: > > On Thu, Mar 29, 2018 at 11:09:08AM +0200, Christian Borntraeger wrote: > >> > >> > >> On 03/29/2018 09:23 AM, Christian Borntraeger wrote: > >>> > >>> > >>> On 03/29/2018

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Christian Borntraeger
On 03/29/2018 12:48 PM, Ming Lei wrote: > On Thu, Mar 29, 2018 at 12:10:11PM +0200, Christian Borntraeger wrote: >> >> >> On 03/29/2018 11:40 AM, Ming Lei wrote: >>> On Thu, Mar 29, 2018 at 11:09:08AM +0200, Christian Borntraeger wrote: On 03/29/2018 09:23 AM, Christian

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Ming Lei
On Thu, Mar 29, 2018 at 12:49:55PM +0200, Christian Borntraeger wrote: > > > On 03/29/2018 12:48 PM, Ming Lei wrote: > > On Thu, Mar 29, 2018 at 12:10:11PM +0200, Christian Borntraeger wrote: > >> > >> > >> On 03/29/2018 11:40 AM, Ming Lei wrote: > >>> On Thu, Mar 29, 2018 at 11:09:08AM +0200,

Re: v4.16-rc1 + dm-mpath + BFQ

2018-03-29 Thread Bart Van Assche
On Thu, 2018-03-29 at 11:02 +0200, Paolo Valente wrote: > > Il giorno 01 mar 2018, alle ore 02:35, Bart Van Assche > > ha scritto: > > Thank you for having shared your kernel config off-list. After having > > made the following changes to your kernel config I was able to

Re: [PATCH V3 0/4] genirq/affinity: irq vector spread among online CPUs as far as possible

2018-03-29 Thread Ming Lei
Hi Thomas, On Fri, Mar 09, 2018 at 04:08:19PM +0100, Thomas Gleixner wrote: > On Fri, 9 Mar 2018, Ming Lei wrote: > > On Fri, Mar 09, 2018 at 11:08:54AM +0100, Thomas Gleixner wrote: > > > > > So my understanding is that these irq patches are enhancements and > > > > > not bug > > > > > fixes.

Re: General protection fault with use_blk_mq=1.

2018-03-29 Thread Zephaniah E. Loss-Cutler-Hull
On 03/29/2018 02:12 AM, Zephaniah E. Loss-Cutler-Hull wrote: > On 03/28/2018 10:13 PM, Paolo Valente wrote: >> In addition, the outcome of your attempt without >> CONFIG_DEBUG_BLK_CGROUP would give us useful bisection information: >> - if no failure occurs, then the issue is likely to be confined

Re: [PATCH] blk-mq: only run mapped hw queues in blk_mq_run_hw_queues()

2018-03-29 Thread Ming Lei
On Thu, Mar 29, 2018 at 01:49:29PM +0200, Christian Borntraeger wrote: > > > On 03/29/2018 01:43 PM, Ming Lei wrote: > > On Thu, Mar 29, 2018 at 12:49:55PM +0200, Christian Borntraeger wrote: > >> > >> > >> On 03/29/2018 12:48 PM, Ming Lei wrote: > >>> On Thu, Mar 29, 2018 at 12:10:11PM +0200,

Re: [GIT PULL 00/37] lightnvm patches for 4.17

2018-03-29 Thread Jens Axboe
On 3/29/18 4:04 PM, Matias Bjørling wrote: > Hi Jens, > > Here is a bunch of patches for 4.17. They include: > > - Open-Channel 2.0 support by Javier and I. > - Lots of refactoring patches to enable 2.0 support. > - Fixes to pblk from Hans, Markus, and Dan. > - Introduction of write