linux-um archives
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Anton Ivanov <anton.ivanov@cambridgegreys.com>,
	linux-um@lists.infradead.org
Cc: richard@nod.at, hch@lst.de
Subject: Re: New Patch series for the UBD Driver
Date: Mon, 12 Nov 2018 11:04:35 -0700	[thread overview]
Message-ID: <880075e6-1032-fe4f-0001-085d7409eb54@kernel.dk> (raw)
In-Reply-To: <58614d39-8c3b-4e8e-7b41-633bb52b533e@cambridgegreys.com>

On 11/12/18 11:00 AM, Anton Ivanov wrote:
> 
> On 11/12/18 5:50 PM, Jens Axboe wrote:
>> On 11/12/18 10:41 AM, anton.ivanov@cambridgegreys.com wrote:
>>> This is the revised patchset for the ubd driver. Known issues:
>>>
>>> 1. If an error is returned to an operation different from READ/WRITE/SYNC
>>> the block subsystem goes south finishing with a crash. I have tried everything
>>> I can think of and whatever I could lift out of the loop and nbd driver. I do
>>> not think that the problem is in the ubd driver. I am lost here, Jens can you
>>> please give me a hand in handling the case when ubd_handler() gets an error in
>>> reply to a discard.
>> It would help if you showed a crash from doing that, and an example of
>> how you are doing that.
> 
> Test case - 1G ext4 image on MS DOS filesystem.
> 
> With the present patch, the logic around line 844 should be commented 
> out so that DISCARD is always enabled. I can send a patch where this is 
> always enabled for testing purposes.
> 
> Mount filesystem - mount /dev/ubdb /mnt
> 
> Try fstrim /mnt
> 
> Crash is immediate,  but different in each case.
> 
> Some cases contain the WARN from line 439 in blk.h . Some contain 
> spinlock recursion BUG(). Some do not contain anything - it just 
> crashes. Or hangs.
> 
> I tried various combinations (and code theft from loop and nbd) of 
> blk_update_request, __blk_mq_end_request, blk_mq_end_request, etc - the 
> flavor of the crash changes a bit, but not the essence.

Sorry, all of this isn't very clear to me. It definitely sounds like
you are doing something wrong. Where are you calling falloc_punch()
from? It's not even safe from ->queue_rq(), you'd need to add
BLK_MQ_F_BLOCKING to your mq_ops flags to ensure that blk-mq
always calls you from a context that can block. If you're doing
it from the irq handler, well then...

> Firsts question - is any of that expected to be invoked out of an 
> interrupt handler in the first place?

What is "that" here?

-- 
Jens Axboe


_______________________________________________
linux-um mailing list
linux-um@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-um

  reply	other threads:[~2018-11-12 18:04 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-12 17:41 New Patch series for the UBD Driver anton.ivanov
2018-11-12 17:41 ` [PATCH 1/3] um: Switch to block-mq constants in the UML UBD driver anton.ivanov
2018-11-12 17:48   ` Jens Axboe
2018-11-12 17:52     ` Anton Ivanov
2018-11-12 17:42 ` [PATCH 2/3] um: Clean-up command processing in " anton.ivanov
2018-11-12 17:42 ` [PATCH 3/3] um: Add support for DISCARD in the UBD Driver anton.ivanov
2018-11-12 17:50 ` New Patch series for " Jens Axboe
2018-11-12 18:00   ` Anton Ivanov
2018-11-12 18:04     ` Jens Axboe [this message]
2018-11-12 18:12       ` Anton Ivanov
2018-11-12 18:14         ` Jens Axboe
2018-11-12 18:23           ` Anton Ivanov
2018-11-12 18:24             ` Anton Ivanov
2018-11-12 18:28             ` Jens Axboe
2018-11-12 18:41               ` Anton Ivanov
2018-11-12 19:11                 ` Jens Axboe
2018-11-12 19:26                   ` Jens Axboe
2018-11-13  8:42                     ` Anton Ivanov
2018-11-13 10:15                       ` Anton Ivanov
2018-11-13 10:20                         ` Anton Ivanov
2018-11-13 13:30                         ` Jens Axboe
2018-11-13 13:56                           ` Anton Ivanov
2018-11-13 15:14                             ` Jens Axboe
2018-11-13 15:24                               ` Anton Ivanov
2018-11-13 15:29                                 ` Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=880075e6-1032-fe4f-0001-085d7409eb54@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=hch@lst.de \
    --cc=linux-um@lists.infradead.org \
    --cc=richard@nod.at \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox