~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to fs/xfs/xfs_log.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
1372
1372
        XFS_BUF_ASYNC(bp);
1373
1373
        bp->b_flags |= XBF_LOG_BUFFER;
1374
1374
 
1375
 
        if (log->l_mp->m_flags & XFS_MOUNT_BARRIER)
 
1375
        if (log->l_mp->m_flags & XFS_MOUNT_BARRIER) {
 
1376
                /*
 
1377
                 * If we have an external log device, flush the data device
 
1378
                 * before flushing the log to make sure all meta data
 
1379
                 * written back from the AIL actually made it to disk
 
1380
                 * before writing out the new log tail LSN in the log buffer.
 
1381
                 */
 
1382
                if (log->l_mp->m_logdev_targp != log->l_mp->m_ddev_targp)
 
1383
                        xfs_blkdev_issue_flush(log->l_mp->m_ddev_targp);
1376
1384
                XFS_BUF_ORDERED(bp);
 
1385
        }
1377
1386
 
1378
1387
        ASSERT(XFS_BUF_ADDR(bp) <= log->l_logBBsize-1);
1379
1388
        ASSERT(XFS_BUF_ADDR(bp) + BTOBB(count) <= log->l_logBBsize);
1449
1458
 
1450
1459
        xlog_cil_destroy(log);
1451
1460
 
 
1461
        /*
 
1462
         * always need to ensure that the extra buffer does not point to memory
 
1463
         * owned by another log buffer before we free it.
 
1464
         */
 
1465
        xfs_buf_set_empty(log->l_xbuf, log->l_iclog_size);
 
1466
        xfs_buf_free(log->l_xbuf);
 
1467
 
1452
1468
        iclog = log->l_iclog;
1453
1469
        for (i=0; i<log->l_iclog_bufs; i++) {
1454
1470
                xfs_buf_free(iclog->ic_bp);
1458
1474
        }
1459
1475
        spinlock_destroy(&log->l_icloglock);
1460
1476
 
1461
 
        xfs_buf_free(log->l_xbuf);
1462
1477
        log->l_mp->m_log = NULL;
1463
1478
        kmem_free(log);
1464
1479
}       /* xlog_dealloc_log */
3248
3263
        return ticket;
3249
3264
}
3250
3265
 
3251
 
xlog_tid_t
3252
 
xfs_log_get_trans_ident(
3253
 
        struct xfs_trans        *tp)
3254
 
{
3255
 
        return tp->t_ticket->t_tid;
3256
 
}
3257
 
 
3258
3266
/*
3259
3267
 * Allocate and initialise a new log ticket.
3260
3268
 */