staging: lustre: llog: fix wrong offset in llog_process_thread()
authorMikhail Pershin <mike.pershin@intel.com>
Fri, 18 Nov 2016 16:49:52 +0000 (11:49 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Nov 2016 13:12:10 +0000 (14:12 +0100)
commitab16bdd8340ffe7d2be1bda3a586b8fd62faa313
tree66b745c77c81718c76a68b44e9821d8a3aba4221
parent8d78f0f2ba76a5a56de8800e19caeb8a3e161b75
staging: lustre: llog: fix wrong offset in llog_process_thread()

- llh_cat_idx may become bigger than llog bitmap size in
  llog_cat_set_first_idx() function
- it is wrong to use previous cur_offset as new buffer offset,
  new offset should be calculated from value returned by
  llog_next_block().
- optimize llog_skip_over() to find llog entry offset by index
  for llog with fixed-size records.

Signed-off-by: Mikhail Pershin <mike.pershin@intel.com>
Signed-off-by: Bob Glossman <bob.glossman@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6714
Reviewed-on: http://review.whamcloud.com/15316
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6163
Reviewed-on: http://review.whamcloud.com/18819
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/obdclass/llog.c