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: 9800481 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 322CD6038C for ; Wed, 21 Jun 2017 00:22:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2294F28426 for ; Wed, 21 Jun 2017 00:22:35 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1788128471; Wed, 21 Jun 2017 00:22:35 +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 D00DD28426 for ; Wed, 21 Jun 2017 00:22:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752899AbdFUAWc (ORCPT ); Tue, 20 Jun 2017 20:22:32 -0400 Received: from mail-pf0-f174.google.com ([209.85.192.174]:34835 "EHLO mail-pf0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752774AbdFUAWU (ORCPT ); Tue, 20 Jun 2017 20:22:20 -0400 Received: by mail-pf0-f174.google.com with SMTP id c73so16661957pfk.2 for ; Tue, 20 Jun 2017 17:22:19 -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=HTPi+AIl29mdCDkJ39WrYAxl0EYQI89Qn5qFPvPWYYYrrLoJfNK9cPJEDJbBvrXxer ivODp/qM3TqppWrSXdrE2f32VUtEu9dpVXweH5GPRAILmzOqKqa3j5n4wA0gLwAI+sO7 H0/DjPPEaRHZ1bKbBtArSQlt8A5kq1LsiGcG94ZvsJI+3vhRPXzhUaf9Gvfj5O9sbxLz BAkN3R1dBOZnM8JDmV4wygTJ7HWZpA6IkTVF/A8LGKRMAGkfRJNRRX3mVO+AbSVMX/ZU DsJN7LOlcN8Dg+Vng8+E9WiAH86ew0ITdcUyg22jS1depq7TXrICHgv3fbCR/5NAxOUj nuFg== X-Gm-Message-State: AKS2vOwoY5j0QNZGk1XdpPDkROD4THtKWApwf8wH5usTnDx2YdaxnjVN hdvw0UB4Y54c8n/nhzCCUQ== 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-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 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; }