From patchwork Wed Jun 21 00:22:04 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9800479 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 390B26038C for ; Wed, 21 Jun 2017 00:22:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 286BA28426 for ; Wed, 21 Jun 2017 00:22:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C3FA28471; Wed, 21 Jun 2017 00:22:34 +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 B215128426 for ; Wed, 21 Jun 2017 00:22:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752906AbdFUAWc (ORCPT ); Tue, 20 Jun 2017 20:22:32 -0400 Received: from mail-pf0-f177.google.com ([209.85.192.177]:33866 "EHLO mail-pf0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752812AbdFUAWU (ORCPT ); Tue, 20 Jun 2017 20:22:20 -0400 Received: by mail-pf0-f177.google.com with SMTP id s66so76782806pfs.1 for ; Tue, 20 Jun 2017 17:22: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=N1eArlIjCGJSmCGvEXTL8Or3unusvYeD0HoMy0SV6Tw=; b=xz5u9Mf62IPvj7CIVqSdMmQRwGhQsKoLmcNgNLeJN1Cs3W9nmuiuRiARsjzthDtBtE /Z8lefNMyw8nI+65MW71Qvz1dr2fnT5oNwUQ/LH8N3g3wqXKcXN1QhJoX+NuMjWxYdAa uKx7v//OGghzn/XtOhoHvo+bjDHEMsVA9mjWzN4UJKdsXQKIEqMcXBlmqq3+MeSYp6fB l6LNOC0+VZWLD0irXTElL8r/WwYmpFULzDcgvr38IDtoAEA0Au0EYBcCfpoRWfQSmxPh /Oq9dLcmXV1jHUV7tWYjroVSLlpCh7JZRMesGChmsbZNhTpVw5eSbOhMSS0teHE/l2Aj e1iw== 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=MHYJbbhohcNtvxpEobTxuh9p8UELHFwxJO6shY9Y6oUHCDWM+2h1e9N1RJbrb/sOcG uUdgF9FmD7vQOvf3RNCho06UlNVSaMAalxEIgsX6RL6EmC8fgRQ2m98htGehSzAdo/ZN 791UStXIr1cVcwd7XrJX+kP4rTUQ9cfUXd+c2WktMGNd7nCMbn7f+qoxMNHAlI1Wz7C+ aw/A9yG5HeQaWuDfwPbeiqdq9QbC+K1OGP6HAyqKoAvtVAsFqUL5BSbL8B/Np1tqeuwm N4OQ4xD+kforjAXUji/8CzdnVYGkgQK3LOqIxxQ5lIN9SruLGqP/mPTNwBeMmB+R2llK EK+w== X-Gm-Message-State: AKS2vOzoAC3cISuKH3kTJxDTpbu0zrXhb/CxLvFRwz16MY8mma+z4bnY NIHQ+qa0yay+m/FOpnWmwg== X-Received: by 10.84.218.2 with SMTP id q2mr29073377pli.208.1498004539324; Tue, 20 Jun 2017 17:22:19 -0700 (PDT) Received: from localhost.localdomain (66.29.164.166.static.utbb.net. [66.29.164.166]) by smtp.gmail.com with ESMTPSA id f10sm13447835pfd.69.2017.06.20.17.22.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 17:22:18 -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: Tue, 20 Jun 2017 18:22:04 -0600 Message-Id: <1498004526-4543-8-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498004526-4543-1-git-send-email-axboe@kernel.dk> References: <1498004526-4543-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 Reviewed-by: Darrick J. Wong --- 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; }