From patchwork Thu Jun 15 16:42:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9789279 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 E779160384 for ; Thu, 15 Jun 2017 16:42:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DAB94286C4 for ; Thu, 15 Jun 2017 16:42:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC810286C7; Thu, 15 Jun 2017 16:42:31 +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 4D37528552 for ; Thu, 15 Jun 2017 16:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752123AbdFOQm3 (ORCPT ); Thu, 15 Jun 2017 12:42:29 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:34077 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750980AbdFOQm2 (ORCPT ); Thu, 15 Jun 2017 12:42:28 -0400 Received: by mail-io0-f172.google.com with SMTP id i7so15439871ioe.1 for ; Thu, 15 Jun 2017 09:42:27 -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=nWIG05tGbkuJQh190c7vKYEJYV3hJzGfe+mImz3se/M=; b=iG/sQGB1+ybvVsHD+2dv+WLq6EPeZW49Ma9kPd16lTI07ubltaOUjVrJulTYb5fgSo jf5HzWLm23HuGgXdlCmcQp6JWPgwIQmh7TKywsr6Hzu8eGu0fsAlT9zLWlgE4ebDyEFu hBmTO8Jcmawr6bcOirVRj6w/IJCYeK8vboB20AKM2dJv3jXx+8diTWSo4x6mPRcqYIpt +obxmukFu2RMTsxebFMNc36BA3DL0YvggMR05gFrXtb+bOMxi7kbzSs0pPZh1ez7Pj8j nKPGuH8ggNNfHKx5ICf7D8lcsWjhqTpJvwSACGyNkRK0zDqNt4hRxpqe3GHRq7hftkfi 1quw== 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=nWIG05tGbkuJQh190c7vKYEJYV3hJzGfe+mImz3se/M=; b=nt0uwVrEdfpdiCuU8tlqY+ntAJIyz3mII6tdMflBReJAzFNO1xwLr8tCUVxx6BxGVr xJQMJrFsOS6U0ROFTaSY4NdMYBQn5FgYyNFfOEaDflosXv/wnNyD+fjRA3nyg0wTS2L9 E80DBhu86NOMlmnGCQW/1rc4TkzA4l/6wYGw2BV51Indhi0pmigyUD97g8G9KXq4GlYv Il5wb4nuIhXO7vkopD84wu9AtQiLiMlDuqZ0Gk4lMCb9MWe6e/CqLl6VYqV5fm2p4DK9 7lXkbrl2kaBMEcu8KWxxI9/o4DTcgCyQfY+tnLm8OtjN+8HuLBtDWkCS1ickDM4kql6J qTfQ== X-Gm-Message-State: AKS2vOzMuplbAXqWfiuMYVvIwEs67LKlpDLCBCIZOK31G0NFWogZpZ/j xoZPfeP/8mwrmPkb X-Received: by 10.107.16.41 with SMTP id y41mr6299503ioi.98.1497544947282; Thu, 15 Jun 2017 09:42:27 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 97sm313476iot.25.2017.06.15.09.42.26 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Jun 2017 09:42:26 -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 10/12] xfs: add support for passing in write hints for buffered writes Date: Thu, 15 Jun 2017 10:42:08 -0600 Message-Id: <1497544930-19174-11-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497544930-19174-1-git-send-email-axboe@kernel.dk> References: <1497544930-19174-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 09af0f7cd55e..fe11fe47d235 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 |= bio_op_write_hint(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 |= bio_op_write_hint(inode_write_hint(ioend->io_inode)); submit_bio(ioend->io_bio); ioend->io_bio = new; }