From 0d672b7fae203071ec7017d9c71eaa7dc0578b07 Mon Sep 17 00:00:00 2001 From: Mr NeilBrown Date: Mon, 9 Mar 2020 13:20:41 +1100 Subject: [PATCH] LU-11591 llog: remove partial_chunk variable This variable is set but never used, so remove it. Test-Parameters: trivial Fixes: ec4194e4e78c ("LU-11591 llog: add synchronization for the last record") Signed-off-by: Mr NeilBrown Change-Id: I59ec75ba66a3ca37990d3ffec1d1b8f80350ae52 Reviewed-on: https://review.whamcloud.com/37830 Tested-by: Maloo Reviewed-by: Andreas Dilger Tested-by: Andreas Dilger Reviewed-by: Alexander Boyko Reviewed-by: James Simmons --- lustre/obdclass/llog.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c index c9f9616..75224fd 100644 --- a/lustre/obdclass/llog.c +++ b/lustre/obdclass/llog.c @@ -499,7 +499,6 @@ static int llog_process_thread(void *arg) struct llog_rec_hdr *rec; off_t chunk_offset = 0; unsigned int buf_offset = 0; - bool partial_chunk; int lh_last_idx; int synced_idx = 0; @@ -540,13 +539,10 @@ repeat: * The absolute offset of the current chunk is calculated * from cur_offset value and stored in chunk_offset variable. */ - if ((cur_offset & (chunk_size - 1)) != 0) { - partial_chunk = true; + if ((cur_offset & (chunk_size - 1)) != 0) chunk_offset = cur_offset & ~(chunk_size - 1); - } else { - partial_chunk = false; + else chunk_offset = cur_offset - chunk_size; - } /* NB: when rec->lrh_len is accessed it is already swabbed * since it is used at the "end" of the loop and the rec -- 1.8.3.1