Skip to content

Commit 26ce34a

Browse files
committed
Merge branch 'master' of ssh://[email protected]/pub/scm/linux/kernel/git/mason/btrfs-unstable
2 parents 3fa8749 + 37d3cdd commit 26ce34a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+36787
-0
lines changed

fs/Kconfig

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,23 @@ config OCFS2_DEBUG_FS
497497
this option for debugging only as it is likely to decrease
498498
performance of the filesystem.
499499

500+
config BTRFS_FS
501+
tristate "Btrfs filesystem (EXPERIMENTAL) Unstable disk format"
502+
depends on EXPERIMENTAL
503+
select LIBCRC32C
504+
help
505+
Btrfs is a new filesystem with extents, writable snapshotting,
506+
support for multiple devices and many more features.
507+
508+
Btrfs is highly experimental, and THE DISK FORMAT IS NOT YET
509+
FINALIZED. You should say N here unless you are interested in
510+
testing Btrfs with non-critical data.
511+
512+
To compile this file system support as a module, choose M here. The
513+
module will be called btrfs.
514+
515+
If unsure, say N.
516+
500517
endif # BLOCK
501518

502519
config DNOTIFY

fs/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,5 @@ obj-$(CONFIG_HOSTFS) += hostfs/
121121
obj-$(CONFIG_HPPFS) += hppfs/
122122
obj-$(CONFIG_DEBUG_FS) += debugfs/
123123
obj-$(CONFIG_OCFS2_FS) += ocfs2/
124+
obj-$(CONFIG_BTRFS_FS) += btrfs/
124125
obj-$(CONFIG_GFS2_FS) += gfs2/

fs/btrfs/COPYING

Lines changed: 356 additions & 0 deletions
Large diffs are not rendered by default.

fs/btrfs/INSTALL

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
Install Instructions
2+
3+
Btrfs puts snapshots and subvolumes into the root directory of the FS. This
4+
directory can only be changed by btrfsctl right now, and normal filesystem
5+
operations do not work on it. The default subvolume is called 'default',
6+
and you can create files and directories in mount_point/default
7+
8+
Btrfs uses libcrc32c in the kernel for file and metadata checksums. You need
9+
to compile the kernel with:
10+
11+
CONFIG_LIBCRC32C=m
12+
13+
libcrc32c can be static as well. Once your kernel is setup, typing make in the
14+
btrfs module sources will build against the running kernel. When the build is
15+
complete:
16+
17+
modprobe libcrc32c
18+
insmod btrfs.ko
19+
20+
The Btrfs utility programs require libuuid to build. This can be found
21+
in the e2fsprogs sources, and is usually available as libuuid or
22+
e2fsprogs-devel from various distros.
23+
24+
Building the utilities is just make ; make install. The programs go
25+
into /usr/local/bin. The commands available are:
26+
27+
mkfs.btrfs: create a filesystem
28+
29+
btrfsctl: control program to create snapshots and subvolumes:
30+
31+
mount /dev/sda2 /mnt
32+
btrfsctl -s new_subvol_name /mnt
33+
btrfsctl -s snapshot_of_default /mnt/default
34+
btrfsctl -s snapshot_of_new_subvol /mnt/new_subvol_name
35+
btrfsctl -s snapshot_of_a_snapshot /mnt/snapshot_of_new_subvol
36+
ls /mnt
37+
default snapshot_of_a_snapshot snapshot_of_new_subvol
38+
new_subvol_name snapshot_of_default
39+
40+
Snapshots and subvolumes cannot be deleted right now, but you can
41+
rm -rf all the files and directories inside them.
42+
43+
btrfsck: do a limited check of the FS extent trees.</li>
44+
45+
debug-tree: print all of the FS metadata in text form. Example:
46+
47+
debug-tree /dev/sda2 >& big_output_file
48+

fs/btrfs/Makefile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
ifneq ($(KERNELRELEASE),)
2+
# kbuild part of makefile
3+
4+
obj-$(CONFIG_BTRFS_FS) := btrfs.o
5+
btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
6+
file-item.o inode-item.o inode-map.o disk-io.o \
7+
transaction.o inode.o file.o tree-defrag.o \
8+
extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \
9+
extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
10+
ref-cache.o export.o tree-log.o acl.o free-space-cache.o
11+
else
12+
13+
# Normal Makefile
14+
15+
KERNELDIR := /lib/modules/`uname -r`/build
16+
all:
17+
$(MAKE) -C $(KERNELDIR) M=`pwd` CONFIG_BTRFS_FS=m modules
18+
19+
modules_install:
20+
$(MAKE) -C $(KERNELDIR) M=`pwd` modules_install
21+
clean:
22+
$(MAKE) -C $(KERNELDIR) M=`pwd` clean
23+
24+
endif

0 commit comments

Comments
 (0)