Skip to content

Commit

Permalink
Merge branch 'master' of ssh://mason@master.kernel.org/pub/scm/linux/…
Browse files Browse the repository at this point in the history
…kernel/git/mason/btrfs-unstable
  • Loading branch information
Chris Mason committed Oct 16, 2008
2 parents 3fa8749 + 37d3cdd commit 26ce34a
Show file tree
Hide file tree
Showing 56 changed files with 36,787 additions and 0 deletions.
17 changes: 17 additions & 0 deletions fs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,23 @@ config OCFS2_DEBUG_FS
this option for debugging only as it is likely to decrease
performance of the filesystem.

config BTRFS_FS
tristate "Btrfs filesystem (EXPERIMENTAL) Unstable disk format"
depends on EXPERIMENTAL
select LIBCRC32C
help
Btrfs is a new filesystem with extents, writable snapshotting,
support for multiple devices and many more features.

Btrfs is highly experimental, and THE DISK FORMAT IS NOT YET
FINALIZED. You should say N here unless you are interested in
testing Btrfs with non-critical data.

To compile this file system support as a module, choose M here. The
module will be called btrfs.

If unsure, say N.

endif # BLOCK

config DNOTIFY
Expand Down
1 change: 1 addition & 0 deletions fs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,5 @@ obj-$(CONFIG_HOSTFS) += hostfs/
obj-$(CONFIG_HPPFS) += hppfs/
obj-$(CONFIG_DEBUG_FS) += debugfs/
obj-$(CONFIG_OCFS2_FS) += ocfs2/
obj-$(CONFIG_BTRFS_FS) += btrfs/
obj-$(CONFIG_GFS2_FS) += gfs2/
356 changes: 356 additions & 0 deletions fs/btrfs/COPYING

Large diffs are not rendered by default.

48 changes: 48 additions & 0 deletions fs/btrfs/INSTALL
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Install Instructions

Btrfs puts snapshots and subvolumes into the root directory of the FS. This
directory can only be changed by btrfsctl right now, and normal filesystem
operations do not work on it. The default subvolume is called 'default',
and you can create files and directories in mount_point/default

Btrfs uses libcrc32c in the kernel for file and metadata checksums. You need
to compile the kernel with:

CONFIG_LIBCRC32C=m

libcrc32c can be static as well. Once your kernel is setup, typing make in the
btrfs module sources will build against the running kernel. When the build is
complete:

modprobe libcrc32c
insmod btrfs.ko

The Btrfs utility programs require libuuid to build. This can be found
in the e2fsprogs sources, and is usually available as libuuid or
e2fsprogs-devel from various distros.

Building the utilities is just make ; make install. The programs go
into /usr/local/bin. The commands available are:

mkfs.btrfs: create a filesystem

btrfsctl: control program to create snapshots and subvolumes:

mount /dev/sda2 /mnt
btrfsctl -s new_subvol_name /mnt
btrfsctl -s snapshot_of_default /mnt/default
btrfsctl -s snapshot_of_new_subvol /mnt/new_subvol_name
btrfsctl -s snapshot_of_a_snapshot /mnt/snapshot_of_new_subvol
ls /mnt
default snapshot_of_a_snapshot snapshot_of_new_subvol
new_subvol_name snapshot_of_default

Snapshots and subvolumes cannot be deleted right now, but you can
rm -rf all the files and directories inside them.

btrfsck: do a limited check of the FS extent trees.</li>

debug-tree: print all of the FS metadata in text form. Example:

debug-tree /dev/sda2 >& big_output_file

24 changes: 24 additions & 0 deletions fs/btrfs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
ifneq ($(KERNELRELEASE),)
# kbuild part of makefile

obj-$(CONFIG_BTRFS_FS) := btrfs.o
btrfs-y := super.o ctree.o extent-tree.o print-tree.o root-tree.o dir-item.o \
file-item.o inode-item.o inode-map.o disk-io.o \
transaction.o inode.o file.o tree-defrag.o \
extent_map.o sysfs.o struct-funcs.o xattr.o ordered-data.o \
extent_io.o volumes.o async-thread.o ioctl.o locking.o orphan.o \
ref-cache.o export.o tree-log.o acl.o free-space-cache.o
else

# Normal Makefile

KERNELDIR := /lib/modules/`uname -r`/build
all:
$(MAKE) -C $(KERNELDIR) M=`pwd` CONFIG_BTRFS_FS=m modules

modules_install:
$(MAKE) -C $(KERNELDIR) M=`pwd` modules_install
clean:
$(MAKE) -C $(KERNELDIR) M=`pwd` clean

endif
Loading

0 comments on commit 26ce34a

Please sign in to comment.