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

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
...@@ -760,38 +760,6 @@ xfs_log_item_init( ...@@ -760,38 +760,6 @@ xfs_log_item_init(
INIT_LIST_HEAD(&item->li_cil); 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 void
xfs_log_move_tail(xfs_mount_t *mp, xfs_log_move_tail(xfs_mount_t *mp,
xfs_lsn_t tail_lsn) xfs_lsn_t tail_lsn)
...@@ -1685,7 +1653,7 @@ xlog_print_tic_res( ...@@ -1685,7 +1653,7 @@ xlog_print_tic_res(
}; };
xfs_warn(mp, xfs_warn(mp,
"xfs_log_write: reservation summary:\n" "xlog_write: reservation summary:\n"
" trans type = %s (%u)\n" " trans type = %s (%u)\n"
" unit res = %d bytes\n" " unit res = %d bytes\n"
" current res = %d bytes\n" " current res = %d bytes\n"
...@@ -1714,7 +1682,7 @@ xlog_print_tic_res( ...@@ -1714,7 +1682,7 @@ xlog_print_tic_res(
} }
xfs_alert_tag(mp, XFS_PTAG_LOGRES, 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); xfs_force_shutdown(mp, SHUTDOWN_CORRUPT_INCORE);
} }
...@@ -1968,23 +1936,21 @@ xlog_write( ...@@ -1968,23 +1936,21 @@ xlog_write(
*start_lsn = 0; *start_lsn = 0;
len = xlog_write_calc_vec_length(ticket, log_vector); 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
* split regions in this function.
*/
if (ticket->t_flags & XLOG_TIC_INITED)
ticket->t_curr_res -= sizeof(xlog_op_header_t);
/* /*
* Commit record headers need to be accounted for. These * Region headers and bytes are already accounted for.
* come in as separate writes so are easy to detect. * We only need to take into account start records and
*/ * split regions in this function.
if (flags & (XLOG_COMMIT_TRANS | XLOG_UNMOUNT_TRANS)) */
ticket->t_curr_res -= sizeof(xlog_op_header_t); if (ticket->t_flags & XLOG_TIC_INITED)
} else ticket->t_curr_res -= sizeof(xlog_op_header_t);
ticket->t_curr_res -= len;
/*
* Commit record headers need to be accounted for. These
* come in as separate writes so are easy to detect.
*/
if (flags & (XLOG_COMMIT_TRANS | XLOG_UNMOUNT_TRANS))
ticket->t_curr_res -= sizeof(xlog_op_header_t);
if (ticket->t_curr_res < 0) if (ticket->t_curr_res < 0)
xlog_print_tic_res(log->l_mp, ticket); xlog_print_tic_res(log->l_mp, ticket);
...@@ -2931,8 +2897,7 @@ _xfs_log_force( ...@@ -2931,8 +2897,7 @@ _xfs_log_force(
XFS_STATS_INC(xs_log_force); XFS_STATS_INC(xs_log_force);
if (log->l_cilp) xlog_cil_force(log);
xlog_cil_force(log);
spin_lock(&log->l_icloglock); spin_lock(&log->l_icloglock);
...@@ -3081,11 +3046,9 @@ _xfs_log_force_lsn( ...@@ -3081,11 +3046,9 @@ _xfs_log_force_lsn(
XFS_STATS_INC(xs_log_force); XFS_STATS_INC(xs_log_force);
if (log->l_cilp) { lsn = xlog_cil_force_lsn(log, lsn);
lsn = xlog_cil_force_lsn(log, lsn); if (lsn == NULLCOMMITLSN)
if (lsn == NULLCOMMITLSN) return 0;
return 0;
}
try_again: try_again:
spin_lock(&log->l_icloglock); spin_lock(&log->l_icloglock);
...@@ -3653,7 +3616,7 @@ xfs_log_force_umount( ...@@ -3653,7 +3616,7 @@ xfs_log_force_umount(
* completed transactions are flushed to disk with the xfs_log_force() * completed transactions are flushed to disk with the xfs_log_force()
* call below. * call below.
*/ */
if (!logerror && (mp->m_flags & XFS_MOUNT_DELAYLOG)) if (!logerror)
xlog_cil_force(log); xlog_cil_force(log);
/* /*
......
...@@ -174,11 +174,6 @@ int xfs_log_reserve(struct xfs_mount *mp, ...@@ -174,11 +174,6 @@ int xfs_log_reserve(struct xfs_mount *mp,
__uint8_t clientid, __uint8_t clientid,
uint flags, uint flags,
uint t_type); 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); int xfs_log_unmount_write(struct xfs_mount *mp);
void xfs_log_unmount(struct xfs_mount *mp); void xfs_log_unmount(struct xfs_mount *mp);
int xfs_log_force_umount(struct xfs_mount *mp, int logerror); int xfs_log_force_umount(struct xfs_mount *mp, int logerror);
......
...@@ -32,10 +32,7 @@ ...@@ -32,10 +32,7 @@
#include "xfs_discard.h" #include "xfs_discard.h"
/* /*
* Perform initial CIL structure initialisation. If the CIL is not * Perform initial CIL structure initialisation.
* 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.
*/ */
int int
xlog_cil_init( xlog_cil_init(
...@@ -44,10 +41,6 @@ xlog_cil_init( ...@@ -44,10 +41,6 @@ xlog_cil_init(
struct xfs_cil *cil; struct xfs_cil *cil;
struct xfs_cil_ctx *ctx; 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); cil = kmem_zalloc(sizeof(*cil), KM_SLEEP|KM_MAYFAIL);
if (!cil) if (!cil)
return ENOMEM; return ENOMEM;
...@@ -80,9 +73,6 @@ void ...@@ -80,9 +73,6 @@ void
xlog_cil_destroy( xlog_cil_destroy(
struct log *log) struct log *log)
{ {
if (!log->l_cilp)
return;
if (log->l_cilp->xc_ctx) { if (log->l_cilp->xc_ctx) {
if (log->l_cilp->xc_ctx->ticket) if (log->l_cilp->xc_ctx->ticket)
xfs_log_ticket_put(log->l_cilp->xc_ctx->ticket); xfs_log_ticket_put(log->l_cilp->xc_ctx->ticket);
...@@ -137,9 +127,6 @@ void ...@@ -137,9 +127,6 @@ void
xlog_cil_init_post_recovery( xlog_cil_init_post_recovery(
struct log *log) struct log *log)
{ {
if (!log->l_cilp)
return;
log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log); log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log);
log->l_cilp->xc_ctx->sequence = 1; log->l_cilp->xc_ctx->sequence = 1;
log->l_cilp->xc_ctx->commit_lsn = xlog_assign_lsn(log->l_curr_cycle, log->l_cilp->xc_ctx->commit_lsn = xlog_assign_lsn(log->l_curr_cycle,
...@@ -786,8 +773,6 @@ xfs_log_item_in_current_chkpt( ...@@ -786,8 +773,6 @@ xfs_log_item_in_current_chkpt(
{ {
struct xfs_cil_ctx *ctx; struct xfs_cil_ctx *ctx;
if (!(lip->li_mountp->m_flags & XFS_MOUNT_DELAYLOG))
return false;
if (list_empty(&lip->li_cil)) if (list_empty(&lip->li_cil))
return false; return false;
......
...@@ -219,7 +219,6 @@ typedef struct xfs_mount { ...@@ -219,7 +219,6 @@ typedef struct xfs_mount {
#define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops #define XFS_MOUNT_WSYNC (1ULL << 0) /* for nfs - all metadata ops
must be synchronous except must be synchronous except
for space allocations */ for space allocations */
#define XFS_MOUNT_DELAYLOG (1ULL << 1) /* delayed logging is enabled */
#define XFS_MOUNT_WAS_CLEAN (1ULL << 3) #define XFS_MOUNT_WAS_CLEAN (1ULL << 3)
#define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem #define XFS_MOUNT_FS_SHUTDOWN (1ULL << 4) /* atomic stop of all filesystem
operations, typically for operations, typically for
......
...@@ -199,7 +199,6 @@ xfs_parseargs( ...@@ -199,7 +199,6 @@ xfs_parseargs(
mp->m_flags |= XFS_MOUNT_BARRIER; mp->m_flags |= XFS_MOUNT_BARRIER;
mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE; mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
mp->m_flags |= XFS_MOUNT_SMALL_INUMS; mp->m_flags |= XFS_MOUNT_SMALL_INUMS;
mp->m_flags |= XFS_MOUNT_DELAYLOG;
/* /*
* These can be overridden by the mount option parsing. * These can be overridden by the mount option parsing.
...@@ -353,11 +352,11 @@ xfs_parseargs( ...@@ -353,11 +352,11 @@ xfs_parseargs(
mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE); mp->m_qflags |= (XFS_GQUOTA_ACCT | XFS_GQUOTA_ACTIVE);
mp->m_qflags &= ~XFS_OQUOTA_ENFD; mp->m_qflags &= ~XFS_OQUOTA_ENFD;
} else if (!strcmp(this_char, MNTOPT_DELAYLOG)) { } 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)) { } else if (!strcmp(this_char, MNTOPT_NODELAYLOG)) {
mp->m_flags &= ~XFS_MOUNT_DELAYLOG;
xfs_warn(mp, 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)) { } else if (!strcmp(this_char, MNTOPT_DISCARD)) {
mp->m_flags |= XFS_MOUNT_DISCARD; mp->m_flags |= XFS_MOUNT_DISCARD;
} else if (!strcmp(this_char, MNTOPT_NODISCARD)) { } else if (!strcmp(this_char, MNTOPT_NODISCARD)) {
...@@ -395,13 +394,6 @@ xfs_parseargs( ...@@ -395,13 +394,6 @@ xfs_parseargs(
return EINVAL; 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 #ifndef CONFIG_XFS_QUOTA
if (XFS_IS_QUOTA_RUNNING(mp)) { if (XFS_IS_QUOTA_RUNNING(mp)) {
xfs_warn(mp, "quota support not available in this kernel."); xfs_warn(mp, "quota support not available in this kernel.");
...@@ -501,7 +493,6 @@ xfs_showargs( ...@@ -501,7 +493,6 @@ xfs_showargs(
{ XFS_MOUNT_ATTR2, "," MNTOPT_ATTR2 }, { XFS_MOUNT_ATTR2, "," MNTOPT_ATTR2 },
{ XFS_MOUNT_FILESTREAMS, "," MNTOPT_FILESTREAM }, { XFS_MOUNT_FILESTREAMS, "," MNTOPT_FILESTREAM },
{ XFS_MOUNT_GRPID, "," MNTOPT_GRPID }, { XFS_MOUNT_GRPID, "," MNTOPT_GRPID },
{ XFS_MOUNT_DELAYLOG, "," MNTOPT_DELAYLOG },
{ XFS_MOUNT_DISCARD, "," MNTOPT_DISCARD }, { XFS_MOUNT_DISCARD, "," MNTOPT_DISCARD },
{ 0, NULL } { 0, NULL }
}; };
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment