FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 10-12-2011, 09:22 PM
Jeff Moyer
 
Default blk-flush: fix invalid BUG_ON in blk_insert_flush

A user reported a regression due to commit
4853abaae7e4a2af938115ce9071ef8684fb7af4 (block: fix flush
machinery for stacking drivers with differring flush flags).
Part of the problem is that blk_insert_flush required a
single bio be attached to the request. In reality, having
no attached bio is also a valid case, as can be observed with
an empty flush.

[1] http://www.redhat.com/archives/dm-devel/2011-September/msg00154.html

Reported-by: Christophe Saout <christophe@saout.de>
Signed-off-by: Jeff Moyer <jmoyer@redhat.com
Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
---
block/blk-flush.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/block/blk-flush.c b/block/blk-flush.c
index 0ff29c6..720ad60 100644
--- a/block/blk-flush.c
+++ b/block/blk-flush.c
@@ -320,7 +320,7 @@ void blk_insert_flush(struct request *rq)
return;
}

- BUG_ON(!rq->bio || rq->bio != rq->biotail);
+ BUG_ON(rq->bio != rq->biotail); /*assumes zero or single bio rq */

/*
* If there's data but flush is not necessary, the request can be
--
1.7.1

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 10-12-2011, 10:18 PM
Tejun Heo
 
Default blk-flush: fix invalid BUG_ON in blk_insert_flush

On Wed, Oct 12, 2011 at 05:22:42PM -0400, Jeff Moyer wrote:
> A user reported a regression due to commit
> 4853abaae7e4a2af938115ce9071ef8684fb7af4 (block: fix flush
> machinery for stacking drivers with differring flush flags).
> Part of the problem is that blk_insert_flush required a
> single bio be attached to the request. In reality, having
> no attached bio is also a valid case, as can be observed with
> an empty flush.
>
> [1] http://www.redhat.com/archives/dm-devel/2011-September/msg00154.html
>
> Reported-by: Christophe Saout <christophe@saout.de>
> Signed-off-by: Jeff Moyer <jmoyer@redhat.com
> Signed-off-by: Jeff Moyer <jmoyer@redhat.com>

Duplicate SOB's and missing space after '/*' in the comment. Other
than that,

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

--
tejun

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 

Thread Tools




All times are GMT. The time now is 12:07 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org