From patchwork Fri Mar 4 16:10:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jens Axboe X-Patchwork-Id: 8505301 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 682FFC0554 for ; Fri, 4 Mar 2016 16:12:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 44EFF20114 for ; Fri, 4 Mar 2016 16:12:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5204620122 for ; Fri, 4 Mar 2016 16:12:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932599AbcCDQMq (ORCPT ); Fri, 4 Mar 2016 11:12:46 -0500 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:54097 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932475AbcCDQMl (ORCPT ); Fri, 4 Mar 2016 11:12:41 -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 u24G9RXH031370; 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=TeNrEK6fLzXY9StTizJ9JKW8C93VtBEA2MTfrQBapoE=; b=WetWUqUJ10ZlrOcg+dmauF6WgPX9pBLBf1v1fpKRXAx6nTD/HC5nxyhuGaSShlYONLyf hqhi5JP0E84RA2DcLE6T126NUWqVV2bzfbxnUi1OFrs8/m0b5DUP7iKCMCAVvPk8w6V0 3ew+siK3iSKFoTFE9ARjLVFvqRtzO1GG0b4= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 21f6yj1f44-10 (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:04 -0800 From: Jens Axboe To: , CC: , , , Jens Axboe Subject: [PATCH 08/11] Add stream ID support for buffered mpage/__block_write_full_page() Date: Fri, 4 Mar 2016 09:10:50 -0700 Message-ID: <1457107853-8689-9-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-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@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 Pass on the inode stream ID to the bio allocation. Signed-off-by: Jens Axboe --- fs/buffer.c | 8 ++++++-- fs/mpage.c | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index e1632abb4ca9..b7b5cbae7482 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -1788,7 +1788,9 @@ static int __block_write_full_page(struct inode *inode, struct page *page, do { struct buffer_head *next = bh->b_this_page; if (buffer_async_write(bh)) { - submit_bh_wbc(write_op, bh, 0, wbc); + submit_bh_wbc(write_op, bh, + streamid_to_flags(inode_streamid(inode)), + wbc); nr_underway++; } bh = next; @@ -1842,7 +1844,9 @@ recover: struct buffer_head *next = bh->b_this_page; if (buffer_async_write(bh)) { clear_buffer_dirty(bh); - submit_bh_wbc(write_op, bh, 0, wbc); + submit_bh_wbc(write_op, bh, + streamid_to_flags(inode_streamid(inode)), + wbc); nr_underway++; } bh = next; diff --git a/fs/mpage.c b/fs/mpage.c index 1480d3a18037..8b093ab150df 100644 --- a/fs/mpage.c +++ b/fs/mpage.c @@ -281,6 +281,7 @@ alloc_new: min_t(int, nr_pages, BIO_MAX_PAGES), gfp); if (bio == NULL) goto confused; + bio_set_streamid(bio, inode_streamid(inode)); } length = first_hole << blkbits;