From patchwork Wed Jun 14 04:01:54 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 9785311 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 EE92460325 for ; Wed, 14 Jun 2017 04:02:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 03E452844E for ; Wed, 14 Jun 2017 04:02:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED1922858D; Wed, 14 Jun 2017 04:02:31 +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 A714E2844E for ; Wed, 14 Jun 2017 04:02:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752231AbdFNECa (ORCPT ); Wed, 14 Jun 2017 00:02:30 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:36297 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751971AbdFNECZ (ORCPT ); Wed, 14 Jun 2017 00:02:25 -0400 Received: by mail-pf0-f178.google.com with SMTP id x63so77509296pff.3 for ; Tue, 13 Jun 2017 21:02:25 -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=gCZce871bWE0gbqt1635ZZGfGdiQJCfcK2t3nUr4O60=; b=LZqGm2Ep98m6ZctH3OP9FyqTP5BK+R8mJyd52L7txMs8tpFPI+GPCeWDbojczT9W7l JLzKb7xHZgaHlvTtgiTW18QnSuY8AxFVheuG0nf0cfBm4eKRQJVccArPnyVqsqtXPrYA Uz2QL7VDuEAGDcrO/Fbdt1TIAVINJYmlClUdPGmOrMhtgRS3zR0/w0frfEuwZWrmYTb4 wOror/FQ2TCRuECV7GeIrbtYQPy7XC37Qn2Jbk9/sTksvwEx4OWoSu4GuB113nidLHpe UfvoQin45Ho84sQ/8qvtWCeHipPu9IdXzzQkLHoqxWnOr4W2iNMN1IExtn1UpLCPvX3z 9BPw== 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=gCZce871bWE0gbqt1635ZZGfGdiQJCfcK2t3nUr4O60=; b=kRy+p5jBq6Jdq4RVgC9H3xDq9ZhnmAqeJBlX7hQOcYUAgWSBt4tq78+WIeOCThoL7x 4Ic5e1eZFXp1B98DWyXe1GiSA4KroM4odCcVmPqjM0TLDHByzOb8EH9kLoKPtWuGM6LU zQmMA7I2YBEuA9BA6LfmXpO/CWsNIRp3dmvleTDgnBwOuJmF84J7kagRiGGl6lNU4ZUm dxjLx4jVhzfEDUdO/Glj/H70cojRWgSgWWKHJLVNwwdjZD+l0vb1AUM6VPV5fvc39PV7 dNBfMFyAPPQhzhNCTfLZ8taVWsf6O1PHR3GNII2WE1B3p+PgmDuA8PNqh7Lty/ZQO8n1 Xsww== X-Gm-Message-State: AKS2vOzu4VRbO866bvQDAIkOqc6dXIy0swnijCG+DQ1q04uv+AswPugV lBUaErxaufblMvYJg59gLA== X-Received: by 10.98.150.9 with SMTP id c9mr2042546pfe.201.1497412930862; Tue, 13 Jun 2017 21:02:10 -0700 (PDT) Received: from localhost.localdomain (66.29.164.166.static.utbb.net. [66.29.164.166]) by smtp.gmail.com with ESMTPSA id f8sm30914083pfc.14.2017.06.13.21.02.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 13 Jun 2017 21:02:10 -0700 (PDT) From: Jens Axboe To: linux-fsdevel@vger.kernel.org, linux-block@vger.kernel.org Cc: adilger@dilger.ca, Jens Axboe Subject: [PATCH 05/10] fs: add O_DIRECT support for sending down bio stream information Date: Tue, 13 Jun 2017 22:01:54 -0600 Message-Id: <1497412919-19400-6-git-send-email-axboe@kernel.dk> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1497412919-19400-1-git-send-email-axboe@kernel.dk> References: <1497412919-19400-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..284b8a786283 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -227,6 +227,7 @@ __blkdev_direct_IO_simple(struct kiocb *iocb, struct iov_iter *iter, bio.bi_iter.bi_sector = pos >> 9; bio.bi_private = current; bio.bi_end_io = blkdev_bio_end_io_simple; + bio.bi_stream = iocb_streamid(iocb); ret = bio_iov_iter_get_pages(&bio, iter); if (unlikely(ret)) @@ -360,6 +361,7 @@ __blkdev_direct_IO(struct kiocb *iocb, struct iov_iter *iter, int nr_pages) bio->bi_iter.bi_sector = pos >> 9; bio->bi_private = dio; bio->bi_end_io = blkdev_bio_end_io; + bio->bi_stream = iocb_streamid(iocb); ret = bio_iov_iter_get_pages(bio, iter); if (unlikely(ret)) { diff --git a/fs/direct-io.c b/fs/direct-io.c index a04ebea77de8..c9c8b9fd4329 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->bi_stream = 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);