From patchwork Wed Jun 21 00:22:03 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9800461 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 A0C456038C for ; Wed, 21 Jun 2017 00:22:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8F12628471 for ; Wed, 21 Jun 2017 00:22:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 83BCA284B2; Wed, 21 Jun 2017 00:22:28 +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 2CC6D28426 for ; Wed, 21 Jun 2017 00:22:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752884AbdFUAWY (ORCPT ); Tue, 20 Jun 2017 20:22:24 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:34830 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752852AbdFUAWS (ORCPT ); Tue, 20 Jun 2017 20:22:18 -0400 Received: by mail-pf0-f180.google.com with SMTP id c73so16661749pfk.2 for ; Tue, 20 Jun 2017 17:22:18 -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=tvQWm8733FSwyFVbjwkLKOJTWYaM7ZynL64PWMwvt9w=; b=P4hMldwbgGqh+37QP4QTIvqx48vwtu4oA1l2bLiZYDhsbq1GCp2RNI/hkbg76Ke+lO XUCHQJVYdRRrZfo7lTHYjj3/oLkZeCwpxhGLWIVEydCBuscUx0A4r5IKl0Q83CTy/Hvg 7Lb+UXwW3vziOSYOoys/OpAza2kqxFBpGiIu8x/NUmzj2T4MPmlLJergkIwFh4tOm1J9 MUZ3jObk2eYZDAs+5Dm2leqc9dC4WBCafqewMQueuWiG6uZ3TAjvJ7ZpeeHAm9qwwVdN of5T4oAqPagARZoHO9k1QybiNEHMMX3S7oZlI54nBAOtR2ONirOn/8tNCfbozPI4o9Sf wbAg== 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=tvQWm8733FSwyFVbjwkLKOJTWYaM7ZynL64PWMwvt9w=; b=VpJPPjohFh8wUxsOMEYQ7XhVXEFXERetvChxepqwyzOrhMOR1NDROaUCKAlqrqbwZK ZEoSLuEV1Hh7t/j1AOKkT/xgvjjLuLV5xflx4aDUpB/UwBYa5D+I/a3yDn9ruBmhUjV+ 8wjtA/snFI9lH3NjbnMvb6sGHB3ObHKzV4k7YLY2lZ+ivwNnBVFBix/oooOvaX83wnLy ygOIqSFhrQ3Ycq1XGW7ExMPQpObTMKUKIbDGjo8S9EY74XFwsobd0CaPOoOGPx6vN5Bn 5bl7Hs77pGkC71tuGGjQTkFutiYtdEiPzNYtEVj6CjcdtD8LUGdML+RdKaSVdu0CI0RU 6m6Q== X-Gm-Message-State: AKS2vOwgrYeLF2HbdePpvGJ0jEYm4FMcQdwa6k3tZUVJtoXQKGSsmCeR 8piSUrrPUtze8DiWqRolAQ== X-Received: by 10.84.232.7 with SMTP id h7mr11146818plk.193.1498004537951; Tue, 20 Jun 2017 17:22:17 -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.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 20 Jun 2017 17:22:17 -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 6/9] ext4: add support for passing in write hints for buffered writes Date: Tue, 20 Jun 2017 18:22:03 -0600 Message-Id: <1498004526-4543-7-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 --- fs/ext4/page-io.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/ext4/page-io.c b/fs/ext4/page-io.c index 930ca0fc9a0f..92834b702728 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -350,6 +350,7 @@ void ext4_io_submit(struct ext4_io_submit *io) if (bio) { int io_op_flags = io->io_wbc->sync_mode == WB_SYNC_ALL ? REQ_SYNC : 0; + io_op_flags |= write_hint_to_opf(inode_write_hint(io->io_end->inode)); bio_set_op_attrs(io->io_bio, REQ_OP_WRITE, io_op_flags); submit_bio(io->io_bio); } @@ -397,6 +398,7 @@ static int io_submit_add_bh(struct ext4_io_submit *io, ret = io_submit_init_bio(io, bh); if (ret) return ret; + io->io_bio->bi_opf |= write_hint_to_opf(inode_write_hint(inode)); } ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh)); if (ret != bh->b_size)