From patchwork Tue Jun 13 17:15:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9784411 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 CBEBC60212 for ; Tue, 13 Jun 2017 17:15:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B1C872857E for ; Tue, 13 Jun 2017 17:15:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A6B80286C4; Tue, 13 Jun 2017 17:15:51 +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 274AA2857E for ; Tue, 13 Jun 2017 17:15:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753604AbdFMRPp (ORCPT ); Tue, 13 Jun 2017 13:15:45 -0400 Received: from mail-io0-f170.google.com ([209.85.223.170]:33433 "EHLO mail-io0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753524AbdFMRPk (ORCPT ); Tue, 13 Jun 2017 13:15:40 -0400 Received: by mail-io0-f170.google.com with SMTP id t87so57865370ioe.0 for ; Tue, 13 Jun 2017 10:15:39 -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=EX7SSIswZjmSM2DkoYJtN444ZV4PLHLFF4k8GzJcgsk=; b=16/K7UuD9gRprqYPLcCYtqY3+0UTMHA2R/39Z2jDeRqKSvgIlYSaGikPLzLNKnb0Rs 48/sCByF1/m9pa+dXrchp4mxo1Cb/HGy+nhcqH8mO9g8q3ZvUu7WheYLOlg1t8pKHxS0 fnbZqCoKg47MiiC/L7SspK3QFSvJ6RJH/QEFXUQrBFOkErep0HdxmY+w2LR2XLWjV4hu gToVNvvV4FrX+JaBZdEP9fnpdB40ahgjNGktpvzb5ncHIZw6nN4E0b/vigzaKdkQ/Jpv oFqr00+kfCu7AnazcmoByPG1j7BB6Mv0A9z6HaXwLQ/DUXeXin+9ZDVAFF1WCL7J62P5 n7qQ== 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=EX7SSIswZjmSM2DkoYJtN444ZV4PLHLFF4k8GzJcgsk=; b=qLXDKEzwDXu1/4RKx/rMI8SwSFLmb9udjxXVroZ8xzQibE9WuIExXuKk5Io0dX1tbC 1v4f4PvWaCrOKe78nMNCsSK2/0oUfggOOopeka+ezcJsWioIjUpt/0DN7Ae3kuLWcHWR 7XRQhnCRIvwfI/0NgunKVC0/4yhDFMSrfbcgiSgGKdTLbwD6xn4H4cRpeyUa0HT2Kcnb e1OWJgt4MWmQVkls0DVhYNZ891kRHvaPo3pkCFtZiv5MrMzAX7cLOEqgMUkXno/NXGVN EEhnQ8mNB40/uI9AJuUILSVqhIVQIsLFcyfp5NtvSh/PcKBduZNbwRRW5yPPJzq/dgJl x5LQ== X-Gm-Message-State: AKS2vOzJy3cg74qlprgDE+qc6KHVfrvdWhbQwTjPb89gG9hb1tXhGTMu PIkpxhiZwb3kq31PFVJshA== X-Received: by 10.107.131.193 with SMTP id n62mr1216357ioi.77.1497374139431; Tue, 13 Jun 2017 10:15:39 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id y188sm6217526ity.9.2017.06.13.10.15.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jun 2017 10:15:38 -0700 (PDT) From: Jens Axboe To: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org Cc: Jens Axboe Subject: [PATCH 10/11] btrfs: add support for passing in stream information for buffered writes Date: Tue, 13 Jun 2017 11:15:22 -0600 Message-Id: <1497374123-15286-11-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497374123-15286-1-git-send-email-axboe@kernel.dk> References: <1497374123-15286-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 Signed-off-by: Jens Axboe Reviewed-by: Andreas Dilger --- 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;