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: 9792327 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 DBD69603B5 for ; Fri, 16 Jun 2017 17:25:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0DBD26223 for ; Fri, 16 Jun 2017 17:25:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B579026490; Fri, 16 Jun 2017 17:25:15 +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 671782863F for ; Fri, 16 Jun 2017 17:25:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750886AbdFPRZO (ORCPT ); Fri, 16 Jun 2017 13:25:14 -0400 Received: from mail-it0-f54.google.com ([209.85.214.54]:38188 "EHLO mail-it0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752063AbdFPRY5 (ORCPT ); Fri, 16 Jun 2017 13:24:57 -0400 Received: by mail-it0-f54.google.com with SMTP id b205so16768390itg.1 for ; Fri, 16 Jun 2017 10:24:56 -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=On1+UsnAvluVPQsuZWTsGEtt/No1bc83IirWOq5vwT4yFR0+m8WK6mlfSBEiPJqVSJ izEsh5VA4dZt0xW6dbN8xaTelv5PJeaptq6DszXKJ0bF8cF6jdc7aDcbYlGp1TULbCzs EZ2bTbp6eAA1gK5I80C2+ERzlPcFhH3cxTtML5CwjghrJiQ+GDkxLlMqsJDtky2vpBw9 PeSSwl5QQjHbDjgR3AP2C/DlScWqKFh3n/RmGki/fqdOk9KK/yeX0YMlbM4nxImFf/a6 ffDYpDpZyc34c+nB6AmZnpMeaVVgZj/cdF3ZZzLCXY3o565KfhJOWLrYhXeYN9iZHJAT OaSg== X-Gm-Message-State: AKS2vOxPxwNDn6nSFIG/E8k/v1rVlLHxbFpno44oNnrG/jpOZPWgpWG/ JzZ6JXM4LlqGq2Us6qbSTg== 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-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)