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

Commit 1f11abc9 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Patch up how we claim metadata blocks for quota purposes
  ext4: Ensure zeroout blocks have no dirty metadata
  ext4: return correct wbc.nr_to_write in ext4_da_writepages
  ext4: Update documentation to correct the inode_readahead_blks option name
  jbd2: don't use __GFP_NOFAIL in journal_init_common()
  ext4: flush delalloc blocks when space is low
  fs-writeback: Add helper function to start writeback if idle
  ext4: Eliminate potential double free on error path
  ext4: fix unsigned long long printk warning in super.c
  ext4, jbd2: Add barriers for file systems with exernal journals
  ext4: replace BUG() with return -EIO in ext4_ext_get_blocks
  ext4: add module aliases for ext2 and ext3
  ext4: Don't ask about supporting ext2/3 in ext4 if ext4 is not configured
  ext4: remove unused #include <linux/version.h>
parents f8e9766d 0637c6f4
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -196,7 +196,7 @@ nobarrier This also requires an IO stack which can support
			also be used to enable or disable barriers, for
			also be used to enable or disable barriers, for
			consistency with other ext4 mount options.
			consistency with other ext4 mount options.


inode_readahead=n	This tuning parameter controls the maximum
inode_readahead_blks=n	This tuning parameter controls the maximum
			number of inode table blocks that ext4's inode
			number of inode table blocks that ext4's inode
			table readahead algorithm will pre-read into
			table readahead algorithm will pre-read into
			the buffer cache.  The default value is 32 blocks.
			the buffer cache.  The default value is 32 blocks.
+1 −0
Original line number Original line Diff line number Diff line
@@ -28,6 +28,7 @@ config EXT4_FS


config EXT4_USE_FOR_EXT23
config EXT4_USE_FOR_EXT23
	bool "Use ext4 for ext2/ext3 file systems"
	bool "Use ext4 for ext2/ext3 file systems"
	depends on EXT4_FS
	depends on EXT3_FS=n || EXT2_FS=n
	depends on EXT3_FS=n || EXT2_FS=n
	default y
	default y
	help
	help
+0 −1
Original line number Original line Diff line number Diff line
@@ -16,7 +16,6 @@
#include <linux/module.h>
#include <linux/module.h>
#include <linux/swap.h>
#include <linux/swap.h>
#include <linux/pagemap.h>
#include <linux/pagemap.h>
#include <linux/version.h>
#include <linux/blkdev.h>
#include <linux/blkdev.h>
#include <linux/mutex.h>
#include <linux/mutex.h>
#include "ext4.h"
#include "ext4.h"
+27 −1
Original line number Original line Diff line number Diff line
@@ -3023,6 +3023,14 @@ static int ext4_convert_unwritten_extents_dio(handle_t *handle,
	return err;
	return err;
}
}


static void unmap_underlying_metadata_blocks(struct block_device *bdev,
			sector_t block, int count)
{
	int i;
	for (i = 0; i < count; i++)
                unmap_underlying_metadata(bdev, block + i);
}

static int
static int
ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
			ext4_lblk_t iblock, unsigned int max_blocks,
			ext4_lblk_t iblock, unsigned int max_blocks,
@@ -3098,6 +3106,18 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
	} else
	} else
		allocated = ret;
		allocated = ret;
	set_buffer_new(bh_result);
	set_buffer_new(bh_result);
	/*
	 * if we allocated more blocks than requested
	 * we need to make sure we unmap the extra block
	 * allocated. The actual needed block will get
	 * unmapped later when we find the buffer_head marked
	 * new.
	 */
	if (allocated > max_blocks) {
		unmap_underlying_metadata_blocks(inode->i_sb->s_bdev,
					newblock + max_blocks,
					allocated - max_blocks);
	}
map_out:
map_out:
	set_buffer_mapped(bh_result);
	set_buffer_mapped(bh_result);
out1:
out1:
@@ -3190,7 +3210,13 @@ int ext4_ext_get_blocks(handle_t *handle, struct inode *inode,
	 * this situation is possible, though, _during_ tree modification;
	 * this situation is possible, though, _during_ tree modification;
	 * this is why assert can't be put in ext4_ext_find_extent()
	 * this is why assert can't be put in ext4_ext_find_extent()
	 */
	 */
	BUG_ON(path[depth].p_ext == NULL && depth != 0);
	if (path[depth].p_ext == NULL && depth != 0) {
		ext4_error(inode->i_sb, __func__, "bad extent address "
			   "inode: %lu, iblock: %d, depth: %d",
			   inode->i_ino, iblock, depth);
		err = -EIO;
		goto out2;
	}
	eh = path[depth].p_hdr;
	eh = path[depth].p_hdr;


	ex = path[depth].p_ext;
	ex = path[depth].p_ext;
+14 −2
Original line number Original line Diff line number Diff line
@@ -88,9 +88,21 @@ int ext4_sync_file(struct file *file, struct dentry *dentry, int datasync)
		return ext4_force_commit(inode->i_sb);
		return ext4_force_commit(inode->i_sb);


	commit_tid = datasync ? ei->i_datasync_tid : ei->i_sync_tid;
	commit_tid = datasync ? ei->i_datasync_tid : ei->i_sync_tid;
	if (jbd2_log_start_commit(journal, commit_tid))
	if (jbd2_log_start_commit(journal, commit_tid)) {
		/*
		 * When the journal is on a different device than the
		 * fs data disk, we need to issue the barrier in
		 * writeback mode.  (In ordered mode, the jbd2 layer
		 * will take care of issuing the barrier.  In
		 * data=journal, all of the data blocks are written to
		 * the journal device.)
		 */
		if (ext4_should_writeback_data(inode) &&
		    (journal->j_fs_dev != journal->j_dev) &&
		    (journal->j_flags & JBD2_BARRIER))
			blkdev_issue_flush(inode->i_sb->s_bdev, NULL);
		jbd2_log_wait_commit(journal, commit_tid);
		jbd2_log_wait_commit(journal, commit_tid);
	else if (journal->j_flags & JBD2_BARRIER)
	} else if (journal->j_flags & JBD2_BARRIER)
		blkdev_issue_flush(inode->i_sb->s_bdev, NULL);
		blkdev_issue_flush(inode->i_sb->s_bdev, NULL);
	return ret;
	return ret;
}
}
Loading