write call hangs in kernel space after virtio hot-remove

2018-04-25 Thread Fabiano Rosas
I'm looking into an issue where removing a virtio disk via sysfs while another process is issuing write() calls results in the writing task going into a livelock: root@guest # cat test.sh #!/bin/bash dd if=/dev/zero of=/dev/vda bs=1M count=1 & sleep 1 echo 1 >

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Paolo Valente
> Il giorno 25 apr 2018, alle ore 20:18, Jens Axboe ha > scritto: > > On 4/25/18 12:02 PM, Paolo Valente wrote: >> >> >>> Il giorno 25 apr 2018, alle ore 19:34, Jens Axboe ha >>> scritto: >>> >>> On 4/25/18 11:25 AM, Paolo Valente wrote:

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Jens Axboe
On 4/25/18 12:02 PM, Paolo Valente wrote: > > >> Il giorno 25 apr 2018, alle ore 19:34, Jens Axboe ha >> scritto: >> >> On 4/25/18 11:25 AM, Paolo Valente wrote: >>> >>> Il giorno 25 apr 2018, alle ore 19:06, Jens Axboe ha scritto: On

Re: [PATCH] cdrom: information leak in cdrom_ioctl_media_changed()

2018-04-25 Thread Scott Bauer
On Wed, Apr 18, 2018 at 12:51:31PM +0300, Dan Carpenter wrote: > This cast is wrong. "cdi->capacity" is an int and "arg" is an unsigned > long. The way the check is written now, if one of the high 32 bits is > set then we could read outside the info->slots[] array. > > This bug is pretty old

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Paolo Valente
> Il giorno 25 apr 2018, alle ore 19:34, Jens Axboe ha > scritto: > > On 4/25/18 11:25 AM, Paolo Valente wrote: >> >> >>> Il giorno 25 apr 2018, alle ore 19:06, Jens Axboe ha >>> scritto: >>> >>> On 4/25/18 11:03 AM, Paolo Valente wrote:

Re: [PATCH blktests] Add surprise removal block test

2018-04-25 Thread Keith Busch
On Wed, Apr 25, 2018 at 08:56:02AM -0700, Omar Sandoval wrote: > On Tue, Apr 24, 2018 at 03:41:46PM -0600, Keith Busch wrote: > > +_test_hotplug_slot() { > > I'd call this _test_dev_in_hotplug_slot(). Sounds good. > > + parent="$(_get_pci_parent_from_blkdev)" > > I haven't been consistent

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Jens Axboe
On 4/25/18 11:25 AM, Paolo Valente wrote: > > >> Il giorno 25 apr 2018, alle ore 19:06, Jens Axboe ha >> scritto: >> >> On 4/25/18 11:03 AM, Paolo Valente wrote: >>> >>> Il giorno 25 apr 2018, alle ore 18:50, Jens Axboe ha scritto: Hi

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Paolo Valente
> Il giorno 25 apr 2018, alle ore 19:06, Jens Axboe ha > scritto: > > On 4/25/18 11:03 AM, Paolo Valente wrote: >> >> >>> Il giorno 25 apr 2018, alle ore 18:50, Jens Axboe ha >>> scritto: >>> >>> Hi Linus, >>> >>> I ended up sitting on this about a week

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Jens Axboe
On 4/25/18 11:03 AM, Paolo Valente wrote: > > >> Il giorno 25 apr 2018, alle ore 18:50, Jens Axboe ha >> scritto: >> >> Hi Linus, >> >> I ended up sitting on this about a week longer than I wanted to, >> since we were hashing out details with a timeout change. I've now >>

Re: [GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Paolo Valente
gt; > - Revert of a change from this merge window from Ming, that causes an > issue on some hardware. > > - Minor clarification doc addition from Linus Walleij. > > Please pull! > > > git://git.kernel.dk/linux-block.git tags/for-linus-20180425 > > >

[GIT PULL] Block fixes for 4.17-rc2

2018-04-25 Thread Jens Axboe
of a change from this merge window from Ming, that causes an issue on some hardware. - Minor clarification doc addition from Linus Walleij. Please pull! git://git.kernel.dk/linux-block.git tags/for-linus-20180425 Alan Jenkins (1

Re: [PATCH] Revert "blk-mq: remove code for dealing with remapping queue"

2018-04-25 Thread Jens Axboe
On 4/24/18 2:01 PM, Ming Lei wrote: > This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. > > Turns out some drivers(most are FC drivers) may not use managed > IRQ affinity, and has their customized .map_queues meantime, so > still keep this code for avoiding regression. Applied,

Re: [PATCH blktests] Add surprise removal block test

2018-04-25 Thread Omar Sandoval
On Tue, Apr 24, 2018 at 03:41:46PM -0600, Keith Busch wrote: > Signed-off-by: Keith Busch Hey, Keith, thanks for the test! Some comments/questions below. > --- > common/rc | 17 + > tests/block/016 | 52

Re: [PATCH blktests 3/3] nvme: add a regression test for UUID ns descriptops

2018-04-25 Thread Johannes Thumshirn
On Wed, Apr 25, 2018 at 08:30:36AM -0700, Omar Sandoval wrote: [...] > The TODO comment was leftover here, I removed it. Oops sorry. > > +DESCRIPTION="Test nvme and nvmet UUID NS descriptors" > > + > > +QUICK=1 > > + > > +requires() { > > + _have_program nvme && _have_module nvme-loop &&

Re: [PATCH] Revert "blk-mq: remove code for dealing with remapping queue"

2018-04-25 Thread Stefan Haberland
On 24.04.2018 22:01, Ming Lei wrote: This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. Turns out some drivers(most are FC drivers) may not use managed IRQ affinity, and has their customized .map_queues meantime, so still keep this code for avoiding regression. Reported-by: Laurence

Re: [PATCH blktests 3/3] nvme: add a regression test for UUID ns descriptops

2018-04-25 Thread Omar Sandoval
On Tue, Apr 24, 2018 at 10:12:51AM -0600, Johannes Thumshirn wrote: > Add a regression test for NVMe 1.3's UUID Namespace Descriptors. > > Signed-off-by: Johannes Thumshirn Thanks, Johannes, applied. A couple of comments below for future reference. > --- > tests/nvme/004

Re: [PATCH] Revert "blk-mq: remove code for dealing with remapping queue"

2018-04-25 Thread Christian Borntraeger
On 04/25/2018 03:59 PM, Jens Axboe wrote: > On 4/25/18 2:38 AM, Stefan Haberland wrote: >> On 25.04.2018 09:41, Christian Borntraeger wrote: >>> On 04/24/2018 10:01 PM, Ming Lei wrote: This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. Turns out some drivers(most are FC

Re: [PATCH] Revert "blk-mq: remove code for dealing with remapping queue"

2018-04-25 Thread Jens Axboe
On 4/25/18 2:38 AM, Stefan Haberland wrote: > On 25.04.2018 09:41, Christian Borntraeger wrote: >> On 04/24/2018 10:01 PM, Ming Lei wrote: >>> This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. >>> >>> Turns out some drivers(most are FC drivers) may not use managed >>> IRQ affinity, and

Re: [PATCH 4/4] iomap: Use FUA for pure data O_DSYNC DIO writes

2018-04-25 Thread Jan Kara
On Wed 25-04-18 00:07:07, Holger Hoffstätte wrote: > On 04/24/18 19:34, Christoph Hellwig wrote: > > On Sat, Apr 21, 2018 at 02:54:05PM +0200, Jan Kara wrote: > > > > - if (iocb->ki_flags & IOCB_DSYNC) > > > > + if (iocb->ki_flags & IOCB_DSYNC) { > > > >

Re: Regression 4.17-rc1: SSD doesn’t properly resume causing system hang (NULL pointer dereference)

2018-04-25 Thread Paul Menzel
Dear Bart, On 04/25/18 14:26, Bart Van Assche wrote: On Wed, 2018-04-25 at 07:37 +0200, Paul Menzel wrote: Am 24.04.2018 um 23:17 schrieb Bart Van Assche: On Tue, 2018-04-24 at 23:04 +0200, Paul Menzel wrote: I applied your change, and rebuilt the Linux kernel. Unfortunately, it looks like,

Re: Regression 4.17-rc1: SSD doesn properly resume causing system hang (NULL pointer dereference)

2018-04-25 Thread Bart Van Assche
On Wed, 2018-04-25 at 07:37 +0200, Paul Menzel wrote: > Am 24.04.2018 um 23:17 schrieb Bart Van Assche: > > On Tue, 2018-04-24 at 23:04 +0200, Paul Menzel wrote: > > > I applied your change, and rebuilt the Linux kernel. Unfortunately, it > > > looks like, it didn’t make a difference. > > > > In

Re: testing io.low limit for blk-throttle

2018-04-25 Thread Joseph Qi
Hi Paolo, On 18/4/24 20:12, Paolo Valente wrote: > > >> Il giorno 23 apr 2018, alle ore 11:01, Joseph Qi ha >> scritto: >> >> >> >> On 18/4/23 15:35, Paolo Valente wrote: >>> >>> Il giorno 23 apr 2018, alle ore 08:05, Joseph Qi ha

Re: [Drbd-dev] [PATCH] drdb: fix print_st_err()'s prototype

2018-04-25 Thread Roland Kammerer
On Tue, Apr 24, 2018 at 03:14:10PM +0200, Luc Van Oostenryck wrote: > print_st_err() is defined with its 4th argument taking an > 'enum drbd_state_rv' but its prototype use an int for it. > > Fix this by using 'enum drbd_state_rv' in the prototype too. > > Signed-off-by: Luc Van Oostenryck

Re: [PATCH v4] blktests: regression test "block: do not use interruptible wait anywhere"

2018-04-25 Thread Alan Jenkins
On 24/04/2018, Omar Sandoval wrote: > On Tue, Apr 17, 2018 at 04:21:36PM +0100, Alan Jenkins wrote: >> > Without this fix, I get an IO error in this test: >> > >> > # dd if=/dev/sda of=/dev/null iflag=direct & \ >> > while killall -SIGUSR1 dd; do sleep 0.1; done & \ >> >

Re: [PATCH] Revert "blk-mq: remove code for dealing with remapping queue"

2018-04-25 Thread Stefan Haberland
On 25.04.2018 09:41, Christian Borntraeger wrote: On 04/24/2018 10:01 PM, Ming Lei wrote: This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. Turns out some drivers(most are FC drivers) may not use managed IRQ affinity, and has their customized .map_queues meantime, so still keep

Re: [PATCH] Revert "blk-mq: remove code for dealing with remapping queue"

2018-04-25 Thread Christian Borntraeger
On 04/24/2018 10:01 PM, Ming Lei wrote: > This reverts commit 37c7c6c76d431dd7ef9c29d95f6052bd425f004c. > > Turns out some drivers(most are FC drivers) may not use managed > IRQ affinity, and has their customized .map_queues meantime, so > still keep this code for avoiding regression. > >