On 03/22/2017 01:01 PM, Christoph Hellwig wrote:
> A bunch of cleanups to get us a nice I/O submission path.
>
> Changes since V2:
> - really address the comments from Bart
> - address another comment from Bart
>
> Changes since V1:
> - rebase on top of the recent blk_mq_try_issue_directly
On 03/22/2017 06:36 PM, Jan Kara wrote:
> Hello,
>
> this is a series with the remaining patches (on top of 4.11-rc2) to
> fix several different races and issues I've found when testing device
> shutdown and reuse. The first patch fixes possible (theoretical)
> problems when opening of a block
Hello,
this is a series with the remaining patches (on top of 4.11-rc2) to fix several
different races and issues I've found when testing device shutdown and reuse.
The first patch fixes possible (theoretical) problems when opening of a
block device races with shutdown of a gendisk structure.
When block device is closed, we call inode_detach_wb() in __blkdev_put()
which sets inode->i_wb to NULL. That is contrary to expectations that
inode->i_wb stays valid once set during the whole inode's lifetime and
leads to oops in wb_get() in locked_inode_to_wb_and_lock_list() because
Make wb->bdi a proper refcounted reference to bdi for all bdi_writeback
structures except for the one embedded inside struct backing_dev_info.
That will allow us to simplify bdi unregistration.
Acked-by: Tejun Heo
Signed-off-by: Jan Kara
---
mm/backing-dev.c | 13
When disk->fops->open() in __blkdev_get() returns -ERESTARTSYS, we
restart the process of opening the block device. However we forget to
switch bdev->bd_bdi back to noop_backing_dev_info and as a result bdev
inode will be pointing to a stale bdi. Fix the problem by setting
bdev->bd_bdi later when
Currently we waited for all cgwbs to get freed in cgwb_bdi_destroy()
which also means that writeback has been shutdown on them. Since this
wait is going away, directly shutdown writeback on cgwbs from
cgwb_bdi_destroy() to avoid live writeback structures after
bdi_unregister() has finished. To
When device open races with device shutdown, we can get the following
oops in scsi_disk_get():
[11863.044351] general protection fault: [#1] SMP
[11863.045561] Modules linked in: scsi_debug xfs libcrc32c netconsole btrfs
raid6_pq zlib_deflate lzo_compress xor [last unloaded: loop]
Make the function available for outside use and fortify it against NULL
kobject.
CC: Greg Kroah-Hartman
Reviewed-by: Bart Van Assche
Acked-by: Tejun Heo
Signed-off-by: Jan Kara
---
include/linux/kobject.h
Currently we wait for all cgwbs to get released in cgwb_bdi_destroy()
(called from bdi_unregister()). That is however unnecessary now when
cgwb->bdi is a proper refcounted reference (thus bdi cannot get
released before all cgwbs are released) and when cgwb_bdi_destroy()
shuts down writeback
Looks fine,
Reviewed-by: Christoph Hellwig
Looks good,
Reviewed-by: Christoph Hellwig
Looks fine,
Reviewed-by: Christoph Hellwig
Turn the different ways of merging or issuing I/O into a series of if/else
statements instead of the current maze of gotos. Note that this means we
pin the CPU a little longer for some cases as the CTX put is moved to
common code at the end of the function.
Signed-off-by: Christoph Hellwig
They are mostly the same code anyway - this just one small conditional
for the plug case that is different for both variants.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c | 164 +++--
1 file changed, 31 insertions(+), 133
Now that we have a nice direct issue heper this helps simplifying
the code a bit, and also gets rid of the old_rq variable.
Signed-off-by: Christoph Hellwig
---
block/blk-mq.c | 36 ++--
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git
A bunch of cleanups to get us a nice I/O submission path.
Changes since V2:
- really address the comments from Bart
- address another comment from Bart
Changes since V1:
- rebase on top of the recent blk_mq_try_issue_directly changes
- incorporate comments from Bart
Rename blk_mq_try_issue_directly to __blk_mq_try_issue_directly and add a
new wrapper that takes care of RCU / SRCU locking to avoid having
boileplate code in the caller which would get duplicated with new callers.
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
This flag was never used since it was introduced.
Signed-off-by: Christoph Hellwig
Reviewed-by: Bart Van Assche
Reviewed-by: Johannes Thumshirn
---
block/blk-mq.c | 8 +---
include/linux/blk-mq.h | 1 -
2 files changed,
On Tue, Mar 21, 2017 at 12:40:17PM +, Bart Van Assche wrote:
> On Mon, 2017-03-20 at 16:39 -0400, Christoph Hellwig wrote:
> > Changes since V1:
> > - rebase on top of the recent blk_mq_try_issue_directly changes
> > - incorporate comments from Bart
>
> Hi Christoph,
>
> It seems to me
On Tue, Mar 21, 2017 at 02:59:01PM -0400, Tejun Heo wrote:
> I do like the fact that this is a lot simpler than the previous
> implementation but am not quite sure we want to deviate significantly
> from what we do for other commands (command translation). Is it
> because fixing the existing
On 03/22/2017 11:58 AM, Keith Busch wrote:
> On Tue, Mar 21, 2017 at 11:03:59PM -0400, Jens Axboe wrote:
>> On 03/21/2017 10:14 PM, Ming Lei wrote:
>>> When iterating busy requests in timeout handler,
>>> if the STARTED flag of one request isn't set, that means
>>> the request is being processed
On Tue, Mar 21, 2017 at 11:03:59PM -0400, Jens Axboe wrote:
> On 03/21/2017 10:14 PM, Ming Lei wrote:
> > When iterating busy requests in timeout handler,
> > if the STARTED flag of one request isn't set, that means
> > the request is being processed in block layer or driver, and
> > isn't
On Wed, Mar 22, 2017 at 01:38:09PM +1100, NeilBrown wrote:
>
> Currently only dm and md/raid5 bios trigger trace_block_bio_complete().
> Now that we have bio_chain(), it is not possible, in general, for a
> driver to know when the bio is really complete. Only bio_endio()
> knows that.
>
> So
24 matches
Mail list logo