Commit Graph

189 Commits

Author SHA1 Message Date
Chris Mason
26afd0f31d ioctls to scan for btrfs filesystems 2008-03-24 15:04:49 -04:00
Chris Mason
1f3ba6a3f9 Btrfsck updates for multi-device filesystems 2008-03-24 15:04:37 -04:00
Chris Mason
d12d4c7203 Dynamic chunk allocation 2008-03-24 15:03:58 -04:00
Chris Mason
510be29677 Add support for multiple devices per filesystem 2008-03-24 15:03:18 -04:00
Chris Mason
00eb6ff656 Remove extent back refs in batches, and avoid duplicate searches 2008-03-04 13:07:22 -05:00
Chris Mason
f3f156de82 Add debugging for block group update failure 2008-02-04 10:10:13 -05:00
Yan
ece29db279 Call btrfs_cow_block while lowering tree level.
When freeing root block of a tree,  btrfs_free_extent' parameter
'ref_generation' is from root block itseft.  When freeing non-root
block,  'ref_generation' is from its parent. so when converting a
non-root block to root block, we must guarantee its generation is
equal to its parent's generation.
2008-02-01 14:58:07 -05:00
Chris Mason
d2255c7c2f Insert extent record and the first backref in a single balance 2008-03-04 11:35:36 -05:00
Chris Mason
45391b1a98 Copy correct tree when inserting into slot 0 2008-01-30 11:43:54 -05:00
Chris Mason
aa69dec31c Add inode item and backref in one insert, reducing cpu usage 2008-01-29 15:15:18 -05:00
Chris Mason
cbf87cad07 During deletes and truncate, remove many items at once from the tree 2008-01-29 15:11:36 -05:00
Chris Mason
bb7055ec21 Add some extra debugging around file data checksum failures 2008-03-04 11:23:32 -05:00
Chris Mason
84696d75db Tune readahead during defrag to avoid reading too much at once 2008-01-24 16:13:14 -05:00
Chris Mason
80791984f6 Rename the extent_map code to extent_io
This mirrors the changes in the kernel code.
2008-03-04 11:16:54 -05:00
Chris Mason
79599947bf Add debug-tree -e to print all allocated extents, and show-blocks to graph them 2008-03-03 19:55:16 -05:00
Chris Mason
6dfdeac7ec Added tag v0.13 for changeset 58b803dc9fae 2008-02-21 14:55:23 -05:00
David Miller
355351fc1d CRC32C big endian bugs...
The CRC32C implementation in the btrfs progs is different from the one
in the kernel, so obviously nothing can possibly work on big-endian.
2008-02-15 11:20:02 -05:00
David Miller
8871a0eaa9 Unaligned access fixes
The first problem is that these SETGET macros lose typing information,
and therefore can't see the 'packed' attribute and therefore take
unaligned access SIGBUS signals on sparc64 when trying to derefernce
the member.

The next problem is a similar issue in btrfs_name_hash().  This gets
passed things like &key.offset which is a member of a packed
structure, losing this packed'ness information btrfs_name_hash()
performs a potentially unaligned memory access, again resulting in a
SIGBUS.
2008-02-15 11:19:58 -05:00
Chris Mason
0c6513b1d1 mkfs: Zero 2MB at the start and end of the device
But, on sparc, don't zero the first 1k.
2008-02-15 11:19:26 -05:00
Chris Mason
d284c1d890 Added tag v0.12 for changeset 5e8f040cdf7c 2008-02-06 11:37:45 -05:00
Chris Mason
f64e047c7c Update magic 2008-02-04 10:11:12 -05:00
Chris Mason
633ddb9a90 Hash in the owner and offset for file extent backref keys 2008-02-01 14:55:03 -05:00
Yan
6f30791b51 Fix for test_range_bit
test_range_bit doesn't properly handle the case: there's a hole at the
end of the range and there's no other extent_state after the range.
2008-01-22 11:34:13 -05:00
Kyle McMartin
d751af515b Fix btrfsck args checking
btrfsck fails to check if it actually received a dev argument though, so if you
don't pass a device, we get a nice segfault.
2008-01-22 11:32:09 -05:00
Jan Engelhardt
fd4bca3dfe btrfs-progs: build with -D_FORTIFY_SOURCE=2
Add -D_FORTIFY_SOURCE=2 to the makeflags. It has been very helpful
in finding problems.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>

---
 Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2008-01-22 11:32:07 -05:00
Jan Engelhardt
4408248634 btrfs-progs: fix a buffer overflow during mkfs
Using strncpy avoids a 1 byte overflow into the next field
of the struct.  The overflow is harmless, but does
trip automated tools.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>

---
 utils.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
2008-01-22 11:32:06 -05:00
Yan
7c28445381 Fix for btrfs_find_free_objectid
btrfs_find_free_objectid may return a used objectid due to arithmetic
underflow. This bug may happen when parameter 'root' is tree root,  so
it may cause serious problems when creating snapshot or sub-volume.
2008-01-22 11:32:05 -05:00
Yan
033cd66451 Fixes for the converter
Hello,

This patch fixes two newly found bugs in the converter.  The important
one is in create_ext2_image, sub-volume root directory's size not
properly updated after creating the ext2 image file. The other one is
a small bug in xattr support codes.  In addition to the fixes,  this
patch moves the 'if mounted' check to main() function.

Regards
YZ
---
2008-01-22 11:32:03 -05:00
Chris Mason
8bbb396c03 Added tag v0.11 for changeset b3e59089dab6 2008-01-17 12:58:38 -05:00
Yan
281c171293 Remove kernel-space header in btrfs-progs
When porting ctree.c in btrfs kernel module to btrfs-progs, I forgot
to remove a kernel-space header.  This may cause compile error on some
system.
2008-01-17 12:23:34 -05:00
Chris Mason
be9df0903f Added tag v0.10 for changeset 548ea8d7514b 2008-01-15 10:33:32 -05:00
Chris Mason
281baf6a85 Install btrfs-convert during make install 2008-01-14 14:08:07 -05:00
Chris Mason
8ee59c9f2a Change the magic to rev the disk format 2008-01-14 13:35:53 -05:00
Yan
3a3123bfc1 Add readonly inode flag
This patch adds readonly inode flag support.  A file with this flag
can't be modified, but can be deleted.
2008-01-14 13:35:00 -05:00
Yan
62a72e7d9a xattr support for the ext3->btrfs converter 2008-01-14 13:35:00 -05:00
Yan
e80e7da3b6 Fix a typo in btrfs-progs/extent_map.c
Hello,

update_extent_state is called with wrong parameter in merge_state.
2008-01-14 13:35:00 -05:00
Yan
d1b729ac2b Add rollback support for the converter
This patch adds rollback support for the converter,  the converter can
roll back a conversion if the image file haven't been modified.  In
addition,  I rearrange some codes in convert.c and add a few comments.
2008-01-08 15:56:32 -05:00
Yan
b86a827172 A few update for btrfs-progs
Hello,

This patch adds inode flags definition to btrfs-progs and updates
extent-tree.c to match the kernel.
2008-01-08 15:55:08 -05:00
Chris Mason
ba1efed418 btrfs_print_node: don't use btrfs_item_key_to_cpu on nodes 2008-01-07 15:25:48 -05:00
Chris Mason
806528b875 Add Yan Zheng's ext3->btrfs conversion program
run make convert to build it, the program is named btrfs-convert and is
not installed by default.
2008-01-04 11:29:55 -05:00
Yan
84b99666be Update find_free_extent for the ext3 conversion tool
This patch adds customized find_free_extent support to btrfs-progs,
the conversion program requires this.
2008-01-04 10:41:19 -05:00
Yan
7777e63b42 Update btrfs-progs to match kernel sources 2008-01-04 10:38:22 -05:00
Yan Zheng
088f78aeaa Port extent buffer to btrfs-progs
This patch ports extent buffer to btrfs-progs. extent_map.c contains a
simplified extent map tree and functions that manipulate/manage extent
buffer. extent state related codes are based on corresponding codes in
kernel module, codes that manage extent buffer are from disk-io.c.
2008-01-04 10:36:26 -05:00
Chris Mason
7e03dadf20 Add online resizing ioctls
btrfsctl -r size mount_point
2007-12-21 16:25:35 -05:00
Chris Mason
c4603e35d7 Verify extent back references in btrfsck 2007-12-14 11:00:30 -05:00
Chris Mason
29bf1724b1 Reorder extent back refs to differentiate file data from btree blocks 2007-12-13 11:12:45 -05:00
Chris Mason
140d96a562 Create macros to generation set/get funcs for on disk structures 2007-12-12 14:39:46 -05:00
Chris Mason
fba66bd865 Add back pointers from the inode to the directory that referenced it 2007-12-12 14:39:36 -05:00
Jan Engelhardt
66d0930cf6 Makefile: CFLAGS, LDFLAGS
Split CFLAGS into CFLAGS (user part) and AM_CFLAGS (not-so-user part;
variable name taken from automake, but otherwise no relation).
Also add LDFLAGS.
This allows me to use `make CFLAGS="-O2 -fPIE" LDFLAGS="-pie"` without
dropping the other important (AM_CFLAGS) flags.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>

---
 btrfs-progs/Makefile |   17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)
2007-12-11 09:22:42 -05:00
Chris Mason
4122e65cb2 Add back pointers from extents to the file or btree referencing them 2007-12-11 09:21:42 -05:00