lkml.org 
[lkml]   [2013]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 11/39] staging/lustre/mdt: CDT cleanup follow-on patch
Date
From: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>

This patch implements the comments made during the review after
maloo passed test or after the landing.

rename in hai_zero() hai_first()
Use a better name for hai helper

replace use of cfs_helpers by native one in CDT
replace atomic_t and helpers
replace cfs_list and helpers
change list_for_each + list_entry by list_entry_for_each
replace cfs_task_t

clean err msg in HSM agent interface
remove duplicate rc print

parenthesis code cleaning
remove useless () in conditionnal tests

Lustre-change: http://review.whamcloud.com/7254
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3709
Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr>
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
.../lustre/lustre/include/lustre/lustre_user.h | 4 ++--
drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index c63a1ae..2c72a88 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -1106,7 +1106,7 @@ static inline int cfs_size_round (int val)
#endif

/* Return pointer to first hai in action list */
-static inline struct hsm_action_item * hai_zero(struct hsm_action_list *hal)
+static inline struct hsm_action_item *hai_first(struct hsm_action_list *hal)
{
return (struct hsm_action_item *)(hal->hal_fsname +
cfs_size_round(strlen(hal-> \
@@ -1126,7 +1126,7 @@ static inline int hal_size(struct hsm_action_list *hal)
struct hsm_action_item *hai;

sz = sizeof(*hal) + cfs_size_round(strlen(hal->hal_fsname));
- hai = hai_zero(hal);
+ hai = hai_first(hal);
for (i = 0 ; i < hal->hal_count ; i++, hai = hai_next(hai))
sz += cfs_size_round(hai->hai_len);

diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index e418b58..eb3b44f 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1957,7 +1957,7 @@ static void lustre_swab_hal(struct hsm_action_list *h)
__swab32s(&h->hal_count);
__swab32s(&h->hal_archive_id);
__swab64s(&h->hal_flags);
- hai = hai_zero(h);
+ hai = hai_first(h);
for (i = 0; i < h->hal_count; i++, hai = hai_next(hai))
lustre_swab_hai(hai);
}
--
1.7.9.5


\
 
 \ /
  Last update: 2013-11-14 19:41    [W:0.639 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site