From patchwork Sat Jun 17 19:59:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9794379 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 55A4A600F6 for ; Sat, 17 Jun 2017 20:00:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4A87427E71 for ; Sat, 17 Jun 2017 20:00:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F8A1280CF; Sat, 17 Jun 2017 20:00:21 +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 0182627E71 for ; Sat, 17 Jun 2017 20:00:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752807AbdFQUAT (ORCPT ); Sat, 17 Jun 2017 16:00:19 -0400 Received: from mail-io0-f176.google.com ([209.85.223.176]:32782 "EHLO mail-io0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752793AbdFQUAN (ORCPT ); Sat, 17 Jun 2017 16:00:13 -0400 Received: by mail-io0-f176.google.com with SMTP id t87so46170853ioe.0 for ; Sat, 17 Jun 2017 13:00:13 -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=Buoq3lBaWn2ukcvcnohPG248Nr0AaMW9+UUQD8rmsBvqCYp6EgmT1WhFFwyB6aDm3q F5/tUc86ptWI/EOC1DLDanNvX9rJR1G5VGUxLMoQ7JZ0gxd8/EObR8zYYpzwfUc861Vf 34WeA0HzYzKOip3lxFdB0ao10hDe3zLSHxP288tPE2hKhkN2uaqgsi2kuM6NInmFqPjG 2DQK9gPjnsrY4Qqs7ey4v0P4VATU+UgYQZK8g42mUCx06bMOIRz0F3GcNagkl9Le3l/i aLDYB/o/qn3urtts/ZLEvqackgL3Ci0Tf1G/YYPZOILZyPKc0QwP7tEkne5654Y2///Q rZ2A== 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=K4l+oZZ+7Q42ge8TQcmmoNFHzZ2kHxfj+q+Myj6YBULF0fB58a4hpPmP7yOfhUxAhe E4CpmTmnKmv/1aPhwY+iU2e0+DZqIfguYQ85pIanwzJMI+ST93B4mMSrBbqJZkcdGZqi Ugvvgt3kczEztfJJHHH6vHmuKVaY+XnzQfCkq+FBYt2U7IR2mB50e43u3AV3tlaEME2O 8k/0a2laVrzbC3gOiT/gwU7X0xaPI9f05Wb1oaMGqI05AJ/FjY0AKeYFLpAyoAiWLsZZ x2AEnWgzbyFXTYgomkrBKfG528SYzzr3giNhJbEWCH9NbrnWlPQtt1oaMKB+Lz/J5vPc H6lA== X-Gm-Message-State: AKS2vOxPCDuLBC7SxtCyiSdSnWAh4i47kwZVZFY+TgWJtym13ZxuF2P3 NEGxSDxb9enkQWYv X-Received: by 10.107.29.129 with SMTP id d123mr384969iod.203.1497729612553; Sat, 17 Jun 2017 13:00:12 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id w199sm537049iod.15.2017.06.17.13.00.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 17 Jun 2017 13:00:12 -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: Sat, 17 Jun 2017 13:59:51 -0600 Message-Id: <1497729594-4707-9-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497729594-4707-1-git-send-email-axboe@kernel.dk> References: <1497729594-4707-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..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)