[PATCH 06/12] bcache: correct cache_dirty_target in __update_writeback_rate()

2017-09-06 Thread Coly Li
From: Tang Junhui __update_write_rate() uses a Proportion-Differentiation Controller algorithm to control writeback rate. A dirty target number is used in this PD controller to control writeback rate. A larger target number will make the writeback rate smaller, on the

[PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API

2017-09-06 Thread Coly Li
From: Byungchul Park Although llist provides proper APIs, they are not used. Make them used. Signed-off-by: Byungchul Park Acked-by: Coly Li --- drivers/md/bcache/closure.c | 15 ++- 1 file changed, 2 insertions(+),

[PATCH 07/12] bcache: Correct return value for sysfs attach errors

2017-09-06 Thread Coly Li
From: Tony Asleson If you encounter any errors in bch_cached_dev_attach it will return a negative error code. The variable 'v' which stores the result is unsigned, thus user space sees a very large value returned for bytes written which can cause incorrect user space

[PATCH 10/12] bcache: silence static checker warning

2017-09-06 Thread Coly Li
From: Dan Carpenter In olden times, closure_return() used to have a hidden return built in. We removed the hidden return but forgot to add a new return here. If "c" were NULL we would oops on the next line, but fortunately "c" is never NULL. Let's just remove the if

[PATCH 08/12] bcache: increase the number of open buckets

2017-09-06 Thread Coly Li
From: Tang Junhui In currently, we only alloc 6 open buckets for each cache set, but in usually, we always attach about 10 or so backend devices for each cache set, and the each bcache device are always accessed by about 10 or so threads in top application layer. So 6

[PATCH 09/12] bcache: fix for gc and write-back race

2017-09-06 Thread Coly Li
From: Tang Junhui gc and write-back get raced (see the email "bcache get stucked" I sended before): gc thread write-back thread | |bch_writeback_thread() |bch_gc_thread()| |

[PATCH 05/12] bcache: gc does not work when triggering by manual command

2017-09-06 Thread Coly Li
From: Tang Junhui I try to execute the following command to trigger gc thread: [root@localhost internal]# echo 1 > trigger_gc But it does not work, I debug the code in gc_should_run(), It works only if in invalidating or sectors_to_gc < 0. So set sectors_to_gc to -1 to

[PATCH 03/12] bcache: do not subtract sectors_to_gc for bypassed IO

2017-09-06 Thread Coly Li
From: Tang Junhui Since bypassed IOs use no bucket, so do not subtract sectors_to_gc to trigger gc thread. Signed-off-by: tang.junhui Acked-by: Coly Li Reviewed-by: Eric Wheeler Reviewed-by: Christoph

[PATCH 01/12] bcache: Fix leak of bdev reference

2017-09-06 Thread Coly Li
From: Jan Kara If blkdev_get_by_path() in register_bcache() fails, we try to lookup the block device using lookup_bdev() to detect which situation we are in to properly report error. However we never drop the reference returned to us from lookup_bdev(). Fix that. Signed-off-by:

[PATCH 00/13] bcache: fixes and update for 4.14

2017-09-06 Thread Coly Li
Hi Jens, Here are 12 patchs for bcache fixes and updates, most of them were posted by Eric Wheeler in 4.13 merge window, but delayed due to lack of code review. The following patches are reviewed or acked by peer developers, 0001-bcache-Fix-leak-of-bdev-reference.patch

Re: [PATCH 3/6] hid: make device_attribute const

2017-09-06 Thread Jiri Kosina
On Mon, 21 Aug 2017, Bhumika Goyal wrote: > Make this const as it is only passed as an argument to the > function device_create_file and device_remove_file and the corresponding > arguments are of type const. > Done using Coccinelle > > Signed-off-by: Bhumika Goyal > --- >

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-06 Thread Adrian Hunter
On 05/09/17 20:54, Ulf Hansson wrote: > On 5 September 2017 at 10:10, Adrian Hunter wrote: >> On 05/09/17 10:24, Ulf Hansson wrote: >>> [...] >>> >> >> I can send blk-mq support for legacy requests in a few days if you like, >> but >> I want to hear a

Re: [PATCH V7 00/10] mmc: Add Command Queue support

2017-09-06 Thread Ulf Hansson
On 6 September 2017 at 09:20, Adrian Hunter wrote: > On 05/09/17 20:54, Ulf Hansson wrote: >> On 5 September 2017 at 10:10, Adrian Hunter wrote: >>> On 05/09/17 10:24, Ulf Hansson wrote: [...] >>> >>> I can send blk-mq support

Re: [PATCH] blk-mq: fix nr_requests wrong value when modify it from sysfs

2017-09-06 Thread weiping zhang
On Tue, Sep 05, 2017 at 03:42:45PM +, Bart Van Assche wrote: > On Sun, 2017-09-03 at 21:46 +0800, weiping zhang wrote: > > if blk-mq use "none" io scheduler, nr_request get a wrong value when > > input a number > tag_set->queue_depth. blk_mq_tag_update_depth will get > > the smaller one

[PATCH] block: export symbol for bio_copy_kern

2017-09-06 Thread Javier González
Export symbol for bio_copy_kern so that we can use it in modules. Reported-by: Andiry Xu Signed-off-by: Javier González --- block/bio.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/bio.c b/block/bio.c index 6745759028da..cface315ace5

[PATCH 03/18] lightnvm: pblk: normalize ppa namings

2017-09-06 Thread Javier González
Normalize the way we name ppa variables to improve code readability. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 48 +++- 1 file changed, 25 insertions(+), 23

Re: [PATCH 1/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout

2017-09-06 Thread Ming Lei
On Wed, Sep 6, 2017 at 6:11 PM, Christoph Hellwig wrote: > bsg-lib now embeddeds the job structure into the request, and req->special > can't be used anymore. > > Signed-off-by: Christoph Hellwig > Cc: sta...@vger.kernel.org > --- > drivers/scsi/scsi_transport_fc.c | 2

Re: [PATCH v2] xfs: fix incorrect log_flushed on fsync

2017-09-06 Thread Amir Goldstein
[-stable] On Tue, Sep 5, 2017 at 5:40 PM, Brian Foster wrote: > On Sat, Sep 02, 2017 at 06:47:03PM +0300, Amir Goldstein wrote: >> On Sat, Sep 2, 2017 at 4:19 PM, Brian Foster wrote: >> > On Fri, Sep 01, 2017 at 06:39:25PM +0300, Amir Goldstein wrote: >>

[PATCH 1/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout

2017-09-06 Thread Christoph Hellwig
bsg-lib now embeddeds the job structure into the request, and req->special can't be used anymore. Signed-off-by: Christoph Hellwig Cc: sta...@vger.kernel.org --- drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/2] bsg-lib: don't free job in bsg_prepare_job

2017-09-06 Thread Christoph Hellwig
The job structure is allocated as part of the request, so we should not free it in the error path of bsg_prepare_job. Signed-off-by: Christoph Hellwig Cc: sta...@vger.kernel.org --- block/bsg-lib.c | 1 - 1 file changed, 1 deletion(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c

two small bsg fixes

2017-09-06 Thread Christoph Hellwig
Two fixups for the recent bsg-lib fixups, should go into 4.13 stable as well.

[PATCH 14/18] lightnvm: pblk: simplify path on REQ_PREFLUSH

2017-09-06 Thread Javier González
On REQ_PREFLUSH, directly tag the I/O context flags to signal a flush in the write to cache path, instead of finding the correct entry context and imposing a memory barrier. This simplifies the code and might potentially prevent race conditions when adding functionality to the write path.

[PATCH 15/18] lightnvm: pblk: avoid deadlock on low LUN config

2017-09-06 Thread Javier González
On low LUN configurations, make sure not to send bios that are bigger than the buffer size. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 2 +- drivers/lightnvm/pblk-rl.c | 6 ++

[PATCH 07/18] lightnvm: pblk: use constant for GC parameter

2017-09-06 Thread Javier González
Use a constant instead of using meaningless tuning parameters on the garbage collector algorithms. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-gc.c | 4 ++-- drivers/lightnvm/pblk.h| 2 +- 2 files

[PATCH] lightnvm: Add error code for bad write pointer

2017-09-06 Thread Javier González
Add new error code introduced on the OCSSD spec 2.0 for write pointer mismatch on the device side. This indicates to the host that a write on a block (chunk) is not respecting the required sequentiality. Signed-off-by: Javier González --- include/linux/lightnvm.h | 3 ++- 1

[PATCH 09/18] lightnvm: pblk: simplify data validity check on GC

2017-09-06 Thread Javier González
When a line is selected for recycling by the garbage collector (GC), the line state changes and the invalid bitmap is frozen, preventing invalidations from happening. Throughout the GC, the L2P map is checked to verify that not data being recycled has been updated. The last check is done before

[PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible

2017-09-06 Thread Javier González
In pblk, buffers forming bios can be allocated on physically contiguous or virtually contiguous memory. For physically contiguous memory, we already use the bio_map_kern helper funciton, however, for virtually contiguous memory, we from the bio manually. This makes the code more complex, specially

[PATCH 01/18] lightnvm: pblk: improve naming for internal req.

2017-09-06 Thread Javier González
Each request type sent to the LightNVM subsystem requires different metadata. Until now, we have tailored this metadata based on write, read and erase commands. However, pblk uses different metadata for internal writes that do not hit the write buffer. Instead of abusing the metadata for reads,

[PATCH 16/18] lightnvm: pblk: enable 1 LUN configuration

2017-09-06 Thread Javier González
Metadata I/Os are scheduled to minimize their impact on user data I/Os. When there are enough LUNs instantiated (i.e., enought bandwidth), it is easy to interleave metadata and data one after the other so that metadata I/Os are the ones being blocked and not viceversa. We do this by calculating

[PATCH 05/18] lightnvm: pblk: initialize debug stat counter

2017-09-06 Thread Javier González
Initialize the stat counter for garbage collected reads. Fixes: a4bd217b43268 ("lightnvm: physical block device (pblk) target") Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 1 + 1 file changed, 1

[PATCH 00/18] lightnvm: pblk patches for 4.14

2017-09-06 Thread Javier González
Hi Jens, Here is the pblk patchset for this window. The most notable patches are on the read path: - ("lightnvm: pblk: check lba sanity on read path") uses the lba stored on the out-of-bound area to verify that the read ppa corresponds to the lba pointed to by the read bio. -

[PATCH 12/18] lightnvm: pblk: free padded entries in write buffer

2017-09-06 Thread Javier González
When a REQ_FLUSH reaches pblk, the bio cannot be directly completed. Instead, data on the write buffer is flushed and the bio is completed on the completion pah. This might require some sectors to be padded in order to guarantee a successful write. This patch fixes a memory leak on the padded

Re: [PATCH 1/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout

2017-09-06 Thread Christoph Hellwig
On Wed, Sep 06, 2017 at 06:59:39PM +0800, Ming Lei wrote: > On Wed, Sep 6, 2017 at 6:11 PM, Christoph Hellwig wrote: > > bsg-lib now embeddeds the job structure into the request, and req->special > > can't be used anymore. > > > > Signed-off-by: Christoph Hellwig > >

Re: [PATCH 01/18] lightnvm: pblk: improve naming for internal req.

2017-09-06 Thread Christoph Hellwig
> -#define ERASE 2 /* READ = 0, WRITE = 1 */ > +/* READ = 0, WRITE (user) = 1 */ > +#define ERASE 2 > +#define WRITE_INT 3 /* Internal write. Not through write buffer */ enum { PBLK_READ, PBLK_WRITE, PBLK_ERASE, PBLK_WRITE, }; please. Don't abuse and overload the

Re: [PATCH v2] xfs: fix incorrect log_flushed on fsync

2017-09-06 Thread Brian Foster
On Wed, Sep 06, 2017 at 03:19:37PM +0200, Christoph Hellwig wrote: > > You could also say that flush sequence counting code doesn't belong > > to xfs code at all. There is nothing xfs specific about it. > > > > If we had an API: > > > > flush_seq = blkdev_get_flush_seq(bdev, flush_seq); > >

Re: [PATCH] block: export symbol for bio_copy_kern

2017-09-06 Thread Christoph Hellwig
On Wed, Sep 06, 2017 at 12:20:25PM +0200, Javier González wrote: > Export symbol for bio_copy_kern so that we can use it in modules. NAK. Always allocate the request first and then map the data to the request.

[PATCH 2/2] scsi_transport_fc: fix NULL pointer dereference in fc_bsg_job_timeout

2017-09-06 Thread Christoph Hellwig
bsg-lib now embeddeds the job structure into the request, and req->special can't be used anymore. Signed-off-by: Christoph Hellwig Cc: sta...@vger.kernel.org --- drivers/scsi/scsi_transport_fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/2] bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer

2017-09-06 Thread Christoph Hellwig
From: Benjamin Block Since we split the scsi_request out of struct request bsg fails to provide a reply-buffer for the drivers. This was done via the pointer for sense-data, that is not preallocated anymore. Failing to allocate/assign it results in illegal

two small bsg fixes V2

2017-09-06 Thread Christoph Hellwig
Two fixups for the recent bsg-lib fixes, should go into 4.13 stable as well.

Re: [PATCH] lightnvm: Add error code for bad write pointer

2017-09-06 Thread Christoph Hellwig
On Wed, Sep 06, 2017 at 12:22:38PM +0200, Javier González wrote: > Add new error code introduced on the OCSSD spec 2.0 for write pointer > mismatch on the device side. This indicates to the host that a write on > a block (chunk) is not respecting the required sequentiality. Do you have a pointer

Re: [PATCH] blk-mq: fix nr_requests wrong value when modify it from sysfs

2017-09-06 Thread Bart Van Assche
On Wed, 2017-09-06 at 15:34 +0800, weiping zhang wrote: > On Tue, Sep 05, 2017 at 03:42:45PM +, Bart Van Assche wrote: > > On Sun, 2017-09-03 at 21:46 +0800, weiping zhang wrote: > > > if blk-mq use "none" io scheduler, nr_request get a wrong value when > > > input a number >

Re: Archiving linux-block

2017-09-06 Thread Bart Van Assche
On Tue, 2017-09-05 at 08:33 -0600, Jens Axboe wrote: > On 09/05/2017 08:19 AM, Bart Van Assche wrote: > > Since gmane.org is no longer operational linux-block messages are no longer > > archived. I think it's useful to archive linux-block messages because it > > makes it possible to review past

Re: [PATCH v2] xfs: fix incorrect log_flushed on fsync

2017-09-06 Thread Christoph Hellwig
> You could also say that flush sequence counting code doesn't belong > to xfs code at all. There is nothing xfs specific about it. > > If we had an API: > > flush_seq = blkdev_get_flush_seq(bdev, flush_seq); > blkdev_issue_flush_after(bdev, flush_seq); > > I am sure it would have been useful

Re: [PATCH 10/18] lightnvm: pblk: use bio_copy_kern when possible

2017-09-06 Thread Christoph Hellwig
On Wed, Sep 06, 2017 at 12:51:03PM +0200, Javier González wrote: > In pblk, buffers forming bios can be allocated on physically contiguous > or virtually contiguous memory. For physically contiguous memory, we > already use the bio_map_kern helper funciton, however, for virtually > contiguous

Re: [PATCH 00/18] lightnvm: pblk patches for 4.14

2017-09-06 Thread Jens Axboe
On 09/06/2017 04:50 AM, Javier González wrote: > Hi Jens, > > Here is the pblk patchset for this window. You must mean for the next window, surely, since we're in the middle of the current merge window? Have these patches been posted for review before? This should have been done (at least) two

Re: [PATCH 1/2] bsg-lib: fix kernel panic resulting from missing allocation of reply-buffer

2017-09-06 Thread Benjamin Block
On Wed, Sep 06, 2017 at 08:07:43AM -0600, Jens Axboe wrote: > On 09/06/2017 07:44 AM, Christoph Hellwig wrote: > > From: Benjamin Block > > > > Since we split the scsi_request out of struct request bsg fails to > > provide a reply-buffer for the drivers. This was done

Re: [PATCH 00/13] bcache: fixes and update for 4.14

2017-09-06 Thread Jens Axboe
On Wed, Sep 06 2017, Coly Li wrote: > Hi Jens, > > Here are 12 patchs for bcache fixes and updates, most of them were posted > by Eric Wheeler in 4.13 merge window, but delayed due to lack of code > review. Next time, please send this _before_ the merge window opens. Not a huge problem for this

Re: [PATCH 2/6] lightnvm: pblk: initialize debug stat counter

2017-09-06 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: Archiving linux-block

2017-09-06 Thread Jens Axboe
On 09/06/2017 08:10 AM, Jens Axboe wrote: > On 09/06/2017 07:13 AM, Bart Van Assche wrote: >> On Tue, 2017-09-05 at 08:33 -0600, Jens Axboe wrote: >>> On 09/05/2017 08:19 AM, Bart Van Assche wrote: Since gmane.org is no longer operational linux-block messages are no longer archived. I

[PATCH 2/6] lightnvm: pblk: initialize debug stat counter

2017-09-06 Thread Javier González
Initialize the stat counter for garbage collected reads. Fixes: a4bd217b43268 ("lightnvm: physical block device (pblk) target") Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-init.c | 1 + 1 file changed, 1

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Johannes Thumshirn
On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote: > Check for failed mempool allocations and act accordingly. Are you sure it is needed? Quoting from mempool_alloc()s Documentation: "[...] Note that due to preallocation, this function *never* fails when called from process

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Javier González
> On 6 Sep 2017, at 17.09, Jens Axboe wrote: > > On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: >> On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote: >>> Check for failed mempool allocations and act accordingly. >> >> Are you sure it is needed? Quoting from

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Johannes Thumshirn
On Wed, Sep 06, 2017 at 09:09:29AM -0600, Jens Axboe wrote: > On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: > > On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote: > >> Check for failed mempool allocations and act accordingly. > > > > Are you sure it is needed? Quoting from

Re: [PATCH 5/6] lightnvm: pblk: fix write I/O sync stat

2017-09-06 Thread Johannes Thumshirn
Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB

Re: Archiving linux-block

2017-09-06 Thread Jens Axboe
On 09/06/2017 07:13 AM, Bart Van Assche wrote: > On Tue, 2017-09-05 at 08:33 -0600, Jens Axboe wrote: >> On 09/05/2017 08:19 AM, Bart Van Assche wrote: >>> Since gmane.org is no longer operational linux-block messages are no longer >>> archived. I think it's useful to archive linux-block messages

Re: [PATCH] lightnvm: Add error code for bad write pointer

2017-09-06 Thread Javier González
> On 6 Sep 2017, at 15.44, Christoph Hellwig wrote: > > On Wed, Sep 06, 2017 at 12:22:38PM +0200, Javier González wrote: >> Add new error code introduced on the OCSSD spec 2.0 for write pointer >> mismatch on the device side. This indicates to the host that a write on >> a

[PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Javier González
Check for failed mempool allocations and act accordingly. Signed-off-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/pblk-core.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/lightnvm/pblk-core.c

[PATCH 6/6] lightnvm: pblk: avoid deadlock on low LUN config

2017-09-06 Thread Javier González
On low LUN configurations, make sure not to send bios that are bigger than the buffer size. Fixes: a4bd217b4326 ("lightnvm: physical block device (pblk) target") Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Jens Axboe
On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: > On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote: >> Check for failed mempool allocations and act accordingly. > > Are you sure it is needed? Quoting from mempool_alloc()s Documentation: > "[...] Note that due to preallocation,

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Jens Axboe
On 09/06/2017 09:13 AM, Jens Axboe wrote: > On 09/06/2017 09:12 AM, Javier González wrote: >>> On 6 Sep 2017, at 17.09, Jens Axboe wrote: >>> >>> On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote: > Check

Re: [PATCH 3/6] lightnvm: pblk: use right flag for GC allocation

2017-09-06 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH 4/6] lightnvm: pblk: free padded entries in write buffer

2017-09-06 Thread Johannes Thumshirn
On Wed, Sep 06, 2017 at 05:01:04PM +0200, Javier González wrote: > the completion pah. This might require some sectors to be padded in ^ path Looks good otherwise, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn

Re: [PATCH V4 00/14] blk-mq-sched: improve SCSI-MQ performance

2017-09-06 Thread Oleksandr Natalenko
Feel free to add: Tested-by: Oleksandr Natalenko since I'm running this on 4 machines without issues. > Hi Jens, > > Ping...

[PATCH 13/13] bcache: initialize dirty stripes in flash_dev_run()

2017-09-06 Thread Coly Li
From: Tang Junhui bcache uses a Proportion-Differentiation Controller algorithm to control writeback rate to cached devices. In the PD controller algorithm, dirty stripes of thin flash device should not be counted in, because flash only volumes never write back dirty

[PATCH 3/3] block/loop: make loop cgroup aware

2017-09-06 Thread Shaohua Li
From: Shaohua Li loop block device handles IO in a separate thread. The actual IO dispatched isn't cloned from the IO loop device received, so the dispatched IO loses the cgroup context. I'm ignoring buffer IO case now, which is quite complicated. Making the loop thread aware

[PATCH 2/3] block: make blkcg aware of kthread stored original cgroup info

2017-09-06 Thread Shaohua Li
From: Shaohua Li Several blkcg APIs are deprecated. After removing them, bio_blkcg is the only API to get cgroup info for a bio. If bio_blkcg finds current task is a kthread and has original css recorded, it will use the css instead of associating the bio to current task.

[PATCH 1/3] kthread: add a mechanism to store cgroup info

2017-09-06 Thread Shaohua Li
From: Shaohua Li kthread usually runs jobs on behalf of other threads. The jobs should be charged to cgroup of original threads. But the jobs run in a kthread, where we lose the cgroup context of original threads. The patch adds a machanism to record cgroup info of original threads

[PATCH 0/3] block: make loop block device cgroup aware

2017-09-06 Thread Shaohua Li
From: Shaohua Li Hi, The IO dispatched to under layer disk by loop block device isn't cloned from original bio, so the IO loses cgroup information of original bio. These IO escapes from cgroup control. The patches try to address this issue. The idea is quite generic, but we

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Javier González
> On 6 Sep 2017, at 17.20, Jens Axboe wrote: > > On 09/06/2017 09:13 AM, Jens Axboe wrote: >> On 09/06/2017 09:12 AM, Javier González wrote: On 6 Sep 2017, at 17.09, Jens Axboe wrote: On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: > On

[PATCH] block: cope with WRITE SAME failing in blkdev_issue_zeroout()

2017-09-06 Thread Ilya Dryomov
sd_config_write_same() ignores ->max_ws_blocks == 0 and resets it to permit trying WRITE SAME on older SCSI devices, unless ->no_write_same is set. This means blkdev_issue_zeroout() must cope with WRITE SAME failing with BLK_STS_TARGET/-EREMOTEIO and explicitly write zeroes, unless

[PATCH V2 1/3] block/loop: don't hijack error number

2017-09-06 Thread Shaohua Li
From: Shaohua Li If the bio returns -EOPNOTSUPP, we shouldn't hijack it and return -EIO Signed-off-by: Shaohua Li --- drivers/block/loop.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/block/loop.c b/drivers/block/loop.c index

Re: [PATCH V4 00/14] blk-mq-sched: improve SCSI-MQ performance

2017-09-06 Thread Tom Nguyen
Likewise with no problems on my work laptop with 4 days uptime. Tested-by: Tom Nguyen On 09/07/2017 04:09 AM, Oleksandr Natalenko wrote: > Feel free to add: > > Tested-by: Oleksandr Natalenko > > since I'm running this on 4 machines without

[PATCH 0/6] lightnvm: pblk bug fixes for 4.14

2017-09-06 Thread Javier González
Hi Jens, Here are the pblk bug fixes for this window. The patches apply on your for-4.14/block, and you can be found at: https://github.com/OpenChannelSSD/linux/tree/pblk.for-4.14 Thanks, Javier Javier González (6): lightnvm: pblk: check for failed mempool alloc. lightnvm: pblk:

[PATCH 5/6] lightnvm: pblk: fix write I/O sync stat

2017-09-06 Thread Javier González
Fix stat counter to collect the right number of I/Os being synced on the completion path. Fixes: 0880a9aa2d91f ("lightnvm: pblk: delete redundant buffer pointer") Signed-off-by: Javier González Signed-off-by: Matias Bjørling ---

Re: [PATCH 1/6] lightnvm: pblk: check for failed mempool alloc.

2017-09-06 Thread Jens Axboe
On 09/06/2017 09:12 AM, Javier González wrote: >> On 6 Sep 2017, at 17.09, Jens Axboe wrote: >> >> On 09/06/2017 09:08 AM, Johannes Thumshirn wrote: >>> On Wed, Sep 06, 2017 at 05:01:01PM +0200, Javier González wrote: Check for failed mempool allocations and act accordingly.

Re: [PATCH 00/13] bcache: fixes and update for 4.14

2017-09-06 Thread Coly Li
On 2017/9/6 下午11:46, Jens Axboe wrote: > On 09/06/2017 09:41 AM, Coly Li wrote: >> On 2017/9/6 下午10:20, Jens Axboe wrote: >>> On Wed, Sep 06 2017, Coly Li wrote: Hi Jens, Here are 12 patchs for bcache fixes and updates, most of them were posted by Eric Wheeler in 4.13 merge

[PATCH 0/3] Move tagset reinit to its only current consumer, nvme-core

2017-09-06 Thread Sagi Grimberg
As suggested by Bart Van Assche, get rid of blk_mq_reinit_tagset and move it to nvme-core (its only current consumer). Instead, introduce a more generic tagset iterator helper. Sagi Grimberg (3): block: introduce blk_mq_tagset_iter nvme: introduce nvme_reinit_tagset block: remove

[PATCH 3/3] block: remove blk_mq_reinit_tagset

2017-09-06 Thread Sagi Grimberg
No callers left. Suggested-by: Bart Van Assche Signed-off-by: Sagi Grimberg --- block/blk-mq-tag.c | 7 --- include/linux/blk-mq.h | 2 -- 2 files changed, 9 deletions(-) diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c index

[PATCH 1/3] block: introduce blk_mq_tagset_iter

2017-09-06 Thread Sagi Grimberg
Iterator helper to apply a function on all the tags in a given tagset. export it as it will be used outside the block layer later on. Suggested-by: Bart Van Assche Signed-off-by: Sagi Grimberg --- block/blk-mq-tag.c | 16 +++-

Re: [PATCH V4 00/14] blk-mq-sched: improve SCSI-MQ performance

2017-09-06 Thread Ming Lei
On Tue, Sep 05, 2017 at 09:39:51AM +0800, Ming Lei wrote: > On Mon, Sep 04, 2017 at 11:12:49AM +0200, Paolo Valente wrote: > > > > > Il giorno 02 set 2017, alle ore 17:17, Ming Lei ha > > > scritto: > > > > > > Hi, > > > > > > In Red Hat internal storage test wrt. blk-mq

Re: [PATCH 00/13] bcache: fixes and update for 4.14

2017-09-06 Thread Jens Axboe
On 09/06/2017 09:41 AM, Coly Li wrote: > On 2017/9/6 下午10:20, Jens Axboe wrote: >> On Wed, Sep 06 2017, Coly Li wrote: >>> Hi Jens, >>> >>> Here are 12 patchs for bcache fixes and updates, most of them were posted >>> by Eric Wheeler in 4.13 merge window, but delayed due to lack of code >>>

Re: [PATCH V6 00/18] blk-throttle: add .low limit

2017-09-06 Thread Shaohua Li
On Wed, Sep 06, 2017 at 09:12:20AM +0800, Joseph Qi wrote: > Hi Shaohua, > > On 17/9/6 05:02, Shaohua Li wrote: > > On Thu, Aug 31, 2017 at 09:24:23AM +0200, Paolo VALENTE wrote: > >> > >>> Il giorno 15 gen 2017, alle ore 04:42, Shaohua Li ha > >>> scritto: > >>> > >>> Hi, > >>> >