From patchwork Mon Jun 19 17:05:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9796959 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 D9BE36020B for ; Mon, 19 Jun 2017 17:05:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF6C41FF20 for ; Mon, 19 Jun 2017 17:05:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B475026E97; Mon, 19 Jun 2017 17:05:41 +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 581C31FF20 for ; Mon, 19 Jun 2017 17:05:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750757AbdFSRFj (ORCPT ); Mon, 19 Jun 2017 13:05:39 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:36620 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751082AbdFSRFO (ORCPT ); Mon, 19 Jun 2017 13:05:14 -0400 Received: by mail-io0-f180.google.com with SMTP id y77so68387471ioe.3 for ; Mon, 19 Jun 2017 10:05: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=N1eArlIjCGJSmCGvEXTL8Or3unusvYeD0HoMy0SV6Tw=; b=Y8SNP62HpBhTw5ajJMYlmC85mzH5TbcPnIuigEBYsL/ofvoMUB7MTxLr5r4yVpHPtV GlnxUyK6BKsV0SiqwpuQyWVvwgfT3ZG2A+NkEmx0Q7F1iLQuqre9UXMuLmkOFVl9bl5G ErgKGyQo+T4/8QlOczhmqDeghLe+D5OvoKUEetle7Oq5mc35Lyn3YbMHABcBOVSBDwIC ytd2UthAaSFBTTIjYacTnuJDV3C4mfYRjIyK8n1zAVDDzjGvNl7XXc7Jvt04VTriv67r I4o9YRHjDHBd/t9iyO5UlSSvWP5EOoCXa+3tGMY626rDPZ2xAXeJV5PyewnU7q0cf5p0 2ErA== 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=N1eArlIjCGJSmCGvEXTL8Or3unusvYeD0HoMy0SV6Tw=; b=edMMQLjIBMwmU3sYDMGc+MoOyfWLkXPRfhJWSUkCkOzmm/bNL6kucW4u62+eQOfMuz QD6wXXSpjaf9Zep9H4cJIjVXuYvdL/Rt5VxxAN7bMd60dxaDRTopaaTTbVveCY6glbGk 43pVXAU/cQhbQ9xiioKnkpzUFXreMdT4xRv+C4xTNpnbj+gwqXZZexOFgpRdd0rp3vKv IfVGGsayKJ9tKMF/WBXOfEQH4R49nigsZb45qe94jnQOWNiKrD9Xol0XME+wdHikWsVa 9NDa1PMjwoGwCCsI35Ksx9gkv/ZLkY+b2qlSHCkKb7bUTqGHoXGaTR58kg6wT5bk0bNP GAjw== X-Gm-Message-State: AKS2vOy5xqk3vvL/Gglha1VCq25WXEfUK6+IN/SJMw1VrZ1dUKg3YK9n GjAEg4z7NNtcVobDsA+EaQ== X-Received: by 10.107.11.160 with SMTP id 32mr24113134iol.222.1497891914148; Mon, 19 Jun 2017 10:05:14 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 3sm6770522ith.7.2017.06.19.10.05.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Jun 2017 10:05: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, linux-nvme@lists.infradead.org, Jens Axboe Subject: [PATCH 7/9] xfs: add support for passing in write hints for buffered writes Date: Mon, 19 Jun 2017 11:05:00 -0600 Message-Id: <1497891902-25737-8-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: 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 76b6f988e2fa..e4d9d470402c 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -506,6 +506,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; } @@ -565,6 +566,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; }