xfs
[Top] [All Lists]

[PATCH 1/5] block: do not try to merge discard requests

To: xfs@xxxxxxxxxxx
Subject: [PATCH 1/5] block: do not try to merge discard requests
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Thu, 31 Mar 2011 07:28:51 -0400
References: <20110331112850.980290062@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: quilt/0.48-1
Hack to not make the kernel crash when submitting multiple discard
requests that the blocl layer otherwise tries to merge.

Index: xfs/block/blk-core.c
===================================================================
--- xfs.orig/block/blk-core.c   2011-03-30 16:04:45.700659775 +0200
+++ xfs/block/blk-core.c        2011-03-30 16:04:59.775160021 +0200
@@ -1247,7 +1247,7 @@ static int __make_request(struct request
         */
        blk_queue_bounce(q, &bio);
 
-       if (bio->bi_rw & (REQ_FLUSH | REQ_FUA)) {
+       if (bio->bi_rw & (REQ_FLUSH | REQ_FUA | REQ_DISCARD)) {
                spin_lock_irq(q->queue_lock);
                where = ELEVATOR_INSERT_FLUSH;
                goto get_rq;

<Prev in Thread] Current Thread [Next in Thread>