Commit 1bf7dbfd authored by Alex Elder's avatar Alex Elder
Browse files

Merge branch 'master' into for-linus

parents ad845636 f9369729
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -794,11 +794,6 @@ designed.


Roadmap:
Roadmap:


2.6.35 Inclusion in mainline as an experimental mount option
	=> approximately 2-3 months to merge window
	=> needs to be in xfs-dev tree in 4-6 weeks
	=> code is nearing readiness for review

2.6.37 Remove experimental tag from mount option
2.6.37 Remove experimental tag from mount option
	=> should be roughly 6 months after initial merge
	=> should be roughly 6 months after initial merge
	=> enough time to:
	=> enough time to:
+15 −0
Original line number Original line Diff line number Diff line
@@ -1332,6 +1332,21 @@ xfs_vm_writepage(


	trace_xfs_writepage(inode, page, 0);
	trace_xfs_writepage(inode, page, 0);


	/*
	 * Refuse to write the page out if we are called from reclaim context.
	 *
	 * This is primarily to avoid stack overflows when called from deep
	 * used stacks in random callers for direct reclaim, but disabling
	 * reclaim for kswap is a nice side-effect as kswapd causes rather
	 * suboptimal I/O patters, too.
	 *
	 * This should really be done by the core VM, but until that happens
	 * filesystems like XFS, btrfs and ext4 have to take care of this
	 * by themselves.
	 */
	if (current->flags & PF_MEMALLOC)
		goto out_fail;

	/*
	/*
	 * We need a transaction if:
	 * We need a transaction if:
	 *  1. There are delalloc buffers on the page
	 *  1. There are delalloc buffers on the page
+13 −3
Original line number Original line Diff line number Diff line
@@ -585,11 +585,20 @@ xfs_vn_fallocate(
	bf.l_len = len;
	bf.l_len = len;


	xfs_ilock(ip, XFS_IOLOCK_EXCL);
	xfs_ilock(ip, XFS_IOLOCK_EXCL);

	/* check the new inode size is valid before allocating */
	if (!(mode & FALLOC_FL_KEEP_SIZE) &&
	    offset + len > i_size_read(inode)) {
		new_size = offset + len;
		error = inode_newsize_ok(inode, new_size);
		if (error)
			goto out_unlock;
	}

	error = -xfs_change_file_space(ip, XFS_IOC_RESVSP, &bf,
	error = -xfs_change_file_space(ip, XFS_IOC_RESVSP, &bf,
				       0, XFS_ATTR_NOLOCK);
				       0, XFS_ATTR_NOLOCK);
	if (!error && !(mode & FALLOC_FL_KEEP_SIZE) &&
	if (error)
	    offset + len > i_size_read(inode))
		goto out_unlock;
		new_size = offset + len;


	/* Change file size if needed */
	/* Change file size if needed */
	if (new_size) {
	if (new_size) {
@@ -600,6 +609,7 @@ xfs_vn_fallocate(
		error = -xfs_setattr(ip, &iattr, XFS_ATTR_NOLOCK);
		error = -xfs_setattr(ip, &iattr, XFS_ATTR_NOLOCK);
	}
	}


out_unlock:
	xfs_iunlock(ip, XFS_IOLOCK_EXCL);
	xfs_iunlock(ip, XFS_IOLOCK_EXCL);
out_error:
out_error:
	return error;
	return error;
+0 −1
Original line number Original line Diff line number Diff line
@@ -23,7 +23,6 @@
#include "xfs_ag.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_mount.h"
#include "xfs_quota.h"
#include "xfs_quota.h"
#include "xfs_log.h"
#include "xfs_trans.h"
#include "xfs_trans.h"
#include "xfs_bmap_btree.h"
#include "xfs_bmap_btree.h"
#include "xfs_inode.h"
#include "xfs_inode.h"
+0 −9
Original line number Original line Diff line number Diff line
@@ -164,10 +164,6 @@ xfs_inode_ag_iterator(
		struct xfs_perag	*pag;
		struct xfs_perag	*pag;


		pag = xfs_perag_get(mp, ag);
		pag = xfs_perag_get(mp, ag);
		if (!pag->pag_ici_init) {
			xfs_perag_put(pag);
			continue;
		}
		error = xfs_inode_ag_walk(mp, pag, execute, flags, tag,
		error = xfs_inode_ag_walk(mp, pag, execute, flags, tag,
						exclusive, &nr);
						exclusive, &nr);
		xfs_perag_put(pag);
		xfs_perag_put(pag);
@@ -867,12 +863,7 @@ xfs_reclaim_inode_shrink(
	down_read(&xfs_mount_list_lock);
	down_read(&xfs_mount_list_lock);
	list_for_each_entry(mp, &xfs_mount_list, m_mplist) {
	list_for_each_entry(mp, &xfs_mount_list, m_mplist) {
		for (ag = 0; ag < mp->m_sb.sb_agcount; ag++) {
		for (ag = 0; ag < mp->m_sb.sb_agcount; ag++) {

			pag = xfs_perag_get(mp, ag);
			pag = xfs_perag_get(mp, ag);
			if (!pag->pag_ici_init) {
				xfs_perag_put(pag);
				continue;
			}
			reclaimable += pag->pag_ici_reclaimable;
			reclaimable += pag->pag_ici_reclaimable;
			xfs_perag_put(pag);
			xfs_perag_put(pag);
		}
		}
Loading