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

Commit 88e88374 authored by Alex Elder's avatar Alex Elder
Browse files

Merge branch 'delayed-logging-for-2.6.35' into for-linus

parents 7e125f7b ccf7c23f
Loading
Loading
Loading
Loading
+816 −0

File added.

Preview size limit exceeded, changes collapsed.

+1 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ xfs-y += xfs_alloc.o \
				   xfs_itable.o \
				   xfs_dfrag.o \
				   xfs_log.o \
				   xfs_log_cil.o \
				   xfs_log_recover.o \
				   xfs_mount.o \
				   xfs_mru_cache.o \
+9 −0
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@

#include "xfs_sb.h"
#include "xfs_inum.h"
#include "xfs_log.h"
#include "xfs_ag.h"
#include "xfs_dmapi.h"
#include "xfs_mount.h"
@@ -850,6 +851,12 @@ xfs_buf_lock_value(
 *	Note that this in no way locks the underlying pages, so it is only
 *	useful for synchronizing concurrent use of buffer objects, not for
 *	synchronizing independent access to the underlying pages.
 *
 *	If we come across a stale, pinned, locked buffer, we know that we
 *	are being asked to lock a buffer that has been reallocated. Because
 *	it is pinned, we know that the log has not been pushed to disk and
 *	hence it will still be locked. Rather than sleeping until someone
 *	else pushes the log, push it ourselves before trying to get the lock.
 */
void
xfs_buf_lock(
@@ -857,6 +864,8 @@ xfs_buf_lock(
{
	trace_xfs_buf_lock(bp, _RET_IP_);

	if (atomic_read(&bp->b_pin_count) && (bp->b_flags & XBF_STALE))
		xfs_log_force(bp->b_mount, 0);
	if (atomic_read(&bp->b_io_remaining))
		blk_run_address_space(bp->b_target->bt_mapping);
	down(&bp->b_sema);
+1 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include "xfs_dmapi.h"
#include "xfs_sb.h"
#include "xfs_inum.h"
#include "xfs_log.h"
#include "xfs_ag.h"
#include "xfs_mount.h"
#include "xfs_quota.h"
+11 −1
Original line number Diff line number Diff line
@@ -119,6 +119,8 @@ mempool_t *xfs_ioend_pool;
#define MNTOPT_DMAPI	"dmapi"		/* DMI enabled (DMAPI / XDSM) */
#define MNTOPT_XDSM	"xdsm"		/* DMI enabled (DMAPI / XDSM) */
#define MNTOPT_DMI	"dmi"		/* DMI enabled (DMAPI / XDSM) */
#define MNTOPT_DELAYLOG   "delaylog"	/* Delayed loging enabled */
#define MNTOPT_NODELAYLOG "nodelaylog"	/* Delayed loging disabled */

/*
 * Table driven mount option parser.
@@ -374,6 +376,13 @@ xfs_parseargs(
			mp->m_flags |= XFS_MOUNT_DMAPI;
		} else if (!strcmp(this_char, MNTOPT_DMI)) {
			mp->m_flags |= XFS_MOUNT_DMAPI;
		} else if (!strcmp(this_char, MNTOPT_DELAYLOG)) {
			mp->m_flags |= XFS_MOUNT_DELAYLOG;
			cmn_err(CE_WARN,
				"Enabling EXPERIMENTAL delayed logging feature "
				"- use at your own risk.\n");
		} else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) {
			mp->m_flags &= ~XFS_MOUNT_DELAYLOG;
		} else if (!strcmp(this_char, "ihashsize")) {
			cmn_err(CE_WARN,
	"XFS: ihashsize no longer used, option is deprecated.");
@@ -535,6 +544,7 @@ xfs_showargs(
		{ XFS_MOUNT_FILESTREAMS,	"," MNTOPT_FILESTREAM },
		{ XFS_MOUNT_DMAPI,		"," MNTOPT_DMAPI },
		{ XFS_MOUNT_GRPID,		"," MNTOPT_GRPID },
		{ XFS_MOUNT_DELAYLOG,		"," MNTOPT_DELAYLOG },
		{ 0, NULL }
	};
	static struct proc_xfs_info xfs_info_unset[] = {
@@ -1755,7 +1765,7 @@ xfs_init_zones(void)
	 * but it is much faster.
	 */
	xfs_buf_item_zone = kmem_zone_init((sizeof(xfs_buf_log_item_t) +
				(((XFS_MAX_BLOCKSIZE / XFS_BLI_CHUNK) /
				(((XFS_MAX_BLOCKSIZE / XFS_BLF_CHUNK) /
				  NBWORD) * sizeof(int))), "xfs_buf_item");
	if (!xfs_buf_item_zone)
		goto out_destroy_trans_zone;
Loading