From patchwork Fri Jun 16 17:24:40 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9792307 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 9E11160231 for ; Fri, 16 Jun 2017 17:25:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8126A2866C for ; Fri, 16 Jun 2017 17:25:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 742862866B; Fri, 16 Jun 2017 17:25:02 +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 1AD4928210 for ; Fri, 16 Jun 2017 17:25:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752379AbdFPRY7 (ORCPT ); Fri, 16 Jun 2017 13:24:59 -0400 Received: from mail-it0-f42.google.com ([209.85.214.42]:38190 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752198AbdFPRY5 (ORCPT ); Fri, 16 Jun 2017 13:24:57 -0400 Received: by mail-it0-f42.google.com with SMTP id b205so16768423itg.1 for ; Fri, 16 Jun 2017 10:24:57 -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=fBDRZ4bSfCSYJ7DegbX4WXu2x6jpIHFp8Lkdh99w4k4=; b=hLv0mEgUGiR+uHr+Ln8q0i9rBf0cFY+YJQ42czQ/+8vpD/5lCRFl6bvyx8GZ+SXTDG Q9r+Fn9WWxRzrID2bL7i7556qkvaNLG8vvjuh/GfmFLW2IJMGDufhd/wmvRbxox/GyOf 0j5sJt2CmWACnXj3Cn/7aR3W65H71xN63n1mW4GEQ3laOrtDjU4IpOYVVBoYxet+sLg2 cjH2yktFirNO9xyKvlJXGJzAW2yTmd3j8bWF8H/hYW59P2jez3c2AEoxqGVh3gqS+vKq /jUOr3iSvDuAf8/vRGDyPywiUEiQzNZhcJb/b3zvxgjG3XljVxabfx9JDFWzHiZNOAup fk+g== 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=fBDRZ4bSfCSYJ7DegbX4WXu2x6jpIHFp8Lkdh99w4k4=; b=GQV57jbAJW/6qQWiA20tQJRDmG2DJ9mNJ+RRvuLy1Zorpxc3O6Po8UjsY6TogWyell sCykA4MaiUtTCMz0oaj17/FlICj+fXPcsXmv1qkS1/hPAIymXNmEFypH3nvQFb7OYGl0 ewZpD+2bx21aSNcovxdc2ag4a1A5GbLBR//K5wQSVnWyLQE56ggU2W/OxfGs35uV2j9b PgY/SZpeOTEtTuUylNIvrwdyMWtawlatGbyJmpUOOg7kO+G038Yk9ND9uV60K8dL2QNc f9Vf6I1KkkJPecR4ERAFP1no+3gLPiIIbV1/7EpmikXCaUmYuhJaWCllQ4Gab5tG9M4U GzOQ== X-Gm-Message-State: AKS2vOzCJZ1S921NY8XA+IDwAB2rpEIXGAT60st7NgpIDLcZsP79kpnj Eh8bmsPWiPw/XGnKfKf2Uw== X-Received: by 10.36.25.199 with SMTP id b190mr12119398itb.23.1497633896393; Fri, 16 Jun 2017 10:24:56 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id e31sm1661101ioi.51.2017.06.16.10.24.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 16 Jun 2017 10:24:55 -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: Fri, 16 Jun 2017 11:24:40 -0600 Message-Id: <1497633883-21230-9-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497633883-21230-1-git-send-email-axboe@kernel.dk> References: <1497633883-21230-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..fbc04a8cb35a 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 |= write_hint_to_opf(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 |= write_hint_to_opf(inode_write_hint(inode)); } ret = bio_add_page(io->io_bio, page, bh->b_size, bh_offset(bh)); if (ret != bh->b_size)