From patchwork Mon Aug 29 03:47:39 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Namhyung Kim X-Patchwork-Id: 1106052 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.4) with ESMTP id p7T3pbs9032718 for ; Mon, 29 Aug 2011 03:51:37 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752463Ab1H2Dux (ORCPT ); Sun, 28 Aug 2011 23:50:53 -0400 Received: from mail-pz0-f42.google.com ([209.85.210.42]:35432 "EHLO mail-pz0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752194Ab1H2Dt5 (ORCPT ); Sun, 28 Aug 2011 23:49:57 -0400 Received: by mail-pz0-f42.google.com with SMTP id 37so7738333pzk.1 for ; Sun, 28 Aug 2011 20:49:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; bh=pyLnAb200TR7F2kaMYSxNAhlL3t1+Kp9oU41yeVY/WU=; b=NZqkrpG6iPkQ8Cdccl6DogikiuuGRAL5mJbmkyXpq+42Q7qCSk9TBTWFBeVUl/2f21 lfdoCTSzjdhMdrxLvD22Bhm0cilhT0oqbk07Rme/P5QeHMdvVw2/TLVdq/nJJKfKMRA/ Z2EQdugIeHV7vBQiznJ4PzvIhTYR97w3jTA6s= Received: by 10.142.229.5 with SMTP id b5mr2066590wfh.131.1314589796941; Sun, 28 Aug 2011 20:49:56 -0700 (PDT) Received: from localhost.localdomain ([211.201.183.198]) by mx.google.com with ESMTPS id x6sm16534701pba.5.2011.08.28.20.49.54 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 28 Aug 2011 20:49:56 -0700 (PDT) From: Namhyung Kim To: Jens Axboe Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-btrfs@vger.kernel.org Subject: [PATCH 5/6] Btrfs: convert to __bio_endio() Date: Mon, 29 Aug 2011 12:47:39 +0900 Message-Id: <1314589660-2918-6-git-send-email-namhyung@gmail.com> X-Mailer: git-send-email 1.7.6 In-Reply-To: <1314589660-2918-1-git-send-email-namhyung@gmail.com> References: <1314589660-2918-1-git-send-email-namhyung@gmail.com> Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Mon, 29 Aug 2011 03:51:37 +0000 (UTC) Use untraced __bio_endio() for nested bio handling path to suppress duplicated trace event. Signed-off-by: Namhyung Kim Cc: linux-btrfs@vger.kernel.org --- fs/btrfs/compression.c | 4 ++-- fs/btrfs/disk-io.c | 2 +- fs/btrfs/inode.c | 8 ++++---- fs/btrfs/volumes.c | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/fs/btrfs/compression.c b/fs/btrfs/compression.c index 8ec5d86f1734..864d3ad6dae7 100644 --- a/fs/btrfs/compression.c +++ b/fs/btrfs/compression.c @@ -197,7 +197,7 @@ csum_failed: /* do io completion on the original bio */ if (cb->errors) { - bio_io_error(cb->orig_bio); + __bio_io_error(cb->orig_bio); } else { int bio_index = 0; struct bio_vec *bvec = cb->orig_bio->bi_io_vec; @@ -211,7 +211,7 @@ csum_failed: bvec++; bio_index++; } - bio_endio(cb->orig_bio, 0); + __bio_endio(cb->orig_bio, 0); } /* finally free the cb struct */ diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 07b3ac662e19..64ed856bdde6 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1490,7 +1490,7 @@ static void end_workqueue_fn(struct btrfs_work *work) bio->bi_private = end_io_wq->private; bio->bi_end_io = end_io_wq->end_io; kfree(end_io_wq); - bio_endio(bio, error); + __bio_endio(bio, error); } static int cleaner_kthread(void *arg) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 0ccc7438ad34..c98716474a57 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -5893,10 +5893,10 @@ static void btrfs_end_dio_bio(struct bio *bio, int err) goto out; if (dip->errors) - bio_io_error(dip->orig_bio); + __bio_io_error(dip->orig_bio); else { set_bit(BIO_UPTODATE, &dip->orig_bio->bi_flags); - bio_endio(dip->orig_bio, 0); + __bio_endio(dip->orig_bio, 0); } out: bio_put(bio); @@ -6059,7 +6059,7 @@ out_err: */ smp_mb__before_atomic_dec(); if (atomic_dec_and_test(&dip->pending_bios)) - bio_io_error(dip->orig_bio); + __bio_io_error(dip->orig_bio); /* bio_end_io() will handle error, so we needn't return it */ return 0; @@ -6133,7 +6133,7 @@ free_ordered: btrfs_put_ordered_extent(ordered); btrfs_put_ordered_extent(ordered); } - bio_endio(bio, ret); + __bio_endio(bio, ret); } static ssize_t check_direct_IO(struct btrfs_root *root, int rw, struct kiocb *iocb, diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index f2a4cc79da61..0f745a97805d 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c @@ -3224,7 +3224,7 @@ static void end_bio_multi_stripe(struct bio *bio, int err) } kfree(multi); - bio_endio(bio, err); + __bio_endio(bio, err); } else if (!is_orig_bio) { bio_put(bio); } @@ -3350,7 +3350,7 @@ int btrfs_map_bio(struct btrfs_root *root, int rw, struct bio *bio, } else { bio->bi_bdev = root->fs_info->fs_devices->latest_bdev; bio->bi_sector = logical >> 9; - bio_endio(bio, -EIO); + __bio_io_error(bio); } dev_nr++; }