From patchwork Fri Mar 4 16:10:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 8505261 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 466B39F659 for ; Fri, 4 Mar 2016 16:12:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 6992C20122 for ; Fri, 4 Mar 2016 16:12:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 887B320114 for ; Fri, 4 Mar 2016 16:12:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932549AbcCDQMp (ORCPT ); Fri, 4 Mar 2016 11:12:45 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:14842 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932463AbcCDQMk (ORCPT ); Fri, 4 Mar 2016 11:12:40 -0500 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.15.0.59/8.15.0.59) with SMTP id u24G9RXF031370; Fri, 4 Mar 2016 08:12:37 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=xoT82F1aEp5PrAVPVe8Kup/9H/S8QiTT68IZQpLtR/g=; b=S4sgxH0Ouak7QoDH+Thqi3pRQGBhTokS3oY+yl4wSZAKsGq1qlmG/PR6Wf01ZTUEfCvE iBfd7E1zyHrbR8rLrharQ+GMzIlRSzrhmYE0fREWhahiniP7uoC4K/ylJZ/1gRlBKaC8 9SiI3pa6qYdB9WLkAK9C95f56gy3oerNP2Y= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 21f6yj1f44-9 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Fri, 04 Mar 2016 08:12:37 -0800 Received: from localhost.localdomain (192.168.54.13) by mail.thefacebook.com (192.168.16.15) with Microsoft SMTP Server (TLS) id 14.3.248.2; Fri, 4 Mar 2016 08:11:03 -0800 From: Jens Axboe To: , CC: , , , Jens Axboe Subject: [PATCH 07/11] direct-io: add support for write stream IDs Date: Fri, 4 Mar 2016 09:10:49 -0700 Message-ID: <1457107853-8689-8-git-send-email-axboe@fb.com> X-Mailer: git-send-email 2.4.1.168.g1ea28e1 In-Reply-To: <1457107853-8689-1-git-send-email-axboe@fb.com> References: <1457107853-8689-1-git-send-email-axboe@fb.com> MIME-Version: 1.0 X-Originating-IP: [192.168.54.13] X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-03-04_07:, , signatures=0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Get the streamid from the file, if any, and set it on the bio. Signed-off-by: Jens Axboe --- fs/direct-io.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fs/direct-io.c b/fs/direct-io.c index d6a9012d42ad..25d6fc191eca 100644 --- a/fs/direct-io.c +++ b/fs/direct-io.c @@ -76,6 +76,7 @@ struct dio_submit { int reap_counter; /* rate limit reaping */ sector_t final_block_in_request;/* doesn't change */ int boundary; /* prev block is at a boundary */ + int streamid; /* Write stream ID */ get_block_t *get_block; /* block mapping function */ dio_submit_t *submit_io; /* IO submition function */ @@ -376,6 +377,8 @@ dio_bio_alloc(struct dio *dio, struct dio_submit *sdio, sdio->bio = bio; sdio->logical_offset_in_bio = sdio->cur_page_fs_offset; + + bio_set_streamid(bio, sdio->streamid); } /* @@ -1224,6 +1227,7 @@ do_blockdev_direct_IO(struct kiocb *iocb, struct inode *inode, sdio.blkbits = blkbits; sdio.blkfactor = i_blkbits - blkbits; sdio.block_in_file = offset >> blkbits; + sdio.streamid = file_streamid(iocb->ki_filp); sdio.get_block = get_block; dio->end_io = end_io;