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: 9809937 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 8EDEE603D7 for ; Mon, 26 Jun 2017 15:38:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 94BE128520 for ; Mon, 26 Jun 2017 15:38:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 89D892863A; Mon, 26 Jun 2017 15:38:29 +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=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 42D6F28520 for ; Mon, 26 Jun 2017 15:38:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751858AbdFZPiW (ORCPT ); Mon, 26 Jun 2017 11:38:22 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:33711 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751592AbdFZPiQ (ORCPT ); Mon, 26 Jun 2017 11:38:16 -0400 Received: by mail-io0-f182.google.com with SMTP id h64so2994992iod.0 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=tmDIpC8Acs5Kf7w0sRTCKTCmxhX7PyiHY9Hk67Z2c1XmaZl8xlGM3WC/IchDwFMDZ1 +8ntP28q3dmPD83G4aRnZ1ewjd4J5ko+b+k9TUFDJUYK/ypebR7WWZaACkLdIJ3Z0PrC 2G/kwFjQmpcWrN6K1MiYvhBh9AOJ79b4fB9KLSYSiBNugOkT6/tPgmWQ2upqN2OSVvJe eIWZhpPCDbf9He+tmSAEI/0Xevij7Z+WyU1iDx4Qj8Xws+PfVyfPrOCnnWTUrz9CDkRC fUlD2mIhHmES5/7gtTZDd8HclEdaaOjiwt1tXjCyXyVF3HyoiDpqzVc+QTWCk1WRjt6m Wv1A== X-Gm-Message-State: AKS2vOxh9K4RMrFsdn8Sa+wMi8tcsgKAMhldrLDXWiQXau9kmYPjXJMC JeMlmZeGLkzyaOgY 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-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 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)