Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
jfs_logmgr.c File Reference
#include <linux/fs.h>
#include <linux/blkdev.h>
#include <linux/interrupt.h>
#include <linux/completion.h>
#include <linux/kthread.h>
#include <linux/buffer_head.h>
#include <linux/bio.h>
#include <linux/freezer.h>
#include <linux/export.h>
#include <linux/delay.h>
#include <linux/mutex.h>
#include <linux/seq_file.h>
#include <linux/slab.h>
#include "jfs_incore.h"
#include "jfs_filsys.h"
#include "jfs_metapage.h"
#include "jfs_superblock.h"
#include "jfs_txnmgr.h"
#include "jfs_debug.h"

Go to the source code of this file.

Macros

#define LOG_LOCK_INIT(log)   mutex_init(&(log)->loglock)
 
#define LOG_LOCK(log)   mutex_lock(&((log)->loglock))
 
#define LOG_UNLOCK(log)   mutex_unlock(&((log)->loglock))
 
#define LOGGC_LOCK_INIT(log)   spin_lock_init(&(log)->gclock)
 
#define LOGGC_LOCK(log)   spin_lock_irq(&(log)->gclock)
 
#define LOGGC_UNLOCK(log)   spin_unlock_irq(&(log)->gclock)
 
#define LOGGC_WAKEUP(tblk)   wake_up_all(&(tblk)->gcwait)
 
#define LOGSYNC_DELTA(logsize)   min((logsize)/8, 128*LOGPSIZE)
 
#define LOGSYNC_BARRIER(logsize)   ((logsize)/4)
 
#define LCACHE_LOCK(flags)   spin_lock_irqsave(&jfsLCacheLock, flags)
 
#define LCACHE_UNLOCK(flags)   spin_unlock_irqrestore(&jfsLCacheLock, flags)
 
#define LCACHE_SLEEP_COND(wq, cond, flags)
 
#define LCACHE_WAKEUP(event)   wake_up(event)
 
#define lbmREAD   0x0001
 
#define lbmWRITE
 
#define lbmRELEASE
 
#define lbmSYNC
 
#define lbmFREE
 
#define lbmDONE   0x0020
 
#define lbmERROR   0x0040
 
#define lbmGC
 
#define lbmDIRECT   0x0100
 

Functions

int lmLog (struct jfs_log *log, struct tblock *tblk, struct lrd *lrd, struct tlock *tlck)
 
int lmGroupCommit (struct jfs_log *log, struct tblock *tblk)
 
void jfs_syncpt (struct jfs_log *log, int hard_sync)
 
int lmLogOpen (struct super_block *sb)
 
int lmLogInit (struct jfs_log *log)
 
int lmLogClose (struct super_block *sb)
 
void jfs_flush_journal (struct jfs_log *log, int wait)
 
int lmLogShutdown (struct jfs_log *log)
 
int jfsIOWait (void *arg)
 
int lmLogFormat (struct jfs_log *log, s64 logAddress, int logSize)
 

Macro Definition Documentation

#define lbmDIRECT   0x0100

Definition at line 151 of file jfs_logmgr.c.

#define lbmDONE   0x0020

Definition at line 148 of file jfs_logmgr.c.

#define lbmERROR   0x0040

Definition at line 149 of file jfs_logmgr.c.

#define lbmFREE
Value:
0x0010 /* return to freelist
* at completion of pageout;
* the buffer may be recycled;
*/

Definition at line 147 of file jfs_logmgr.c.

#define lbmGC
Value:
0x0080 /* lbmIODone to perform post-GC processing
* of log page
*/

Definition at line 150 of file jfs_logmgr.c.

#define lbmREAD   0x0001

Definition at line 143 of file jfs_logmgr.c.

#define lbmRELEASE
Value:
0x0004 /* remove from write queue
* at completion of pageout;
* do not free/recycle it yet:
* caller will free it;
*/

Definition at line 145 of file jfs_logmgr.c.

#define lbmSYNC
Value:
0x0008 /* do not return to freelist
* when removed from write queue;
*/

Definition at line 146 of file jfs_logmgr.c.

#define lbmWRITE
Value:
0x0002 /* enqueue at tail of write queue;
* init pageout if at head of queue;
*/

Definition at line 144 of file jfs_logmgr.c.

#define LCACHE_LOCK (   flags)    spin_lock_irqsave(&jfsLCacheLock, flags)

Definition at line 123 of file jfs_logmgr.c.

#define LCACHE_SLEEP_COND (   wq,
  cond,
  flags 
)
Value:
do { \
if (cond) \
break; \
__SLEEP_COND(wq, cond, LCACHE_LOCK(flags), LCACHE_UNLOCK(flags)); \
} while (0)

Definition at line 129 of file jfs_logmgr.c.

#define LCACHE_UNLOCK (   flags)    spin_unlock_irqrestore(&jfsLCacheLock, flags)

Definition at line 124 of file jfs_logmgr.c.

#define LCACHE_WAKEUP (   event)    wake_up(event)

Definition at line 136 of file jfs_logmgr.c.

#define LOG_LOCK (   log)    mutex_lock(&((log)->loglock))

Definition at line 94 of file jfs_logmgr.c.

#define LOG_LOCK_INIT (   log)    mutex_init(&(log)->loglock)

Definition at line 93 of file jfs_logmgr.c.

#define LOG_UNLOCK (   log)    mutex_unlock(&((log)->loglock))

Definition at line 95 of file jfs_logmgr.c.

#define LOGGC_LOCK (   log)    spin_lock_irq(&(log)->gclock)

Definition at line 103 of file jfs_logmgr.c.

#define LOGGC_LOCK_INIT (   log)    spin_lock_init(&(log)->gclock)

Definition at line 102 of file jfs_logmgr.c.

#define LOGGC_UNLOCK (   log)    spin_unlock_irq(&(log)->gclock)

Definition at line 104 of file jfs_logmgr.c.

#define LOGGC_WAKEUP (   tblk)    wake_up_all(&(tblk)->gcwait)

Definition at line 105 of file jfs_logmgr.c.

#define LOGSYNC_BARRIER (   logsize)    ((logsize)/4)

Definition at line 111 of file jfs_logmgr.c.

#define LOGSYNC_DELTA (   logsize)    min((logsize)/8, 128*LOGPSIZE)

Definition at line 110 of file jfs_logmgr.c.

Function Documentation

void jfs_flush_journal ( struct jfs_log log,
int  wait 
)

Definition at line 1518 of file jfs_logmgr.c.

void jfs_syncpt ( struct jfs_log log,
int  hard_sync 
)

Definition at line 1046 of file jfs_logmgr.c.

int jfsIOWait ( void arg)

Definition at line 2323 of file jfs_logmgr.c.

int lmGroupCommit ( struct jfs_log log,
struct tblock tblk 
)

Definition at line 666 of file jfs_logmgr.c.

int lmLog ( struct jfs_log log,
struct tblock tblk,
struct lrd lrd,
struct tlock tlck 
)

Definition at line 225 of file jfs_logmgr.c.

int lmLogClose ( struct super_block sb)

Definition at line 1444 of file jfs_logmgr.c.

int lmLogFormat ( struct jfs_log log,
s64  logAddress,
int  logSize 
)

Definition at line 2368 of file jfs_logmgr.c.

int lmLogInit ( struct jfs_log log)

Definition at line 1248 of file jfs_logmgr.c.

int lmLogOpen ( struct super_block sb)

Definition at line 1065 of file jfs_logmgr.c.

int lmLogShutdown ( struct jfs_log log)

Definition at line 1641 of file jfs_logmgr.c.