xfs_repair: improved secondary sb search
v5 cover xfs_repair: improved secondary sb search
Hello -
New iteration (v5) of this series...
Current xfs_repair uses a brute force approach to find a valid secondary sb. This series optimizes the secondary sb search, using similar method to determine geometry as that of xfs_mkfs. If the faster method fails in its search, fall back to original brute force slower search.
version history:
----
v1: http://oss.sgi.com/archives/xfs/2016-02/msg00304.html
v2: patch 2 whitespace fixups
v3: patch 2 correct functionality; style fixups
v4: patch 1,2 properly see to style and whitespace fixups
v5: patch 1 rebase to latest
----
patch 1 has some general infrastructure adjustments, moving general topology functions from mkfs to libxcmd.
patch 2 adds the new secondary superblock search method.
Questions, comments are welcome.
Thanks-
Bill
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
PATCH v5 1/2 libxcmd: generalize topology functions
Move general topology functions from xfs_mkfs to new topology collection in libxcmd.
--- include/Makefile | 1 + include/libxcmd.h | 56 +++++++++ libxcmd/Makefile | 2 +- libxcmd/topology.c | 342 +++++++++++++++++++++++++++++++++++++++++++++++++++++ mkfs/Makefile | 2 +- mkfs/xfs_mkfs.c | 327 +------------------------------------------------- 6 files changed, 402 insertions(+), 328 deletions(-) create mode 100644 include/libxcmd.h create mode 100644 libxcmd/topology.c
include/Makefile +1 -0
@@ -20,6 +20,7 @@ include $(TOPDIR)/include/builddefs LIBHFILES = libxfs.h \ libxlog.h \ + libxcmd.h \ atomic.h \ bitops.h \ cache.h \
include/libxcmd.h new file +56 -0
56 lines not on this page · raw message
libxcmd/Makefile +1 -1
@@ -10,7 +10,7 @@ LT_CURRENT = 0 LT_REVISION = 0 LT_AGE = 0 -CFILES = command.c input.c paths.c projects.c help.c quit.c +CFILES = command.c input.c paths.c projects.c help.c quit.c topology.c ifeq ($(HAVE_GETMNTENT),yes) LCFLAGS += -DHAVE_GETMNTENT
libxcmd/topology.c new file +342 -0
342 lines not on this page · raw message
mkfs/Makefile +1 -1
@@ -10,7 +10,7 @@ LTCOMMAND = mkfs.xfs HFILES = CFILES = maxtrres.c proto.c xfs_mkfs.c -LLDLIBS += $(LIBBLKID) $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) +LLDLIBS += $(LIBBLKID) $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) $(LIBXCMD) LTDEPENDENCIES += $(LIBXFS) LLDFLAGS = -static-libtool-libs
mkfs/xfs_mkfs.c +1 -326
345 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH v5 1/2] libxcmd: generalize topology functions
I still think libxfs would be the better place, but otherwise this looks fine in general.
libxcmd/topology.c line 24
Quoted 4 lines
libxcmd/topology.c new file +4
-0+#ifdef ENABLE_BLKID +# include <blkid/blkid.h> +#endif /* ENABLE_BLKID */ +#include "xfs_multidisk.h"
But what tree is this against? I can't find a xfs_multidisk.h in the master branch, nor in this patch?
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH v5 1/2] libxcmd: generalize topology functions
Quoted 10 lines · Christoph Hellwig
I still think libxfs would be the better place, but otherwise this looks fine in general.
libxcmd/topology.c line 24
Quoted 4 lines
libxcmd/topology.c new file +4
-0+#ifdef ENABLE_BLKID +# include <blkid/blkid.h> +#endif /* ENABLE_BLKID */ +#include "xfs_multidisk.h" But what tree is this against? I can't find a
xfs_multidisk.hin the master branch, nor in this patch?
xfs_multidisk.h came about a few days ago (4a32b9e928b80)git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH v5 1/2] libxcmd: generalize topology functions
Quoted 2 lines · Bill O'Donnell
xfs_multidisk.hcame about a few days ago (4a32b9e928b80)git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.git
Gah, looks like I'm stuck on the oss.sgi.com repo..
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH v5 1/2] libxcmd: generalize topology functions
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Bill O'Donnell
xfs_multidisk.hcame about a few days ago (4a32b9e928b80)git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.gitGah, looks like I'm stuck on the oss.sgi.com repo..
We really need to kill that.
-Eric
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH v5 1/2] libxcmd: generalize topology functions
Quoted 8 lines · Eric Sandeen
Quoted 5 lines · Christoph Hellwig
Quoted 2 lines · Bill O'Donnell
xfs_multidisk.hcame about a few days ago (4a32b9e928b80)git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev.gitGah, looks like I'm stuck on the oss.sgi.com repo..
We really need to kill that.
I only update xfsprogs on oss at releases. All dev happens on the kernel.org repo. Before we kill oss.sgi.com we have to sort out how to get release tarballs up on kernel.org. I'm pretty we can do that 'kup', but I haven't had time to work out the process needed to do that. This is really the only thing keeping us on oss.sgi.com.
I'm also not sure what to do with all the tarballs from previous releases that are on oss. I think I can regenerate all the recent releases (e.g. 3.2.0 onwards) without much trouble, but the older releases might be more of an issue. More investigation needed.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Re: [PATCH v5 1/2] libxcmd: generalize topology functions
In reply to Bill O'DonnellQuoted 4 lines · Bill O'Donnell
Move general topology functions from
xfs_mkfsto new topology collection in libxcmd.Signed-off-by Bill O'Donnell <[email protected]>
FYI, this patch breaks 'make deb'.
I don't expect anyone to know this - the debian/rules build script has a special hand-rolled mkfs build for the debian installer. This new libxcmd dependency also needs to be described in that script. I've fixed that up, but it's also pointed out a couple of other things to do with dependencies:
mkfs/Makefile LTCOMMAND = mkfs.xfs · line 15
Quoted 12 lines
mkfs/Makefile +1
-1@@ -10,7 +10,7 @@ LTCOMMAND = mkfs.xfs HFILES = CFILES = maxtrres.c proto.c xfs_mkfs.c -LLDLIBS += $(LIBBLKID) $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) +LLDLIBS += $(LIBBLKID) $(LIBXFS) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) $(LIBXCMD) LTDEPENDENCIES += $(LIBXFS) LLDFLAGS = -static-libtool-libs
mkfs.xfs also needs the build dependency on libxcmd to be expressed in LTDEPENDENCIES. It's just lucky that other targets have already expressed such "libxfs + libxcmd" dependencies as that ensured libxcmd was already built before mkfs tries to link against it. Blind luck strikes again!
Those top level build dependencies are expressed in the top level Makefile like so:
Makefile +1 -0
@@ -82,6 +82,7 @@ io: libxcmd libhandle quota: libxcmd repair: libxlog copy: libxlog +mkfs: libxcmd ifeq ($(HAVE_BUILDDEFS), yes) include $(BUILDRULES)
I've fixed these problems because I need to build .deb packages to deploy changes for testing.
Cheers,
Dave.
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
PATCH v5 2/2 xfs_repair: new secondary superblock search method
In reply to Bill O'DonnellOptimize secondary sb search, using similar method to find fs geometry as that of xfs_mkfs. If this faster method fails in finding a secondary sb, fall back to original brute force slower search.
--- Makefile | 2 +- repair/Makefile | 4 ++-- repair/sb.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 70 insertions(+), 8 deletions(-)
Makefile +1 -1
@@ -80,7 +80,7 @@ fsr: libhandle growfs: libxcmd io: libxcmd libhandle quota: libxcmd -repair: libxlog +repair: libxlog libxcmd copy: libxlog ifeq ($(HAVE_BUILDDEFS), yes)
repair/Makefile +2 -2
@@ -20,8 +20,8 @@ CFILES = agheader.c attr_repair.c avl.c avl64.c bmap.c btree.c \ progress.c prefetch.c rt.c sb.c scan.c threads.c \ versions.c xfs_repair.c -LLDLIBS = $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) -LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) +LLDLIBS = $(LIBBLKID) $(LIBXFS) $(LIBXLOG) $(LIBUUID) $(LIBRT) $(LIBPTHREAD) $(LIBXCMD) +LTDEPENDENCIES = $(LIBXFS) $(LIBXLOG) $(LIBXCMD) LLDFLAGS = -static-libtool-libs default: depend $(LTCOMMAND)
repair/sb.c +67 -5
97 lines not on this page · raw message
Signature · 6 lines
2.5.5 _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs
Ok, just a rebase, and all the code moves match current upstream, so for both patches:
Quoted 27 lines · Bill O'Donnell
Hello -
New iteration (v5) of this series...
Current
xfs_repairuses a brute force approach to find a valid secondary sb. This series optimizes the secondary sb search, using similar method to determine geometry as that ofxfs_mkfs. If the faster method fails in its search, fall back to original brute force slower search.version history:
----
v1: http://oss.sgi.com/archives/xfs/2016-02/msg00304.html
v2: patch 2 whitespace fixups
v3: patch 2 correct functionality; style fixups
v4: patch 1,2 properly see to style and whitespace fixups
v5: patch 1 rebase to latest
----patch 1 has some general infrastructure adjustments, moving general topology functions from mkfs to libxcmd.
patch 2 adds the new secondary superblock search method.
Questions, comments are welcome.
Quoted 8 lines
Thanks-
Bill_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs