]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/log
thirdparty/xfsprogs-dev.git
14 years agoMerge branch 'master' of git://oss.sgi.com/xfs/cmds/xfsprogs
hch@lst.de [Fri, 27 Nov 2009 14:56:42 +0000 (15:56 +0100)] 
Merge branch 'master' of git://oss.sgi.com/xfs/cmds/xfsprogs

14 years agoMerge branch 'repair-speedup-20091112'
hch@lst.de [Fri, 27 Nov 2009 14:46:32 +0000 (15:46 +0100)] 
Merge branch 'repair-speedup-20091112'

14 years agoRevert "Merge branch 'xfsprogs-dev'"
Alex Elder [Thu, 26 Nov 2009 00:03:49 +0000 (18:03 -0600)] 
Revert "Merge branch 'xfsprogs-dev'"

This reverts commit 15a60a5e1ac0502d351ceda9888cc523e272ffc9, reversing
changes made to d24f8e6d2d46781bc76e6686f5a38f965ef057c1.

This completes the reverts of changes published to oss.sgi.com on
October 23, 2009.

The state of the tree should now match this commit:
    d24f8e6d2d46781bc76e6686f5a38f965ef057c1 (on 2009-09-10)

Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoRevert "3.0.5 release" and some of its preceding commits.
Alex Elder [Wed, 25 Nov 2009 23:44:40 +0000 (17:44 -0600)] 
Revert "3.0.5 release" and some of its preceding commits.

This reverts 11 commits that followed merge 15a60a5...:
    b0567f1 3.0.5 release
    24d9757 add lpath_to_handle to libhandle
    bad0fe5 repair: add missing locking in scanfunc_bmap
    2098754 repair: optimize duplicate extent tracking
    241ea1c repair: switch block usage bitmap to a btree
    af20fe6 repair: cleanup alloc/free/reset of the block...
    add8f66 repair: cleanup helpers for tracking block usage
    da9398d repair: track logical to physical block mapping...
    d081a36 repair: clean up prefetch tracing
    d93f8b2 repair: use single prefetch queue
    eb26465 repair: use a btree instead of a radix tree for...

Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoadd german translation
Chris Leick [Fri, 20 Nov 2009 10:08:07 +0000 (11:08 +0100)] 
add german translation

[hch: submitted via Debian bug #557100, minimal fixes to survive my
 msgfmt version]

Signed-off-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsprogs: stop using off64_t in platform headers
Christoph Hellwig [Fri, 20 Nov 2009 09:55:15 +0000 (10:55 +0100)] 
xfsprogs: stop using off64_t in platform headers

Using off64_t may require special headers or compiler flags that aren't
always available, e.g. in the configure check in xfstests.  Rever to a plain
uint64_t to make apps compile as before.

While we're at it also rename the second argument of platform_discard_blocks
from end to len as that's what the BLKDISCARD ioctl excepts - we currently
always discard the whole device so it doesn't matter in practice.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agolibdisk: do not install libdisk.a
Christoph Hellwig [Thu, 19 Nov 2009 22:50:18 +0000 (23:50 +0100)] 
libdisk: do not install libdisk.a

Since xfsprogs 3.0 libdisk is intended to be private to xfsprogs and we do
not install the headers anymore.  But we kept installing the static library,
which doesn't make sense.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agolibhandle: add symbol versioning
Christoph Hellwig [Thu, 19 Nov 2009 22:49:59 +0000 (23:49 +0100)] 
libhandle: add symbol versioning

Add symbol versioning for libhandle.  For now version 1.0.3 contains all
pre-existing symbols, any new additions both needs a minor version bump
and an entry in libhandle.sym.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agorepair: add missing locking in scanfunc_bmap repair-speedup-20091112
Barry Naujok [Thu, 12 Nov 2009 10:28:37 +0000 (11:28 +0100)] 
repair: add missing locking in scanfunc_bmap

Make sure to protect access to the block usage tracking btree with
the ag_lock.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: optimize duplicate extent tracking
Barry Naujok [Thu, 12 Nov 2009 10:28:34 +0000 (11:28 +0100)] 
repair: optimize duplicate extent tracking

Switch the duplicate extent tracking from an avl tree to our new btree
implementation.  Modify search_dup_extent to find overlapping extents
with differening start blocks instead of having the caller walk every
possible start block.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: switch block usage bitmap to a btree
Barry Naujok [Thu, 12 Nov 2009 10:28:31 +0000 (11:28 +0100)] 
repair: switch block usage bitmap to a btree

Using a btree representing the extents is much more space efficient than
using a bitmap tracking every single block.  In addition it also allows
for more optimal algorithms checking range overlaps instead of walking
every block in various places.

Also move the RT tracking bitmap into incore.c instead of leaving it
a as macros - this keeps the implementation contained.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: cleanup alloc/free/reset of the block usage tracking
Barry Naujok [Thu, 12 Nov 2009 10:28:25 +0000 (11:28 +0100)] 
repair: cleanup alloc/free/reset of the block usage tracking

Currently the code to allocate, free and reset the block usage bitmaps
is a complete mess.  This patch reorganizes it into logical helpers.

Details:

 - the current incore_init code is called just before phase2 is called,
   which then marks the log and the AG headers used.
 - we get rid of incore_init init, and replace it with direct calls to the
   unchanched incore_ino_init/incore_ext_init functions and our new init_bmaps
   which does all the allocations for the block usage tracking, aswell
   as a call to reset_bmaps to initialize it to the default values.
 - reset_bmaps is also called from early phase4 code to reset all state
   instead of opencoding it.
 - there is a new free_bmaps helper which we call to free our block usage
   bitmaps when we don't need them anymore after phase5.  The current
   code frees some of it a bit early in phase5, but needs to take of it
   in phase6 in case we didn't call phase5 due to nomodify mode, and leaks
   it if we don't call phase 6, which might happen in case of a bad inode
   allocation btree.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: cleanup helpers for tracking block usage
Barry Naujok [Thu, 12 Nov 2009 10:27:33 +0000 (11:27 +0100)] 
repair: cleanup helpers for tracking block usage

Rename get_agbno_state/set_agbno_state to get_bmap/set_bmap because
those names are more self-descriptive.  Remove the superblous mount
argument to the as the current filesystem is a global in repair.
Remove the fsbno taking variant as they just complicated the code.
Bring all uses of them into the canonical form.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: track logical to physical block mapping more effeciently
Barry Naujok [Thu, 12 Nov 2009 10:27:28 +0000 (11:27 +0100)] 
repair: track logical to physical block mapping more effeciently

Currently we track the logical to physical block mapping by a structure which
contains an array of physicial blocks.  This is extremly inefficient and is
replaced with the normal startblock, length extent descriptors.

In addition also use thread-local storage for the block map, this is possible
because repair only processes one inode at a given time per thread, and the
block map does not have to outlive the processing of a single inode.

The combination of those factors means we can use pthread thread-local
storage to store the block map, and we can re-use the allocation over
and over again.

This should be ported over to xfs_db eventually, or even better we could try
to share the code.

[hch: added a small fix in blkmap_set_ext to not call memmove unless needed]

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: clean up prefetch tracing
Barry Naujok [Thu, 12 Nov 2009 10:27:23 +0000 (11:27 +0100)] 
repair: clean up prefetch tracing

Define a dummy pftrace macro for the non-tracing case to reduce the ifdef hell,
clean up a few trace calls and add proper init/exit handlers for the tracing
setup and teardown.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: use single prefetch queue
Barry Naujok [Thu, 12 Nov 2009 10:27:17 +0000 (11:27 +0100)] 
repair: use single prefetch queue

We don't need two prefetch queues as we guarantee execution in order anyway.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agorepair: use a btree instead of a radix tree for the prefetch queue
Barry Naujok [Thu, 12 Nov 2009 10:27:11 +0000 (11:27 +0100)] 
repair: use a btree instead of a radix tree for the prefetch queue

Currently the prefetch queue in xfs_repair uses a radix tree implementation
derived from the Linux kernel one to manage it's prefetch queue.

The radix tree implement is not very memory efficient for sparse indices,
so replace it with a btree implementation that is much more efficient.
This is not that important for the prefetch queue but will be very important
for the next memory optimization patches which need a tree to store things
like the block map which are very sparse, and we do not want to deal with
two tree implementations (or rather three given that we still have avl.c
around)

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
14 years agosimplify and unify source package generation
Christoph Hellwig [Fri, 30 Oct 2009 07:04:20 +0000 (08:04 +0100)] 
simplify and unify source package generation

Currently the build/ directory can create rpm, debian and source / binary
tar packages.  The RPM generation is not used as all distributions prefer
their own spec files, and the binary tarball not used at all as it's
a not very useful format.  Reimplement the generation of the source
tarballs to use the source-link method used for the debian packages and
get rid of the whole old package generation machinery.  Also fix a small
bug in the link-based source directory creation which was not including
the .pot file for gettext.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Nathan Scott <nathans@debian.org>
14 years ago3.0.5 release v3.0.5
Alex Elder [Fri, 23 Oct 2009 20:04:52 +0000 (15:04 -0500)] 
3.0.5 release

New version number advises of availability of lpath_to_handle(),
as well as significant performance-related changes to xfs_repair.

Updated doc/CHANGES to reflect recent updates.

Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoadd lpath_to_handle to libhandle
Bill Kendall [Thu, 22 Oct 2009 16:52:23 +0000 (16:52 +0000)] 
add lpath_to_handle to libhandle

path_to_handle() is not reliable when called on a path which
is a symlink. If the symlink is dangling, or if its points
to a non-XFS filesystem then path_to_handle() will fail. The
reason is that path_to_handle() must open the path in order
to obtain an fd for the xfsctl call.

It's common during xfsrestore to have dangling symlinks since
the target of the link may not be restored before the symlink.

This patch adds a new function to libhandle, lpath_to_handle.
It is just like path_to_handle, except it takes a filesystem
path in addition to the path which you want convert to a
handle.

Alex Elder is going to take care of bumping the libhandle
minor number, and adjusting the xfsdump/xfsprogs version numbers
and dependencies to ensure a compatible libhandle is installed
for xfsdump.

Signed-off-by: Bill Kendall <wkendall@sgi.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: add missing locking in scanfunc_bmap
Christoph Hellwig [Wed, 2 Sep 2009 17:55:45 +0000 (17:55 +0000)] 
repair: add missing locking in scanfunc_bmap

Make sure to protect access to the block usage tracking btree with
the ag_lock.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: optimize duplicate extent tracking
Christoph Hellwig [Wed, 2 Sep 2009 17:55:44 +0000 (17:55 +0000)] 
repair: optimize duplicate extent tracking

Switch the duplicate extent tracking from an avl tree to our new btree
implementation.  Modify search_dup_extent to find overlapping extents
with differening start blocks instead of having the caller walk every
possible start block.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: switch block usage bitmap to a btree
Christoph Hellwig [Wed, 2 Sep 2009 17:55:43 +0000 (17:55 +0000)] 
repair: switch block usage bitmap to a btree

Using a btree representing the extents is much more space efficient than
using a bitmap tracking every single block.  In addition it also allows
for more optimal algorithms checking range overlaps instead of walking
every block in various places.

Also move the RT tracking bitmap into incore.c instead of leaving it
a as macros - this keeps the implementation contained.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: cleanup alloc/free/reset of the block usage tracking
Christoph Hellwig [Wed, 2 Sep 2009 17:55:42 +0000 (17:55 +0000)] 
repair: cleanup alloc/free/reset of the block usage tracking

Currently the code to allocate, free and reset the block usage bitmaps
is a complete mess.  This patch reorganizes it into logical helpers.

Details:

 - the current incore_init code is called just before phase2 is called,
   which then marks the log and the AG headers used.
 - we get rid of incore_init init, and replace it with direct calls to the
   unchanched incore_ino_init/incore_ext_init functions and our new init_bmaps
   which does all the allocations for the block usage tracking, aswell
   as a call to reset_bmaps to initialize it to the default values.
 - reset_bmaps is also called from early phase4 code to reset all state
   instead of opencoding it.
 - there is a new free_bmaps helper which we call to free our block usage
   bitmaps when we don't need them anymore after phase5.  The current
   code frees some of it a bit early in phase5, but needs to take of it
   in phase6 in case we didn't call phase5 due to nomodify mode, and leaks
   it if we don't call phase 6, which might happen in case of a bad inode
   allocation btree.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: cleanup helpers for tracking block usage
Christoph Hellwig [Wed, 2 Sep 2009 17:55:41 +0000 (17:55 +0000)] 
repair: cleanup helpers for tracking block usage

Rename get_agbno_state/set_agbno_state to get_bmap/set_bmap because
those names are more self-descriptive.  Remove the superblous mount
argument to the as the current filesystem is a global in repair.
Remove the fsbno taking variant as they just complicated the code.
Bring all uses of them into the canonical form.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: track logical to physical block mapping more effeciently
Christoph Hellwig [Wed, 2 Sep 2009 17:55:40 +0000 (17:55 +0000)] 
repair: track logical to physical block mapping more effeciently

Currently we track the logical to physical block mapping by a structure which
contains an array of physicial blocks.  This is extremly efficient and is
replaced with the normal starblock storage we use in the kernel and on disk
in this patch.

In addition also use thread-local storage for the block map, this is possible
because repair only processes one inode at a given time per thread, and the
block map does not have to outlive the processing of a single inode.

The combination of those factors means we can use pthread thread-local
storage to store the block map, and we can re-use the allocation over
and over again.

This should be ported over to xfs_db eventually, or even better we could try
to share the code.

[hch: added a small fix in blkmap_set_ext to not call memmove unless needed]

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: clean up prefetch tracing
Christoph Hellwig [Wed, 2 Sep 2009 17:55:39 +0000 (17:55 +0000)] 
repair: clean up prefetch tracing

Define a dummy pftrace macro for the non-tracing case to reduce the ifdef hell,
clean up a few trace calls and add proper init/exit handlers for the tracing
setup and teardown.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: use single prefetch queue
Christoph Hellwig [Wed, 2 Sep 2009 17:55:38 +0000 (17:55 +0000)] 
repair: use single prefetch queue

We don't need two prefetch queues as we guarantee execution in order anyway.

XXX: description could use some more details.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agorepair: use a btree instead of a radix tree for the prefetch queue
Christoph Hellwig [Wed, 2 Sep 2009 17:55:37 +0000 (17:55 +0000)] 
repair: use a btree instead of a radix tree for the prefetch queue

Currently the prefetch queue in xfs_repair uses a radix tree implementation
derived from the Linux kernel one to manage it's prefetch queue.

The radix tree implement is not very memory efficient for sparse indices,
so replace it with a btree implementation that is much more efficient.
This is not that important for the prefetch queue but will be very important
for the next memory optimization patches which need a tree to store things
like the block map which are very sparse, and we do not want to deal with
two tree implementations (or rather three given that we still have avl.c
around)

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoMerge branch 'xfsprogs-dev'
Alex Elder [Fri, 23 Oct 2009 16:32:31 +0000 (11:32 -0500)] 
Merge branch 'xfsprogs-dev'

14 years agorepair: reduce byte swapping in scan_freelist
Barry Naujok [Tue, 13 Oct 2009 22:29:32 +0000 (00:29 +0200)] 
repair: reduce byte swapping in scan_freelist

Store the ag number in a local native endian variable to avoid byteswapping
it over and over again.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agorepair: split up scanfunc_ino
Barry Naujok [Tue, 13 Oct 2009 22:29:29 +0000 (00:29 +0200)] 
repair: split up scanfunc_ino

Split out a helper to scan a single inode chunk for suspect inodes from
scanfunc_ino to make it more readable.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agorepair: kill B_IS_META flag
Christoph Hellwig [Tue, 13 Oct 2009 22:29:26 +0000 (00:29 +0200)] 
repair: kill B_IS_META flag

B_IS_META is the inverse flag of B_IS_INODE which is not really obvious
from it's use.  So just use !B_IS_INODE to make it more clear.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agorepair: reduce byte swap operations in scanfunc_allocbt
Barry Naujok [Tue, 13 Oct 2009 22:29:23 +0000 (00:29 +0200)] 
repair: reduce byte swap operations in scanfunc_allocbt

Store native endian version of the extent startblock and length in
local variables instead of converting them over and over again.

Signed-off-by: Barry Naujok <bnaujok@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agorepair: merge scanfunc_bno and scanfunc_cnt
Christoph Hellwig [Tue, 13 Oct 2009 22:29:03 +0000 (00:29 +0200)] 
repair: merge scanfunc_bno and scanfunc_cnt

Those two functions are almost identical.  The big difference is that we only
move blocks from XR_E_FREE1 to XR_E_FREE state when processing the cnt btree.

Besides that we print bno vs cnt in the messages and obviously validate a
slightly different magic number in the header.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agomkfs: add discard support
Christoph Hellwig [Tue, 13 Oct 2009 22:28:52 +0000 (00:28 +0200)] 
mkfs: add discard support

Call the BLKDISCARD ioctl to mark the whole disk as unused before creating
a new filesystem.  This will allow SSDs, Arrays with thin provisioning support
and virtual machines to make smarter allocation decisions.

Add a new -K option to prevent mkfs from discarding blocks to aid
trouble-shooting or specialized requirements.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Andi Kleen <andi@firstfloor.org>
14 years agoallow linking against libblkid instead of libdisk
Christoph Hellwig [Sat, 10 Oct 2009 21:05:32 +0000 (17:05 -0400)] 
allow linking against libblkid instead of libdisk

Add a new --enable-blkid switch to use libblkid from util-linux to detect
the device geometry and check for existing partitions or filesystem on a
device.  Note that this requires the latest blkid from util-linux-ng git
for the topology calls, odler ones won't work.  If I had a little more
autoconf fu we might be able to detect a too early one, but right now it
just fails if it's too old and --enable-blkid is specified.  We also
stop building libdisk in the blkid case as it's an internal static library
not otherwise used.

For the actual checks I tried to stay as close as possible to the old
code, so we still don't check topology for external log devices.  I hope
to add this at a later stage.

As a small addition we also print a warning if trying to create a filesystem
on a partition that is not properly aligned.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoupdate configure defaults
Christoph Hellwig [Sat, 10 Oct 2009 21:02:53 +0000 (17:02 -0400)] 
update configure defaults

Currenly xfsprogs has two different sets of defauls for it's installation
layout.  One is in set in the configure.in file and used when running
./configure directly, and the second one is passed by make to ./configure
when configuring through make.

The defaults in the makefile are a lot better, as they install xfsprogs
into the / vs /usr split used by most distributions and enable multi-libs
when detected.

This patch changes the build system to also use the same defaults when
running ./configure.  To do this we get rid of some of the hacky
autoconf abuse we had in the past in xfsprogs and just use the normal
default sbindir and libdir variables for /usr/sbin an /usr/lib respecticly
and define new root_sbindir and root_libdir variables for those few
binaries installed into /.  The installation to / is disabled if the
user chooses a non-default exec prefix.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfsprogs: add missing CHANGES entry
Christoph Hellwig [Wed, 7 Oct 2009 22:14:04 +0000 (18:14 -0400)] 
xfsprogs: add missing CHANGES entry

The 3.0.4 release for debian actually had a few more changes than documented.
Add the missing entries so that they appear in the right spot for future
releases.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agobuild: makefile and package tweaks for in-tree deb builds. v3.0.4
Nathan Scott [Wed, 30 Sep 2009 19:44:52 +0000 (05:44 +1000)] 
build: makefile and package tweaks for in-tree deb builds.

Also bumped the build version number, tagged, and uploaded
3.0.4 to the Debian archives.

Signed-off-by: Nathan Scott <nathans@debian.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfs_repair: replace custom block allocation lists with list_heads
Josef 'Jeff' Sipek [Fri, 25 Sep 2009 19:26:23 +0000 (14:26 -0500)] 
xfs_repair: replace custom block allocation lists with list_heads

The previous implementation of the linked lists was buggy,
and leaked memory.

Cc: sandeen@sandeen.net
Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfs_fsr: fix test for short write
Eric Sandeen [Tue, 22 Sep 2009 15:22:57 +0000 (10:22 -0500)] 
xfs_fsr: fix test for short write

Clang found this one too, as a dead nested assignment.

The point is to see if we write all the bytes; but the initial
assignment is backwards.  It's safe in the end, because if they
weren't already equal anyway, we'd have exited prior to this, but
it's worth fixing up for clarity.

Signed-of-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agolibxfs: increase hash chain depth when we run out of slots
Eric Sandeen [Thu, 17 Sep 2009 19:04:44 +0000 (14:04 -0500)] 
libxfs: increase hash chain depth when we run out of slots

A couple people reported xfs_repair hangs after
"Traversing filesystem ..." in xfs_repair.  This happens
when all slots in the cache are full and referenced, and the
loop in cache_node_get() which tries to shake unused entries
fails to find any - it just keeps upping the priority and goes
forever.

This can be worked around by restarting xfs_repair with
-P and/or "-o bhash=<largersize>" for older xfs_repair.

I started down the path of increasing the number of hash buckets
on the fly, but Barry suggested simply increasing the max allowed
depth which is much simpler (thanks!)

Resizing the hash lengths does mean that cache_report ends up with
most things in the "greater-than" category:

...
Hash buckets with  23 entries      3 (  3%)
Hash buckets with  24 entries      3 (  3%)
Hash buckets with >24 entries     50 ( 85%)

but I think I'll save that fix for another patch unless there's
real concern right now.

I tested this on the metadump image provided by Tomek.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reported-by: Tomek Kruszona <bloodyscarion@gmail.com>
Reported-by: Riku Paananen <riku.paananen@helsinki.fi>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agolibdisk: use major/minor when calling dmsetup
Eric Sandeen [Tue, 15 Sep 2009 14:47:24 +0000 (09:47 -0500)] 
libdisk: use major/minor when calling dmsetup

In RH bugzilla,
[Bug 471102] Error message seen during mkfs.xfs on multipath device
(unfortunately marked private) reports problems when making xfs
fileystems on multipath devices:

# mkfs -t xfs -f /dev/mpath/oramp4
dm_task_set_name: Device /dev/dm-12 not found
Command failed
dm_task_set_name: Device /dev/dm-12 not found
Command failed
meta-data=/dev/mpath/oramp4      isize=256    agcount=4, agsize=2359680 blks
...

This is because dmsetup takes a "name" which is sometimes, but not
always (I think) the same as the device name.

dmsetup also can take major/minor as arguments, so this may be
simpler at this point.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfsprogs: fix the -V option for various shell scripts
Christoph Hellwig [Thu, 10 Sep 2009 22:25:34 +0000 (17:25 -0500)] 
xfsprogs: fix the -V option for various shell scripts

For most of the shellscripts wrapping xfs_db or xfs_growfs the -V option
is not implemented correctly.  If we just add -V to the options for the
underlying binaries we will never actually call it because the mandatory
device / mount point argument is missing.  Instead just call the underlying
command with -V directly and exit early.  This is what xfs_bmap.sh,
xfs_mkfile and xfs_metadump.sh are already doing.

Reported-by: Michael Monnerie <michael.monnerie@is.it-management.at>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoxfsprogs: fix up the noreturn annotations
Christoph Hellwig [Thu, 10 Sep 2009 21:20:29 +0000 (16:20 -0500)] 
xfsprogs: fix up the noreturn annotations

The usage function in mkfs needs a noreturn annotation too, otherwise
gcc will complain, similarly the do_msg function in repair would need
it if do_abort is set, but because conditional annotations aren't
possible just clean this area up and inline the do_msg function into
it's callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoxfsprogs: mark some functions as noreturn
Eric Sandeen [Thu, 10 Sep 2009 21:17:56 +0000 (16:17 -0500)] 
xfsprogs: mark some functions as noreturn

Static checkers are a lot less noisy if they know certain
functions are noreturn.

Making this change removed about 50 errors from "clang" output.
(http://clang-analyzer.llvm.org) output.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
14 years agoxfsprogs: remove unused scripts
Christoph Hellwig [Wed, 9 Sep 2009 17:25:13 +0000 (14:25 -0300)] 
xfsprogs: remove unused scripts

xfs_check64.sh and xfs_ncheck64.sh are outdated copies of xfs_check.sh
and xfs_ncheck.sh which call a non-existant xfs_db64 binary.  They
are never installed or otherwise used, so remove them.   They are
probably a leftover from IRIX

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfsprogs: fix the -V option for most shell scripts
Christoph Hellwig [Wed, 9 Sep 2009 17:24:38 +0000 (14:24 -0300)] 
xfsprogs: fix the -V option for most shell scripts

For most of the shellscripts wrapping xfs_db or xfs_growfs the -V option
is not implemented correctly.  If we just add -V to the options for the
underlying binaries we will never actually call it because the mandatory
device / mount point argument is missing.  Instead just call the underlying
command with -V directly and exit early.  This is what xfs_bmap.sh,
xfs_mkfile and xfs_metadump.sh are already doing.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Michael Monnerie <michael.monnerie@is.it-management.at>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfsprogs: fix up the noreturn annotations
Christoph Hellwig [Wed, 9 Sep 2009 17:23:58 +0000 (14:23 -0300)] 
xfsprogs: fix up the noreturn annotations

The usage function in mkfs needs a noreturn annotation too, otherwise
gcc will complain, similarly the do_msg function in repair would need
it if do_abort is set, but because conditional annotations aren't
possible just clean this area up an inline the do_msg function into
it's callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
14 years agoxfsprogs: mark some functions as noreturn
Eric Sandeen [Sun, 6 Sep 2009 18:23:23 +0000 (13:23 -0500)] 
xfsprogs: mark some functions as noreturn

Static checkers are a lot less noisy if they know certain
functions are noreturn.

Making this change removed about 50 errors from "clang"
(http://clang-analyzer.llvm.org) output.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years ago3.0.3 release v3.0.3
Felix Blyakher [Sun, 30 Aug 2009 16:33:14 +0000 (11:33 -0500)] 
3.0.3 release

14 years agoupdate CHANGES
Christoph Hellwig [Fri, 28 Aug 2009 22:54:02 +0000 (19:54 -0300)] 
update CHANGES

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
14 years agoxfsprogs: fix unaligned access in libxfs
Christoph Hellwig [Fri, 28 Aug 2009 18:18:06 +0000 (15:18 -0300)] 
xfsprogs: fix unaligned access in libxfs

The get/put unaligned handlers we use to access the extent descriptor
are not good enough for architectures like Sparc that do not tolerate
dereferencing unaligned pointers.  Replace the implementation with the
one the kernel uses on these architectures.  It might be a tad
slower on architectures like x86, but I don't want to have multiple
implementations around to not let the testing matrix explode.
Also remove the unaligned.h header which includes another implementation
for unaligned access we don't actually use anymore.

Note that the little change to xfs_inode.c needs to go into the kernel
aswell, I will send a patch for that shortly.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reported-by: Gabriel Vlasiu <gabrielvlasiu@gmail.com>
Tested-by: Gabriel Vlasiu <gabrielvlasiu@gmail.com>
14 years agoxfs_io: actually issue 0 size writes
Eric Sandeen [Wed, 26 Aug 2009 23:38:59 +0000 (18:38 -0500)] 
xfs_io: actually issue 0 size writes

While testing some stuff in generic_write_checks() in the
kernel I realized that you can't actually use xfs_io to send
a 0-byte write in.  This is actually a condition worth testing:

       If  count  is zero and fd refers to a regular file,
       then write() may return a failure status if one  of
       the  errors  below  is  detected.  If no errors are
       detected, 0 will be returned  without  causing  any
       other  effect.

So fix that up.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
14 years agoxfs_db: do bounds checking in frag's scanfunc_bmap
Eric Sandeen [Fri, 31 Jul 2009 20:49:49 +0000 (15:49 -0500)] 
xfs_db: do bounds checking in frag's scanfunc_bmap

This is for http://oss.sgi.com/bugzilla/show_bug.cgi?id=842
Bug 842 -  xfs_db crashes on 'frag'

The nrecs in scanfunc_bmap was corrupted & out of bounds, causing
the loop in process_bmbt_reclist to walk well past allocated memory
and eventually segfault.

Add checking to this scanfunc_bmap() similar to that in similar
functions for check, metadump, and repair.

I'm not sure if we can/should print out any more information here...

# db/xfs_db -r -c frag xfs.img
invalid numrecs (46311) in bmapbtd block
actual 38085, ideal 37731, fragmentation factor 0.93%

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agothe freesp doesn't support "-f" so take it out of the usage().
Eric Sandeen [Thu, 30 Jul 2009 15:40:44 +0000 (10:40 -0500)] 
the freesp doesn't support "-f" so take it out of the usage().

The manpage is fine; usage() is the only reference to "-f"

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoxfs_repair: clear inodes in incorrect btree format
Eric Sandeen [Thu, 16 Jul 2009 22:00:29 +0000 (17:00 -0500)] 
xfs_repair: clear inodes in incorrect btree format

See also RH bug #510823:
https://bugzilla.redhat.com/show_bug.cgi?id=510823

This check in xfs_iformat_btree() tripped:

        /*
         * blow out if -- fork has less extents than can fit in
         * fork (fork shouldn't be a btree format), root btree
         * block has more records than can fit into the fork,
         * or the number of extents is greater than the number of
         * blocks.
         */

leading to:

Jul 10 23:22:45 hermes kernel: Filesystem "dm-11": corrupt inode 2339503222
(btree).  Unmount and run xfs_repair.
Jul 10 23:22:45 hermes kernel: Filesystem "dm-11": XFS internal error
xfs_iformat_btree at line 625 of file fs/xfs/xfs_inode.c.

but repair finds nothing at all.  xfs_check, however, does flag the inodes
as problematic:

extent count for ino 2339503222 data fork too low (6) for file format

So I copied the xfs_check test into xfs_repair, and voila, it clears
these inodes.

Ideally repair would move these back into extent format, as long as
they are all valid.  But I need to look further at that, and for now
there is no other way out of the situation when the kernel finds
the problematic inode, so I'll commit this as a first step.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Acked-By: Olaf Weber <olaf@sgi.com>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
14 years agoxfs_metadump: agcount*agblocks overflow
Eric Sandeen [Mon, 6 Jul 2009 19:53:35 +0000 (14:53 -0500)] 
xfs_metadump: agcount*agblocks overflow

Found another potential overflow in xfs_metadump,
similar to those just fixed in repair.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@infradead.org>
--

14 years agoxfs_repair: fix agcount*agblocks overflows
Eric Sandeen [Thu, 2 Jul 2009 05:29:36 +0000 (00:29 -0500)] 
xfs_repair: fix agcount*agblocks overflows

The last test in verify_ag_bno() may overflow:

return (agbno >= (sbp->sb_dblocks -
((sbp->sb_agcount - 1) * sbp->sb_agblocks)));

because sb_agcount & sb_agblocks are 32-bit integers; this
may then miss corrupt agbnos for the last ag, which can in
turn lead to out of bounds memory accesses later, for example
when the block nr is used to offset in set_agbno_state():

addr = ba_bmap[(agno)] + (ag_blockno)/XR_BB_NUM;

Similar problems in mk_incore_fstree

Reported-by: Jesse Stroik <jstroik@ssec.wisc.edu>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
14 years agoxfs_io: fix test for fallocate on 32bit boxes
Eric Sandeen [Mon, 15 Jun 2009 20:45:44 +0000 (15:45 -0500)] 
xfs_io: fix test for fallocate on 32bit boxes

As per Red Hat bug 500487, fallocate64 is missing in glibc,
so attempts to build with fallocate and _FILE_OFFSET_BITS=64
will fail.

So, change the config to test the way we will build.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Olaf Weber <olaf@sgi.com>
14 years agoxfs_repair: catch bad depth in traverse_int_dir2block
Eric Sandeen [Mon, 8 Jun 2009 21:39:32 +0000 (16:39 -0500)] 
xfs_repair: catch bad depth in traverse_int_dir2block

A bad on-disk tree depth in traverse_int_dir2block() can
later cause a segfault when it's used as an array index in
this function; if we get something beyond the max depth,
just error out and the dir will get rebuilt.

Reported-by: Richard Kolkovich <richard@intrameta.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
14 years agoadd -x flags to include/install-sh
Robert Herndon [Fri, 5 Jun 2009 19:11:35 +0000 (21:11 +0200)] 
add -x flags to include/install-sh

Signed-off-by: Robert Herndon <rherndon@sgi.com>
15 years agoUpdate CHANGES file for recent commits
Eric Sandeen [Mon, 18 May 2009 16:13:35 +0000 (11:13 -0500)] 
Update CHANGES file for recent commits

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
15 years agoxfs_io: add fallocate command
Eric Sandeen [Mon, 18 May 2009 16:11:44 +0000 (11:11 -0500)] 
xfs_io: add fallocate command

Based on Dave's earlier patch, but now we have an fallocate
glibc call... this also adds autoconf magic and a manpage
update.

(hopefully not too #ifdef-heavy....)

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agoxfsprogs: fix readline/editline for xfs_io and xfs_quota
Eric Sandeen [Mon, 18 May 2009 16:06:03 +0000 (11:06 -0500)] 
xfsprogs: fix readline/editline for xfs_io and xfs_quota

It looks like libxcmd wasn't ever being built with -DENABLE_READLINE
even when it was asked for by configure --enable-readline=yes
so xfs_io & xfs_quota didn't get the functionality.

This seems to fix it up for me (fixes editline too while we're
at it).

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agomkfs: allow to make larger logs
David Chinner [Sun, 10 May 2009 19:31:22 +0000 (21:31 +0200)] 
mkfs: allow to make larger logs

Increase the maximum log size supported by mkfs.

The log size can be increased easily in mkfs by changing a few
defines and a couple of types to allow the log size to increase to
just under 2GB. Theoretically, the log size can be made much, much
larger than this (up to 2^32 sectors), but going beyond 2^31
*bytes* causes integer overflow issues in the kernel log code.

We use a maximum size of just under 2GB as exactly 2GB will cause
overflow issues on the first transaction reservation.

Maximum log size is now reached at a fs size of ~4TB.

Signed-off-by: Dave Chinner <dgc@sgi.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years agoxfs_repair: open filesystem device exclusively
Nathaniel W. Turner [Sun, 10 May 2009 18:02:30 +0000 (20:02 +0200)] 
xfs_repair: open filesystem device exclusively

Currently two xfs_repair processes will happily operate on the same
filesystem device at the same time.  It is also possible to mount a
filesystem that is in the process of being repaired.

This patch modifies xfs_repair to open the filesystem devices with
O_EXCL unless it was invoked in "no modify" or "dangerous" mode.

The net effect is that a 2nd xfs_repair will now safely fail with
"xfs_repair: cannot open /dev/foo: Device or resource busy", and a mount
command will fail with (the slightly cryptic) "mount: /dev/foo already
mounted or /mountpoint busy".

Note that this has no effect if the filesystem is stored in a regular
file instead of on a block device.

(Error messages could probably be improved to be more user-friendly in
this new failure case, and it probably wouldn't hurt to add a BLKROGET
ioctl to check for read-only block devices with read-write permissions,
but this does the job for me.)

Signed-off-by: Nathaniel W. Turner <nate@houseofnate.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years agoMerge branch 'master' of git://oss.sgi.com/xfs/cmds/xfsprogs
Christoph Hellwig [Wed, 6 May 2009 19:30:58 +0000 (21:30 +0200)] 
Merge branch 'master' of git://oss.sgi.com/xfs/cmds/xfsprogs

Fix up CHANGES mismerge due to the 3.0.1 vs 3.0.2 schism.

Conflicts:
doc/CHANGES

15 years agoDebian packaging updates, and bumped minor version to 3.0.2. v3.0.2
Nathan Scott [Wed, 6 May 2009 02:58:41 +0000 (12:58 +1000)] 
Debian packaging updates, and bumped minor version to 3.0.2.

Signed-off-by: Nathan Scott <nathans@debian.org>
15 years agoResolve minor man page warnings reported by lintian tool.
Nathan Scott [Wed, 6 May 2009 02:57:08 +0000 (12:57 +1000)] 
Resolve minor man page warnings reported by lintian tool.

Signed-off-by: Nathan Scott <nathans@debian.org>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
15 years ago3.0.1 release
Felix Blyakher [Mon, 4 May 2009 21:54:27 +0000 (16:54 -0500)] 
3.0.1 release

15 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev
Felix Blyakher [Mon, 4 May 2009 20:56:10 +0000 (15:56 -0500)] 
Merge branch 'master' of git://git.kernel.org/pub/scm/fs/xfs/xfsprogs-dev

15 years agoadd release.sh
Christoph Hellwig [Sat, 2 May 2009 06:48:05 +0000 (08:48 +0200)] 
add release.sh

Add a little script to automate releases.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
15 years ago3.0.1 release v3.0.1
Felix Blyakher [Fri, 1 May 2009 21:47:58 +0000 (16:47 -0500)] 
3.0.1 release

15 years agokeep autoconf-generated files over make distclean
Christoph Hellwig [Wed, 29 Apr 2009 13:32:28 +0000 (15:32 +0200)] 
keep autoconf-generated files over make distclean

We do want to ship the autoconf-generated files over make distclean and
pick them up in Makepkgs so that a user compiling the program doesn't
require autoconf.

For that split up make distclean from make realclean and exclude the
files we want to keep form the former.

To make this easier to maintain adher to stricter rules of use for
CONFIGURE and LDIRT.  CONFIGURE now includes all generated files from
autoconf (or for it like our copied install-sh) and gets only removed
on make realclean, but added to LSRCFILES so that Makepkgs can pick it
up.  Everything else than needs to be removed on a realclean gets
assigned to LDIRT.

Also split up the configure rule into one to generate the configure
script and one to run it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mike Frysinger <vapier@gentoo.org>
15 years agoadd .gitignore file
Christoph Hellwig [Thu, 23 Apr 2009 17:24:28 +0000 (19:24 +0200)] 
add .gitignore file

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
15 years agofix libtool spelling
Christoph Hellwig [Thu, 23 Apr 2009 17:22:15 +0000 (19:22 +0200)] 
fix libtool spelling

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reported-by: Martin Steigerwald <Martin@lichtvoll.de>
15 years agoxfsprogs: bump version and updates CHANGES
Christoph Hellwig [Thu, 16 Apr 2009 19:13:21 +0000 (21:13 +0200)] 
xfsprogs: bump version and updates CHANGES

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
15 years agoxfsprogs: set default prefix to /usr
Christoph Hellwig [Thu, 16 Apr 2009 19:12:35 +0000 (21:12 +0200)] 
xfsprogs: set default prefix to /usr

Make sure the installation defaults to /usr like all the other xfs
tools.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
15 years agoautomake and libtool fixes
Andreas Gruenbacher [Tue, 24 Mar 2009 12:50:06 +0000 (13:50 +0100)] 
automake and libtool fixes

Remove aclocal.m4 from the repository and generate it when needed.
Move the AC_PROG_LIBTOOL autoconf macro and use libtoolize according to
the libtool info pages.

Make sure that libtoolize adds the auxiliary files (config.guess and config.sub).

Move install-sh into include/ so that libtoolize does not destroy it.

Split up the ``make clean'' and ``make distclean'' targets: the former
removes all files generated during a build.  The latter removes all
files generated by libtoolize, autoconf, and configure as well.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years agofix tarball names generated by Makepkgs
Christoph Hellwig [Mon, 23 Mar 2009 15:47:51 +0000 (16:47 +0100)] 
fix tarball names generated by Makepkgs

Currently Makepkgs generates the source tarball as xfsprogs-version.src.tar.gz,
which is not what we used for recent releases and not what most other open
source packages do.  Change it to xfsprogs-version.tar.gz, and rename the
binary tarball to xfsprogs-version.bin.tar.gz

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
15 years agoxfsprogs: add projects(5) and projid(5) manpages
Christoph Hellwig [Sat, 21 Mar 2009 19:33:27 +0000 (20:33 +0100)] 
xfsprogs: add projects(5) and projid(5) manpages

Document the /etc/projects and /etc/projid files in their own manpages
instead of in xfs_quota(8).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
15 years agoxfs_io: fix extent array reallocation
Tomasz Majkowski [Fri, 20 Mar 2009 16:01:58 +0000 (17:01 +0100)] 
xfs_io: fix extent array reallocation

The XFS_IOC_FSGETXATTRA ioctl only returns the number of allocated
extents, so when we reallocate the extent array in the bmap command
we have to account for the worst case where there is a whole between
each two allocated extents.  Also add some slack to that case to
allow for a file growing while we are racing with it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
15 years agoFix cross-compile issues with libtool and compiler.
Barry Naujok [Mon, 16 Mar 2009 06:47:00 +0000 (07:47 +0100)] 
Fix cross-compile issues with libtool and compiler.

This is equivalent to commit de7b3f6 from Barry Naujok <bnaujok@sgi.com>
in the acl package/

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Christoph Hellwig <hch@lst.de>
15 years agofix various typos
Malcolm Parsons [Tue, 3 Mar 2009 15:46:04 +0000 (16:46 +0100)] 
fix various typos

https://bugs.launchpad.net/ubuntu/+source/xfsprogs/+bug/65304
http://oss.sgi.com/bugzilla/show_bug.cgi?id=815

Signed-off-by: Malcolm Parsons <malcolm.parsons@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agofix parallel builds
Mike Frysinger [Tue, 24 Feb 2009 18:53:34 +0000 (19:53 +0100)] 
fix parallel builds

I noticed that xfsprogs-3.0.0 sometimes fails to build in parallel with an
error about fsr not being able to find libhandle.  Looking at the top level
Makefile shows the obvious missing depend (fsr: libhandle).  Playing around
a bit found a few more not so obvious missing depends on the include subdir
so I fixed that too.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
15 years agogenerate complete source tarball from Makepkgs
Christoph Hellwig [Tue, 24 Feb 2009 13:29:29 +0000 (14:29 +0100)] 
generate complete source tarball from Makepkgs

The source file lists in the Makefiles were missing a couple of files.
Because those missing files include the new headers that are only
installed on make install-qa that resulting tarball would not even be
buildable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
15 years agospecfile: remove Distribution tag
Jan Engelhardt [Sun, 15 Feb 2009 18:11:27 +0000 (19:11 +0100)] 
specfile: remove Distribution tag

There exist a number of rpm specfile tags that make it possible to
mislead users of the produced RPM package, because its presence
overrides anything that has been specified in ~/.rpmmacros (or the
configuration files of the build system used). Such is especially
annoying when Packager:/Vendor: is put in specfiles, because it is
then almost impossible to get the name/email of the person who
_really_ did the packaging (assuming s/he set it in their
.rpmmacros).

Such similarly applies to the Distribution: tag, which is why I
suggest its removal and let the build systems provide the proper
string instead.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agospecfile: use rpm macros where possible
Jan Engelhardt [Sun, 15 Feb 2009 18:10:31 +0000 (19:10 +0100)] 
specfile: use rpm macros where possible

This way less places need to be changes (when a developer decides
to change it..) after the placeholders have been substituted.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agoallow xfs_freeze to freeze "foreign" filesystems
Eric Sandeen [Tue, 10 Feb 2009 20:41:51 +0000 (14:41 -0600)] 
allow xfs_freeze to freeze "foreign" filesystems

Now that the freeze ioctl has been elevated to the VFS,
let's let xfs_io and xfs_freeze freeze other filesystems
as well - add the CMD_FOREIGN_OK flag to freeze & thaw.

I think the worst that will happen on older kernels is that
the command will fail with ENOSYS or EINVAL....

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agoxfs_db: fix wrong sibling pointer offset for the bmbt attr block
Christoph Hellwig [Mon, 9 Feb 2009 09:11:28 +0000 (10:11 +0100)] 
xfs_db: fix wrong sibling pointer offset for the bmbt attr block

The attr bmbt should use long, not short pointers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
15 years ago3.0.0 release v3.0.0
Felix Blyakher [Wed, 4 Feb 2009 21:22:49 +0000 (15:22 -0600)] 
3.0.0 release

15 years agoMerge branch 'master' of hera.kernel.org:/pub/scm/fs/xfs/xfsprogs-dev
Christoph Hellwig [Mon, 2 Feb 2009 11:18:39 +0000 (12:18 +0100)] 
Merge branch 'master' of hera.kernel.org:/pub/scm/fs/xfs/xfsprogs-dev

15 years agoadd a note about a fixed debian bug (thanks Christoph).
Nathan Scott [Sun, 1 Feb 2009 19:07:56 +0000 (06:07 +1100)] 
add a note about a fixed debian bug (thanks Christoph).

15 years agoremove remaining unused-but-installed headers
Nathan Scott [Sun, 1 Feb 2009 19:07:23 +0000 (06:07 +1100)] 
remove remaining unused-but-installed headers

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nathan Scott <nathans@debian.org>
15 years agopolish translation update
Arkadiusz Miśkiewicz [Sun, 1 Feb 2009 17:19:45 +0000 (18:19 +0100)] 
polish translation update

15 years agoapply gettext translation to more strings
Arkadiusz Miśkiewicz [Sun, 1 Feb 2009 17:19:27 +0000 (18:19 +0100)] 
apply gettext translation to more strings

Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
Reviewed-by: Christoph Hellwig <hch@lst.de>
15 years agoxfsprogs: add missing periods in CHANGES
Christoph Hellwig [Fri, 30 Jan 2009 17:54:13 +0000 (18:54 +0100)] 
xfsprogs: add missing periods in CHANGES

All the older entries terminate each item with a period, so do it for
the 3.0.0 items, too.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Felix Blyakher <felixb@sgi.com>
15 years agoxfs_db: exit on invalid magic number
Christoph Hellwig [Fri, 30 Jan 2009 17:52:29 +0000 (18:52 +0100)] 
xfs_db: exit on invalid magic number

Fail gracefully and with a useful error message when we detect an
invalid superblock magic in xfs_db.  Add a new -F flag to continue
when seeing the invalid magic number - that way xfs_check and
xfs_metadump can be used on a filesystem that has a corrupted primary
superblock.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Eric Sandeen <sandeen@sandeen.net>
Reviewed-by: Felix Blyakher <felixb@sgi.com>