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: 9789281 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 3DCCC6038E for ; Thu, 15 Jun 2017 16:42:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3054B28552 for ; Thu, 15 Jun 2017 16:42:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2516E286C0; Thu, 15 Jun 2017 16:42:32 +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 CDAAA28552 for ; Thu, 15 Jun 2017 16:42:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751955AbdFOQmb (ORCPT ); Thu, 15 Jun 2017 12:42:31 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:35179 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751773AbdFOQm1 (ORCPT ); Thu, 15 Jun 2017 12:42:27 -0400 Received: by mail-it0-f42.google.com with SMTP id m62so21372528itc.0 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=eaD6vWlzo/fw7K9jzUjdfB3no1MV9x5rzJnaSdZGaZt575Oym4+Sh+1Tw/cl5JiPwF iOh0tOuopKacew6oQPlKI/Hy44s/sBwqGVBb+1NKA5o6D3wHRpx/oN3OSJUTarRy+trj 1gGv+6lwZ4G6ueNz7xgeeUP7A0hGx8ApoLHgb/bqEX8ecMRIIKG2yc4d6kq3uSFhyH+M OsGQZHGbbWysfTjbo2sqIuA9puhNpjh4/L7Nut1HeM+Dx3JaLlFlm4tCeAj1JQjETaWr 2xl9NHfMXWKeM4UHPdY5ZqRqG4YKLTWe8hxgzuQMJ5zOdTDWwo0esQt6Uu6JfOWd75iV hSTg== X-Gm-Message-State: AKS2vOwagOl10ZTov9UyxMmrzME+TtvjTGXbc6BStBvmYHxnRjJ2giUq H25DqTs5bc2bVxKLhfs6hg== 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-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)