Linux Kernel
3.7.1
|
#include <linux/list.h>
#include <linux/spinlock.h>
#include <linux/writeback.h>
#include "incore.h"
Go to the source code of this file.
Functions | |
unsigned int | gfs2_struct2blk (struct gfs2_sbd *sdp, unsigned int nstruct, unsigned int ssize) |
int | gfs2_log_reserve (struct gfs2_sbd *sdp, unsigned int blks) |
void | gfs2_log_flush (struct gfs2_sbd *sdp, struct gfs2_glock *gl) |
void | gfs2_log_commit (struct gfs2_sbd *sdp, struct gfs2_trans *trans) |
void | gfs2_remove_from_ail (struct gfs2_bufdata *bd) |
void | gfs2_ail1_flush (struct gfs2_sbd *sdp, struct writeback_control *wbc) |
void | gfs2_log_shutdown (struct gfs2_sbd *sdp) |
void | gfs2_meta_syncfs (struct gfs2_sbd *sdp) |
int | gfs2_logd (void *data) |
void gfs2_ail1_flush | ( | struct gfs2_sbd * | sdp, |
struct writeback_control * | wbc | ||
) |
void gfs2_log_commit | ( | struct gfs2_sbd * | sdp, |
struct gfs2_trans * | tr | ||
) |
gfs2_log_commit - Commit a transaction to the log : the filesystem : the transaction
We wake up gfs2_logd if the number of pinned blocks exceed thresh1 or the total number of used blocks (pinned blocks plus AIL blocks) is greater than thresh2.
At mount time thresh1 is 1/3rd of journal size, thresh2 is 2/3rd of journal size.
Returns: errno
void gfs2_log_flush | ( | struct gfs2_sbd * | sdp, |
struct gfs2_glock * | gl | ||
) |
gfs2_log_reserve - Make a log reservation : The GFS2 superblock : The number of blocks to reserve
Note that we never give out the last few blocks of the journal. Thats due to the fact that there is a small number of header blocks associated with each log flush. The exact number can't be known until flush time, so we ensure that we have just enough free blocks at all times to avoid running out during a log flush.
We no longer flush the log here, instead we wake up logd to do that for us. To avoid the thundering herd and to ensure that we deal fairly with queued waiters, we use an exclusive wait. This means that when we get woken with enough journal space to get our reservation, we need to wake the next waiter on the list.
Returns: errno
void gfs2_remove_from_ail | ( | struct gfs2_bufdata * | bd | ) |