From patchwork Thu Apr 14 12:02:40 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8835041 Return-Path: X-Original-To: patchwork-linux-block@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 0DDADC0554 for ; Thu, 14 Apr 2016 12:06:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2CA6B20109 for ; Thu, 14 Apr 2016 12:06:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5390120131 for ; Thu, 14 Apr 2016 12:06:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753841AbcDNMFu (ORCPT ); Thu, 14 Apr 2016 08:05:50 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:34253 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755037AbcDNMDn (ORCPT ); Thu, 14 Apr 2016 08:03:43 -0400 Received: by mail-oi0-f67.google.com with SMTP id q133so9555083oib.1; Thu, 14 Apr 2016 05:03:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Xg8Q8bi9J8FrAIfB2bHyFspeFkGT63M0SAecD323Org=; b=LR1NvcbWaLBNnIY/gUwbOXaZPImdsJzVbJpfCRk1oI5UZxVJxIp8eVE6n/ofECUheT Dwm/Yt+eoeIWdzybLmnPNHns0s8HzKgO5fE3GBGEedSuBQpyUZt2MeV85kxasKIq+bKq ACu8XdBxxq11lLeb8KnDwHxd6GT0XFvexQDijXRWGBZz9fF/uIExLnCqZbLSQDGMQw+q CPyCaZat//HnaPqFZkxlRkrJ+pwrF1dp/Okj5ROMLIqk/gcrpY3MeAZ0povZeCC2vapp yqEYpsXRpL41ZZGSp5B6nxBh8KbDn5TqEkhRkVjEHIrGTXeo5M6vgt+aApJddl4X9KoJ aj0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Xg8Q8bi9J8FrAIfB2bHyFspeFkGT63M0SAecD323Org=; b=lktz35G8BA6iQUOH8okn+Ai2GzzPN32dpH3bVGPTQZLKkIdHMVUGzE8N+VQCxLbPHd 3t1Ttfrf3ef7Xi66o3GvvTQpefo1kJ0XQi0XRH2bMnqEXilZeRMPKiOtsw45Eg8zji/Y GjvZYY+1e78SmvEtWBa8CYKpJRpgYGnYLiSOMaMWqc6CoyOz2ubYDTw//zqRvu3O6u56 GncF/MSrmnnXYvafYbHa+mpqQXdMAtKsFMYmWSvONf8PRUihO8ZFBWV2xb9h4PzScY/4 m50GHC/8de0eqDBxQ5cRDaD7iklBwBZsJ24s8MtsKjEgr21WU85zigRRWG8CHLuLpJCu RUVQ== X-Gm-Message-State: AOPr4FULLPCkYMlYr2Bj3d71OEVSuvyy2ugEWrQrc52vNFBfKD0DAqv+T+mqk1uHmRygGQ== X-Received: by 10.157.17.93 with SMTP id p29mr7864654otp.174.1460635423028; Thu, 14 Apr 2016 05:03:43 -0700 (PDT) Received: from localhost ([12.228.154.70]) by smtp.gmail.com with ESMTPSA id 91sm13210931oth.17.2016.04.14.05.03.42 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 14 Apr 2016 05:03:42 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Ming Lei , Joern Engel , Prasad Joshi , logfs@logfs.org (open list:LogFS) Subject: [PATCH v1 22/27] fs: logfs: convert to bio_add_page() in sync_request() Date: Thu, 14 Apr 2016 20:02:40 +0800 Message-Id: <1460635375-28282-23-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> References: <1460635375-28282-1-git-send-email-tom.leiming@gmail.com> Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, 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 Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lei --- fs/logfs/dev_bdev.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/fs/logfs/dev_bdev.c b/fs/logfs/dev_bdev.c index 9f15b53..9623812 100644 --- a/fs/logfs/dev_bdev.c +++ b/fs/logfs/dev_bdev.c @@ -21,13 +21,10 @@ static int sync_request(struct page *page, struct block_device *bdev, int rw) bio_init(&bio); bio_set_vec_table(&bio, &bio_vec, 1); - bio_vec.bv_page = page; - bio_vec.bv_len = PAGE_SIZE; - bio_vec.bv_offset = 0; - bio.bi_vcnt = 1; bio.bi_bdev = bdev; bio.bi_iter.bi_sector = page->index * (PAGE_SIZE >> 9); - bio.bi_iter.bi_size = PAGE_SIZE; + + bio_add_page(&bio, page, PAGE_SIZE, 0); return submit_bio_wait(rw, &bio); }