From patchwork Mon Jun 19 17:05:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9796923 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 3C2256020B for ; Mon, 19 Jun 2017 17:05:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 217C01FF0B for ; Mon, 19 Jun 2017 17:05:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 15FCA27EE2; Mon, 19 Jun 2017 17:05: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 982D01FF0B for ; Mon, 19 Jun 2017 17:05:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752651AbdFSRFR (ORCPT ); Mon, 19 Jun 2017 13:05:17 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:38557 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751081AbdFSRFQ (ORCPT ); Mon, 19 Jun 2017 13:05:16 -0400 Received: by mail-it0-f42.google.com with SMTP id b205so47105430itg.1 for ; Mon, 19 Jun 2017 10:05:15 -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=YfhhAntgPOMj5sKGQMMjMcm98K3TLgGVtbtqzqMG7fU=; b=naVevHbEoRbDJ/NfTIMuW/IIWAsDG+/ujNQApMplRdXPkCPJPwSqSHxRlP1eq/i5mz 5tJTzWYaxnoZfbXyVUHpcvGGt3cEW2FCN6F1bD7EAkY4r1ukwMpsMnO21QX8RfQiVcgP P/S0qfQ5hU2qVCI5gJosrudUAWwHaoDCqK7k4mbTCMrgS907XM+KCIPkst/jUO7p4Pds sE7rqcv34C8bz5Pp9R4A1UAtPlK02QQaQ0q+4qpbFBBdzHSSWDbrI2vO4zb7o+30S27+ xg8JNbiN1DhPEk6sgZKy67Pn8gVvGAQAXIrdiGZlOYf6Ws6k2BtoVZe0oKDxi02rh4h9 S1hQ== 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=YfhhAntgPOMj5sKGQMMjMcm98K3TLgGVtbtqzqMG7fU=; b=cmDox1vcRRaBjtmlxhLOgFJW5ePBVyKQKbyvHeh1lb3KnrdNgRzddQ6Ww6dBUryXkA QghcAPpkJ5wSYlMd08ECrS1lp1y0jDNVAG9icPO8vOYGspo3kz9caVYwOK7+2GUKuygy DiGFJhfpG377UT7+4gaB69O+LiyzzHyoHnVZEP4Y25c08ExJXD4X3B+XLpoU4iEMLvIe PBznf7PueTcfmull6mba7OXUNZOaPMfMIJBNRG3w9wdHTehUq/iOuSmanf6+xGONUf5z 7bDzp15K/RJzN+LOH2BH28+1Tv1dsnfvuHgnvoFrKpnbyzY7ublEHRFGyvafL6ziO+5f BRFA== X-Gm-Message-State: AKS2vOzKlgKVe5Mk8fEo6vMI3qt0l8bPxIf01DQg4zAGTGjAnrc8w8/5 K4lWUDL7OLJXNypb X-Received: by 10.36.55.149 with SMTP id r143mr22819130itr.53.1497891915340; Mon, 19 Jun 2017 10:05:15 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 3sm6770522ith.7.2017.06.19.10.05.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 10:05: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, linux-nvme@lists.infradead.org, Jens Axboe Subject: [PATCH 8/9] btrfs: add support for passing in write hints for buffered writes Date: Mon, 19 Jun 2017 11:05:01 -0600 Message-Id: <1497891902-25737-9-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497891902-25737-1-git-send-email-axboe@kernel.dk> References: <1497891902-25737-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: 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 19eedf2e630b..3e57cfaa6dd6 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -2830,6 +2830,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);