From patchwork Mon Mar 22 03:22:38 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: jim owens X-Patchwork-Id: 87337 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2M3Mgnm017743 for ; Mon, 22 Mar 2010 03:22:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753968Ab0CVDWl (ORCPT ); Sun, 21 Mar 2010 23:22:41 -0400 Received: from qw-out-2122.google.com ([74.125.92.25]:19357 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753726Ab0CVDWk (ORCPT ); Sun, 21 Mar 2010 23:22:40 -0400 Received: by qw-out-2122.google.com with SMTP id 8so1062505qwh.37 for ; Sun, 21 Mar 2010 20:22:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=96ZY2m24QivzBn9kph9oqy55384YKaPy5U5T6HkooM4=; b=k/Upilxd9x5O/VgIckOSRR6Y6zElzkNuwxl0kK6kExHEyAbPmHzQ1hJeQ2p7u2mHHs dXRIqaRUxiFxjKRxHZeHgP9C5bHfmPNhy3cGmXttcZtrDaNa6madNJ5srHA5ARGuPsCA Y7mOF6qPovziZLrDwfr+CT8zrUFf78KaL55q0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=D2XF0IgyxNRMlC8yALZVQTCIzEwMrg7sJ7rQWTnBsHeWvJs9RB1OFhNvGSjMjyQk2V B1jRP2ynHkAlw8XvlhXCJ//e+7DLUQYe3w9vVYo/hk0Qiu8QkXvoty5OyIqdwXadFmv6 PWPDJgtI9QMPXxTnb+2yi/0lgV4rsGUf3m7fY= Received: by 10.229.97.147 with SMTP id l19mr3383370qcn.24.1269228160077; Sun, 21 Mar 2010 20:22:40 -0700 (PDT) Received: from [192.168.0.97] (c-24-147-40-65.hsd1.nh.comcast.net [24.147.40.65]) by mx.google.com with ESMTPS id 20sm1953845qyk.12.2010.03.21.20.22.39 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 21 Mar 2010 20:22:39 -0700 (PDT) Message-ID: <4BA6E27E.3030508@gmail.com> Date: Sun, 21 Mar 2010 23:22:38 -0400 From: jim owens User-Agent: Thunderbird 2.0.0.24 (X11/20100317) MIME-Version: 1.0 To: linux-btrfs Subject: [PATCH V3 05/18] Btrfs: btrfs_discard_extent must use WRITE with btrfs_map_block. 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.3 (demeter.kernel.org [140.211.167.41]); Mon, 22 Mar 2010 03:22:42 +0000 (UTC) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index f01e41a..53ad905 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -1602,7 +1602,7 @@ static int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, return 0; /* Tell the block device(s) that the sectors can be discarded */ - ret = btrfs_map_block(&root->fs_info->mapping_tree, READ, + ret = btrfs_map_block(&root->fs_info->mapping_tree, WRITE, bytenr, &map_length, &multi, 0); if (!ret) { struct btrfs_bio_stripe *stripe = multi->stripes;