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

Commit 93b8a585 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Ben Myers
Browse files

xfs: remove the deprecated nodelaylog option



The delaylog mode has been the default for a long time, and the nodelaylog
option has been scheduled for removal in Linux 3.3.  Remove it and code
only used by it now that we have opened the 3.3 window.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDave Chinner <dchinner@redhat.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 9f9c19ec
Loading
Loading
Loading
Loading
+21 −58
Original line number Diff line number Diff line
@@ -760,38 +760,6 @@ xfs_log_item_init(
	INIT_LIST_HEAD(&item->li_cil);
}

/*
 * Write region vectors to log.  The write happens using the space reservation
 * of the ticket (tic).  It is not a requirement that all writes for a given
 * transaction occur with one call to xfs_log_write(). However, it is important
 * to note that the transaction reservation code makes an assumption about the
 * number of log headers a transaction requires that may be violated if you
 * don't pass all the transaction vectors in one call....
 */
int
xfs_log_write(
	struct xfs_mount	*mp,
	struct xfs_log_iovec	reg[],
	int			nentries,
	struct xlog_ticket	*tic,
	xfs_lsn_t		*start_lsn)
{
	struct log		*log = mp->m_log;
	int			error;
	struct xfs_log_vec	vec = {
		.lv_niovecs = nentries,
		.lv_iovecp = reg,
	};

	if (XLOG_FORCED_SHUTDOWN(log))
		return XFS_ERROR(EIO);

	error = xlog_write(log, &vec, tic, start_lsn, NULL, 0);
	if (error)
		xfs_force_shutdown(mp, SHUTDOWN_LOG_IO_ERROR);
	return error;
}

void
xfs_log_move_tail(xfs_mount_t	*mp,
		  xfs_lsn_t	tail_lsn)
@@ -1685,7 +1653,7 @@ xlog_print_tic_res(
	};

	xfs_warn(mp,
		"xfs_log_write: reservation summary:\n"
		"xlog_write: reservation summary:\n"
		"  trans type  = %s (%u)\n"
		"  unit res    = %d bytes\n"
		"  current res = %d bytes\n"
@@ -1714,7 +1682,7 @@ xlog_print_tic_res(
	}

	xfs_alert_tag(mp, XFS_PTAG_LOGRES,
		"xfs_log_write: reservation ran out. Need to up reservation");
		"xlog_write: reservation ran out. Need to up reservation");
	xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
}

@@ -1968,7 +1936,7 @@ xlog_write(
	*start_lsn = 0;

	len = xlog_write_calc_vec_length(ticket, log_vector);
	if (log->l_cilp) {

	/*
	 * Region headers and bytes are already accounted for.
	 * We only need to take into account start records and
@@ -1983,8 +1951,6 @@ xlog_write(
	 */
	if (flags & (XLOG_COMMIT_TRANS | XLOG_UNMOUNT_TRANS))
		ticket->t_curr_res -= sizeof(xlog_op_header_t);
	} else
		ticket->t_curr_res -= len;

	if (ticket->t_curr_res < 0)
		xlog_print_tic_res(log->l_mp, ticket);
@@ -2931,7 +2897,6 @@ _xfs_log_force(

	XFS_STATS_INC(xs_log_force);

	if (log->l_cilp)
	xlog_cil_force(log);

	spin_lock(&log->l_icloglock);
@@ -3081,11 +3046,9 @@ _xfs_log_force_lsn(

	XFS_STATS_INC(xs_log_force);

	if (log->l_cilp) {
	lsn = xlog_cil_force_lsn(log, lsn);
	if (lsn == NULLCOMMITLSN)
		return 0;
	}

try_again:
	spin_lock(&log->l_icloglock);
@@ -3653,7 +3616,7 @@ xfs_log_force_umount(
	 * completed transactions are flushed to disk with the xfs_log_force()
	 * call below.
	 */
	if (!logerror && (mp->m_flags & XFS_MOUNT_DELAYLOG))
	if (!logerror)
		xlog_cil_force(log);

	/*
+0 −5
Original line number Diff line number Diff line
@@ -174,11 +174,6 @@ int xfs_log_reserve(struct xfs_mount *mp,
			  __uint8_t	   clientid,
			  uint		   flags,
			  uint		   t_type);
int	  xfs_log_write(struct xfs_mount *mp,
			xfs_log_iovec_t  region[],
			int		 nentries,
			struct xlog_ticket *ticket,
			xfs_lsn_t	 *start_lsn);
int	  xfs_log_unmount_write(struct xfs_mount *mp);
void      xfs_log_unmount(struct xfs_mount *mp);
int	  xfs_log_force_umount(struct xfs_mount *mp, int logerror);
+1 −16
Original line number Diff line number Diff line
@@ -32,10 +32,7 @@
#include "xfs_discard.h"

/*
 * Perform initial CIL structure initialisation. If the CIL is not
 * enabled in this filesystem, ensure the log->l_cilp is null so
 * we can check this conditional to determine if we are doing delayed
 * logging or not.
 * Perform initial CIL structure initialisation.
 */
int
xlog_cil_init(
@@ -44,10 +41,6 @@ xlog_cil_init(
	struct xfs_cil	*cil;
	struct xfs_cil_ctx *ctx;

	log->l_cilp = NULL;
	if (!(log->l_mp->m_flags & XFS_MOUNT_DELAYLOG))
		return 0;

	cil = kmem_zalloc(sizeof(*cil), KM_SLEEP|KM_MAYFAIL);
	if (!cil)
		return ENOMEM;
@@ -80,9 +73,6 @@ void
xlog_cil_destroy(
	struct log	*log)
{
	if (!log->l_cilp)
		return;

	if (log->l_cilp->xc_ctx) {
		if (log->l_cilp->xc_ctx->ticket)
			xfs_log_ticket_put(log->l_cilp->xc_ctx->ticket);
@@ -137,9 +127,6 @@ void
xlog_cil_init_post_recovery(
	struct log	*log)
{
	if (!log->l_cilp)
		return;

	log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log);
	log->l_cilp->xc_ctx->sequence = 1;
	log->l_cilp->xc_ctx->commit_lsn = xlog_assign_lsn(log->l_curr_cycle,
@@ -786,8 +773,6 @@ xfs_log_item_in_current_chkpt(
{
	struct xfs_cil_ctx *ctx;

	if (!(lip->li_mountp->m_flags & XFS_MOUNT_DELAYLOG))
		return false;
	if (list_empty(&lip->li_cil))
		return false;

+0 −1
Original line number Diff line number Diff line
@@ -219,7 +219,6 @@ typedef struct xfs_mount {
#define XFS_MOUNT_WSYNC		(1ULL << 0)	/* for nfs - all metadata ops
						   must be synchronous except
						   for space allocations */
#define XFS_MOUNT_DELAYLOG	(1ULL << 1)	/* delayed logging is enabled */
#define XFS_MOUNT_WAS_CLEAN	(1ULL << 3)
#define XFS_MOUNT_FS_SHUTDOWN	(1ULL << 4)	/* atomic stop of all filesystem
						   operations, typically for
+3 −12
Original line number Diff line number Diff line
@@ -199,7 +199,6 @@ xfs_parseargs(
	mp->m_flags |= XFS_MOUNT_BARRIER;
	mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
	mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
	mp->m_flags |= XFS_MOUNT_DELAYLOG;

	/*
	 * These can be overridden by the mount option parsing.
@@ -353,11 +352,11 @@ xfs_parseargs(
			mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
			mp->m_qflags &= ~XFS_OQUOTA_ENFD;
		} else if (!strcmp(this_char, MNTOPT_DELAYLOG)) {
			mp->m_flags |= XFS_MOUNT_DELAYLOG;
			xfs_warn(mp,
	"delaylog is the default now, option is deprecated.");
		} else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) {
			mp->m_flags &= ~XFS_MOUNT_DELAYLOG;
			xfs_warn(mp,
	"nodelaylog is deprecated and will be removed in Linux 3.3");
	"nodelaylog support has been removed, option is deprecated.");
		} else if (!strcmp(this_char, MNTOPT_DISCARD)) {
			mp->m_flags |= XFS_MOUNT_DISCARD;
		} else if (!strcmp(this_char, MNTOPT_NODISCARD)) {
@@ -395,13 +394,6 @@ xfs_parseargs(
		return EINVAL;
	}

	if ((mp->m_flags & XFS_MOUNT_DISCARD) &&
	    !(mp->m_flags & XFS_MOUNT_DELAYLOG)) {
		xfs_warn(mp,
	"the discard option is incompatible with the nodelaylog option");
		return EINVAL;
	}

#ifndef CONFIG_XFS_QUOTA
	if (XFS_IS_QUOTA_RUNNING(mp)) {
		xfs_warn(mp, "quota support not available in this kernel.");
@@ -501,7 +493,6 @@ xfs_showargs(
		{ XFS_MOUNT_ATTR2,		"," MNTOPT_ATTR2 },
		{ XFS_MOUNT_FILESTREAMS,	"," MNTOPT_FILESTREAM },
		{ XFS_MOUNT_GRPID,		"," MNTOPT_GRPID },
		{ XFS_MOUNT_DELAYLOG,		"," MNTOPT_DELAYLOG },
		{ XFS_MOUNT_DISCARD,		"," MNTOPT_DISCARD },
		{ 0, NULL }
	};
Loading