From patchwork Sat Jun 17 19:59:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9794387 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 34445600F6 for ; Sat, 17 Jun 2017 20:00:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 290C427E71 for ; Sat, 17 Jun 2017 20:00:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E27927FAC; Sat, 17 Jun 2017 20:00:26 +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 BA46727E71 for ; Sat, 17 Jun 2017 20:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752856AbdFQUAW (ORCPT ); Sat, 17 Jun 2017 16:00:22 -0400 Received: from mail-io0-f173.google.com ([209.85.223.173]:35756 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752805AbdFQUAU (ORCPT ); Sat, 17 Jun 2017 16:00:20 -0400 Received: by mail-io0-f173.google.com with SMTP id k93so46092211ioi.2 for ; Sat, 17 Jun 2017 13:00:20 -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=7QQVfoM3QgBg/hWQWGcXWpX4EmO2Z3DaIrmzhwbv8is=; b=i/fBysGQ0OkSVsjOkcYV2hUJtjS31QHZs5cZ6erYePviQVp0UWxIZeTwvr5ofi5bOo AUGJvF05fTGO07h8CWhtU8F9IRbpua9qbB0WTy3zt+D2dF0mYNIBilkT1Ez3KVUSYvcg oJThaM2oVot5zvuFPCHDbdhiG3k6cobJRiKATTkVO/TsFU2PofrTOdguRqS8OTOntbAb C/iZhjd9HYHrzdxfgPZnixuIMTf8EX8e0+V8Ipr0QkCgvl/Q9YcnZib6opE/CQwwmwi+ rA4pvPu0ewPlOepOnkoGgqp51BqsguxXPx41l5rijAAlZb6prwwB6/MhOdMpAvO//ZaQ aktg== 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=7QQVfoM3QgBg/hWQWGcXWpX4EmO2Z3DaIrmzhwbv8is=; b=RjxeMbBwxCzqQW0+QXKlcZjoQE7sUxVbuVmkVEXE0SF8oPNpRnVtsKrQqYxPJQulq6 Ph2wk0+D7Eg+tu0fO06zsFU/hPmBTUHcWSr4nRyH9BZnnyvEFackbLedoy1j2UPi4ZPD qHMsm7UXaB+Qa+g4tHwycDvzrnFYSeOcQxqA8eurH59u04bKWLh22ivofMIH8MnXpVnC 021rFpU5ucHxSyTFdBZd4LtX8lR7bezobd3zEILYG0jo80yZkafrSU4mL4S2xfycFNoq hcGsSLh7a9Eco2YBRR1g0wBvyrpRikHiBkM95dy8UEtMiywEmjvgXobPLHQzZT49B7Sw u0hw== X-Gm-Message-State: AKS2vOylpw5cQYCCh/nipEMcmCLDmcayDXgBJ0Lg52ATPO7ZdsE6Snie 77tjkXXPKBn8vyF6nFRv3g== X-Received: by 10.107.170.144 with SMTP id g16mr15358294ioj.19.1497729614661; Sat, 17 Jun 2017 13:00:14 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id w199sm537049iod.15.2017.06.17.13.00.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Jun 2017 13:00:14 -0700 (PDT) From: Jens Axboe To: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org Cc: adilger@dilger.ca, hch@infradead.org, martin.petersen@oracle.com, Jens Axboe Subject: [PATCH 10/11] btrfs: add support for passing in write hints for buffered writes Date: Sat, 17 Jun 2017 13:59:53 -0600 Message-Id: <1497729594-4707-11-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497729594-4707-1-git-send-email-axboe@kernel.dk> References: <1497729594-4707-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: Chris Mason Signed-off-by: Jens Axboe --- fs/btrfs/extent_io.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index d3619e010005..92e75e4014ea 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2826,6 +2826,7 @@ static int submit_extent_page(int op, int op_flags, struct extent_io_tree *tree, bio_add_page(bio, page, page_size, offset); bio->bi_end_io = end_io_func; bio->bi_private = tree; + op_flags |= write_hint_to_opf(inode_write_hint(page->mapping->host)); bio_set_op_attrs(bio, op, op_flags); if (wbc) { wbc_init_bio(wbc, bio);