From patchwork Wed Jun 14 19:05:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9787285 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 D3BB460325 for ; Wed, 14 Jun 2017 19:06:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6C4E23D5E for ; Wed, 14 Jun 2017 19:06:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BBAFE268AE; Wed, 14 Jun 2017 19:06:04 +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 5E96B24B44 for ; Wed, 14 Jun 2017 19:06:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752095AbdFNTGB (ORCPT ); Wed, 14 Jun 2017 15:06:01 -0400 Received: from mail-io0-f172.google.com ([209.85.223.172]:36381 "EHLO mail-io0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751755AbdFNTFr (ORCPT ); Wed, 14 Jun 2017 15:05:47 -0400 Received: by mail-io0-f172.google.com with SMTP id y77so6268448ioe.3 for ; Wed, 14 Jun 2017 12:05:47 -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=0BUKUhkgAoib8gFB+vRTkjj1Y3OA3l9pmhXPtgsxRD0=; b=zwmMm2qonF/Dab+A5UseM3la7Gvh9OXlG/1mHcNKxsdZLbMdDukceZ7IMYIaGV3d1n iSwEbtl6eMQDmSphLVUz5aal3MK5A9gZ9zcscFke0GmjtQWwtiZQzNZnX4f+Rif0ix0p YzVwx7j9QYYKxWMdGboHrhKHkfGAyJhiigt/x9r49G1jaCNvD1/Bur9ol3mPd9H/0zkk e15+INQGwSaYMQ2T1nFsxscjQKXUXKCaxpqosakjp29MvqPDJfnV+yxo7lCPz4BuqI5+ 5NNNLIKOMyHYcK0pLQNB/g5VhBlyDf9ESJEEtDVDJjik99FfyXKIz5VizmMzjVx4GG6G l5uA== 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=0BUKUhkgAoib8gFB+vRTkjj1Y3OA3l9pmhXPtgsxRD0=; b=hzRcUWS4DVXUpRWvUVbgpOhjfXWkeaH0u1oBC4z2dJmX/lQ60rA9J/f3iaIfAAf3A7 b4DZKhzQvYEys1ujR57WU9mkrGyd0ansdQSs0L23pCDq0k336op0XY4bM37DmCt6xg/f I/wEZP8l9JJSMlY8ESQSevOn71fewZHZDFhelh4Di6NbnZTcnJxThdA/UNM3bxX9vwxK z2B1V2pWaBl21ET/u35ydZKoLE+6YI0R1mNSU+X5yHuBKWLwPgoU3VJ94KJERLGSZP6I 3zBNMlXABPJvokKhFG7f/7Gg+61+l/s1epgogwkSegKQibGDEAf0akKpTwNvVJIYFdxr dk1w== X-Gm-Message-State: AKS2vOxhteAERn0FaS4/eMEpViNURDyBmpmYrY3dxJSucsvyMNvC0L08 TQMSBrvgXL/HGik8ywT9Wg== X-Received: by 10.107.59.13 with SMTP id i13mr1568024ioa.163.1497467146242; Wed, 14 Jun 2017 12:05:46 -0700 (PDT) Received: from localhost.localdomain ([216.160.245.98]) by smtp.gmail.com with ESMTPSA id h67sm380361itb.19.2017.06.14.12.05.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jun 2017 12:05:45 -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 06/11] fs: add O_DIRECT support for sending down bio stream information Date: Wed, 14 Jun 2017 13:05:29 -0600 Message-Id: <1497467134-6323-7-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497467134-6323-1-git-send-email-axboe@kernel.dk> References: <1497467134-6323-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/block_dev.c | 2 ++ fs/direct-io.c | 2 ++ fs/iomap.c | 1 + 3 files changed, 5 insertions(+) diff --git a/fs/block_dev.c b/fs/block_dev.c index 519599dddd36..31ba4a8f0a28 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -239,6 +239,7 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, should_dirty = true; } else { bio.bi_opf = dio_bio_write_op(iocb); + bio_set_streamid(&bio, iocb_streamid(iocb)); task_io_account_write(ret); } @@ -374,6 +375,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) bio_set_pages_dirty(bio); } else { bio->bi_opf = dio_bio_write_op(iocb); + bio_set_streamid(bio, iocb_streamid(iocb)); task_io_account_write(bio->bi_iter.bi_size); } diff --git a/fs/direct-io.c b/fs/direct-io.c index a04ebea77de8..a770e82bb9f8 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -386,6 +386,8 @@ dio_bio_alloc(struct dio *dio, struct dio_submit *sdio, else bio->bi_end_io = dio_bio_end_io; + bio_set_streamid(bio, iocb_streamid(dio->iocb)); + sdio->bio = bio; sdio->logical_offset_in_bio = sdio->cur_page_fs_offset; } diff --git a/fs/iomap.c b/fs/iomap.c index 4b10892967a5..fa7d29632fbc 100644 --- a/fs/iomap.c +++ b/fs/iomap.c @@ -804,6 +804,7 @@ iomap_dio_actor(struct inode *inode, loff_t pos, loff_t length, if (dio->flags & IOMAP_DIO_WRITE) { bio_set_op_attrs(bio, REQ_OP_WRITE, REQ_SYNC | REQ_IDLE); + bio_set_streamid(bio, inode_streamid(inode)); task_io_account_write(bio->bi_iter.bi_size); } else { bio_set_op_attrs(bio, REQ_OP_READ, 0);