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

Commit 2ac232f3 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:
  jbd: change the field "b_cow_tid" of struct journal_head from type unsigned to tid_t
  ext3.txt: update the links in the section "useful links" to the latest ones
  ext3: Fix data corruption in inodes with journalled data
  ext2: check xattr name_len before acquiring xattr_sem in ext2_xattr_get
  ext3: Fix compilation with -DDX_DEBUG
  quota: Remove unused declaration
  jbd: Use WRITE_SYNC in journal checkpoint.
  jbd: Fix oops in journal_remove_journal_head()
  ext3: Return -EINVAL when start is beyond the end of fs in ext3_trim_fs()
  ext3/ioctl.c: silence sparse warnings about different address spaces
  ext3/ext4 Documentation: remove bh/nobh since it has been deprecated
  ext3: Improve truncate error handling
  ext3: use proper little-endian bitops
  ext2: include fs.h into ext2_fs.h
  ext3: Fix oops in ext3_try_to_allocate_with_rsv()
  jbd: fix a bug of leaking jh->b_jcount
  jbd: remove dependency on __GFP_NOFAIL
  ext3: Convert ext3 to new truncate calling convention
  jbd: Add fixed tracepoints
  ext3: Add fixed tracepoints

Resolve conflicts in fs/ext3/fsync.c due to fsync locking push-down and
new fixed tracepoints.
parents fa8f53ac 5cf49d76
Loading
Loading
Loading
Loading
+2 −11
Original line number Diff line number Diff line
@@ -147,15 +147,6 @@ grpjquota=<file> during journal replay. They replace the above
			package for more details
			(http://sourceforge.net/projects/linuxquota).

bh		(*)	ext3 associates buffer heads to data pages to
nobh			(a) cache disk block mapping information
			(b) link pages into transaction to provide
			    ordering guarantees.
			"bh" option forces use of buffer heads.
			"nobh" option tries to avoid associating buffer
			heads (supported only for "writeback" mode).


Specification
=============
Ext3 shares all disk implementation with the ext2 filesystem, and adds
@@ -227,5 +218,5 @@ kernel source: <file:fs/ext3/>
programs: 	http://e2fsprogs.sourceforge.net/
		http://ext2resize.sourceforge.net

useful links:	http://www.ibm.com/developerworks/library/l-fs7.html
		http://www.ibm.com/developerworks/library/l-fs8.html
useful links:	http://www.ibm.com/developerworks/library/l-fs7/index.html
        http://www.ibm.com/developerworks/library/l-fs8/index.html
+7 −16
Original line number Diff line number Diff line
@@ -68,12 +68,12 @@ Note: More extensive information for getting started with ext4 can be
    '-o barriers=[0|1]' mount option for both ext3 and ext4 filesystems
    for a fair comparison.  When tuning ext3 for best benchmark numbers,
    it is often worthwhile to try changing the data journaling mode; '-o
    data=writeback,nobh' can be faster for some workloads.  (Note
    however that running mounted with data=writeback can potentially
    leave stale data exposed in recently written files in case of an
    unclean shutdown, which could be a security exposure in some
    situations.)  Configuring the filesystem with a large journal can
    also be helpful for metadata-intensive workloads.
    data=writeback' can be faster for some workloads.  (Note however that
    running mounted with data=writeback can potentially leave stale data
    exposed in recently written files in case of an unclean shutdown,
    which could be a security exposure in some situations.)  Configuring
    the filesystem with a large journal can also be helpful for
    metadata-intensive workloads.

2. Features
===========
@@ -272,14 +272,6 @@ grpjquota=<file> during journal replay. They replace the above
			package for more details
			(http://sourceforge.net/projects/linuxquota).

bh		(*)	ext4 associates buffer heads to data pages to
nobh			(a) cache disk block mapping information
			(b) link pages into transaction to provide
			    ordering guarantees.
			"bh" option forces use of buffer heads.
			"nobh" option tries to avoid associating buffer
			heads (supported only for "writeback" mode).

stripe=n		Number of filesystem blocks that mballoc will try
			to use for allocation size and alignment. For RAID5/6
			systems this should be the number of data
@@ -393,8 +385,7 @@ dioread_nolock locking. If the dioread_nolock option is specified
			write and convert the extent to initialized after IO
			completes. This approach allows ext4 code to avoid
			using inode mutex, which improves scalability on high
			speed storages. However this does not work with nobh
			option and the mount will fail. Nor does it work with
			speed storages. However this does not work with
			data journaling and dioread_nolock option will be
			ignored with kernel warning. Note that dioread_nolock
			code path is only used for extent-based files.
+5 −5
Original line number Diff line number Diff line
@@ -161,6 +161,10 @@ ext2_xattr_get(struct inode *inode, int name_index, const char *name,

	if (name == NULL)
		return -EINVAL;
	name_len = strlen(name);
	if (name_len > 255)
		return -ERANGE;

	down_read(&EXT2_I(inode)->xattr_sem);
	error = -ENODATA;
	if (!EXT2_I(inode)->i_file_acl)
@@ -181,12 +185,8 @@ bad_block: ext2_error(inode->i_sb, "ext2_xattr_get",
		error = -EIO;
		goto cleanup;
	}
	/* find named attribute */
	name_len = strlen(name);

	error = -ERANGE;
	if (name_len > 255)
		goto cleanup;
	/* find named attribute */
	entry = FIRST_ENTRY(bh);
	while (!IS_LAST_ENTRY(entry)) {
		struct ext2_xattr_entry *next =
+22 −16
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
#include <linux/quotaops.h>
#include <linux/buffer_head.h>
#include <linux/blkdev.h>
#include <trace/events/ext3.h>

/*
 * balloc.c contains the blocks allocation and deallocation routines
@@ -161,6 +162,7 @@ read_block_bitmap(struct super_block *sb, unsigned int block_group)
	desc = ext3_get_group_desc(sb, block_group, NULL);
	if (!desc)
		return NULL;
	trace_ext3_read_block_bitmap(sb, block_group);
	bitmap_blk = le32_to_cpu(desc->bg_block_bitmap);
	bh = sb_getblk(sb, bitmap_blk);
	if (unlikely(!bh)) {
@@ -351,6 +353,7 @@ void ext3_rsv_window_add(struct super_block *sb,
	struct rb_node * parent = NULL;
	struct ext3_reserve_window_node *this;

	trace_ext3_rsv_window_add(sb, rsv);
	while (*p)
	{
		parent = *p;
@@ -476,8 +479,10 @@ void ext3_discard_reservation(struct inode *inode)
	rsv = &block_i->rsv_window_node;
	if (!rsv_is_empty(&rsv->rsv_window)) {
		spin_lock(rsv_lock);
		if (!rsv_is_empty(&rsv->rsv_window))
		if (!rsv_is_empty(&rsv->rsv_window)) {
			trace_ext3_discard_reservation(inode, rsv);
			rsv_window_remove(inode->i_sb, rsv);
		}
		spin_unlock(rsv_lock);
	}
}
@@ -683,14 +688,10 @@ error_return:
void ext3_free_blocks(handle_t *handle, struct inode *inode,
			ext3_fsblk_t block, unsigned long count)
{
	struct super_block * sb;
	struct super_block *sb = inode->i_sb;
	unsigned long dquot_freed_blocks;

	sb = inode->i_sb;
	if (!sb) {
		printk ("ext3_free_blocks: nonexistent device");
		return;
	}
	trace_ext3_free_blocks(inode, block, count);
	ext3_free_blocks_sb(handle, sb, block, count, &dquot_freed_blocks);
	if (dquot_freed_blocks)
		dquot_free_block(inode, dquot_freed_blocks);
@@ -1136,6 +1137,7 @@ static int alloc_new_reservation(struct ext3_reserve_window_node *my_rsv,
	else
		start_block = grp_goal + group_first_block;

	trace_ext3_alloc_new_reservation(sb, start_block);
	size = my_rsv->rsv_goal_size;

	if (!rsv_is_empty(&my_rsv->rsv_window)) {
@@ -1230,8 +1232,11 @@ retry:
	 * check if the first free block is within the
	 * free space we just reserved
	 */
	if (start_block >= my_rsv->rsv_start && start_block <= my_rsv->rsv_end)
	if (start_block >= my_rsv->rsv_start &&
	    start_block <= my_rsv->rsv_end) {
		trace_ext3_reserved(sb, start_block, my_rsv);
		return 0;		/* success */
	}
	/*
	 * if the first free bit we found is out of the reservable space
	 * continue search for next reservable space,
@@ -1514,10 +1519,6 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,

	*errp = -ENOSPC;
	sb = inode->i_sb;
	if (!sb) {
		printk("ext3_new_block: nonexistent device");
		return 0;
	}

	/*
	 * Check quota for allocation of this block.
@@ -1528,8 +1529,10 @@ ext3_fsblk_t ext3_new_blocks(handle_t *handle, struct inode *inode,
		return 0;
	}

	trace_ext3_request_blocks(inode, goal, num);

	sbi = EXT3_SB(sb);
	es = EXT3_SB(sb)->s_es;
	es = sbi->s_es;
	ext3_debug("goal=%lu.\n", goal);
	/*
	 * Allocate a block from reservation only when
@@ -1742,6 +1745,10 @@ allocated:
	brelse(bitmap_bh);
	dquot_free_block(inode, *count-num);
	*count = num;

	trace_ext3_allocate_blocks(inode, goal, num,
				   (unsigned long long)ret_block);

	return ret_block;

io_error:
@@ -1996,6 +2003,7 @@ ext3_grpblk_t ext3_trim_all_free(struct super_block *sb, unsigned int group,
		if ((next - start) < minblocks)
			goto free_extent;

		trace_ext3_discard_blocks(sb, discard_block, next - start);
		 /* Send the TRIM command down to the device */
		err = sb_issue_discard(sb, discard_block, next - start,
				       GFP_NOFS, 0);
@@ -2100,7 +2108,7 @@ int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range)
	if (unlikely(minlen > EXT3_BLOCKS_PER_GROUP(sb)))
		return -EINVAL;
	if (start >= max_blks)
		goto out;
		return -EINVAL;
	if (start + len > max_blks)
		len = max_blks - start;

@@ -2148,8 +2156,6 @@ int ext3_trim_fs(struct super_block *sb, struct fstrim_range *range)

	if (ret >= 0)
		ret = 0;

out:
	range->len = trimmed * sb->s_blocksize;

	return ret;
+0 −1
Original line number Diff line number Diff line
@@ -71,7 +71,6 @@ const struct file_operations ext3_file_operations = {
};

const struct inode_operations ext3_file_inode_operations = {
	.truncate	= ext3_truncate,
	.setattr	= ext3_setattr,
#ifdef CONFIG_EXT3_FS_XATTR
	.setxattr	= generic_setxattr,
Loading