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: 9784413 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 E1ABD6038E 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 C7B942857E for ; Tue, 13 Jun 2017 17:15:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BC8ED286F8; 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=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 7F7092858F for ; Tue, 13 Jun 2017 17:15:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753605AbdFMRPp (ORCPT ); Tue, 13 Jun 2017 13:15:45 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:33435 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753599AbdFMRPk (ORCPT ); Tue, 13 Jun 2017 13:15:40 -0400 Received: by mail-io0-f172.google.com with SMTP id t87so57865442ioe.0 for ; Tue, 13 Jun 2017 10:15:40 -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=EjnbU7fT2StyFysvpxCud19S7bvsRf6sV7X/+p+5hQlh2H/6DdJod9k1aH928S8jpc WexdqEI+IINeZnh+E8ZvPFPu+SX+CtVW/NuWBkBhoUt+jJHIk4nHw8o8LDCpUNp9C0U1 YauAMNzwAlNSruNKhbS6I7IQRq2xOSgG5X+85Av9OjN6SPZH7wNkStU5K78/8z+bjHzy Ci9Au+MwcfGMU0lfMnw1DKuDTHdZ2fEHnIR+R76fZWw6a6Kg8WZJUx73KebTsN/VftHV ECpMK+HpwdTKWfKqo7wjNDS3xgC9zC1lpJ6ABgKBJZIdECPjvd9qArlZDyOabMbNXVwj wRUg== X-Gm-Message-State: AKS2vOygg45BmCw30L5sY3bwSH7c9DLj5BomFAroJdRhc/Wf8Tj6wMGY gqSPgyu+kaCJIKlVtIe4FA== 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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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;