From patchwork Thu Jun 15 16:42:07 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9789285 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 548C860384 for ; Thu, 15 Jun 2017 16:42:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4794027F7F for ; Thu, 15 Jun 2017 16:42:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3CB77286C4; Thu, 15 Jun 2017 16:42:36 +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 E8B5827F7F for ; Thu, 15 Jun 2017 16:42:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752140AbdFOQma (ORCPT ); Thu, 15 Jun 2017 12:42:30 -0400 Received: from mail-it0-f52.google.com ([209.85.214.52]:38851 "EHLO mail-it0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751893AbdFOQm1 (ORCPT ); Thu, 15 Jun 2017 12:42:27 -0400 Received: by mail-it0-f52.google.com with SMTP id l6so14178137iti.1 for ; Thu, 15 Jun 2017 09:42:26 -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=McFcA2a6wVVB4K/4gaUhRR9+ChSyo8lY2QgQIr1d3yKOsEtW41X8hE9wRCqNvQnUpJ mt9W0NP1cxjMLOmKh2nIqNr3ErdIDqfw7H1/3wBeKh51Y51KnCm1IhjKPXLihwvoNLYW ns+jqTSeQPXTX9U/hQU9uRzqT/AbX5Vz28MZnfbtsHbwGKT63GDJMM7OKq/P6W9+Mwbu R/2YEKFrbL/F9GzyMwB9m2x/DP6EWlg6HnrVTcmFoEJIiBBfQYCTHBr6sS27bevM8pMp XVGlWzpCTwH+Mze+U4o0T1o9fYICdmDvKwH/6hem8ERrbIvTfcoDDbmJVceACVoSwU55 9W+Q== 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=fsgsMSFhRXRwfK16M2yPZpFxzL9FauVdZ51bc2K7EeBxyl2RbWNqwCVq7nLv1gxzrl 8mebZqGChJwBxg7J/eAP4rZnYBxK3UeY02gmq+EFktxifvjcegeCHs2t5jen7R+UknhG Cwy9227GunhukV0IN5UZMpgt7OPHxVa3V7Ee3hRCdUU6WgmFTwPD4r7BMf11ufo0UvwL S0/0qFjerwh3wCyrNCEPpWj0fXrybW0KpB6kdngMlukG7tH3+/xt9tm04KQlewVF3iq9 zpIeJ3TuoN/BCDQElpxJF/wNiuu8SJYW/W7rQVhV/nasmE43NahzSvPA9B+fWL548LSo li8w== X-Gm-Message-State: AKS2vOy4sRx8OszaZBz2xkf7zpnCV5bKY6bep0DsLzrKc/llIyBT7d6V Poqb32wG+VLOPAvyspxgkA== X-Received: by 10.36.208.83 with SMTP id m80mr1864460itg.25.1497544946205; Thu, 15 Jun 2017 09:42:26 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id 97sm313476iot.25.2017.06.15.09.42.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 15 Jun 2017 09:42:25 -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 09/12] ext4: add support for passing in write hints for buffered writes Date: Thu, 15 Jun 2017 10:42:07 -0600 Message-Id: <1497544930-19174-10-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/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)