]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - include/libxlog.h
libxlog: add xlog_is_empty() helper
authorEric Sandeen <sandeen@sandeen.net>
Tue, 28 Jul 2015 23:04:35 +0000 (09:04 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 28 Jul 2015 23:04:35 +0000 (09:04 +1000)
commit7ac353a9b3ed56b85d20aee60638a8285248ad9c
treece418559c0d61f719cbb04d54623c928235df4cf
parent4d9d2e48ceb9d3577ba09379993b30abc4957e38
libxlog: add xlog_is_empty() helper

xfs_repair and xfs_db both check for a dirty log, using roughly
the same cut and pasted code.

Add a new helper to do this, xlog_is_dirty(), and use it instead.

Note, the helper (and the code before it) is a little odd in that
it (re-)initializes some libxfs_init_t members before proceeding,
I haven't yet worked out if that's necessary or correct, so I've
just kept the same behavior for now.  Still, it seems like this
should be done in libxfs_init, or not at all.

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