From patchwork Thu Jun 15 03:45:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9788031 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 DA66E60384 for ; Thu, 15 Jun 2017 03:45:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D08612838B for ; Thu, 15 Jun 2017 03:45:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C54FC283AE; Thu, 15 Jun 2017 03:45:48 +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 E315F2857E for ; Thu, 15 Jun 2017 03:45:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752121AbdFODpi (ORCPT ); Wed, 14 Jun 2017 23:45:38 -0400 Received: from mail-pf0-f180.google.com ([209.85.192.180]:33363 "EHLO mail-pf0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752097AbdFODpe (ORCPT ); Wed, 14 Jun 2017 23:45:34 -0400 Received: by mail-pf0-f180.google.com with SMTP id 83so1832455pfr.0 for ; Wed, 14 Jun 2017 20:45:34 -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=/68+sjO0ETvecMztVqo/SFsKphiaw92t+LEwchPbDCI=; b=NdlKCUqOSAG8E9athJhxyjJQNhd7ZiSee41zMI9P+nJiIHJ4oJDG2tJUzepNfe2OTO ExEXh2hbgByrrdFpRU7/MmtEq+r4tXzlwt7hL0e4gFdwsyI7dX6fzPYnaK1GuaRV/gB1 7Dna9StbV8r1ohgqK2k/mZgKVqnSfk6zEnCJL08N8xpQ0paaQUG5THS/kqdj/alSDjEs 3MSHpJ/bBpap+n1ZDeC+vN8W6cnPp3WixIV2rLYCn55WmuMA0v364pqv3ZiCtG6deiyd P9m/QUOD6jA1+6ySyYE3F3FteGXgMTmJPj9lVrvaOUsDLMyN70TM5iy3onzB2ZcOd1Ru nxTQ== 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=/68+sjO0ETvecMztVqo/SFsKphiaw92t+LEwchPbDCI=; b=Uj+BVNPY+6NsdzmLoY5+pe0xN3Q25hzLJkien+cIPnje7646nRIjpcdfRurXR4fa8F z9D4GWh2LntXPUre3RFyfZwMgo3/7/V32jKU6c20OscfwNyzRWvumbyvip2u0wbePMLO UKTagMhIcxqkYk8+pDbsKYrdYo/+ZMo5YJmy4x0wZk2ShOSCFZyrA9I1B8Fc4neDJbUT vhCsoPhC0szTw/Dxs9NIo/YVHojx7odpgpVPee4R6rBW7OzwfsgDyaM9wVCC5hqPojZu 4kl5mHcfsppe61fX0n7nCsb2Q9cByj9/ks4rXfxWdKYbWJ/4H7O4ZYC7Q7gCH1Hg6eM0 T8Cw== X-Gm-Message-State: AKS2vOxLIp+XNHqaqE/6C2xrLkO6JjNCzVx4wQDXoV6hKPkNVqaRAwZ2 cW3sWt6gLa6BJh6PTsQqIg== X-Received: by 10.84.238.15 with SMTP id u15mr3862439plk.126.1497498333941; Wed, 14 Jun 2017 20:45:33 -0700 (PDT) Received: from localhost.localdomain (66.29.164.166.static.utbb.net. [66.29.164.166]) by smtp.gmail.com with ESMTPSA id f71sm2532627pfd.98.2017.06.14.20.45.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 20:45:33 -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 08/11] ext4: add support for passing in write hints for buffered writes Date: Wed, 14 Jun 2017 21:45:09 -0600 Message-Id: <1497498312-17704-9-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497498312-17704-1-git-send-email-axboe@kernel.dk> References: <1497498312-17704-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 1a82138ba739..764bf0ddecd4 100644 --- a/fs/ext4/page-io.c +++ b/fs/ext4/page-io.c @@ -349,6 +349,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 |= bio_op_write_hint(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); } @@ -396,6 +397,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 |= bio_op_write_hint(inode_write_hint(inode)); } ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh)); if (ret != bh->b_size)