From: Mr NeilBrown Date: Mon, 9 Mar 2020 02:20:41 +0000 (+1100) Subject: LU-11591 llog: remove partial_chunk variable X-Git-Tag: 2.13.53~30 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F37830%2F3;p=fs%2Flustre-release.git 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 --- 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