From patchwork Tue Apr 5 12:07:37 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 8750801 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 A44DC9F36E for ; Tue, 5 Apr 2016 12:10:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D34C22012B for ; Tue, 5 Apr 2016 12:10:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 06B2C20117 for ; Tue, 5 Apr 2016 12:10:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932850AbcDEMJc (ORCPT ); Tue, 5 Apr 2016 08:09:32 -0400 Received: from mail-pa0-f65.google.com ([209.85.220.65]:35553 "EHLO mail-pa0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933011AbcDEMJa (ORCPT ); Tue, 5 Apr 2016 08:09:30 -0400 Received: by mail-pa0-f65.google.com with SMTP id zy2so1138803pac.2; Tue, 05 Apr 2016 05:09:30 -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=dGY3sgxZgnR+CmYoTdOT4DeE3Yn5GlUjK9CRNDEJ0Ts=; b=dq2ILcIeb0avXFGL8d2YVLxIV3hx1gyXXZP/vbFYNURvoflZ8+eSQAoaXhjRMn+t6u LzTaOG52GpZV7toq+/g+3YToLSInxZ94PfqBKhoSWYWGKb8ZiD2QG4DLbKp3MRxn76+W 8wut7zzxbiW1g5gPWmudEOyzGJhbaDdo/X9Gm7SfOv2FHGinQeadt8oBV9KOx4lWvjpz 24LJbCzb+tzEcFKIlgdflmLWr6mMjjhhCUKsu5v3Zdq7+UiaO3zRxn2BksMTdD5601kl ecrEWsMcTypuYjHSExqzHgt9pmo5QLCdzmLj4BpEPOkBeqXJmu1vnZRLpFQe4XTLwbV7 Ph8A== 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=dGY3sgxZgnR+CmYoTdOT4DeE3Yn5GlUjK9CRNDEJ0Ts=; b=Ylocs0yoYWCXDO7+iXnmKYr6+1zOrSXjfbFRxAn2jE6dby3UbJ0lssx7OU/ww9j7dO SKW1UszNfClac3erBCgT+R+WpLHWz6awWOlOd3WAaN+MukH7sIgMOMw7egwp4dF4kI0A Ky5wnuVeemT3A0aS8TbqDoebgGut8cJJLhrk2rPWKFZs3EThOmg7q3yTtmVpwrZSxd+S c4TcUj7w4n+Fnrkg5aEj0IPtPeX7EX1VrvDWxdZfWUWv7rjK42QuvyrpUb9I5eCGIeW0 xxOwrme/tLcFugAulen+mCldKP3thEKHPgmM+YdQuLBea7voFFNuTlteYrscUwtwFSBY zEOQ== X-Gm-Message-State: AD7BkJI36muG6pg7F150PvnG8kK8nHtE/G7Qxurjo+uPbOspiQe9tVyF3FhqZKvkbZCZUg== X-Received: by 10.66.171.75 with SMTP id as11mr53461054pac.36.1459858169723; Tue, 05 Apr 2016 05:09:29 -0700 (PDT) Received: from localhost (56.34.213.162.lcy-01.canonistack.canonical.com. [162.213.34.56]) by smtp.gmail.com with ESMTPSA id qy7sm7463259pab.34.2016.04.05.05.09.25 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Tue, 05 Apr 2016 05:09:29 -0700 (PDT) From: Ming Lei To: Jens Axboe , linux-kernel@vger.kernel.org Cc: linux-block@vger.kernel.org, Christoph Hellwig , Boaz Harrosh , Ming Lei , Joern Engel , Prasad Joshi , logfs@logfs.org (open list:LogFS) Subject: [PATCH 22/27] fs: logfs: convert to bio_add_page() in sync_request() Date: Tue, 5 Apr 2016 20:07:37 +0800 Message-Id: <1459858062-21075-8-git-send-email-tom.leiming@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1459858062-21075-1-git-send-email-tom.leiming@gmail.com> References: <1459858062-21075-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 Signed-off-by: Ming Lei Reviewed-by: Christoph Hellwig --- 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 bc422bc9..957c237 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); }