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: 9789297 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 C6B796038E for ; Thu, 15 Jun 2017 16:42:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B9E3F2852E for ; Thu, 15 Jun 2017 16:42:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A8FEE286C5; Thu, 15 Jun 2017 16:42:42 +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 6909228552 for ; Thu, 15 Jun 2017 16:42:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752068AbdFOQmi (ORCPT ); Thu, 15 Jun 2017 12:42:38 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:35082 "EHLO mail-io0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752155AbdFOQmd (ORCPT ); Thu, 15 Jun 2017 12:42:33 -0400 Received: by mail-io0-f178.google.com with SMTP id k93so15399691ioi.2 for ; Thu, 15 Jun 2017 09:42:32 -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=tdkuUsyBa2GbqA/xBJf5+7lHkS7/dCui7GB0vDNfBHoSJCLCBx2GIfwfbNJZklYiwW cVjHqtT4rQjHv5Hn3zurORjV0fKf+Nd3oAiI2PijnYmGAUlxduLThJE8tf2tlhD9RPbp 8z7kBBg3miM3EU2gkOd6TfBzHvNqESIIDUOjcow+IPi/gQ8M14F1Zq7iF+hXvYQE64p9 78ZPnJy0rdPIJqGm9MTmAtPpsrN+m23muPj0j9HXRTC4Wgyp74XQjTYrZxPiXoVaVjm3 8aPBTer27nVr207lgvwva5qSe4H4TUgHi/wscCWCJu7f0WncfkTcxZjyDIf+8fUzxZ03 XiTg== X-Gm-Message-State: AKS2vOwwR+S+TSZ/2kjCg8BbvLtnwTbIJHid3CgDspNSqLP3KTxu08w1 RaGQizS9baPBCFhPrLl2Jg== 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-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 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; }