summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorJC Lafoucriere2013-11-26 03:05:01 +0100
committerGreg Kroah-Hartman2013-11-26 04:28:04 +0100
commit18dfaebfa8c5752b34c87a5269bb24bc3a571e5a (patch)
tree7bb8a1d886c720443a933fa54300ce171871bb54 /drivers/staging
parentstaging/lustre/lu: shrink lu_object by 8 bytes on x86_64 (diff)
downloadkernel-qcow2-linux-18dfaebfa8c5752b34c87a5269bb24bc3a571e5a.tar.gz
kernel-qcow2-linux-18dfaebfa8c5752b34c87a5269bb24bc3a571e5a.tar.xz
kernel-qcow2-linux-18dfaebfa8c5752b34c87a5269bb24bc3a571e5a.zip
staging/lustre/mdt: HSM coordinator client interface
This patch implements the HSM coordinator methods used by client to add/remove/list HSM actions on FID. Lustre-change: http://review.whamcloud.com/6532 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3341 Signed-off-by: JC Lafoucriere <jacques-charles.lafoucriere@cea.fr> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/include/lustre/lustre_user.h7
-rw-r--r--drivers/staging/lustre/lustre/mdc/mdc_request.c4
2 files changed, 4 insertions, 7 deletions
diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
index 9fd1d3ba2a63..9436166c6ef2 100644
--- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
+++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h
@@ -1121,11 +1121,10 @@ static inline int hal_size(struct hsm_action_list *hal)
sz = sizeof(*hal) + cfs_size_round(strlen(hal->hal_fsname));
hai = hai_zero(hal);
- for (i = 0 ; i < hal->hal_count ; i++) {
+ for (i = 0; i < hal->hal_count; i++, hai = hai_next(hai))
sz += cfs_size_round(hai->hai_len);
- hai = hai_next(hai);
- }
- return(sz);
+
+ return sz;
}
/* Copytool progress reporting */
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c
index a09a5c3141aa..8373778c2e78 100644
--- a/drivers/staging/lustre/lustre/mdc/mdc_request.c
+++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c
@@ -1919,10 +1919,8 @@ static void lustre_swab_hal(struct hsm_action_list *h)
__swab32s(&h->hal_archive_id);
__swab64s(&h->hal_flags);
hai = hai_zero(h);
- for (i = 0; i < h->hal_count; i++) {
+ for (i = 0; i < h->hal_count; i++, hai = hai_next(hai))
lustre_swab_hai(hai);
- hai = hai_next(hai);
- }
}
static void lustre_swab_kuch(struct kuc_hdr *l)