From patchwork Wed Jun 14 04:01:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9785299 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A1F4460325 for ; Wed, 14 Jun 2017 04:02:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA6B82844E for ; Wed, 14 Jun 2017 04:02:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F8862858D; Wed, 14 Jun 2017 04:02:25 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3D7AA2844E for ; Wed, 14 Jun 2017 04:02:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750757AbdFNECX (ORCPT ); Wed, 14 Jun 2017 00:02:23 -0400 Received: from mail-pg0-f41.google.com ([74.125.83.41]:33011 "EHLO mail-pg0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751821AbdFNECV (ORCPT ); Wed, 14 Jun 2017 00:02:21 -0400 Received: by mail-pg0-f41.google.com with SMTP id f185so69556165pgc.0 for ; Tue, 13 Jun 2017 21:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=eHQ+ukvoLEZiwcPGlCpozMxdzSVvyYOteyfip//fUNU=; b=chVUuUdvmpjLuk32ZdmbMz0JNodUIFJEv67ZCfld0AMwxgbBwhx7iBpwsZafZmxzGM CHpsMiPkdEx8tyoC/bHZ5w8ovUE2uQzJ3u7gCtcTQMGp0SgPif2noI+fadZCG0OO/idN Ok4x9EJK2iOHMeILHMDj31knnEBX2OW8KrtfLYrEXhYGB4tTYihXS2CUZZ5htd4RBkoq nhQSEyLSI/mnUvgK2r9c/gmnc1R7xxe2VQkoLTYpwUmN0bxXId1NJk6mBmyJLdYLXfSI MqMsOyoYXgC0NKimw7Hl2khxM4Cqg/n9EdH+khCcrtAEnqIW9RFAgxC6aqLg2DD4jPP7 CV/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=eHQ+ukvoLEZiwcPGlCpozMxdzSVvyYOteyfip//fUNU=; b=NEvV88LDqyOHggSZB9Mh8ehW4TLetshZ7c2RLeW1CFPMo9JF7Xz6qoQ9dHo3yxecXa Z0K80UGOu7Lh8TcXpfvx7G+RMSRwZCt5iSrvQKeSuOl6bPELRtS7jTE/PhyhB6Jp/ztv mYu9JdgCHRkanmIJoa/IMtFLr7pUNboDuwb7GgD/gMKk0eKqrm8y09RIXtvapuY/Y5Kl wfObPGufky6VZlACdnPDmrh6ernUcwEc+6WeyelSvYVpyoB13UGlmnfFym+c0BeJdYvV Go4O24nBjfaGTy/KGNi3IlFXij4b0NqllQNKTtj8vBr5ltlZyK3f7VnyWwrhwYhmcK51 XGdg== X-Gm-Message-State: AKS2vOyZ6mQJbG22wcrnjOhNKZMnUFrPq3sOQ6hFbrqxOchet0XtbErP 9OOSZGyclmI/F4FE X-Received: by 10.98.1.72 with SMTP id 69mr2230111pfb.124.1497412935982; Tue, 13 Jun 2017 21:02:15 -0700 (PDT) Received: from localhost.localdomain (66.29.164.166.static.utbb.net. [66.29.164.166]) by smtp.gmail.com with ESMTPSA id f8sm30914083pfc.14.2017.06.13.21.02.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jun 2017 21:02:15 -0700 (PDT) From: Jens Axboe To: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org Cc: adilger@dilger.ca, Jens Axboe Subject: [PATCH 09/10] btrfs: add support for passing in stream information for buffered writes Date: Tue, 13 Jun 2017 22:01:58 -0600 Message-Id: <1497412919-19400-10-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497412919-19400-1-git-send-email-axboe@kernel.dk> References: <1497412919-19400-1-git-send-email-axboe@kernel.dk> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Reviewed-by: Andreas Dilger Signed-off-by: Jens Axboe --- fs/btrfs/extent_io.c | 1 + fs/btrfs/inode.c | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index d3619e010005..b245085e8f10 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2827,6 +2827,7 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree, bio->bi_end_io = end_io_func; bio->bi_private = tree; bio_set_op_attrs(bio, op, op_flags); + bio_set_streamid(bio, inode_streamid(page->mapping->host)); if (wbc) { wbc_init_bio(wbc, bio); wbc_account_io(wbc, page, page_size); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index ef3c98c527c1..db0558a19f65 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -8608,6 +8608,7 @@ static void btrfs_submit_direct(struct bio *dio_bio, struct inode *inode, atomic_set(&dip->pending_bios, 0); btrfs_bio = btrfs_io_bio(io_bio); btrfs_bio->logical = file_offset; + bio_set_streamid(io_bio, bio_stream(dio_bio)); if (write) { io_bio->bi_end_io = btrfs_endio_direct_write;