From patchwork Fri Jun 21 12:20:56 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhiyong Wu X-Patchwork-Id: 2761891 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1E3BF9F756 for ; Fri, 21 Jun 2013 12:22:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 371B020149 for ; Fri, 21 Jun 2013 12:22:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0393720134 for ; Fri, 21 Jun 2013 12:22:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161221Ab3FUMW3 (ORCPT ); Fri, 21 Jun 2013 08:22:29 -0400 Received: from e7.ny.us.ibm.com ([32.97.182.137]:47909 "EHLO e7.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161052Ab3FUMW2 (ORCPT ); Fri, 21 Jun 2013 08:22:28 -0400 Received: from /spool/local by e7.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 21 Jun 2013 08:22:28 -0400 Received: from d01dlp02.pok.ibm.com (9.56.250.167) by e7.ny.us.ibm.com (192.168.1.107) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 21 Jun 2013 08:22:24 -0400 Received: from d01relay04.pok.ibm.com (d01relay04.pok.ibm.com [9.56.227.236]) by d01dlp02.pok.ibm.com (Postfix) with ESMTP id 1905F6E804F for ; Fri, 21 Jun 2013 08:22:20 -0400 (EDT) Received: from d03av04.boulder.ibm.com (d03av04.boulder.ibm.com [9.17.195.170]) by d01relay04.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id r5LCLrUv315474 for ; Fri, 21 Jun 2013 08:21:54 -0400 Received: from d03av04.boulder.ibm.com (loopback [127.0.0.1]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id r5LCLpWf012425 for ; Fri, 21 Jun 2013 06:21:53 -0600 Received: from us.ibm.com (f17.cn.ibm.com [9.115.122.140]) by d03av04.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with SMTP id r5LCLkrS011804; Fri, 21 Jun 2013 06:21:47 -0600 Received: by us.ibm.com (sSMTP sendmail emulation); Fri, 21 Jun 2013 20:21:07 +0800 From: zwu.kernel@gmail.com To: linux-btrfs@vger.kernel.org Cc: viro@zeniv.linux.org.uk, sekharan@us.ibm.com, linuxram@us.ibm.com, david@fromorbit.com, chris.mason@fusionio.com, jbacik@fusionio.com, idryomov@gmail.com, Martin@lichtvoll.de, Zhi Yong Wu Subject: [RFC PATCH v2 1/5] BTRFS hot reloc, vfs: add one list_head field Date: Fri, 21 Jun 2013 20:20:56 +0800 Message-Id: <1371817260-8615-2-git-send-email-zwu.kernel@gmail.com> X-Mailer: git-send-email 1.7.11.7 In-Reply-To: <1371817260-8615-1-git-send-email-zwu.kernel@gmail.com> References: <1371817260-8615-1-git-send-email-zwu.kernel@gmail.com> X-TM-AS-MML: No x-cbid: 13062112-5806-0000-0000-000021D1F5A5 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-8.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,UNPARSEABLE_RELAY autolearn=unavailable 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 From: Zhi Yong Wu Add one list_head field 'reloc_list' to accommodate hot relocation support. Signed-off-by: Zhi Yong Wu --- fs/hot_tracking.c | 1 + include/linux/hot_tracking.h | 1 + 2 files changed, 2 insertions(+) diff --git a/fs/hot_tracking.c b/fs/hot_tracking.c index dbc90d4..f013182 100644 --- a/fs/hot_tracking.c +++ b/fs/hot_tracking.c @@ -44,6 +44,7 @@ static void hot_comm_item_init(struct hot_comm_item *ci, int type) clear_bit(HOT_IN_LIST, &ci->delete_flag); clear_bit(HOT_DELETING, &ci->delete_flag); INIT_LIST_HEAD(&ci->track_list); + INIT_LIST_HEAD(&ci->reloc_list); memset(&ci->hot_freq_data, 0, sizeof(struct hot_freq_data)); ci->hot_freq_data.avg_delta_reads = (u64) -1; ci->hot_freq_data.avg_delta_writes = (u64) -1; diff --git a/include/linux/hot_tracking.h b/include/linux/hot_tracking.h index 1009377..98bb092 100644 --- a/include/linux/hot_tracking.h +++ b/include/linux/hot_tracking.h @@ -75,6 +75,7 @@ struct hot_comm_item { unsigned long delete_flag; struct rcu_head c_rcu; struct list_head track_list; /* link to *_map[] */ + struct list_head reloc_list; /* used in hot relocation*/ }; /* An item representing an inode and its access frequency */