[lustre-devel] [PATCH 063/151] lustre: lov: pack lsm_flags from layout
James Simmons
jsimmons at infradead.org
Mon Sep 30 11:55:22 PDT 2019
From: Jinshan Xiong <jinshan.xiong at gmail.com>
Pack lsm_flags from compount layout.
WC-bug-id: https://jira.whamcloud.com/browse/LU-9771
Lustre-commit: 9b74a75ecbdc ("LU-9771 lov: pack lsm_flags from layout")
Signed-off-by: Jinshan Xiong <jinshan.xiong at gmail.com>
Reviewed-on: https://review.whamcloud.com/29081
Reviewed-by: Bobi Jam <bobijam at hotmail.com>
Reviewed-by: Lai Siyao <lai.siyao at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
fs/lustre/lov/lov_ea.c | 1 +
fs/lustre/lov/lov_internal.h | 3 ++-
fs/lustre/lov/lov_pack.c | 1 +
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/lustre/lov/lov_ea.c b/fs/lustre/lov/lov_ea.c
index e1630f6..8ecf3eb 100644
--- a/fs/lustre/lov/lov_ea.c
+++ b/fs/lustre/lov/lov_ea.c
@@ -446,6 +446,7 @@ static int lsm_verify_comp_md_v1(struct lov_comp_md_v1 *lcm,
lsm->lsm_magic = le32_to_cpu(lcm->lcm_magic);
lsm->lsm_layout_gen = le32_to_cpu(lcm->lcm_layout_gen);
lsm->lsm_entry_count = entry_count;
+ lsm->lsm_flags = le16_to_cpu(lcm->lcm_flags);
lsm->lsm_is_released = true;
lsm->lsm_maxbytes = LLONG_MIN;
diff --git a/fs/lustre/lov/lov_internal.h b/fs/lustre/lov/lov_internal.h
index e18ea8e..18fe92f 100644
--- a/fs/lustre/lov/lov_internal.h
+++ b/fs/lustre/lov/lov_internal.h
@@ -86,8 +86,9 @@ struct lov_stripe_md {
struct ost_id lsm_oi;
u32 lsm_magic;
u32 lsm_layout_gen;
- u32 lsm_entry_count;
+ u16 lsm_flags;
bool lsm_is_released;
+ u32 lsm_entry_count;
struct lov_stripe_md_entry *lsm_entries[];
};
diff --git a/fs/lustre/lov/lov_pack.c b/fs/lustre/lov/lov_pack.c
index 269e61c..c8b55eb 100644
--- a/fs/lustre/lov/lov_pack.c
+++ b/fs/lustre/lov/lov_pack.c
@@ -185,6 +185,7 @@ ssize_t lov_lsm_pack(const struct lov_stripe_md *lsm, void *buf,
lcmv1->lcm_magic = cpu_to_le32(lsm->lsm_magic);
lcmv1->lcm_size = cpu_to_le32(lmm_size);
lcmv1->lcm_layout_gen = cpu_to_le32(lsm->lsm_layout_gen);
+ lcmv1->lcm_flags = cpu_to_le16(lsm->lsm_flags);
lcmv1->lcm_entry_count = cpu_to_le16(lsm->lsm_entry_count);
offset = sizeof(*lcmv1) + sizeof(*lcme) * lsm->lsm_entry_count;
--
1.8.3.1
More information about the lustre-devel
mailing list