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: 9788021 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 F046760384 for ; Thu, 15 Jun 2017 03:45:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E526627C2D for ; Thu, 15 Jun 2017 03:45:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D9630285A8; Thu, 15 Jun 2017 03:45:46 +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 50FF327C2D for ; Thu, 15 Jun 2017 03:45:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752134AbdFODpk (ORCPT ); Wed, 14 Jun 2017 23:45:40 -0400 Received: from mail-pf0-f181.google.com ([209.85.192.181]:33362 "EHLO mail-pf0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752088AbdFODpj (ORCPT ); Wed, 14 Jun 2017 23:45:39 -0400 Received: by mail-pf0-f181.google.com with SMTP id 83so1832414pfr.0 for ; Wed, 14 Jun 2017 20:45:39 -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=R6E+W9/db0ziXMeRA5w8cnSvu2Bre6BfNGw421eKhDZDMeQPMSCQtILqjyKguCGi/J MypOCxMKKKWAVtDQsZRMhQs5kuFZcNYRwzeWFFUnajGFfakzmLQQSXwfSu0hFNLJQkQ5 GoDSqHtL4iWK5lFjSJMEc77RrIMG+HyP0OlZS6ZPY2njEO3ZPUdvNDGbcmMKgMLgH5Pm tDhuY3p3Fhxg4H8w5YhDGtN6SxJgLjfEPJ+IFfa6w/XwMfpMma7/CKcEgcQViwo2lVIN gaG0wcA60LjEp0Z9P+TOqfAdWQrrxJQPXlv7rLcDCaVqYh8CSBfGFt74H39ySGNtCctv BGTA== X-Gm-Message-State: AKS2vOypsU9pn5mcDivYABTjZZWBR6HLvk2ARDMGeuR2QouMZs/CD6TK 5wMk17bXEMJ91rVc 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-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/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)