]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxlog: pull struct xlog out of xlog_is_dirty()
authorBrian Foster <bfoster@redhat.com>
Tue, 13 Oct 2015 23:58:24 +0000 (10:58 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 13 Oct 2015 23:58:24 +0000 (10:58 +1100)
commit0ab627db659dd4061c8dd8d7d03d4641ceb9c979
tree71884aca2ba0f8cd15d30ec2fb1a211c997553ec
parent0337f27cb32328f97582d39ccc5adf9a3702349c
libxlog: pull struct xlog out of xlog_is_dirty()

The xlog_is_dirty() helper is called in various places to acquire the
current log head, tail and to determine whether the log is dirty. Some
callers will require additional information to deal with formatting the
log, such as the current LSN. xlog_is_dirty() already acquires this
information through existing sub-helpers, but it is not available to
callers as the xlog structure is allocated on the local stack.

Update xlog_is_dirty() to receive the xlog structure as a parameter and
pass it along such that additional information about the log is
available to callers. Update the existing callers to allocate the xlog
structure on the stack.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
db/metadump.c
db/sb.c
include/libxlog.h
libxlog/util.c