platform/upstream/btrfs-progs.git
15 years agoFix print-tree.c to skip blocks it can't read instead of aborting
Chris Mason [Wed, 13 May 2009 15:27:35 +0000 (11:27 -0400)]
Fix print-tree.c to skip blocks it can't read instead of aborting

15 years agoAdd scan of the btrfs log tree to btrfs-debug-tree
Chris Mason [Wed, 15 Apr 2009 18:30:14 +0000 (14:30 -0400)]
Add scan of the btrfs log tree to btrfs-debug-tree

15 years agoFix showblocks to display different colors for different metadata roots
Chris Mason [Mon, 9 Mar 2009 17:00:44 +0000 (13:00 -0400)]
Fix showblocks to display different colors for different metadata roots

15 years agoAdd man/btrfsck.8.in and Makefile for man pages
Goldwyn Rodrigues [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Add man/btrfsck.8.in and Makefile for man pages

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@gmail.com>
15 years agoAdd man/btrfsctl.8.in
Goldwyn Rodrigues [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Add man/btrfsctl.8.in

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@gmail.com>
15 years agoAdd man/mkfs.btrfs.8.in
Goldwyn Rodrigues [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Add man/mkfs.btrfs.8.in

Kept the name with the name in, so that further processing such as
BUILD_DATE BUILD_VERSION etc. could be included later.

All man pages included in the man directory to avoid file cluttering.

Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.de>
15 years agobtrfsck.c: bit-fields should be unsigned
Wang Cong [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
btrfsck.c: bit-fields should be unsigned

Signed-off-by: WANG Cong <wangcong@zeuux.org>
15 years agobtrfsck: Exit and print error message when not able to open a device
Thadeu Lima de Souza Cascardo [Wed, 21 Jan 2009 18:59:36 +0000 (13:59 -0500)]
btrfsck: Exit and print error message when not able to open a device

If btrfsck is not able to open a device, it segfaults. This fixes it and
prints an error message too.

15 years agobtrfs-image.c: fix return values
Wang Cong [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
btrfs-image.c: fix return values

- Exit with non-zero when fail;
- Don't exit in non-main functions, return.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
15 years agobtrfs-progs: make several functions static
Wang Cong [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
btrfs-progs: make several functions static

Make several functions static, and make one argument const.

Signed-off-by: WANG Cong <wangcong@zeuux.org>
15 years agoFix misleading error message in btrfsctl
Calvin Walton [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Fix misleading error message in btrfsctl

This updates Peter Klotz's original patch to use perror instead of fprintf
when it fails to open /dev/btrfs-control

15 years agoMention minimum size on devices that are considered too small
Jan Engelhardt [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Mention minimum size on devices that are considered too small

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
15 years agoModify Makefile to include man directory
Goldwyn Rodrigues [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Modify Makefile to include man directory

15 years agoUpdate convert for uninitialized block groups
Yan Zheng [Wed, 21 Jan 2009 18:22:49 +0000 (13:22 -0500)]
Update convert for uninitialized block groups

There is a new feature 'uninitialized block groups' in ext4.
Block and inode bitmaps in uninitialized block groups are
uninitialized. This confuses the converter. The fix is call
ext2fs_new_inode for each block group at open time. It set
up uninitialized block and inode bitmaps appropriately.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoDrop bit-radix.[ch] files
Chris Mason [Wed, 21 Jan 2009 19:00:24 +0000 (14:00 -0500)]
Drop bit-radix.[ch] files

These are no longer in use

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoUpdate version.sh to 0.18
Chris Mason [Sat, 17 Jan 2009 01:08:19 +0000 (20:08 -0500)]
Update version.sh to 0.18

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoFix ioctl arg size (userland incompatible change!)
Chris Mason [Fri, 16 Jan 2009 17:05:01 +0000 (12:05 -0500)]
Fix ioctl arg size (userland incompatible change!)

The structure used to send device in btrfs ioctl calls was not
properly aligned, and so 32 bit ioctls would not work properly on
64 bit kernels.

We could fix this with compat ioctls, but we're just one byte away
and it doesn't make sense at this stage to carry about the compat ioctls
forever at this stage in the project.

This patch brings the ioctl arg up to an evenly aligned 4k.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoUpdate version.sh to v0.17
Chris Mason [Mon, 12 Jan 2009 17:56:34 +0000 (12:56 -0500)]
Update version.sh to v0.17

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoFix isize/nbytes update bugs in btrfs-convert
Yan Zheng [Mon, 12 Jan 2009 17:47:06 +0000 (12:47 -0500)]
Fix isize/nbytes update bugs in btrfs-convert

These fix a few converter problems found by the new btrfsck code.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoFix mispatch of the experimental warnings
Chris Mason [Sun, 11 Jan 2009 12:58:35 +0000 (07:58 -0500)]
Fix mispatch of the experimental warnings

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoWarn user that this release is experimental
Jim Owens [Fri, 9 Jan 2009 20:06:28 +0000 (15:06 -0500)]
Warn user that this release is experimental

Post wiki pointer message for getting version
status, limitations, and known problems.

Signed-off-by: jim owens <jowens@hp.com>
15 years agoFix an accessing freed memory bug in btrfsck
Yan Zheng [Fri, 9 Jan 2009 19:39:33 +0000 (14:39 -0500)]
Fix an accessing freed memory bug in btrfsck

15 years agoRename debug-tree to btrfs-debug-tree
Chris Mason [Wed, 7 Jan 2009 20:12:15 +0000 (15:12 -0500)]
Rename debug-tree to btrfs-debug-tree

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoAdd error processing for btrfsctl -a
Shen Feng [Wed, 7 Jan 2009 19:57:11 +0000 (14:57 -0500)]
Add error processing for btrfsctl -a

brfsctl -a will do nothing and no error is output
if btrfs.ko is not inserted.

Since no caller do error processing for btrfs_register_one_device,
make its return void and do error processing inside.

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
15 years agodebug-tree output tree/key type instead of id
Shen Feng [Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)]
debug-tree output tree/key type instead of id

This makes the tree name and key type output more readable.

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
15 years agoUpdate BUG_ON and WARN_ON
Shen Feng [Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)]
Update BUG_ON and WARN_ON

Define BUG_ON and WARN_ON as assert for easy debugging.

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
15 years agoAdd semantic checks to btrfsck for files and directories
Yan Zheng [Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)]
Add semantic checks to btrfsck for files and directories

This patch makes btrfsck check more things, including
directory items, file extents, checksumming, inode link
counts etc.

The code for these checks is similar to the code verifies
extent back references. The main difference is that
shared tree blocks are treated specially. The partial
checking results(unresolved references and/or errors)
of shared sub-trees are cached. This avoids scanning
the shared blocks several times. Thank you,

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoFix compile error in quick-test.c of btrfs progs
Liu Hui [Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)]
Fix compile error in quick-test.c of btrfs progs

15 years agoFix mkfs.btrfs usage help to match the current args
Shen Feng [Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)]
Fix mkfs.btrfs usage help to match the current args

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
15 years agoMake the minimum filesystem size error message more clear
Shen Feng [Wed, 7 Jan 2009 19:57:12 +0000 (14:57 -0500)]
Make the minimum filesystem size error message more clear

Signed-off-by: Shen Feng <shen@cn.fujitsu.com>
15 years agoBtrfs: update converter for the new disk format
Yan Zheng [Wed, 17 Dec 2008 21:10:07 +0000 (16:10 -0500)]
Btrfs: update converter for the new disk format

This patch updates the ext3 to btrfs converter for the new
disk format. This mainly involves changing the convert's
data relocation and free space management code. This patch
also ports some functions from kernel module to btrfs-progs.
Thank you,

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoBtrfs: Add inode sequence number for NFS and reserved space in a few structs
Chris Mason [Mon, 8 Dec 2008 22:01:14 +0000 (17:01 -0500)]
Btrfs: Add inode sequence number for NFS and reserved space in a few structs

This adds a sequence number to the btrfs inode that is increased on
every update.  NFS will be able to use that to detect when an inode has
changed, without relying on inaccurate time fields.

While we're here, this also:

Puts reserved space into the super block and inode

Adds a log root transid to the super so we can pick the newest super
based on the fsync log as well as the main transaction ID.  For now
the log root transid is always zero, but that'll get fixed.

Adds a starting offset to the dev_item.  This will let us do better
alignment calculations if we know the start of a partition on the disk.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agosuperblock duplication
Yan Zheng [Fri, 5 Dec 2008 17:21:31 +0000 (12:21 -0500)]
superblock duplication

This patch updates btrfs-progs for superblock duplication.
Note: I didn't make this patch as complete as the one for
kernel since updating the converter requires changing the
code again. Thank you,

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoBtrfs: move data checksumming into a dedicated tree
Chris Mason [Mon, 8 Dec 2008 22:00:31 +0000 (17:00 -0500)]
Btrfs: move data checksumming into a dedicated tree

Btrfs stores checksums for each data block.  Until now, they have
been stored in the subvolume trees, indexed by the inode that is
referencing the data block.  This means that when we read the inode,
we've probably read in at least some checksums as well.

But, this has a few problems:

* The checksums are indexed by logical offset in the file.  When
compression is on, this means we have to do the expensive checksumming
on the uncompressed data.  It would be faster if we could checksum
the compressed data instead.

* If we implement encryption, we'll be checksumming the plain text and
storing that on disk.  This is significantly less secure.

* For either compression or encryption, we have to get the plain text
back before we can verify the checksum as correct.  This makes the raid
layer balancing and extent moving much more expensive.

* It makes the front end caching code more complex, as we have touch
the subvolume and inodes as we cache extents.

* There is potentitally one copy of the checksum in each subvolume
referencing an extent.

The solution used here is to store the extent checksums in a dedicated
tree.  This allows us to index the checksums by phyiscal extent
start and length.  It means:

* The checksum is against the data stored on disk, after any compression
or encryption is done.

* The checksum is stored in a central location, and can be verified without
following back references, or reading inodes.

This makes compression significantly faster by reducing the amount of
data that needs to be checksummed.  It will also allow much faster
raid management code in general.

The checksums are indexed by a key with a fixed objectid (a magic value
in ctree.h) and offset set to the starting byte of the extent.  This
allows us to copy the checksum items into the fsync log tree directly (or
any other tree), without having to invent a second format for them.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoRev the disk format for the compat code and the csum selection
Chris Mason [Tue, 2 Dec 2008 15:20:36 +0000 (10:20 -0500)]
Rev the disk format for the compat code and the csum selection

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agobtrfs-progs: support for different csum algorithims
Josef Bacik [Tue, 2 Dec 2008 14:58:23 +0000 (09:58 -0500)]
btrfs-progs: support for different csum algorithims

This is the btrfs-progs version of the patch to add the ability to have
different csum algorithims.  Note I didn't change the image maker since it
seemed a bit more complicated than just changing some stuff around so I will let
Yan take care of that.

Everything else was converted and for now a mkfs just
sets the type to be BTRFS_CSUM_TYPE_CRC32.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
15 years agobtrfs-progs: add support for compat flags
Josef Bacik [Tue, 2 Dec 2008 12:18:36 +0000 (07:18 -0500)]
btrfs-progs: add support for compat flags

This patch updates btrfs-progs with the disk format changes for the
compatability flags.

Signed-off-by: Josef Bacik <jbacik@redhat.com>
15 years agoFix image tool compile warnings
yanhai zhu [Tue, 2 Dec 2008 12:19:08 +0000 (07:19 -0500)]
Fix image tool compile warnings

15 years agoBtrfs image tool
Yan Zheng [Thu, 20 Nov 2008 14:52:48 +0000 (09:52 -0500)]
Btrfs image tool

This patch adds btrfs image tool. The image tool is
a debugging tool that creates/restores btrfs metadump
image.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoUpdate the super magic string to match the seed and root format changes
Chris Mason [Tue, 18 Nov 2008 19:13:44 +0000 (14:13 -0500)]
Update the super magic string to match the seed and root format changes

15 years agoAdd disk format requirements for subvol backward and forward refs
Chris Mason [Tue, 18 Nov 2008 15:34:08 +0000 (10:34 -0500)]
Add disk format requirements for subvol backward and forward refs

15 years agoModify the subvol and snapshot creation ioctls to work anywhere in the tree
Chris Mason [Tue, 18 Nov 2008 16:26:35 +0000 (11:26 -0500)]
Modify the subvol and snapshot creation ioctls to work anywhere in the tree

This changes the snapshot and subvol ioctl API and command lines so
that new snapshots and subvols can be created anywhere.

Subvolume creation hasn't changed much:

btrfsctl -S subvol_name directory

This creates a new subvolume under 'directory'

Snapshot creation looks the same, but is actually different:

btrfsctl -s full_path_to_new_snapshot file_or_dir

For example: btrfsctl -s /mnt/new_snap /mnt/subvol

Will create a new snapshot named new_snap under /mnt of the root
found in /mnt/subvol.  It always snapshots the entire root regardless of
which file or directory inside the root you give it.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoupdate btrfs-progs for seed device support
Yan Zheng [Tue, 18 Nov 2008 15:40:06 +0000 (10:40 -0500)]
update btrfs-progs for seed device support

This patch does the following:

1) Update device management code to match the kernel code.

2) Allocator fixes.

3) Add a program called btrfstune to set/clear the SEEDING
   super block flags.

15 years agoAdd fallocate support v2
Yan Zheng [Fri, 31 Oct 2008 16:48:02 +0000 (12:48 -0400)]
Add fallocate support v2

This patch updates btrfs-progs for fallocate support.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoAvoid tree of tree root cow when committing a clean FS
Chris Mason [Thu, 30 Oct 2008 15:11:39 +0000 (11:11 -0400)]
Avoid tree of tree root cow when committing a clean FS

The root node generation number code made commit_tree_root look like the
kernel code.  It forces a cow of the tree of tree roots even when
the FS hasn't changed.

This causes errors during fsck and other readonly operations.  This adds
a check to see if commit_tree_root is going to trigger writes to the
tree of tree roots, and bails if none are pending.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoRev the disk format for compression and root pointer generation fields
Chris Mason [Wed, 29 Oct 2008 18:09:40 +0000 (14:09 -0400)]
Rev the disk format for compression and root pointer generation fields

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoAdd root tree pointer transaction ids
Yan Zheng [Wed, 29 Oct 2008 18:07:47 +0000 (14:07 -0400)]
Add root tree pointer transaction ids

This patch adds transaction IDs to root tree pointers.
Transaction IDs in tree pointers are compared with the
generation numbers in block headers when reading root
blocks of trees. This can detect some types of IO errors.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoAdd disk format elements for compression
Chris Mason [Wed, 29 Oct 2008 18:37:41 +0000 (14:37 -0400)]
Add disk format elements for compression

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoRev the disk format for the new back reference format
Chris Mason [Thu, 9 Oct 2008 17:40:23 +0000 (13:40 -0400)]
Rev the disk format for the new back reference format

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoCount space allocated to file in bytes
Yan Zheng [Thu, 9 Oct 2008 15:55:26 +0000 (11:55 -0400)]
Count space allocated to file in bytes

This patch updates btrfs-progs for counting space
allocated to file in bytes.

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoRemove offset field from struct btrfs_extent_ref
Yan Zheng [Thu, 9 Oct 2008 15:55:30 +0000 (11:55 -0400)]
Remove offset field from struct btrfs_extent_ref

The offset field in struct btrfs_extent_ref records the position
inside file that file extent is referenced by. In the new back
reference system, tree leaves holding reference to file extent
are recorded explicitly. We can quickly scan these tree leaves, so the
offset field is not required.

This patch also makes the back reference system check the objectid
when extents are being deleted

Signed-off-by: Yan Zheng <zheng.yan@oracle.com>
15 years agoupdate mkfs.btrfs for the new space balancing code
Zheng Yan [Fri, 26 Sep 2008 14:26:53 +0000 (10:26 -0400)]
update mkfs.btrfs for the new space balancing code

The new space balancing code needs a subvol to store the
temporary inode for data extent relocation.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
15 years agoFull back reference support
Zheng Yan [Tue, 23 Sep 2008 16:29:10 +0000 (12:29 -0400)]
Full back reference support

This patch makes the back reference system to explicit record the
location of parent node for all types of extents. The location of
parent node is placed into the offset field of backref key. Every
time a tree block is balanced, the back references for the affected
lower level extents are updated.

15 years agoDisk format changes required for write ahead tree log
Chris Mason [Fri, 5 Sep 2008 20:15:58 +0000 (16:15 -0400)]
Disk format changes required for write ahead tree log

15 years agoRev the disk format
Chris Mason [Thu, 21 Aug 2008 19:49:34 +0000 (15:49 -0400)]
Rev the disk format

15 years agoSwitch btrfs_name_hash() to crc32c
David Woodhouse [Thu, 21 Aug 2008 00:11:23 +0000 (20:11 -0400)]
Switch btrfs_name_hash() to crc32c

Date: Tue, 19 Aug 2008 19:21:22 +0100
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoUse git for version number too
David Woodhouse [Thu, 21 Aug 2008 00:11:22 +0000 (20:11 -0400)]
Use git for version number too

Date: Tue, 19 Aug 2008 18:57:17 +0100
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agofix btrfs-progs version script
Eric Sandeen [Wed, 6 Aug 2008 16:17:01 +0000 (12:17 -0400)]
fix btrfs-progs version script

btrfs-progs-0.16.tar.bz2 seems to be distributed w/o an .hg,
which make the version.sh script go bonk.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

15 years agoAdded tag v0.16 for changeset 2b26e4f8c71e
Chris Mason [Mon, 4 Aug 2008 19:46:36 +0000 (15:46 -0400)]
Added tag v0.16 for changeset 2b26e4f8c71e

15 years agoUpdate version.sh to v0.16
Chris Mason [Mon, 4 Aug 2008 19:46:31 +0000 (15:46 -0400)]
Update version.sh to v0.16

15 years agobtrfs-convert: Iterate correctly using libext2fs functions
Radoslaw Szkodzinski [Wed, 30 Jul 2008 21:02:57 +0000 (17:02 -0400)]
btrfs-convert: Iterate correctly using libext2fs functions

This patch corrects open-coded inode_map iteration, which happens to be
illegal in new libext2fs due to inode_map being private, causing warning,
which becomes a compile error.

15 years agoCleanup btrfsctl help message
email.ahmedkamal@googlemail.com [Wed, 30 Jul 2008 17:29:28 +0000 (13:29 -0400)]
Cleanup btrfsctl help message

Many options were not mentioned in the usage message, fix that and
cleaning up the brackets

Signed-Off-By: Ahmed Kamal <email.ahmedkamal@googlemail.com>
15 years agoFix: btrfsctl arguments handling
Ahmed [Wed, 30 Jul 2008 13:17:21 +0000 (09:17 -0400)]
Fix: btrfsctl arguments handling

btrfsctl -A
in the current -unstable branch, does not result in the error message
designated for it, namely "-A requires an arg\n"

15 years agobtrfs-convert new dir index support
Yan [Wed, 30 Jul 2008 13:16:42 +0000 (09:16 -0400)]
btrfs-convert new dir index support

This patch updates btrfs-convert for the new dir index format.

15 years agobtrfs-progs: add orphan support to print-tree
Josef Bacik [Wed, 30 Jul 2008 13:15:02 +0000 (09:15 -0400)]
btrfs-progs: add orphan support to print-tree

This adds orphan support to print-tree so when debug_tree hits an orphan item it
will print out "orphan item" under it so you know what it is

15 years agoRev the disk format
Chris Mason [Thu, 24 Jul 2008 17:52:04 +0000 (13:52 -0400)]
Rev the disk format

15 years agobtrfs-progs new dir index support
Josef Bacik [Thu, 24 Jul 2008 16:13:32 +0000 (12:13 -0400)]
btrfs-progs new dir index support

15 years agoPrint the version string in a few programs
Chris Mason [Thu, 24 Jul 2008 16:13:30 +0000 (12:13 -0400)]
Print the version string in a few programs

15 years agoAdd version strings
Chris Mason [Wed, 23 Jul 2008 16:12:13 +0000 (12:12 -0400)]
Add version strings

15 years agoAdd .hgignore file to ignore verison.h
Chris Mason [Wed, 23 Jul 2008 15:36:13 +0000 (11:36 -0400)]
Add .hgignore file to ignore verison.h

16 years agoAdd sync and transaction ioctl defs
Chris Mason [Tue, 10 Jun 2008 14:09:18 +0000 (10:09 -0400)]
Add sync and transaction ioctl defs

btrfsctl -c forces a single FS sync

The transaction ioctls are unsafe for general use because they can lead
to deadlocks if the application is not very careful.  But, ceph is
experimenting with btrfs as a backing store, and these ioctls are required
for testing.

16 years agobtrfsctl: print usage when called with bad args
Linda Knippers [Tue, 10 Jun 2008 02:23:13 +0000 (22:23 -0400)]
btrfsctl: print usage when called with bad args

16 years agoAdded tag v0.15 for changeset e6571e2ce0c8
Chris Mason [Thu, 29 May 2008 14:32:09 +0000 (10:32 -0400)]
Added tag v0.15 for changeset e6571e2ce0c8

16 years agoVerify parent generation number on btree reads
Chris Mason [Tue, 13 May 2008 17:48:58 +0000 (13:48 -0400)]
Verify parent generation number on btree reads

16 years agoPass down the expected generation number when reading tree blocks
Chris Mason [Mon, 12 May 2008 17:51:24 +0000 (13:51 -0400)]
Pass down the expected generation number when reading tree blocks

16 years agoFix the pretty print code for num_bytes == 0
Chris Mason [Mon, 12 May 2008 17:01:57 +0000 (13:01 -0400)]
Fix the pretty print code for num_bytes == 0

16 years agoAdd a readonly flag open_ctree to force RO opens
Chris Mason [Mon, 5 May 2008 13:45:26 +0000 (09:45 -0400)]
Add a readonly flag open_ctree to force RO opens

16 years agobcp updates for single file copies
Chris Mason [Fri, 2 May 2008 20:12:02 +0000 (16:12 -0400)]
bcp updates for single file copies

16 years agoAdd bcp to test the clone file ioctl
Chris Mason [Fri, 2 May 2008 19:08:08 +0000 (15:08 -0400)]
Add bcp to test the clone file ioctl

16 years agoFix compiler warning in volumes.c
Chris Mason [Fri, 2 May 2008 19:05:11 +0000 (15:05 -0400)]
Fix compiler warning in volumes.c

16 years agoAdd the clone ioctl number
Chris Mason [Fri, 2 May 2008 15:05:21 +0000 (11:05 -0400)]
Add the clone ioctl number

16 years agoFix uninitialized variables, and use -O so gcc starts checking for them
Chris Mason [Thu, 1 May 2008 14:22:47 +0000 (10:22 -0400)]
Fix uninitialized variables, and use -O so gcc starts checking for them

Gcc only sends warnings for uninitialized variables when you compile with -O,
and there were a couple of bugs sprinkled in the code.  The biggest was the
alloc_start variable for mkfs, which can cause strange things to happen.

(thanks to Gabor Micsko for helping to find this)

16 years agoAdded tag v0.14 for changeset 969099968b60
Chris Mason [Tue, 29 Apr 2008 18:29:18 +0000 (14:29 -0400)]
Added tag v0.14 for changeset 969099968b60

16 years agoFix btrfs-convert's large file support.
Zhu [Mon, 28 Apr 2008 20:45:11 +0000 (16:45 -0400)]
Fix btrfs-convert's large file support.

This patch add ext2_inode.i_size_high into account when calculating regular
file's size in btrfs-convert,  which makes it deal with large files bigger than
4GB properly.

16 years agoAdd btrfs-vol command to balance, add and (eventually) remove devices
Chris Mason [Mon, 28 Apr 2008 20:44:22 +0000 (16:44 -0400)]
Add btrfs-vol command to balance, add and (eventually) remove devices

16 years agoAdd mkfs.btrfs -A offset to control allocation start on devices
Chris Mason [Fri, 25 Apr 2008 20:55:21 +0000 (16:55 -0400)]
Add mkfs.btrfs -A offset to control allocation start on devices

This is a utility option for the resizer, it makes sure to allocate
at offset bytes in the disk or higher.  It ensures the resizer will have
something to move when testing it.

16 years agoSpeed improvement and bug fixes for ext3 converter
Yan Zheng [Thu, 24 Apr 2008 18:57:50 +0000 (14:57 -0400)]
Speed improvement and bug fixes for ext3 converter

This patch improves converter's allocator and fixes a bug in data relocation
function. The new allocator caches free blocks as Btrfs's default allocator.
In testing here, the user CPU time reduced to half of the original when
checksum and small file packing was disabled. This patch also enlarges the
size of block groups created by the converter.

16 years agoFix balance_level to free the middle block if there is room in the left one
Chris Mason [Thu, 24 Apr 2008 18:46:15 +0000 (14:46 -0400)]
Fix balance_level to free the middle block if there is room in the left one

balance level starts by trying to empty the middle block, and then
pushes from the right to the middle.  This might empty the right block
and leave a small number of pointers in the middle.

16 years agoDon't empty the middle buffer in push_nodes_for_insert
Chris Mason [Thu, 24 Apr 2008 14:54:32 +0000 (10:54 -0400)]
Don't empty the middle buffer in push_nodes_for_insert

16 years agoKeep more pointers free in the nodes for double splits
Chris Mason [Thu, 24 Apr 2008 14:18:25 +0000 (10:18 -0400)]
Keep more pointers free in the nodes for double splits

16 years agoDrop quick-test from the list of programs built by default
Chris Mason [Tue, 22 Apr 2008 18:30:52 +0000 (14:30 -0400)]
Drop quick-test from the list of programs built by default

16 years agoUpdate the Ext3 converter
Chris Mason [Tue, 22 Apr 2008 18:06:56 +0000 (14:06 -0400)]
Update the Ext3 converter

The main changes in this patch are adding chunk handing and data relocation
ability. In the last step of conversion, the converter relocates data in system
chunk and move chunk tree into system chunk. In the rollback process, the
converter remove chunk tree from system chunk and copy data back.

Regards
YZ
---

16 years agoAdd a command to show all of the btrfs filesystems on the box (btrfs-show)
Chris Mason [Tue, 22 Apr 2008 18:06:31 +0000 (14:06 -0400)]
Add a command to show all of the btrfs filesystems on the box (btrfs-show)

16 years agoFix chunk allocation when some devices don't have enough room for the stripe
Chris Mason [Fri, 18 Apr 2008 15:56:21 +0000 (11:56 -0400)]
Fix chunk allocation when some devices don't have enough room for the stripe

16 years agoAdd checks to avoid adding the same device twice during mkfs
Chris Mason [Fri, 18 Apr 2008 14:45:17 +0000 (10:45 -0400)]
Add checks to avoid adding the same device twice during mkfs

16 years agoUse better chunk sizes for small and large filesystems
Chris Mason [Fri, 18 Apr 2008 14:31:42 +0000 (10:31 -0400)]
Use better chunk sizes for small and large filesystems

16 years agoAdd support for filesystem labels via mkfs.btrfs -L
Chris Mason [Fri, 18 Apr 2008 14:31:42 +0000 (10:31 -0400)]
Add support for filesystem labels via mkfs.btrfs -L

16 years agoUse device uuids when scanning devices
Chris Mason [Fri, 18 Apr 2008 14:31:42 +0000 (10:31 -0400)]
Use device uuids when scanning devices

16 years agoAdd raid10 support
Chris Mason [Wed, 16 Apr 2008 15:14:21 +0000 (11:14 -0400)]
Add raid10 support

16 years agoAdd chunk uuids and update multi-device back references
Chris Mason [Tue, 15 Apr 2008 19:42:08 +0000 (15:42 -0400)]
Add chunk uuids and update multi-device back references

Block headers now store the chunk tree uuid

Chunk items records the device uuid for each stripes

Device extent items record better back refs to the chunk tree

Block groups record better back refs to the chunk tree

The chunk tree format has also changed.  The objectid of BTRFS_CHUNK_ITEM_KEY
used to be the logical offset of the chunk.  Now it is a chunk tree id,
with the logical offset being stored in the offset field of the key.

This allows a single chunk tree to record multiple logical address spaces,
upping the number of bytes indexed by a chunk tree from 2^64 to
2^128.