type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
includes | #include <linux/freezer.h> |
includes | #include <linux/export.h> |
includes | #include <linux/delay.h> |
includes | #include <linux/mutex.h> |
includes | #include <linux/seq_file.h> |
includes | #include <linux/slab.h> |
defines | #define LOG_LOCK_INIT(log) mutex_init(&(log)->loglock) |
defines | #define LOG_LOCK(log) mutex_lock(&((log)->loglock)) |
defines | #define LOG_UNLOCK(log) mutex_unlock(&((log)->loglock)) |
defines |
#define LOGGC_LOCK_INIT(log) spin_lock_init(&(log)->gclock) |
defines | #define LOGGC_LOCK(log) spin_lock_irq(&(log)->gclock) |
defines | #define LOGGC_UNLOCK(log) spin_unlock_irq(&(log)->gclock) |
defines | #define LOGGC_WAKEUP(tblk) wake_up_all(&(tblk)->gcwait) |
defines | #define LOGSYNC_DELTA(logsize) min((logsize)/8, 128*LOGPSIZE) |
defines | #define LOGSYNC_BARRIER(logsize) ((logsize)/4) |
defines | #define LOGSYNC_DELTA(logsize) min((logsize)/4, 256*LOGPSIZE) |
defines | #define LOGSYNC_BARRIER(logsize) ((logsize)/2) |
defines |
#define LCACHE_LOCK(flags) spin_lock_irqsave(&jfsLCacheLock, flags) |
defines | #define LCACHE_UNLOCK(flags) spin_unlock_irqrestore(&jfsLCacheLock, flags) |
defines | #define LCACHE_SLEEP_COND(wq, cond, flags) \ |
defines |
#define LCACHE_WAKEUP(event) wake_up(event) |
defines | #define lbmREAD 0x0001 |
defines | #define lbmWRITE 0x0002 /* enqueue at tail of write queue; |
defines | #define lbmRELEASE 0x0004 /* remove from write queue |
defines | #define lbmSYNC 0x0008 /* do not return to freelist |
defines | #define lbmFREE 0x0010 /* return to freelist |
defines | #define lbmDONE 0x0020 |
defines | #define lbmERROR 0x0040 |
defines | #define lbmGC 0x0080 /* lbmIODone to perform post-GC processing |
defines | #define lbmDIRECT 0x0100 |
functions | int lmLog(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd,
struct tlock *tlck)
{
int lsn;
int diffp, difft;
struct metapage *mp = NULL;
unsigned long flags;
jfs_info("lmLog: log:0x%p tblk:0x%p, lrd:0x%p tlck:0x%p",
log, tblk, lrd, tlck);
LOG_LOCK(log);
/* log by (out-of-transaction) JFS ? */... |
functions | int
lmWriteRecord(struct jfs_log *log, struct tblock *tblk, struct lrd *lrd,
struct tlock *tlck)
{
int lsn = 0; /* end-of-log address */
struct lbuf *bp; /* dst log page buffer */
struct logpage *lp; /* dst log page */
caddr_t dst; /* destination address in log page */
int dstoffset; /* end-of-log offset i... |
functions | else if (tlck->flag & tlckINODELOCK)
{
if (tlck->type & tlckDTREE)
{
p = (caddr_t) &JFS_IP(tlck->ip)->i_dtroot;
} |
functions | else if (tlck->flag & tlckINLINELOCK)
{
inlinelock = (struct inlinelock *) & tlck;
p = (caddr_t) & inlinelock->pxd;
linelock = (struct linelock *) & tlck;
} |
functions | int lmNextPage(struct jfs_log *log)
{
struct logpage *lp;
int lspn; /* log sequence page number */
int pn; /* current page number */
struct lbuf *bp;
struct lbuf *nextbp;
struct tblock *tblk;
/* get current log page number and log sequence page number */
pn = log->page;
bp = log->bp;
lp = (struct logpage ... |
functions | int lmGroupCommit(struct jfs_log *log, struct tblock *tblk)
{
int rc = 0;
LOGGC_LOCK(log);
/* group committed already ? */
if (tblk->flag & tblkGC_COMMITTED)
{
if (tblk->flag & tblkGC_ERROR)
{
rc = -EIO;
} |
functions | void lmGCwrite(struct jfs_log *log, int cant_write)
{
struct lbuf *bp;
struct logpage *lp;
int gcpn; /* group commit page number */
struct tblock *tblk;
struct tblock *xtblk = NULL;
/*
* build the commit group of a log page
*
* scan commit queue and make a commit group of all
* transactions with COMMIT ... |
functions | void lmPostGC(struct lbuf *bp)
{
unsigned long flags;
struct jfs_log *log = bp->l_log;
struct logpage *lp;
struct tblock *tblk, *temp;
//LOGGC_LOCK(log);
spin_lock_irqsave(&log->gclock, flags);
/*
* current pageout of group commit completed.
*
* remove/wakeup transactions from commit queue who were
* gr... |
functions | else if (tblk->flag & tblkGC_EOP)
{
/* finalize the page */
lp = (struct logpage *) bp->l_ldata;
bp->l_ceor = bp->l_eor;
lp->h.eor = lp->t.eor = cpu_to_le16(bp->l_eor);
jfs_info("lmPostGC: calling lbmWrite");
lbmWrite(log, bp, lbmWRITE | lbmRELEASE | lbmFREE,
1);
} |
functions | int lmLogSync(struct jfs_log *log, int hard_sync)
{
int logsize;
int written; /* written since last syncpt */
int free; /* free space left available */
int delta; /* additional delta to write normally */
int more; /* additional write granted */
struct lrd lrd;
int lsn;
struct logsyncblk *lp;
unsigned long ... |
functions | void jfs_syncpt(struct jfs_log *log, int hard_sync)
{
LOG_LOCK(log);
if (!test_bit(log_QUIESCE, &log->flag))
{
lmLogSync(log, hard_sync);
} |
functions | int lmLogOpen(struct super_block *sb)
{
int rc;
struct block_device *bdev;
struct jfs_log *log;
struct jfs_sb_info *sbi = JFS_SBI(sb);
if (sbi->flag & JFS_NOINTEGRITY)
{
return open_dummy_log(sb);
} |
functions | int open_inline_log(struct super_block *sb)
{
struct jfs_log *log;
int rc;
if (!(log = kzalloc(sizeof(struct jfs_log), GFP_KERNEL)))
{
return -ENOMEM;
} |
functions | int open_dummy_log(struct super_block *sb)
{
int rc;
mutex_lock(&jfs_log_mutex);
if (!dummy_log)
{
dummy_log = kzalloc(sizeof(struct jfs_log), GFP_KERNEL);
if (!dummy_log)
{
mutex_unlock(&jfs_log_mutex);
return -ENOMEM;
} |
functions | int lmLogInit(struct jfs_log *log)
{
int rc = 0;
struct lrd lrd;
struct logsuper *logsuper;
struct lbuf *bpsuper;
struct lbuf *bp;
struct logpage *lp;
int lsn = 0;
jfs_info("lmLogInit: log:0x%p", log);
/* initialize the group commit serialization lock */
LOGGC_LOCK_INIT(log);
/* allocate/initialize the lo... |
functions | int lmLogClose(struct super_block *sb)
{
struct jfs_sb_info *sbi = JFS_SBI(sb);
struct jfs_log *log = sbi->log;
struct block_device *bdev;
int rc = 0;
jfs_info("lmLogClose: log:0x%p", log);
mutex_lock(&jfs_log_mutex);
LOG_LOCK(log);
list_del(&sbi->log_list);
LOG_UNLOCK(log);
sbi->log = NULL;
/*
* We nee... |
functions | void jfs_flush_journal(struct jfs_log *log, int wait)
{
int i;
struct tblock *target = NULL;
/* jfs_write_inode may call us during read-only mount */
if (!log)
{
return;
} |
functions | int lmLogShutdown(struct jfs_log *log)
{
int rc;
struct lrd lrd;
int lsn;
struct logsuper *logsuper;
struct lbuf *bpsuper;
struct lbuf *bp;
struct logpage *lp;
jfs_info("lmLogShutdown: log:0x%p", log);
jfs_flush_journal(log, 2);
/*
* write the last SYNCPT record with syncpoint = 0
* (i.e., log redo up ... |
functions | int lmLogFileSystem(struct jfs_log *log, struct jfs_sb_info *sbi,
int activate)
{
int rc = 0;
int i;
struct logsuper *logsuper;
struct lbuf *bpsuper;
char *uuid = sbi->uuid;
/*
* insert/remove file system device to log active file system list.
*/
if ((rc = lbmRead(log, 1, &bpsuper)))
{
return rc... |
functions | int lbmLogInit(struct jfs_log *log)
{
/* log inode */
int i;
struct lbuf *lbuf;
jfs_info("lbmLogInit: log:0x%p", log);
/* initialize current buffer cursor */
log->bp = NULL;
/* initialize log device write queue */
log->wqueue = NULL;
/*
* Each log has its own buffer pages allocated to it. These are
* ... |
functions | void lbmLogShutdown(struct jfs_log *log)
{
struct lbuf *lbuf;
jfs_info("lbmLogShutdown: log:0x%p", log);
lbuf = log->lbuf_free;
while (lbuf)
{
struct lbuf *next = lbuf->l_freelist;
__free_page(lbuf->l_page);
kfree(lbuf);
lbuf = next;
} |
functions | void lbmFree(struct lbuf *bp)
{
unsigned long flags;
LCACHE_LOCK(flags);
lbmfree(bp);
LCACHE_UNLOCK(flags);
} |
functions | void lbmfree(struct lbuf *bp)
{
struct jfs_log *log = bp->l_log;
assert(bp->l_wqnext == NULL);
/*
* return the buffer to head of freelist
*/
bp->l_freelist = log->lbuf_free;
log->lbuf_free = bp;
wake_up(&log->free_wait);
return;
} |
functions | void lbmRedrive(struct lbuf *bp)
{
unsigned long flags;
spin_lock_irqsave(&log_redrive_lock, flags);
bp->l_redrive_next = log_redrive_list;
log_redrive_list = bp;
spin_unlock_irqrestore(&log_redrive_lock, flags);
wake_up_process(jfsIOthread);
} |
functions | int lbmRead(struct jfs_log *log, int pn, struct lbuf **bpp)
{
struct bio *bio;
struct lbuf *bp;
/*
* allocate a log buffer
*/
*bpp = bp = lbmAllocate(log, pn);
jfs_info("lbmRead: bp:0x%p pn:0x%x", bp, pn);
bp->l_flag |= lbmREAD;
bio = bio_alloc(GFP_NOFS, 1);
bio->bi_iter.bi_sector = bp->l_blkno << (log-... |
functions | void lbmWrite(struct jfs_log *log, struct lbuf *bp, int flag,
int cant_block)
{
struct lbuf *tail;
unsigned long flags;
jfs_info("lbmWrite: bp:0x%p flag:0x%x pn:0x%x", bp, flag, bp->l_pn);
/* map the logical block address to physical block address */
bp->l_blkno =
log->base + (bp->l_pn << (L2LOGPSIZE - l... |
functions | else if (flag & lbmSYNC)
{
lbmStartIO(bp);
} |
functions | void lbmDirectWrite(struct jfs_log *log, struct lbuf *bp, int flag)
{
jfs_info("lbmDirectWrite: bp:0x%p flag:0x%x pn:0x%x",
bp, flag, bp->l_pn);
/*
* initialize buffer for device driver
*/
bp->l_flag = flag | lbmDIRECT;
/* map the logical block address to physical block address */
bp->l_blkno =
log->ba... |
functions | void lbmStartIO(struct lbuf *bp)
{
struct bio *bio;
struct jfs_log *log = bp->l_log;
jfs_info("lbmStartIO");
bio = bio_alloc(GFP_NOFS, 1);
bio->bi_iter.bi_sector = bp->l_blkno << (log->l2bsize - 9);
bio->bi_bdev = log->bdev;
bio_add_page(bio, bp->l_page, LOGPSIZE, bp->l_offset);
BUG_ON(bio->bi_iter.bi_size !... |
functions | int lbmIOWait(struct lbuf *bp, int flag)
{
unsigned long flags;
int rc = 0;
jfs_info("lbmIOWait1: bp:0x%p flag:0x%x:0x%x", bp, bp->l_flag, flag);
LCACHE_LOCK(flags); /* disable+lock */
LCACHE_SLEEP_COND(bp->l_ioevent, (bp->l_flag & lbmDONE), flags);
rc = (bp->l_flag & lbmERROR) ? -EIO : 0;
if (flag & lbmFR... |
functions | void lbmIODone(struct bio *bio)
{
struct lbuf *bp = bio->bi_private;
struct lbuf *nextbp, *tail;
struct jfs_log *log;
unsigned long flags;
/*
* get back jfs buffer bound to the i/o buffer
*/
jfs_info("lbmIODone: bp:0x%p flag:0x%x", bp, bp->l_flag);
LCACHE_LOCK(flags); /* disable+lock */
bp->l_flag |= lb... |
functions | else if (bp->l_flag & lbmGC)
{
LCACHE_UNLOCK(flags);
lmPostGC(bp);
} |
functions | int jfsIOWait(void *arg)
{
struct lbuf *bp;
do
{
spin_lock_irq(&log_redrive_lock);
while ((bp = log_redrive_list))
{
log_redrive_list = bp->l_redrive_next;
bp->l_redrive_next = NULL;
spin_unlock_irq(&log_redrive_lock);
lbmStartIO(bp);
spin_lock_irq(&log_redrive_lock);
} |
functions | int lmLogFormat(struct jfs_log *log, s64 logAddress, int logSize)
{
int rc = -EIO;
struct jfs_sb_info *sbi;
struct logsuper *logsuper;
struct logpage *lp;
int lspn; /* log sequence page number */
struct lrd *lrd_ptr;
int npages = 0;
struct lbuf *bp;
jfs_info("lmLogFormat: logAddress:%Ld logSize:%d",
(lon... |
functions | int jfs_lmstats_proc_show(struct seq_file *m, void *v)
{
seq_printf(m,
"JFS Logmgr stats\n"
"================\n"
"commits = %d\n"
"writes submitted = %d\n"
"writes completed = %d\n"
"full pages submitted = %d\n"
"partial pages submitted = %d\n",
lmStat.commit,
lmSt... |
functions | int jfs_lmstats_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, jfs_lmstats_proc_show, NULL);
} |
defines | #define DDSD_CAPS 0x00000001l ///< default |
defines | #define DDSD_HEIGHT 0x00000002l ///< default |
defines | #define DDSD_WIDTH 0x00000004l ///< default |
defines | #define DDSD_PIXELFORMAT 0x00001000l ///< default |
defines | #define DDSD_PITCH 0x00000008l ///< For uncompressed formats |
defines | #define DDSD_MIPMAPCOUNT 0x00020000l |
defines | #define DDSD_LINEARSIZE 0x00080000l ///< For compressed formats |
defines | #define DDSD_DEPTH 0x00800000l ///< Volume Textures |
defines | #define DDPF_ALPHAPIXELS 0x00000001l |
defines | #define DDPF_FOURCC 0x00000004l ///< Compressed formats |
defines | #define DDPF_RGB 0x00000040l ///< Uncompressed formats |
defines | #define DDPF_ALPHA 0x00000002l |
defines | #define DDPF_COMPRESSED 0x00000080l |
defines | #define DDPF_LUMINANCE 0x00020000l |
defines | #define DDPF_PALETTEINDEXED4 0x00000008l |
defines | #define DDPF_PALETTEINDEXEDTO8 0x00000010l |
defines | #define DDPF_PALETTEINDEXED8 0x00000020l |
defines | #define DDSCAPS_COMPLEX 0x00000008l |
defines | #define DDSCAPS_TEXTURE 0x00001000l ///< default |
defines | #define DDSCAPS_MIPMAP 0x00400000l |
defines |
#define DDSCAPS2_VOLUME 0x00200000l |
defines | #define DDSCAPS2_CUBEMAP 0x00000200L |
defines | #define DDSCAPS2_CUBEMAP_POSITIVEX 0x00000400L |
defines | #define DDSCAPS2_CUBEMAP_NEGATIVEX 0x00000800L |
defines | #define DDSCAPS2_CUBEMAP_POSITIVEY 0x00001000L |
defines | #define DDSCAPS2_CUBEMAP_NEGATIVEY 0x00002000L |
defines | #define DDSCAPS2_CUBEMAP_POSITIVEZ 0x00004000L |
defines | #define DDSCAPS2_CUBEMAP_NEGATIVEZ 0x00008000L |
defines |
#define MAKEFOURCC(ch0, ch1, ch2, ch3) \ |
defines |
#define FOURCC_DDS MAKEFOURCC('D', 'D', 'S', ' ') |
defines | #define FOURCC_DXT1 MAKEFOURCC('D', 'X', 'T', '1') |
defines | #define FOURCC_DXT2 MAKEFOURCC('D', 'X', 'T', '2') |
defines | #define FOURCC_DXT3 MAKEFOURCC('D', 'X', 'T', '3') |
defines | #define FOURCC_DXT4 MAKEFOURCC('D', 'X', 'T', '4') |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.