Re: [PATCH v2 2/3] nvme: avoid to use blk_mq_abort_requeue_list()

2017-05-19 Thread Ming Lei
On Sat, May 20, 2017 at 11:56:04AM +0800, Ming Lei wrote: > NVMe may add request into requeue list simply and not kick off the > requeue if hw queues are stopped. Then blk_mq_abort_requeue_list() > is called in both nvme_kill_queues() and nvme_ns_remove() for > dealing with this issue. > >

[PATCH v2 2/3] nvme: avoid to use blk_mq_abort_requeue_list()

2017-05-19 Thread Ming Lei
NVMe may add request into requeue list simply and not kick off the requeue if hw queues are stopped. Then blk_mq_abort_requeue_list() is called in both nvme_kill_queues() and nvme_ns_remove() for dealing with this issue. Unfortunately blk_mq_abort_requeue_list() is absolutely a race maker, for

[PATCH v2 0/3] nvme: fix hang in path of removing disk

2017-05-19 Thread Ming Lei
The first two patches fixes hang during removing disk. The 3rd patch removes blk_mq_abort_requeue_list() since no one uses it any more. Ming Lei (3): nvme: use blk_mq_start_hw_queues() in nvme_kill_queues() nvme: avoid to use blk_mq_abort_requeue_list() blk-mq: remove

[PATCH v2 1/3] nvme: use blk_mq_start_hw_queues() in nvme_kill_queues()

2017-05-19 Thread Ming Lei
Inside nvme_kill_queues(), we have to start hw queues for draining requests in sw queues, .dispatch list and requeue list, so use blk_mq_start_hw_queues() instead of blk_mq_start_stopped_hw_queues() which only run queues if queues are stopped, but the queues may have been started already, for

[PATCH v2 3/3] blk-mq: remove blk_mq_abort_requeue_list()

2017-05-19 Thread Ming Lei
No one uses it any more, so remove it. Signed-off-by: Ming Lei --- block/blk-mq.c | 19 --- include/linux/blk-mq.h | 1 - 2 files changed, 20 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index a69ad122ed66..f2224ffd225d 100644 ---

Darlehen angebot 3 %

2017-05-19 Thread Frau SCHMIDT
Sehr geehrte Damen und Herren, Haben Sie Interesse über einer finanziellen Darlehen zu 3%? kontaktieren Sie mich für mehr Details und Bedingungen. ich kann all jenen helfen, wer ein Darlehen benötigen. Ich kann Ihnen biete ein darlehen in hohe von 10.000.000 EUR Meine mail:

Re: [PATCH 05/18] nfsd: Check private request size before submitting a SCSI request

2017-05-19 Thread J . Bruce Fields
ACK as far as I'm concerned.--b. On Fri, May 19, 2017 at 11:30:03AM -0700, Bart Van Assche wrote: > Since using scsi_req() is only allowed against request queues for which > struct scsi_request is the first member of their private request > data, refuse to register block layer queues for which

Re: [PATCH blktests] check: add ability to exclude a test or group

2017-05-19 Thread Omar Sandoval
On Fri, May 19, 2017 at 03:17:10PM +0200, Johannes Thumshirn wrote: > Add the ability to exclude a test or whole test group from a test > run. Thus a user can explicitly decide which tests to skip like in > this example where one wants all of the 'block' group but block/001. > > block/002 (remove

[PATCH 03/18] pktcdvd: Check private request size before attaching to a queue

2017-05-19 Thread Bart Van Assche
Since the pktcdvd driver only supports request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which the private data is smaller than struct scsi_request. References: commit 82ed4db499b8 ("block: split scsi_request

[PATCH 04/18] cdrom: Check private request size before attaching to a queue

2017-05-19 Thread Bart Van Assche
Since the cdrom driver only supports request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which the private data is smaller than struct scsi_request. References: commit 82ed4db499b8 ("block: split scsi_request

[PATCH 08/18] block: Make scsi_req_init() calls implicit

2017-05-19 Thread Bart Van Assche
Instead of explicitly calling scsi_req_init(), let blk_get_request() call that function from inside blk_rq_init(). Add an .initialize_rq_fn() callback function to the block drivers that need it. Merge the IDE .init_rq_fn() function into .initialize_rq_fn() because it is too small to keep it as a

[PATCH 01/18] block: Introduce blk_queue_cmd_size()

2017-05-19 Thread Bart Van Assche
This function will be used by later patches in this series. Signed-off-by: Bart Van Assche Cc: Jens Axboe Cc: Christoph Hellwig Cc: Omar Sandoval Cc: Hannes Reinecke Cc: linux-block@vger.kernel.org ---

[PATCH 07/18] block: Introduce request_queue.initialize_rq_fn()

2017-05-19 Thread Bart Van Assche
Several block drivers need to initialize the driver-private data after having called blk_get_request() and before .prep_rq_fn() is called, e.g. when submitting a REQ_OP_SCSI_* request. Avoid that that initialization code has to be repeated after every blk_get_request() call by adding a new

[PATCH 05/18] nfsd: Check private request size before submitting a SCSI request

2017-05-19 Thread Bart Van Assche
Since using scsi_req() is only allowed against request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which the private data is smaller than struct scsi_request. References: commit 82ed4db499b8 ("block: split

[PATCH 02/18] bsg: Check private request size before attaching to a queue

2017-05-19 Thread Bart Van Assche
Since BSG only supports request queues for which struct scsi_request is the first member of their private request data, refuse to register block layer queues for which the private data is smaller than struct scsi_request. References: commit bd1599d931ca ("scsi_transport_sas: fix BSG ioctl memory

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread yizhan
On 05/20/2017 12:40 AM, Ming Lei wrote: On Fri, May 19, 2017 at 08:41:13AM -0600, Jens Axboe wrote: On 05/16/2017 07:27 PM, Ming Lei wrote: When one NVMe PCI device is being resetted and found reset failue, nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues are put

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread Ming Lei
On Fri, May 19, 2017 at 08:41:13AM -0600, Jens Axboe wrote: > On 05/16/2017 07:27 PM, Ming Lei wrote: > > When one NVMe PCI device is being resetted and found reset failue, > > nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues > > are put into stopped first, then schedule

[PATCH] block: partitions: mac: Put mac_fix_string() inside #ifdef section

2017-05-19 Thread Matthias Kaehlcke
The function is only used when CONFIG_PPC_PMAC=y, put it inside the existing #ifdef section. This fixes the following warning when building with clang: block/partitions/mac.c:22:20: error: unused function 'mac_fix_string' [-Werror,-Wunused-function] Signed-off-by: Matthias Kaehlcke

[GIT PULL] libnvdimm fixes for 4.12-rc2

2017-05-19 Thread Williams, Dan J
Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-for-next ...to receive a couple compile fixes for 4.12-rc2. With the removal of the ->direct_access() method from block_device_operations in favor of a new dax_device + dax_operations we broke 2

Re: [PATCH] block: partitions: mac: Mark mac_fix_string() as __maybe_unused

2017-05-19 Thread Jens Axboe
On 05/18/2017 07:24 PM, Matthias Kaehlcke wrote: > The function is only used when CONFIG_PPC_PMAC=y. Adding the attribute > fixes the following warning when building with clang: > > block/partitions/mac.c:22:20: error: unused function 'mac_fix_string' > [-Werror,-Wunused-function] > >

Re: [PATCH] blktrace: fix integer parse

2017-05-19 Thread Jens Axboe
On 05/19/2017 09:04 AM, Shaohua Li wrote: > sscanf is a very poor way to parse integer. For example, I input > "discard" for act_mask, it gets 0xd and completely messes up. Using > correct API to do integer parse. > > This patch also makes attributes accept any base of integer. Thanks Shaohua,

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread Ming Lei
On Fri, May 19, 2017 at 08:41:13AM -0600, Jens Axboe wrote: > On 05/16/2017 07:27 PM, Ming Lei wrote: > > When one NVMe PCI device is being resetted and found reset failue, > > nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues > > are put into stopped first, then schedule

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread Keith Busch
On Fri, May 19, 2017 at 08:52:45PM +0800, Ming Lei wrote: > But I still think it may be better to move nvme_kill_queues() into > nvme_remove_dead_ctrl() as an improvement because during this small > window page cache can be used up by write application, and no writeback > can move on meantime.

[PATCH] blktrace: fix integer parse

2017-05-19 Thread Shaohua Li
sscanf is a very poor way to parse integer. For example, I input "discard" for act_mask, it gets 0xd and completely messes up. Using correct API to do integer parse. This patch also makes attributes accept any base of integer. Signed-off-by: Shaohua Li --- kernel/trace/blktrace.c

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread Jens Axboe
On 05/16/2017 07:27 PM, Ming Lei wrote: > When one NVMe PCI device is being resetted and found reset failue, > nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues > are put into stopped first, then schedule .remove_work to release the driver. > > Unfortunately if the driver

Re: [PATCH BUGFIX] block, bfq: access and cache blkg data only when safe

2017-05-19 Thread Jens Axboe
On 05/19/2017 02:39 AM, Paolo Valente wrote: > @@ -692,8 +725,7 @@ void bfq_pd_offline(struct blkg_policy_data *pd) > /* >* The idle tree may still contain bfq_queues belonging >* to exited task because they never migrated to a different > -

Re: [PATCH 1/6 v2] mmc: core: Delete bounce buffer Kconfig option

2017-05-19 Thread Linus Walleij
On Fri, May 19, 2017 at 10:30 AM, Ulf Hansson wrote: > Thanks, the *series* applied for next! (Responding to patch1 as > couldn't find the cover-letter for v2). Awesome, and just to make sure you will not be bored in the weekend I just sent a sequel series expanding the

[PATCH blktests v2 1/3] Add ability to build test-cases

2017-05-19 Thread Johannes Thumshirn
Add the ability to build test cases from C files. This is handy for things like syzcaller reproducers and all other kinds of test binaries. Signed-off-by: Johannes Thumshirn --- Makefile | 26 +++- src/.gitignore | 1 + src/Makefile | 16 +++ src/sg-001.c | 438

[PATCH blktests v2 2/3] tests/sg: add SCSI generic test grouop

2017-05-19 Thread Johannes Thumshirn
Add a test group for tests of the SCSI generic driver and and functions common to the SCSI generic driver and it's test cases. Signed-off-by: Johannes Thumshirn --- common/sg | 41 + tests/sg/group | 28

[PATCH blktests v2 3/3] sg/001: add regression test for syzcaller generated GPF in sg_read path

2017-05-19 Thread Johannes Thumshirn
Add a regression test for commit 48ae8484e9fc ("scsi: sg: don't return bogus Sg_requests"). This is a general protection fault triggered by syzcaller via issuing bogus read(2)s on the /dev/sg devices. Signed-off-by: Johannes Thumshirn --- tests/sg/001 | 47

[PATCH blktests v2 0/3] Add SCSI generic test group

2017-05-19 Thread Johannes Thumshirn
Add a test group for the SCSI generic driver and one syzcaller reproducer for this group. The reprodcuer is distributed as a C program, so the makefile is amended to build C files to be used in the test. Changes to v1: * Stripped left over TODO comment * Modified reproducer to accept a device

[PATCH 6/6] mmc: debugfs: Move EXT CSD debugfs acces to block layer

2017-05-19 Thread Linus Walleij
Just like the previous commit moving status retriveal for MMC and SD cards into the block layer (when active), this moves the retrieveal of the EXT CSD from the card from the special ext_csd file into the block stack as well. Again special care is taken to make the debugfs work even with the

[PATCH 1/6] mmc: block: remove req back pointer

2017-05-19 Thread Linus Walleij
Just as we can use blk_mq_rq_from_pdu() to get the per-request tag we can use blk_mq_rq_to_pdu() to get a request from a tag. Introduce a static inline helper so we are on the clear what is happening. Suggested-by: Christoph Hellwig Signed-off-by: Linus Walleij

[PATCH 2/6] mmc: block: Tag DRV_OPs with a driver operation type

2017-05-19 Thread Linus Walleij
We will expand the DRV_OP usage, so we need to know which operation we're performing. Tag the operations with an enum:ed type and rename the function so it is clear that it deals with any command and put a switch statement in it. Currently only ioctls are supported. Signed-off-by: Linus Walleij

[PATCH 5/6] mmc: debugfs: Move card status retrieveal into the block layer

2017-05-19 Thread Linus Walleij
The debugfs file "status" (in e.g. /debug/mmc3/mmc3:0001) is only available if and only if the card used is an (e)MMC or SD card, not for SDIO, as can be seen from this guard in mmc_add_card_debugfs(); if (mmc_card_mmc(card) || mmc_card_sd(card)) (...create debugfs "status" entry...) Further

[PATCH 3/6] mmc: block: Move DRV OP issue function

2017-05-19 Thread Linus Walleij
We will need to access static functions above the pure block layer operations in the file, so move the driver operations issue function down so we can see all non-blocklayer symbols. Signed-off-by: Linus Walleij --- drivers/mmc/core/block.c | 74

[PATCH 4/6] mmc: block: Move boot partition locking into a driver op

2017-05-19 Thread Linus Walleij
This moves the boot partition lock command (issued from sysfs) into a custom block layer request, just like the ioctl()s, getting rid of yet another instance of mmc_get_card(). Since we now have two operations issuing special DRV_OP's, we rename the result variable ->drv_op_result. Tested by

[PATCH 0/6] More MMC block core refactorings

2017-05-19 Thread Linus Walleij
This series builds on top of the previous series that created custom DRV_OP requests for ioctl() operations in MMC. The first patch is a suggestion from Christoph, the second builds infrastructure for issuing more, currently orthogonal custom operations through the block layer. The first

Re: [PATCH 2/2] nvme: avoid to hang in remove disk

2017-05-19 Thread Ming Lei
On Thu, May 18, 2017 at 12:06:24PM -0400, Keith Busch wrote: > On Thu, May 18, 2017 at 11:35:43PM +0800, Ming Lei wrote: > > On Thu, May 18, 2017 at 03:49:31PM +0200, Christoph Hellwig wrote: > > > On Wed, May 17, 2017 at 09:27:29AM +0800, Ming Lei wrote: > > > > If some writeback requests are

[PATCH blktests] check: add ability to exclude a test or group

2017-05-19 Thread Johannes Thumshirn
Add the ability to exclude a test or whole test group from a test run. Thus a user can explicitly decide which tests to skip like in this example where one wants all of the 'block' group but block/001. block/002 (remove a device while running blktrace) 0.835s ... runtime + test

Re: [PATCH 1/2] nvme: fix race between removing and reseting failure

2017-05-19 Thread Ming Lei
On Thu, May 18, 2017 at 10:13:07AM -0400, Keith Busch wrote: > On Wed, May 17, 2017 at 09:27:28AM +0800, Ming Lei wrote: > > When one NVMe PCI device is being resetted and found reset failue, > > nvme_remove_dead_ctrl() is called to handle the failure: blk-mq hw queues > > are put into stopped

[PATCH 2/7] genirq/affinity: assign vectors to all present CPUs

2017-05-19 Thread Christoph Hellwig
Currently we only assign spread vectors to online CPUs, which ties the IRQ mapping to the currently online devices and doesn't deal nicely with the fact that CPUs could come and go rapidly due to e.g. power management. Instead assign vectors to all present CPUs to avoid this churn.

[PATCH 1/7] genirq: allow assigning affinity to present but not online CPUs

2017-05-19 Thread Christoph Hellwig
This will allow us to spread MSI/MSI-X affinity over all present CPUs and thus better deal with systems where cpus are take on and offline all the time. Signed-off-by: Christoph Hellwig --- kernel/irq/manage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 5/7] blk-mq: include all present CPUs in the default queue mapping

2017-05-19 Thread Christoph Hellwig
This way we get a nice distribution independent of the current cpu online / offline state. Signed-off-by: Christoph Hellwig --- block/blk-mq-cpumap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c index

[PATCH 4/7] genirq/affinity: update CPU affinity for CPU hotplug events

2017-05-19 Thread Christoph Hellwig
Remove a CPU from the affinity mask when it goes offline and add it back when it returns. In case the vetor was assigned only to the CPU going offline it will be shutdown and re-started when the CPU reappears. Signed-off-by: Christoph Hellwig --- arch/x86/kernel/irq.c | 3

[PATCH 7/7] nvme: allocate queues for all possible CPUs

2017-05-19 Thread Christoph Hellwig
Unlike most drіvers that simply pass the maximum possible vectors to pci_alloc_irq_vectors NVMe needs to configure the device before allocting the vectors, so it needs a manual update for the new scheme of using all present CPUs. Signed-off-by: Christoph Hellwig ---

[PATCH 6/7] blk-mq: create hctx for each present CPU

2017-05-19 Thread Christoph Hellwig
Currently we only create hctx for online CPUs, which can lead to a lot of churn due to frequent soft offline / online operations. Instead allocate one for each present CPU to avoid this and dramatically simplify the code. Signed-off-by: Christoph Hellwig --- block/blk-mq.c

spread MSI(-X) vectors to all possible CPUs V2

2017-05-19 Thread Christoph Hellwig
Hi all, this series changes our automatic MSI-X vector assignment so that it takes all present CPUs into account instead of all online ones. This allows to better deal with cpu hotplug events, which could happen frequently due to power management for example. Changes since V1: - rebase to

[PATCH BUGFIX] block, bfq: access and cache blkg data only when safe

2017-05-19 Thread Paolo Valente
Operations on blkg objects in blk-cgroup are protected with the request_queue lock, which is no more the lock that protects I/O-scheduler operations in blk-mq. The latter are now protected with finer-grained per-scheduler-instance locks. As a consequence, if blkg and blkg-related objects are

Re: [PATCH 1/6 v2] mmc: core: Delete bounce buffer Kconfig option

2017-05-19 Thread Ulf Hansson
On 18 May 2017 at 11:29, Linus Walleij wrote: > This option is activated by all multiplatform configs and what > not so we almost always have it turned on, and the memory it > saves is negligible, even more so moving forward. The actual > bounce buffer only gets

Re: [PATCH 12/15] block: merge blk_types.h into bio.h

2017-05-19 Thread h...@lst.de
On Thu, May 18, 2017 at 02:25:52PM +, Bart Van Assche wrote: > On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote: > > We've cleaned up our headers sufficiently that we don't need this split > > anymore. > > Hello Christoph, > > Request-based drivers need the structure definitions

Re: dedicated error codes for the block layer

2017-05-19 Thread Christoph Hellwig
On Thu, May 18, 2017 at 04:55:08PM +0200, David Sterba wrote: > JFYI, the patches 13 and 15 are missing, not in linux-btrfs mailbox and > patchwork web. Does not look like a delay, maybe vger refused them > completely. They still haven't made it to linux-block and linux-btrfs, but they did make

[RFC PATCH] mmc: core: Remove CONFIG_MMC_BLOCK_BOUNCE option.

2017-05-19 Thread Steven J. Hill
Remove MMC bounce buffer config option and associated code. This is proposed in addition to Linus' changes to remove the config option. I have tested this on our Octeon hardware platforms. Signed-off-by: Steven J. Hill --- arch/arm/configs/colibri_pxa300_defconfig | 1

Re: [PATCH blktests 0/3] Add SCSI generic test group

2017-05-19 Thread Johannes Thumshirn
On 05/19/2017 12:46 AM, Omar Sandoval wrote: > Looking at this some more, it seems like the syzkaller reproducer always > bangs on /dev/sg0. How hard would it be to adapt it to run on the sg > device for every test device instead? Can't be too hard I guess ;-). Maybe I can even clean it up a bit