Re: [PATCH BUGFIX V3] block, bfq: add requeue-request hook

2018-02-23 Thread Paolo Valente
> Il giorno 23 feb 2018, alle ore 17:17, Ming Lei ha > scritto: > > Hi Paolo, > > On Fri, Feb 23, 2018 at 04:41:36PM +0100, Paolo Valente wrote: >> >> >>> Il giorno 23 feb 2018, alle ore 16:07, Ming Lei ha >>> scritto: >>> >>> Hi Paolo, >>> >>>

[PATCH 1/1] extend BLKRRPART to update the readable size of media

2018-02-23 Thread Steve Kenton
The readable size of new, factory blank, optical media can change via user space ioctl(SG_IO) commands to format overwritable media such as DVD+RW for a UDF filesystem or write to sequential media such as DVD-R for an ISO-9660 filesystem. However there appears to be no easy way to update the size

Re: [PATCH v2] blk-throttle: fix race between blkcg_bio_issue_check and cgroup_rmdir

2018-02-23 Thread Joseph Qi
Hi Tejun, On 18/2/23 22:23, Tejun Heo wrote: > Hello, > > On Fri, Feb 23, 2018 at 09:56:54AM +0800, xuejiufei wrote: >>> On Thu, Feb 22, 2018 at 02:14:34PM +0800, Joseph Qi wrote: I still don't get how css_tryget can work here. The race happens when: 1) writeback kworker has

Re: [PATCH 1/2] blk-mq: don't call io sched's .requeue_request when requeueing rq to ->dispatch

2018-02-23 Thread Bart Van Assche
On Fri, 2018-02-23 at 23:36 +0800, Ming Lei wrote: > __blk_mq_requeue_request() covers two cases: > > - one is that the requeued request is added to hctx->dispatch, such as > blk_mq_dispatch_rq_list() > > - another case is that the request is requeued to io scheduler, such as >

Re: [PATCH V2] block: pass inclusive 'lend' parameter to truncate_inode_pages_range

2018-02-23 Thread Jens Axboe
On 2/9/18 5:46 PM, Ming Lei wrote: > The 'lend' parameter of truncate_inode_pages_range is required to be > inclusive, so follow the rule. > > This patch fixes one memory corruption triggered by discard. Applied, thanks. -- Jens Axboe

Re: [PATCH V2] block: pass inclusive 'lend' parameter to truncate_inode_pages_range

2018-02-23 Thread Bart Van Assche
On Sat, 2018-02-10 at 08:46 +0800, Ming Lei wrote: > The 'lend' parameter of truncate_inode_pages_range is required to be > inclusive, so follow the rule. > > This patch fixes one memory corruption triggered by discard. Reviewed-by: Bart Van Assche

Re: [PATCH] lightnvm: fix bad block initialization

2018-02-23 Thread Matias Bjørling
On 02/23/2018 06:40 PM, Heiner Litz wrote: fix reading bad block device information to correctly setup the per line blk_bitmap during lightnvm initialization Signed-off-by: Heiner Litz --- drivers/lightnvm/pblk-init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Hangs in balance_dirty_pages with arm-32 LPAE + highmem

2018-02-23 Thread Laura Abbott
Hi, The Fedora arm-32 build VMs have a somewhat long standing problem of hanging when running mkfs.ext4 with a bunch of processes stuck in D state. This has been seen as far back as 4.13 but is still present on 4.14: sysrq: SysRq : Show Blocked State

[PATCH 1/1] extend BLKRRPART to update the readable size of media

2018-02-23 Thread Steve Kenton
The readable size of new, factory blank, optical media can change via user space ioctl(SG_IO) commands to format overwritable media such as DVD+RW for a UDF filesystem or write to sequential media such as DVD-R for an ISO-9660 filesystem. However there appears to be no easy way to update the size

Re: v4.16-rc2: I/O hang with dm-rq + Kyber

2018-02-23 Thread Bart Van Assche
On Sat, 2018-02-24 at 00:26 +0800, Ming Lei wrote: > The following 2 patch fixes one IO hang on kyber in my test on USB, could > you test it and see if your case can be fixed? > > https://marc.info/?l=linux-block=151940022831994=2 These two patches are sufficient to make my test pass.

Re: [PATCH 2/2] block: kyber: fix domain token leak during requeue

2018-02-23 Thread Bart Van Assche
On Fri, 2018-02-23 at 23:36 +0800, Ming Lei wrote: > When requeuing request, the domain token should have been freed > before re-inserting the request to io scheduler. Otherwise, the > assigned domain token will be leaked, and IO hang can be caused. Please consider to add a "Cc: stable" tag to

Re: v4.16-rc2: I/O hang with dm-rq + Kyber

2018-02-23 Thread Ming Lei
On Thu, Feb 22, 2018 at 09:10:23PM +, Bart Van Assche wrote: > Hello Omar, > > I/O hangs if I run the following command on top of kernel v4.16-rc2 + the > ib_srpt patch that adds RDMA/CM support: > > srp-test/run_tests -c -d -r 10 -t 02-mq -e kyber > > This does not happen with the deadline

Re: [PATCH BUGFIX V3] block, bfq: add requeue-request hook

2018-02-23 Thread Ming Lei
Hi Paolo, On Fri, Feb 23, 2018 at 04:41:36PM +0100, Paolo Valente wrote: > > > > Il giorno 23 feb 2018, alle ore 16:07, Ming Lei ha > > scritto: > > > > Hi Paolo, > > > > On Wed, Feb 07, 2018 at 10:19:20PM +0100, Paolo Valente wrote: > >> Commit 'a6a252e64914

Re: [PATCH v4 4/6] block: Add a third argument to blk_alloc_queue_node()

2018-02-23 Thread Bart Van Assche
On Fri, 2018-02-23 at 09:26 +0100, Johannes Thumshirn wrote: > how about "block: Add 'lock' as third argument to > blk_alloc_queue_node()"? > > So one actually sees early enough what the thrird argument will be? Hello Johannes, If I have to repost this patch series I will make that change.

Re: disk-io lockup in 4.14.13 kernel

2018-02-23 Thread Bart Van Assche
On Fri, 2018-02-23 at 11:58 +0200, Jaco Kroon wrote: > On 22/02/2018 18:46, Bart Van Assche wrote: > > (cd /sys/kernel/debug/block && find . -type f -exec grep -aH . {} \;) > > I don't have a /sys/kernel/debug folder - I've enabled CONFIG_DEBUG_FS > and BLK_DEBUG_FS, will reboot at the first

v4.16-rc2: virtio-block + ext4 lockdep splats / sleeping from invalid context

2018-02-23 Thread Mark Rutland
Hi all, While fuzzing arm64/v4.16-rc2 with syzkaller, I simultaneously hit a number of splats in the block layer: * inconsistent {HARDIRQ-ON-W} -> {IN-HARDIRQ-R} usage in jbd2_trans_will_send_data_barrier * BUG: sleeping function called from invalid context at mm/mempool.c:320 * WARNING:

Re: [PATCH BUGFIX V3] block, bfq: add requeue-request hook

2018-02-23 Thread Paolo Valente
> Il giorno 23 feb 2018, alle ore 16:07, Ming Lei ha > scritto: > > Hi Paolo, > > On Wed, Feb 07, 2018 at 10:19:20PM +0100, Paolo Valente wrote: >> Commit 'a6a252e64914 ("blk-mq-sched: decide how to handle flush rq via >> RQF_FLUSH_SEQ")' makes all non-flush re-prepared

[PATCH 2/2] block: kyber: fix domain token leak during requeue

2018-02-23 Thread Ming Lei
When requeuing request, the domain token should have been freed before re-inserting the request to io scheduler. Otherwise, the assigned domain token will be leaked, and IO hang can be caused. Cc: Paolo Valente Cc: Omar Sandoval Signed-off-by: Ming Lei

[PATCH 0/2] blk-mq: kyber: fix domain token leak during requeue

2018-02-23 Thread Ming Lei
Hi, This two patch fixes domain token leak on kyber scheduler, and actually fixes one IO hang issue. Thanks, Ming Lei (2): blk-mq: don't call io sched's .requeue_request when requeueing rq to ->dispatch block: kyber: fix domain token leak during requeue block/blk-mq.c| 4 +++-

[PATCH 1/2] blk-mq: don't call io sched's .requeue_request when requeueing rq to ->dispatch

2018-02-23 Thread Ming Lei
__blk_mq_requeue_request() covers two cases: - one is that the requeued request is added to hctx->dispatch, such as blk_mq_dispatch_rq_list() - another case is that the request is requeued to io scheduler, such as blk_mq_requeue_request(). We should call io sched's .requeue_request callback

Re: [PATCH v2] block/loop: add documentation for sysfs interface

2018-02-23 Thread Jonathan Corbet
On Sat, 17 Feb 2018 11:43:04 +0530 Aishwarya Pant wrote: > Documentation has been compiled from git logs and by reading through > code. > > Signed-off-by: Aishwarya Pant > --- > For drivers/block/loop.c, I don't see any maintainers or mailing lists

Re: [RESEND PATCH v2] Documentation/ABI: clean up sysfs-class-pktcdvd

2018-02-23 Thread Jonathan Corbet
On Fri, 23 Feb 2018 18:46:32 +0530 Aishwarya Pant wrote: > Clean up the sysfs documentation such that it is in the same format as > described in Documentation/ABI/README. Mainly, the patch moves the > attribute names to the 'What:' field. This might be useful for scripting >

Re: [PATCH BUGFIX V3] block, bfq: add requeue-request hook

2018-02-23 Thread Ming Lei
Hi Paolo, On Wed, Feb 07, 2018 at 10:19:20PM +0100, Paolo Valente wrote: > Commit 'a6a252e64914 ("blk-mq-sched: decide how to handle flush rq via > RQF_FLUSH_SEQ")' makes all non-flush re-prepared requests for a device > be re-inserted into the active I/O scheduler for that device. As a No, this

Re: [PATCH v2] blk-throttle: fix race between blkcg_bio_issue_check and cgroup_rmdir

2018-02-23 Thread Tejun Heo
Hello, On Fri, Feb 23, 2018 at 09:56:54AM +0800, xuejiufei wrote: > > On Thu, Feb 22, 2018 at 02:14:34PM +0800, Joseph Qi wrote: > >> I still don't get how css_tryget can work here. > >> > >> The race happens when: > >> 1) writeback kworker has found the blkg with rcu; > >> 2) blkcg is during

Re: [PATCH] blk-throttle: avoid multiple counting for same bio

2018-02-23 Thread Tejun Heo
Hello, On Fri, Feb 23, 2018 at 12:29:25PM +0800, Chengguang Xu wrote: > > That's true, the issue Shaohua has fixed is double charge, but double > > stat issue still exists. > > > > Jiufei has posted a fix, which has already been tested by Bo Liu: > > [PATCH RESEND] blk-throttle: avoid double

[RESEND PATCH v2] Documentation/ABI: clean up sysfs-class-pktcdvd

2018-02-23 Thread Aishwarya Pant
Clean up the sysfs documentation such that it is in the same format as described in Documentation/ABI/README. Mainly, the patch moves the attribute names to the 'What:' field. This might be useful for scripting and tracking changes in the ABI. Signed-off-by: Aishwarya Pant

Re: [PATCH 1/1] extend BLKRRPART to update the readable size of optical media

2018-02-23 Thread Carlos Maiolino
On Fri, Feb 23, 2018 at 11:14:41AM +0100, Carlos Maiolino wrote: > On Thu, Feb 22, 2018 at 01:00:16PM -0600, Steve Kenton wrote: > > The readable size of new, factory blank, optical media can change via user > > space ioctl(SG_IO) commands to format overwritable media such as DVD+RW for > > a

Re: disk-io lockup in 4.14.13 kernel

2018-02-23 Thread Jaco Kroon
Hi Bart, Thank you for your response. On 22/02/2018 18:46, Bart Van Assche wrote: > On 02/22/18 02:58, Jaco Kroon wrote: >> We've been seeing sporadic IO lockups on recent kernels. > > Are you using the legacy I/O stack or blk-mq? If you are not yet using > blk-mq, can you switch to blk-mq +

Re: [PATCH v4 6/6] block: Fix a race between request queue removal and the block cgroup controller

2018-02-23 Thread Joseph Qi
On 18/2/23 09:08, Bart Van Assche wrote: > Avoid that the following race can occur: > > blk_cleanup_queue() blkcg_print_blkgs() > spin_lock_irq(lock) (1) spin_lock_irq(blkg->q->queue_lock) (2,5) > q->queue_lock = >__queue_lock (3) > spin_unlock_irq(lock) (4) >

Re: [PATCH v4 5/6] block: Fix a race between the cgroup code and request queue initialization

2018-02-23 Thread Joseph Qi
On 18/2/23 09:08, Bart Van Assche wrote: > Initialize the request queue lock earlier such that the following > race can no longer occur: > > blk_init_queue_node() blkcg_print_blkgs() > blk_alloc_queue_node (1) > q->queue_lock = >__queue_lock (2) > blkcg_init_queue(q) (3) >

Re: [PATCH v4 3/6] zram: Delete gendisk before cleaning up the request queue

2018-02-23 Thread Joseph Qi
On 18/2/23 09:08, Bart Van Assche wrote: > Remove the disk, partition and bdi sysfs attributes before cleaning up > the request queue associated with the disk. > > Signed-off-by: Bart Van Assche > Cc: Minchan Kim > Cc: Nitin Gupta

Re: [PATCH v4 2/6] md: Delete gendisk before cleaning up the request queue

2018-02-23 Thread Joseph Qi
On 18/2/23 09:08, Bart Van Assche wrote: > Remove the disk, partition and bdi sysfs attributes before cleaning up > the request queue associated with the disk. > > Signed-off-by: Bart Van Assche > Cc: Shaohua Li Looks good. Reviewed-by: Joseph Qi

Re: [PATCH v4 1/6] block/loop: Delete gendisk before cleaning up the request queue

2018-02-23 Thread Joseph Qi
On 18/2/23 09:08, Bart Van Assche wrote: > Remove the disk, partition and bdi sysfs attributes before cleaning up > the request queue associated with the disk. > > Signed-off-by: Bart Van Assche > Cc: Josef Bacik > Cc: Shaohua Li > Cc: Omar

Re: [PATCH v4 4/6] block: Add a third argument to blk_alloc_queue_node()

2018-02-23 Thread Joseph Qi
On 18/2/23 09:08, Bart Van Assche wrote: > This patch does not change any functionality. > > Signed-off-by: Bart Van Assche > Cc: Christoph Hellwig > Cc: Joseph Qi > Cc: Philipp Reisner > Cc: Ulf

Re: [PATCH] lightnvm: fix memory leak in pblk_luns_init

2018-02-23 Thread Javier González
> On 23 Feb 2018, at 07.12, Matias Bjørling wrote: > > On 02/23/2018 12:03 AM, Huaicheng Li wrote: >> Please ignore my previous email as I found the memory is free'ed at >> pblk_init()'s error handling logic. >> Sorry for the interruption. >> On Thu, Feb 22, 2018 at 3:01 PM,

Re: [PATCH v4 4/6] block: Add a third argument to blk_alloc_queue_node()

2018-02-23 Thread Johannes Thumshirn
Hi Bart, how about "block: Add 'lock' as third argument to blk_alloc_queue_node()"? So one actually sees early enough what the thrird argument will be? Thanks, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH v4 3/6] zram: Delete gendisk before cleaning up the request queue

2018-02-23 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 v4 2/6] md: Delete gendisk before cleaning up the request queue

2018-02-23 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 v4 1/6] block/loop: Delete gendisk before cleaning up the request queue

2018-02-23 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