Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fb0d1eb8 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull btrfs fixes from Chris Mason:
 "Almost all of these are bug fixes.  Dave Sterba's documentation update
  is the big exception because he removed our promises to set any
  machine running Btrfs on fire"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Documentation: filesystems: update btrfs tools section
  Documentation: filesystems: add new btrfs mount options
  btrfs: update kconfig help text
  btrfs: fix bio_size_ok() for max_sectors > 0xffff
  btrfs: Use trace condition for get_extent tracepoint
  btrfs: fix typo in the log message
  Btrfs: fix list delete warning when removing ordered root from the list
  Btrfs: print bytenr instead of page pointer in check-int
  Btrfs: remove dead codes from ctree.h
  Btrfs: don't wait for ordered data outside desired range
  Btrfs: fix lockdep error in async commit
  Btrfs: avoid heavy operations in btrfs_commit_super
  Btrfs: fix __btrfs_start_workers retval
  Btrfs: disable online raid-repair on ro mounts
  Btrfs: do not inc uncorrectable_errors counter on ro scrubs
  Btrfs: only drop modified extents if we logged the whole inode
  Btrfs: make sure to copy everything if we rename
  Btrfs: don't BUG_ON() if we get an error walking backrefs
parents 6ea9786e c7501796
Loading
Loading
Loading
Loading
+17 −17
Original line number Diff line number Diff line
@@ -70,6 +70,12 @@ Unless otherwise specified, all options default to off.

	See comments at the top of fs/btrfs/check-integrity.c for more info.

  commit=<seconds>
	Set the interval of periodic commit, 30 seconds by default. Higher
	values defer data being synced to permanent storage with obvious
	consequences when the system crashes. The upper bound is not forced,
	but a warning is printed if it's more than 300 seconds (5 minutes).

  compress
  compress=<type>
  compress-force
@@ -154,6 +160,10 @@ Unless otherwise specified, all options default to off.
	Currently this scans a list of several previous tree roots and tries to 
	use the first readable.

  rescan_uuid_tree
	Force check and rebuild procedure of the UUID tree. This should not
	normally be needed.

  skip_balance
	Skip automatic resume of interrupted balance operation after mount.
	May be resumed with "btrfs balance resume."
@@ -234,24 +244,14 @@ available from the git repository at the following location:

These include the following tools:

mkfs.btrfs: create a filesystem

btrfsctl: control program to create snapshots and subvolumes:
* mkfs.btrfs: create a filesystem

	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
* btrfs: a single tool to manage the filesystems, refer to the manpage for more details

	Snapshots and subvolumes cannot be deleted right now, but you can
	rm -rf all the files and directories inside them.
* 'btrfsck' or 'btrfs check': do a consistency check of the filesystem

btrfsck: do a limited check of the FS extent trees.
Other tools for specific tasks:

btrfs-debug-tree: print all of the FS metadata in text form.  Example:
* btrfs-convert: in-place conversion from ext2/3/4 filesystems

	btrfs-debug-tree /dev/sda2 >& big_output_file
* btrfs-image: dump filesystem metadata for debugging
+10 −5
Original line number Diff line number Diff line
@@ -9,12 +9,17 @@ config BTRFS_FS
	select XOR_BLOCKS

	help
	  Btrfs is a new filesystem with extents, writable snapshotting,
	  support for multiple devices and many more features.
	  Btrfs is a general purpose copy-on-write filesystem with extents,
	  writable snapshotting, support for multiple devices and many more
	  features focused on fault tolerance, repair and easy administration.

	  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.
	  The filesystem disk format is no longer unstable, and it's not
	  expected to change unless there are strong reasons to do so. If there
	  is a format change, file systems with a unchanged format will
	  continue to be mountable and usable by newer kernels.

	  For more information, please see the web pages at
	  http://btrfs.wiki.kernel.org.

	  To compile this file system support as a module, choose M here. The
	  module will be called btrfs.
+1 −0
Original line number Diff line number Diff line
@@ -495,6 +495,7 @@ static int __btrfs_start_workers(struct btrfs_workers *workers)
	spin_lock_irq(&workers->lock);
	if (workers->stopping) {
		spin_unlock_irq(&workers->lock);
		ret = -EINVAL;
		goto fail_kthread;
	}
	list_add_tail(&worker->worker_list, &workers->idle_list);
+17 −8
Original line number Diff line number Diff line
@@ -77,6 +77,15 @@
 * the integrity of (super)-block write requests, do not
 * enable the config option BTRFS_FS_CHECK_INTEGRITY to
 * include and compile the integrity check tool.
 *
 * Expect millions of lines of information in the kernel log with an
 * enabled check_int_print_mask. Therefore set LOG_BUF_SHIFT in the
 * kernel config to at least 26 (which is 64MB). Usually the value is
 * limited to 21 (which is 2MB) in init/Kconfig. The file needs to be
 * changed like this before LOG_BUF_SHIFT can be set to a high value:
 * config LOG_BUF_SHIFT
 *       int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
 *       range 12 30
 */

#include <linux/sched.h>
@@ -124,6 +133,7 @@
#define BTRFSIC_PRINT_MASK_INITIAL_DATABASE			0x00000400
#define BTRFSIC_PRINT_MASK_NUM_COPIES				0x00000800
#define BTRFSIC_PRINT_MASK_TREE_WITH_ALL_MIRRORS		0x00001000
#define BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH_VERBOSE		0x00002000

struct btrfsic_dev_state;
struct btrfsic_state;
@@ -3015,6 +3025,7 @@ void btrfsic_submit_bio(int rw, struct bio *bio)
	    (rw & WRITE) && NULL != bio->bi_io_vec) {
		unsigned int i;
		u64 dev_bytenr;
		u64 cur_bytenr;
		int bio_is_patched;
		char **mapped_datav;

@@ -3033,6 +3044,7 @@ void btrfsic_submit_bio(int rw, struct bio *bio)
				       GFP_NOFS);
		if (!mapped_datav)
			goto leave;
		cur_bytenr = dev_bytenr;
		for (i = 0; i < bio->bi_vcnt; i++) {
			BUG_ON(bio->bi_io_vec[i].bv_len != PAGE_CACHE_SIZE);
			mapped_datav[i] = kmap(bio->bi_io_vec[i].bv_page);
@@ -3044,16 +3056,13 @@ void btrfsic_submit_bio(int rw, struct bio *bio)
				kfree(mapped_datav);
				goto leave;
			}
			if ((BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH |
			     BTRFSIC_PRINT_MASK_VERBOSE) ==
			    (dev_state->state->print_mask &
			     (BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH |
			      BTRFSIC_PRINT_MASK_VERBOSE)))
			if (dev_state->state->print_mask &
			    BTRFSIC_PRINT_MASK_SUBMIT_BIO_BH_VERBOSE)
				printk(KERN_INFO
				       "#%u: page=%p, len=%u, offset=%u\n",
				       i, bio->bi_io_vec[i].bv_page,
				       bio->bi_io_vec[i].bv_len,
				       "#%u: bytenr=%llu, len=%u, offset=%u\n",
				       i, cur_bytenr, bio->bi_io_vec[i].bv_len,
				       bio->bi_io_vec[i].bv_offset);
			cur_bytenr += bio->bi_io_vec[i].bv_len;
		}
		btrfsic_process_written_block(dev_state, dev_bytenr,
					      mapped_datav, bio->bi_vcnt,
+0 −6
Original line number Diff line number Diff line
@@ -3613,9 +3613,6 @@ int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
			   struct btrfs_ordered_sum *sums);
int btrfs_csum_one_bio(struct btrfs_root *root, struct inode *inode,
		       struct bio *bio, u64 file_start, int contig);
int btrfs_csum_truncate(struct btrfs_trans_handle *trans,
			struct btrfs_root *root, struct btrfs_path *path,
			u64 isize);
int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
			     struct list_head *list, int search_commit);
/* inode.c */
@@ -3744,9 +3741,6 @@ void btrfs_cleanup_defrag_inodes(struct btrfs_fs_info *fs_info);
int btrfs_sync_file(struct file *file, loff_t start, loff_t end, int datasync);
void btrfs_drop_extent_cache(struct inode *inode, u64 start, u64 end,
			     int skip_pinned);
int btrfs_replace_extent_cache(struct inode *inode, struct extent_map *replace,
			       u64 start, u64 end, int skip_pinned,
			       int modified);
extern const struct file_operations btrfs_file_operations;
int __btrfs_drop_extents(struct btrfs_trans_handle *trans,
			 struct btrfs_root *root, struct inode *inode,
Loading