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

Commit 90e0c225 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs-2.6:
  ext3: Fix dirtying of journalled buffers in data=journal mode
  ext3: default to ordered mode
  quota: Use mark_inode_dirty_sync instead of mark_inode_dirty
  quota: Change quota error message to print out disk and function name
  MAINTAINERS: Update entries of ext2 and ext3
  MAINTAINERS: Update address of Andreas Dilger
  ext3: Avoid filesystem corruption after a crash under heavy delete load
  ext3: remove vestiges of nobh support
  ext3: Fix set but unused variables
  quota: clean up quota active checks
  quota: Clean up the namespace in dqblk_xfs.h
  quota: check quota reservation on remove_dquot_ref
parents 938a73b9 5f11e6a4
Loading
Loading
Loading
Loading
+4 −2
Original line number Original line Diff line number Diff line
@@ -2237,6 +2237,7 @@ S: Maintained
F:	drivers/net/eth16i.c
F:	drivers/net/eth16i.c


EXT2 FILE SYSTEM
EXT2 FILE SYSTEM
M:	Jan Kara <jack@suse.cz>
L:	linux-ext4@vger.kernel.org
L:	linux-ext4@vger.kernel.org
S:	Maintained
S:	Maintained
F:	Documentation/filesystems/ext2.txt
F:	Documentation/filesystems/ext2.txt
@@ -2244,8 +2245,9 @@ F: fs/ext2/
F:	include/linux/ext2*
F:	include/linux/ext2*


EXT3 FILE SYSTEM
EXT3 FILE SYSTEM
M:	Jan Kara <jack@suse.cz>
M:	Andrew Morton <akpm@linux-foundation.org>
M:	Andrew Morton <akpm@linux-foundation.org>
M:	Andreas Dilger <adilger@sun.com>
M:	Andreas Dilger <adilger.kernel@dilger.ca>
L:	linux-ext4@vger.kernel.org
L:	linux-ext4@vger.kernel.org
S:	Maintained
S:	Maintained
F:	Documentation/filesystems/ext3.txt
F:	Documentation/filesystems/ext3.txt
@@ -2254,7 +2256,7 @@ F: include/linux/ext3*


EXT4 FILE SYSTEM
EXT4 FILE SYSTEM
M:	"Theodore Ts'o" <tytso@mit.edu>
M:	"Theodore Ts'o" <tytso@mit.edu>
M:	Andreas Dilger <adilger@sun.com>
M:	Andreas Dilger <adilger.kernel@dilger.ca>
L:	linux-ext4@vger.kernel.org
L:	linux-ext4@vger.kernel.org
W:	http://ext4.wiki.kernel.org
W:	http://ext4.wiki.kernel.org
Q:	http://patchwork.ozlabs.org/project/linux-ext4/list/
Q:	http://patchwork.ozlabs.org/project/linux-ext4/list/
+1 −0
Original line number Original line Diff line number Diff line
@@ -31,6 +31,7 @@ config EXT3_FS
config EXT3_DEFAULTS_TO_ORDERED
config EXT3_DEFAULTS_TO_ORDERED
	bool "Default to 'data=ordered' in ext3"
	bool "Default to 'data=ordered' in ext3"
	depends on EXT3_FS
	depends on EXT3_FS
	default y
	help
	help
	  The journal mode options for ext3 have different tradeoffs
	  The journal mode options for ext3 have different tradeoffs
	  between when data is guaranteed to be on disk and
	  between when data is guaranteed to be on disk and
+43 −37
Original line number Original line Diff line number Diff line
@@ -1149,9 +1149,25 @@ static int walk_page_buffers( handle_t *handle,
static int do_journal_get_write_access(handle_t *handle,
static int do_journal_get_write_access(handle_t *handle,
					struct buffer_head *bh)
					struct buffer_head *bh)
{
{
	int dirty = buffer_dirty(bh);
	int ret;

	if (!buffer_mapped(bh) || buffer_freed(bh))
	if (!buffer_mapped(bh) || buffer_freed(bh))
		return 0;
		return 0;
	return ext3_journal_get_write_access(handle, bh);
	/*
	 * __block_prepare_write() could have dirtied some buffers. Clean
	 * the dirty bit as jbd2_journal_get_write_access() could complain
	 * otherwise about fs integrity issues. Setting of the dirty bit
	 * by __block_prepare_write() isn't a real problem here as we clear
	 * the bit before releasing a page lock and thus writeback cannot
	 * ever write the buffer.
	 */
	if (dirty)
		clear_buffer_dirty(bh);
	ret = ext3_journal_get_write_access(handle, bh);
	if (!ret && dirty)
		ret = ext3_journal_dirty_metadata(handle, bh);
	return ret;
}
}


/*
/*
@@ -1625,9 +1641,6 @@ static int ext3_writeback_writepage(struct page *page,
		goto out_fail;
		goto out_fail;
	}
	}


	if (test_opt(inode->i_sb, NOBH) && ext3_should_writeback_data(inode))
		ret = nobh_writepage(page, ext3_get_block, wbc);
	else
	ret = block_write_full_page(page, ext3_get_block, wbc);
	ret = block_write_full_page(page, ext3_get_block, wbc);


	err = ext3_journal_stop(handle);
	err = ext3_journal_stop(handle);
@@ -1922,17 +1935,6 @@ static int ext3_block_truncate_page(handle_t *handle, struct page *page,
	length = blocksize - (offset & (blocksize - 1));
	length = blocksize - (offset & (blocksize - 1));
	iblock = index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);
	iblock = index << (PAGE_CACHE_SHIFT - inode->i_sb->s_blocksize_bits);


	/*
	 * For "nobh" option,  we can only work if we don't need to
	 * read-in the page - otherwise we create buffers to do the IO.
	 */
	if (!page_has_buffers(page) && test_opt(inode->i_sb, NOBH) &&
	     ext3_should_writeback_data(inode) && PageUptodate(page)) {
		zero_user(page, offset, length);
		set_page_dirty(page);
		goto unlock;
	}

	if (!page_has_buffers(page))
	if (!page_has_buffers(page))
		create_empty_buffers(page, blocksize, 0);
		create_empty_buffers(page, blocksize, 0);


@@ -2283,27 +2285,6 @@ static void ext3_free_branches(handle_t *handle, struct inode *inode,
					   (__le32*)bh->b_data + addr_per_block,
					   (__le32*)bh->b_data + addr_per_block,
					   depth);
					   depth);


			/*
			 * We've probably journalled the indirect block several
			 * times during the truncate.  But it's no longer
			 * needed and we now drop it from the transaction via
			 * journal_revoke().
			 *
			 * That's easy if it's exclusively part of this
			 * transaction.  But if it's part of the committing
			 * transaction then journal_forget() will simply
			 * brelse() it.  That means that if the underlying
			 * block is reallocated in ext3_get_block(),
			 * unmap_underlying_metadata() will find this block
			 * and will try to get rid of it.  damn, damn.
			 *
			 * If this block has already been committed to the
			 * journal, a revoke record will be written.  And
			 * revoke records must be emitted *before* clearing
			 * this block's bit in the bitmaps.
			 */
			ext3_forget(handle, 1, inode, bh, bh->b_blocknr);

			/*
			/*
			 * Everything below this this pointer has been
			 * Everything below this this pointer has been
			 * released.  Now let this top-of-subtree go.
			 * released.  Now let this top-of-subtree go.
@@ -2327,6 +2308,31 @@ static void ext3_free_branches(handle_t *handle, struct inode *inode,
				truncate_restart_transaction(handle, inode);
				truncate_restart_transaction(handle, inode);
			}
			}


			/*
			 * We've probably journalled the indirect block several
			 * times during the truncate.  But it's no longer
			 * needed and we now drop it from the transaction via
			 * journal_revoke().
			 *
			 * That's easy if it's exclusively part of this
			 * transaction.  But if it's part of the committing
			 * transaction then journal_forget() will simply
			 * brelse() it.  That means that if the underlying
			 * block is reallocated in ext3_get_block(),
			 * unmap_underlying_metadata() will find this block
			 * and will try to get rid of it.  damn, damn. Thus
			 * we don't allow a block to be reallocated until
			 * a transaction freeing it has fully committed.
			 *
			 * We also have to make sure journal replay after a
			 * crash does not overwrite non-journaled data blocks
			 * with old metadata when the block got reallocated for
			 * data.  Thus we have to store a revoke record for a
			 * block in the same transaction in which we free the
			 * block.
			 */
			ext3_forget(handle, 1, inode, bh, bh->b_blocknr);

			ext3_free_blocks(handle, inode, nr, 1);
			ext3_free_blocks(handle, inode, nr, 1);


			if (parent_bh) {
			if (parent_bh) {
+1 −2
Original line number Original line Diff line number Diff line
@@ -1447,7 +1447,6 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
	struct inode *inode)
	struct inode *inode)
{
{
	struct inode *dir = dentry->d_parent->d_inode;
	struct inode *dir = dentry->d_parent->d_inode;
	unsigned long offset;
	struct buffer_head * bh;
	struct buffer_head * bh;
	struct ext3_dir_entry_2 *de;
	struct ext3_dir_entry_2 *de;
	struct super_block * sb;
	struct super_block * sb;
@@ -1469,7 +1468,7 @@ static int ext3_add_entry (handle_t *handle, struct dentry *dentry,
		ext3_mark_inode_dirty(handle, dir);
		ext3_mark_inode_dirty(handle, dir);
	}
	}
	blocks = dir->i_size >> sb->s_blocksize_bits;
	blocks = dir->i_size >> sb->s_blocksize_bits;
	for (block = 0, offset = 0; block < blocks; block++) {
	for (block = 0; block < blocks; block++) {
		bh = ext3_bread(handle, dir, block, 0, &retval);
		bh = ext3_bread(handle, dir, block, 0, &retval);
		if(!bh)
		if(!bh)
			return retval;
			return retval;
+0 −2
Original line number Original line Diff line number Diff line
@@ -964,7 +964,6 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es,
		      ext3_fsblk_t n_blocks_count)
		      ext3_fsblk_t n_blocks_count)
{
{
	ext3_fsblk_t o_blocks_count;
	ext3_fsblk_t o_blocks_count;
	unsigned long o_groups_count;
	ext3_grpblk_t last;
	ext3_grpblk_t last;
	ext3_grpblk_t add;
	ext3_grpblk_t add;
	struct buffer_head * bh;
	struct buffer_head * bh;
@@ -976,7 +975,6 @@ int ext3_group_extend(struct super_block *sb, struct ext3_super_block *es,
	 * yet: we're going to revalidate es->s_blocks_count after
	 * yet: we're going to revalidate es->s_blocks_count after
	 * taking the s_resize_lock below. */
	 * taking the s_resize_lock below. */
	o_blocks_count = le32_to_cpu(es->s_blocks_count);
	o_blocks_count = le32_to_cpu(es->s_blocks_count);
	o_groups_count = EXT3_SB(sb)->s_groups_count;


	if (test_opt(sb, DEBUG))
	if (test_opt(sb, DEBUG))
		printk(KERN_DEBUG "EXT3-fs: extending last group from "E3FSBLK" uto "E3FSBLK" blocks\n",
		printk(KERN_DEBUG "EXT3-fs: extending last group from "E3FSBLK" uto "E3FSBLK" blocks\n",
Loading