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: 9796919 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 99A326020B for ; Mon, 19 Jun 2017 17:05:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7F3521FF0B for ; Mon, 19 Jun 2017 17:05:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7413F27F8F; Mon, 19 Jun 2017 17:05:21 +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 234A21FF0B for ; Mon, 19 Jun 2017 17:05:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751385AbdFSRFT (ORCPT ); Mon, 19 Jun 2017 13:05:19 -0400 Received: from mail-io0-f180.google.com ([209.85.223.180]:36622 "EHLO mail-io0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752026AbdFSRFP (ORCPT ); Mon, 19 Jun 2017 13:05:15 -0400 Received: by mail-io0-f180.google.com with SMTP id y77so68387532ioe.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=AFUe2EUeuDFagOm7AMfoA7DBVx/ZRbZSilWU7LvAG1u7VP1hl8nK13Xp4xPZ0FMBLp mQrmBAfCvtFdEhRgAnOMztrBK17pRpraUh3hkJD50fNPNPog/b+P82B9DmRi8hXC/s/n BMO+eVkJk5wfpG4NYL5ee6PL3QBqLcmhLMNNM09wr0SunI2wzQRrZpnnX/5loYOnWl0E mHAmbnuyrA4uFzVGOvtSDjNcgvZd7+E/0q7Sp+soPOUirYIu7fjtg/QYdKNGh+5JoExV NM+FgZZAXvrRuxqlsKan3Cpt33FbzrZb/ysgN8SNPXMRg6xDFjzj6s5zSH2r3/fbAdMy ZYIw== X-Gm-Message-State: AKS2vOzbDiJwb8fP2YZLX33ZPsshK6IeVlXEJP6+4t1/QMtYEGdhVx9H YrciJhLtHO61ZvTDJtYaOA== 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-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 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; }