From patchwork Sat Jun 17 19:59:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9794383 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 03212600F6 for ; Sat, 17 Jun 2017 20:00:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC98627E71 for ; Sat, 17 Jun 2017 20:00:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E199F27FAC; Sat, 17 Jun 2017 20:00:22 +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 9D7E227E71 for ; Sat, 17 Jun 2017 20:00:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752825AbdFQUAS (ORCPT ); Sat, 17 Jun 2017 16:00:18 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:32785 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752807AbdFQUAO (ORCPT ); Sat, 17 Jun 2017 16:00:14 -0400 Received: by mail-io0-f180.google.com with SMTP id t87so46171031ioe.0 for ; Sat, 17 Jun 2017 13:00:14 -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=KrAmBj6klkYjo1n5lJUjJNjk4+pxXlXldEKObb7b3Rk=; b=srATU1NwJcV96S57kewUcz0IvL2mh7mP/EPjkS51x2XNXlS64zT7iYg/b2z+nAc34j fu6G1NZ9aOUmx9vQ7uHbt3H9XsuyzH0JSQzkOIdm1WfBplNUQiEcxfu6vWqmd7Nmk2L2 g+hfvayyYnuNIHEldqCx9dT2Su6Bkzw43QUNo84AlP/1FWlYkqvVXD8cwP2Fipz6ipj+ e+m6voCMxxG64dDrQ4gfA8ov/q3+wlMppT+F29XOAA1rTErjwubD95hvr+1SjEMJSuUo 8KpHIxMztcpFaELK+SqbXVMrjCDZVcjb5c5ijHM73HxPpfprz7kwSwtZ+BPFT0f9i9bq NCfQ== 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=KrAmBj6klkYjo1n5lJUjJNjk4+pxXlXldEKObb7b3Rk=; b=NQZXtdzVIT6EZoHIOwvufVKHxy4QICAKg5Uy12ZvAq2OZHmoPWsjhyoK8I5RUIyynw zxSGT3ZozWzwCH6sovP7wcT6iwAB5j2FGkansc6Iwh/Mt2RMzn/tvc9/Y+qwhaNtAE7/ IZ/qzR1tmnH1RRpd67IP76/IWvm3Oro0EIA9VihjKt8hEcGpGwWj+CMAFNgX3F7ZLj4K 8nVlaBxf+dMcsyOOAOMIAG9YdqtXBDkCk500tio3RBNrmidsODpYnEj5jP5BSsfcgomR 0ISRgKvd4c3Xdv5hY6zZyNPwnldagxZ7P7e/x0zUvx5GzCjh2oFKKY9oAYhYjIveV4Qd d5jw== X-Gm-Message-State: AKS2vOwk4o8H6Us81hz/5ct7Cehxr+D2IL3HA1vs7gTuANwFzdtw3pfm 4YATulyjd9uSNuJl9Jb+xg== X-Received: by 10.107.158.131 with SMTP id h125mr1924942ioe.82.1497729613678; Sat, 17 Jun 2017 13:00:13 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id w199sm537049iod.15.2017.06.17.13.00.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Jun 2017 13:00:13 -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 09/11] xfs: add support for passing in write hints for buffered writes Date: Sat, 17 Jun 2017 13:59:52 -0600 Message-Id: <1497729594-4707-10-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: Jens Axboe --- fs/xfs/xfs_aops.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index 09af0f7cd55e..040789c51930 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -505,6 +505,7 @@ xfs_submit_ioend( return status; } + ioend->io_bio->bi_opf |= write_hint_to_opf(inode_write_hint(ioend->io_inode)); submit_bio(ioend->io_bio); return 0; } @@ -564,6 +565,7 @@ xfs_chain_bio( bio_chain(ioend->io_bio, new); bio_get(ioend->io_bio); /* for xfs_destroy_ioend */ ioend->io_bio->bi_opf = REQ_OP_WRITE | wbc_to_write_flags(wbc); + ioend->io_bio->bi_opf |= write_hint_to_opf(inode_write_hint(ioend->io_inode)); submit_bio(ioend->io_bio); ioend->io_bio = new; }