From patchwork Mon Jun 26 15:37:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9809935 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 6A520603D7 for ; Mon, 26 Jun 2017 15:38:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6DF6628520 for ; Mon, 26 Jun 2017 15:38:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6191E2861B; Mon, 26 Jun 2017 15:38:23 +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.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 D8B0528520 for ; Mon, 26 Jun 2017 15:38:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751813AbdFZPiW (ORCPT ); Mon, 26 Jun 2017 11:38:22 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:34883 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751615AbdFZPiQ (ORCPT ); Mon, 26 Jun 2017 11:38:16 -0400 Received: by mail-io0-f182.google.com with SMTP id h134so2978135iof.2 for ; Mon, 26 Jun 2017 08:38:16 -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=ZV3jvvLddaXtuCTlZjmkygmRNjWjTKGkCt5krE8BBO0=; b=Fa37HLsUxNGz8nmBakEEEqiSxEc8/ltO9+xMVMUx8j/GHMq5amWtAs241PqGkXFgw/ JnDBqJBu04h+lNdNRnnAbLcu1vxsDT6TpIcJUHSzgO93ChYeopjoQCcLkdxXePzpTqHt DwhFALxHKInubSqKQIsk7WeTZuZylIr03ZjiY/bNQj/pN/adeZhIpJSOf88B+01eP5WO 9niYLyiIgeb6rJZ0Z8VTMykGK+n7qoW5AQO2ZI1Zjy+jfOiH0zBTE7Jt+UaI+FnVANWL 7GmWjO1OZjA+IMNqcL8C0KTnWgD5RxPloCobHpTgftPL9VvSXk8WYlp4xV2Pe0j8Tho/ NXWA== 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=ZV3jvvLddaXtuCTlZjmkygmRNjWjTKGkCt5krE8BBO0=; b=DoyJfJ70FDzYs+SjceUiRBV9CaQ8amDhfcafMObr/HK/bpdYYogZCZx7Cepvm1cRY4 1De1LfGtqXS9oKdU1mfyiZWEa+mP8oBXdDc/q3yzoJZyq/8Z5wx0qmMWYcwmB20ZXfSS oz/59FSAQ/gMlU7VTIVB5bUKbp9LlE5KgZzi0ZkW4gSpBfm5QBuXCg7AsWhl0yH2GrOZ jyZyK6v/lfU0jos0D4IzCbzGKmOXEeGXQTY9XR7X8n1NpRTM4y5hVqfBqf3ZDTTn4oLq nzUvTJQcm2TV8HIMws9PtlwixdOxy/oexlvXhDIhjhShVKufxSGe3Do0fJIFoYsvS8sJ yTrQ== X-Gm-Message-State: AKS2vOzRkpDNy4M6xe5Md2lho9aX5qQFDPvf+hniL7YGEH4WUn0zUxSv qJkteg1l78sUyPRcajsefw== X-Received: by 10.107.178.13 with SMTP id b13mr1051589iof.148.1498491495716; Mon, 26 Jun 2017 08:38:15 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id b69sm33425itb.23.2017.06.26.08.38.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 26 Jun 2017 08:38:15 -0700 (PDT) From: Jens Axboe To: linux-block@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, hch@lst.de, martin.petersen@oracle.com, Jens Axboe Subject: [PATCH 6/9] ext4: add support for passing in write hints for buffered writes Date: Mon, 26 Jun 2017 09:37:57 -0600 Message-Id: <1498491480-16306-7-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1498491480-16306-1-git-send-email-axboe@kernel.dk> References: <1498491480-16306-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 Reviewed-by: Martin K. Petersen 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..02e5a7b8d60b 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 |= inode_hint_to_opf(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 |= inode_hint_to_opf(inode); } ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh)); if (ret != bh->b_size)