From patchwork Tue Aug 7 08:57:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "jeff.liu" X-Patchwork-Id: 1284341 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 112F6E0012 for ; Tue, 7 Aug 2012 08:57:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752518Ab2HGI5r (ORCPT ); Tue, 7 Aug 2012 04:57:47 -0400 Received: from rcsinet15.oracle.com ([148.87.113.117]:23742 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752091Ab2HGI5q (ORCPT ); Tue, 7 Aug 2012 04:57:46 -0400 Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by rcsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q778viAr003545 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 7 Aug 2012 08:57:45 GMT Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q778vie0024391 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 7 Aug 2012 08:57:44 GMT Received: from abhmt113.oracle.com (abhmt113.oracle.com [141.146.116.65]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q778vhjQ029134 for ; Tue, 7 Aug 2012 03:57:43 -0500 Received: from [192.168.1.103] (/123.119.96.132) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 07 Aug 2012 01:57:43 -0700 Message-ID: <5020D85C.5020204@oracle.com> Date: Tue, 07 Aug 2012 16:57:00 +0800 From: Jeff Liu Reply-To: jeff.liu@oracle.com Organization: Oracle User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.28) Gecko/20120313 Thunderbird/3.1.20 MIME-Version: 1.0 To: "linux-btrfs@vger.kernel.org" Subject: [RFC PATCH 1/5] btrfs-progs: make ino_resovle() shared X-Source-IP: ucsinet21.oracle.com [156.151.31.93] Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org Make ino_resolve() shared so that we can call it at snapshot diff module. Signed-off-by: Jie Liu --- btrfs-list.c | 3 +-- btrfs-list.h | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 btrfs-list.h diff --git a/btrfs-list.c b/btrfs-list.c index c53d016..75681e1 100644 --- a/btrfs-list.c +++ b/btrfs-list.c @@ -474,8 +474,7 @@ char *build_name(char *dirid, char *name) * cache the results so we can avoid tree searches if a later call goes * to the same directory or file name */ -static char *ino_resolve(int fd, u64 ino, u64 *cache_dirid, char **cache_name) - +char *ino_resolve(int fd, u64 ino, u64 *cache_dirid, char **cache_name) { u64 dirid; char *dirname; diff --git a/btrfs-list.h b/btrfs-list.h new file mode 100644 index 0000000..70b2078 --- /dev/null +++ b/btrfs-list.h @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2007 Oracle. All rights reserved. + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public + * License v2 as published by the Free Software Foundation. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public + * License along with this program; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 021110-1307, USA. + */ + +#ifndef __BTRFS_LIST_ +#define __BTRFS_LIST_ +char *ino_resolve(int fd, u64 ino, u64 *cache_dirid, char **cache_name); +#endif