On Fri, Jul 14, 2017 at 08:22:31AM -0600, Jens Axboe wrote:
> /*
> * drivers should _never_ use the all version - the bio may have been split
> - * before it got to the driver and the driver won't own all of it
> + * before it got to the driver and the driver won't own all of it.
> + *
> + *
Now no one uses these APIs anymore, so unexport them.
Signed-off-by: Ming Lei
---
block/blk-mq.c | 83 ++
block/blk-mq.h | 1 +
include/linux/blk-mq.h | 8 -
3 files changed, 3 insertions(+), 89
Now blk-mq implements such function via BLK_MQ_F_AUTO_RESTART,
so just use that and remove related code in virtio-blk and xen-blkfront.
Signed-off-by: Ming Lei
---
drivers/block/virtio_blk.c | 8 +---
drivers/block/xen-blkfront.c | 15 ++-
2 files
Both xen-blkfront and virito-blk stops queue when
the queue becomes busy, and restarts the queue after
one request is completed.
This patch implements this function in blk-mq core
by introducing BLK_MQ_F_AUTO_RESTART, then we can
remove stop/start queue related APIs and make 'stopped'
state
If .queue_rq() returns BLK_STS_RESOURCE, blk-mq will rerun
the queue in the three situations:
1) if BLK_MQ_S_SCHED_RESTART is set
- queue is rerun after one rq is completed, see blk_mq_sched_restart()
which is run from blk_mq_free_request()
2) BLK_MQ_S_TAG_WAITING is set
- queue is rerun after
Hi,
We have replaced most of start/stop queue via quiesce/unquiesce.
And only the usage in case of handling BLK_STS_RESOURCE is kept.
This patch moves this handling into blk-mq for xen-blkfront and
virtio-blk, then we can avoid to let drivers touch the 'stopped'
state, because allowing driver to
stopping queue may cause race and may not stop the queue really
after the API returns, and we have improved quiescing
interface and it really can block dispatching once it returns.
So switch to quiesce/unquiece like what we did on other drivers
(NVMe, NBD, mtip32xx, ...)
The
Now SCSI won't stop queue at all, and not necessary to use
blk_mq_start_hw_queues() to clear the state of 'stopped',
so switch to blk_mq_run_hw_queues() instead.
Cc: "James E.J. Bottomley"
Cc: "Martin K. Petersen"
Cc:
On 07/14/2017 04:35 PM, Ming Lei wrote:
> On Sat, Jul 15, 2017 at 4:54 AM, Liu Bo wrote:
>> On Fri, Jul 14, 2017 at 08:22:31AM -0600, Jens Axboe wrote:
>>> On 07/14/2017 07:47 AM, Ming Lei wrote:
> @@ -156,6 +156,9 @@ static inline void *bio_data(struct bio *bio)
>
On Sat, Jul 15, 2017 at 4:54 AM, Liu Bo wrote:
> On Fri, Jul 14, 2017 at 08:22:31AM -0600, Jens Axboe wrote:
>> On 07/14/2017 07:47 AM, Ming Lei wrote:
>> >> @@ -156,6 +156,9 @@ static inline void *bio_data(struct bio *bio)
>> >> /*
>> >> * drivers should _never_ use the
On Fri, Jul 14 2017 at 1:17pm -0400,
Ewan D. Milne wrote:
> On Fri, 2017-07-14 at 10:19 -0400, Mike Snitzer wrote:
> >
> > Do you see a benefit to extracting that portion of your WIP patch
> > (removing the ->complete handler entirely)?
> >
> > Or leave well enough alone
On Fri, Jul 14, 2017 at 08:22:31AM -0600, Jens Axboe wrote:
> On 07/14/2017 07:47 AM, Ming Lei wrote:
> >> @@ -156,6 +156,9 @@ static inline void *bio_data(struct bio *bio)
> >> /*
> >> * drivers should _never_ use the all version - the bio may have been
> >> split
> >> * before it got to
On 07/14/2017 11:56 AM, Filipe Manana wrote:
>
>
> On 07/14/2017 04:03 PM, David Sterba wrote:
>> On Fri, Jul 14, 2017 at 09:47:30PM +0800, Ming Lei wrote:
>>> On Fri, Jul 14, 2017 at 9:40 PM, David Sterba wrote:
We've switched to cloned bios in btrfs and hit a nasty bug
On 07/14/2017 04:03 PM, David Sterba wrote:
> On Fri, Jul 14, 2017 at 09:47:30PM +0800, Ming Lei wrote:
>> On Fri, Jul 14, 2017 at 9:40 PM, David Sterba wrote:
>>> We've switched to cloned bios in btrfs and hit a nasty bug leading to
>>> corruptions, when cloned bios are
On Thu, Jul 06, 2017 at 02:09:21PM +0200, Johannes Thumshirn wrote:
> Add a regression test for the patch titled "scsi: sg: fix
> SG_DXFER_FROM_DEV transfers" which reassembles the syscalls done by Nero
> Burning ROM to discover CD and DVD burners.
Fixed up a few things below and applied, thanks!
On Fri, 2017-07-14 at 10:19 -0400, Mike Snitzer wrote:
>
> Do you see a benefit to extracting that portion of your WIP patch
> (removing the ->complete handler entirely)?
>
> Or leave well enough alone and just continue to disable dm-mq's ability
> to stack on .request_fn paths?
>
> Given
On Fri, Jun 30, 2017 at 11:07:35AM +0200, Johannes Thumshirn wrote:
> Use nproc to get number of CPUs for fio jobs and introduce
> _run_fio_rand_io helper for parallel IO which we don't really care about
> the details and just want some IO.
Thanks, Johannes, applied with a fix below.
>
On Fri, Jul 14, 2017 at 09:47:30PM +0800, Ming Lei wrote:
> On Fri, Jul 14, 2017 at 9:40 PM, David Sterba wrote:
> > We've switched to cloned bios in btrfs and hit a nasty bug leading to
> > corruptions, when cloned bios are iterated by bio_for_each_segment_all.
>
> No, you
On 07/14/2017 12:40 AM, Johannes Thumshirn wrote:
> On Thu, Jul 13, 2017 at 08:02:41AM -0600, Jens Axboe wrote:
>> Because it sucks as an interface - there's no way to apply different
>> settings to different devices, and using the kernel command line to
>> control something like this is ugly. It
On Fri, Jul 14, 2017 at 9:40 PM, David Sterba wrote:
> We've switched to cloned bios in btrfs and hit a nasty bug leading to
> corruptions, when cloned bios are iterated by bio_for_each_segment_all.
No, you simply can't use bio_for_each_segment_all on cloned bio, and the
reason
We've switched to cloned bios in btrfs and hit a nasty bug leading to
corruptions, when cloned bios are iterated by bio_for_each_segment_all.
Report and fix:
https://patchwork.kernel.org/patch/9838535/
As a matter of precaution, we've added assertions to btrfs code to catch
the bad usage
On 14/07/17 15:44, Christoph Hellwig wrote:
can you please report what hardware this is one (e.g. libata or
real scsi, which driver), a kernel config and the actual command
used to suspend the system (to ram, to disk?) so that I an try to
reproduce it?
The hardware I used to bisect the problem
Tomi,
can you please report what hardware this is one (e.g. libata or
real scsi, which driver), a kernel config and the actual command
used to suspend the system (to ram, to disk?) so that I an try to
reproduce it?
Omar, ping?
--
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 21284 (AG Nürnberg)
Key fingerprint = EC38
Omar, ping?
--
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 21284 (AG Nürnberg)
Key fingerprint = EC38
From: Ming Lei
When blk_mq_get_request() failed, preempt counter isn't
released, and blk_mq_make_request() doesn't release the counter
too.
This patch fixes the issue, and makes sure that preempt counter
is only held if rq is allocated successfully. The same policy is
applied
No function change, just move 'struct resync_pages' and related
helpers into raid1-10.c
Signed-off-by: Ming Lei
---
drivers/md/md.h | 53 ---
drivers/md/raid1-10.c | 62 +++
We will support multipage bvec soon, so initialize bvec
table using the standardy way instead of writing the
talbe directly. Otherwise it won't work any more once
multipage bvec is enabled.
Acked-by: Guoqing Jiang
Signed-off-by: Ming Lei
---
bio_add_page() won't fail for resync bio, and the page index for each
bio is same, so remove it.
More importantly the 'idx' of 'struct resync_pages' is initialized in
mempool allocator function, the current way is wrong since mempool is
only responsible for allocation, we can't use that for
This 1st patch fixes one issue introduced in the following two
commits:
Fixes: f0250618361d(md: raid10: don't use bio's vec table to manage
resync pages)
Fixes: 98d30c5812c3(md: raid1: don't use bio's vec table to manage
resync pages)
The 2nd one initializes bvec table of bio
The problem here is the following:
blk_finish_request must always be called with the queue lock held,
it even has an assert.
Without blk-mq used by dm-rq, dm uses the block softirq to execute the
completion, which means we always have a different execution context and
can take the queue lock
Btw, we might want to expedite this to 4.13, a 4.13 now defaults
to blk-mq for scsi, and this patch would make sure that dm keeps
on just working with that switch.
On Thu, Jul 13, 2017 at 08:02:41AM -0600, Jens Axboe wrote:
> Because it sucks as an interface - there's no way to apply different
> settings to different devices, and using the kernel command line to
> control something like this is ugly. It never should have been done.
>
> The sysfs interface,
33 matches
Mail list logo