From patchwork Fri Apr 15 19:16:01 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: mchristi@redhat.com X-Patchwork-Id: 611185 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3qmnck3GhZz9t6B for ; Sat, 16 Apr 2016 05:27:50 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753871AbcDOT0r (ORCPT ); Fri, 15 Apr 2016 15:26:47 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56579 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752489AbcDOTRW (ORCPT ); Fri, 15 Apr 2016 15:17:22 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72AC013A60; Fri, 15 Apr 2016 19:17:21 +0000 (UTC) Received: from rh2.redhat.com (vpn-53-120.rdu2.redhat.com [10.10.53.120]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u3FJGIhq007872; Fri, 15 Apr 2016 15:17:19 -0400 From: mchristi@redhat.com To: linux-f2fs-devel@lists.sourceforge.net, linux-ext4@vger.kernel.org, konrad.wilk@oracle.com, drbd-dev@lists.linbit.com, philipp.reisner@linbit.com, lars.ellenberg@linbit.com, linux-raid@vger.kernel.org, dm-devel@redhat.com, linux-fsdevel@vger.kernel.org, linux-bcache@vger.kernel.org, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org, linux-mtd@lists.infradead.org, target-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, osd-dev@open-osd.org, xfs@oss.sgi.com, ocfs2-devel@oss.oracle.com Cc: Mike Christie Subject: [PATCH 26/42] block: copy bio op to request op Date: Fri, 15 Apr 2016 14:16:01 -0500 Message-Id: <1460747777-8479-27-git-send-email-mchristi@redhat.com> In-Reply-To: <1460747777-8479-1-git-send-email-mchristi@redhat.com> References: <1460747777-8479-1-git-send-email-mchristi@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org From: Mike Christie The bio users should now always be setting up the bio->bi_op. This patch has us copy that to the struct request op field. Signed-off-by: Mike Christie Reviewed-by: Christoph Hellwig Reviewed-by: Hannes Reinecke --- block/blk-core.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block/blk-core.c b/block/blk-core.c index 3b238ef..94736c3 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -2991,6 +2991,7 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq, { /* tmp compat. Allow users to set bi_op or bi_rw */ rq->cmd_flags |= bio_data_dir(bio); + rq->op = bio->bi_op; if (bio_has_data(bio)) rq->nr_phys_segments = bio_phys_segments(q, bio); @@ -3075,6 +3076,7 @@ EXPORT_SYMBOL_GPL(blk_rq_unprep_clone); static void __blk_rq_prep_clone(struct request *dst, struct request *src) { dst->cpu = src->cpu; + dst->op = src->op; dst->cmd_flags |= (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE; dst->cmd_type = src->cmd_type; dst->__sector = blk_rq_pos(src);