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: 9785301 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 7438C60325 for ; Wed, 14 Jun 2017 04:02:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7DC342844E for ; Wed, 14 Jun 2017 04:02:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 72D5B2858D; Wed, 14 Jun 2017 04:02:27 +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=unavailable 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 1308A2844E for ; Wed, 14 Jun 2017 04:02:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751065AbdFNECT (ORCPT ); Wed, 14 Jun 2017 00:02:19 -0400 Received: from mail-pg0-f47.google.com ([74.125.83.47]:34294 "EHLO mail-pg0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750728AbdFNECQ (ORCPT ); Wed, 14 Jun 2017 00:02:16 -0400 Received: by mail-pg0-f47.google.com with SMTP id v18so69543314pgb.1 for ; Tue, 13 Jun 2017 21:02:16 -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=lDAldMWpimD7ROxrGWhb5EguOt9AzqR7U0DRrx/qAYBhNZP5xAO6Ku77gjUjg8ONKp 5G9RgHYlwPCZdIoOpaXaFLEMgmlEJuRyAPZ9E2H2r5qI/L2rC4SZW8DnAbeFKBszPGJ4 H+bcfCxW2/XUmazAiIyMnkn/BX77ExMaPR4eqrrHHNuKpHQTmK3CA2FU9S2VIz9D+sxx ieL02FTUrIOanYSFjJpDToHs7GOxnnmyLY1cKlZq60moHURKKykhnE2yt4kYpGmkGADf 9nbDz8VPpda3TDYbzbuIBh/ggH46xPpKYhYYutQKi3U5ZPasX4nB6vvzC2p2pSPe/a7l vOeQ== X-Gm-Message-State: AKS2vOzFWa9DjST7kp80F8nXvHhCrtlDi+wAyTPaZwXzivAKNTHeuibz MkozeYlFCpxq/V24Gg457w== 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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;