Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
segbuf.h File Reference
#include <linux/fs.h>
#include <linux/buffer_head.h>
#include <linux/bio.h>
#include <linux/completion.h>

Go to the source code of this file.

Data Structures

struct  nilfs_segsum_info
 
struct  nilfs_segment_buffer
 

Macros

#define NILFS_LIST_SEGBUF(head)   list_entry((head), struct nilfs_segment_buffer, sb_list)
 
#define NILFS_NEXT_SEGBUF(segbuf)   NILFS_LIST_SEGBUF((segbuf)->sb_list.next)
 
#define NILFS_PREV_SEGBUF(segbuf)   NILFS_LIST_SEGBUF((segbuf)->sb_list.prev)
 
#define NILFS_LAST_SEGBUF(head)   NILFS_LIST_SEGBUF((head)->prev)
 
#define NILFS_FIRST_SEGBUF(head)   NILFS_LIST_SEGBUF((head)->next)
 
#define NILFS_SEGBUF_IS_LAST(segbuf, head)   ((segbuf)->sb_list.next == (head))
 
#define nilfs_for_each_segbuf_before(s, t, h)
 
#define NILFS_SEGBUF_FIRST_BH(head)   (list_entry((head)->next, struct buffer_head, b_assoc_buffers))
 
#define NILFS_SEGBUF_NEXT_BH(bh)
 
#define NILFS_SEGBUF_BH_IS_LAST(bh, head)   ((bh)->b_assoc_buffers.next == head)
 

Functions

struct nilfs_segment_buffernilfs_segbuf_new (struct super_block *)
 
void nilfs_segbuf_free (struct nilfs_segment_buffer *)
 
void nilfs_segbuf_map (struct nilfs_segment_buffer *, __u64, unsigned long, struct the_nilfs *)
 
void nilfs_segbuf_map_cont (struct nilfs_segment_buffer *segbuf, struct nilfs_segment_buffer *prev)
 
void nilfs_segbuf_set_next_segnum (struct nilfs_segment_buffer *, __u64, struct the_nilfs *)
 
int nilfs_segbuf_reset (struct nilfs_segment_buffer *, unsigned, time_t, __u64)
 
int nilfs_segbuf_extend_segsum (struct nilfs_segment_buffer *)
 
int nilfs_segbuf_extend_payload (struct nilfs_segment_buffer *, struct buffer_head **)
 
void nilfs_segbuf_fill_in_segsum (struct nilfs_segment_buffer *)
 
void nilfs_clear_logs (struct list_head *logs)
 
void nilfs_truncate_logs (struct list_head *logs, struct nilfs_segment_buffer *last)
 
int nilfs_write_logs (struct list_head *logs, struct the_nilfs *nilfs)
 
int nilfs_wait_on_logs (struct list_head *logs)
 
void nilfs_add_checksums_on_logs (struct list_head *logs, u32 seed)
 

Variables

struct kmem_cachenilfs_segbuf_cachep
 

Macro Definition Documentation

#define NILFS_FIRST_SEGBUF (   head)    NILFS_LIST_SEGBUF((head)->next)

Definition at line 103 of file segbuf.h.

#define nilfs_for_each_segbuf_before (   s,
  t,
  h 
)
Value:
for ((s) = NILFS_FIRST_SEGBUF(h); (s) != (t); \

Definition at line 106 of file segbuf.h.

#define NILFS_LAST_SEGBUF (   head)    NILFS_LIST_SEGBUF((head)->prev)

Definition at line 102 of file segbuf.h.

#define NILFS_LIST_SEGBUF (   head)    list_entry((head), struct nilfs_segment_buffer, sb_list)

Definition at line 98 of file segbuf.h.

#define NILFS_NEXT_SEGBUF (   segbuf)    NILFS_LIST_SEGBUF((segbuf)->sb_list.next)

Definition at line 100 of file segbuf.h.

#define NILFS_PREV_SEGBUF (   segbuf)    NILFS_LIST_SEGBUF((segbuf)->sb_list.prev)

Definition at line 101 of file segbuf.h.

#define NILFS_SEGBUF_BH_IS_LAST (   bh,
  head 
)    ((bh)->b_assoc_buffers.next == head)

Definition at line 115 of file segbuf.h.

#define NILFS_SEGBUF_FIRST_BH (   head)    (list_entry((head)->next, struct buffer_head, b_assoc_buffers))

Definition at line 110 of file segbuf.h.

#define NILFS_SEGBUF_IS_LAST (   segbuf,
  head 
)    ((segbuf)->sb_list.next == (head))

Definition at line 104 of file segbuf.h.

#define NILFS_SEGBUF_NEXT_BH (   bh)
Value:
(list_entry((bh)->b_assoc_buffers.next, struct buffer_head, \
b_assoc_buffers))

Definition at line 112 of file segbuf.h.

Function Documentation

void nilfs_add_checksums_on_logs ( struct list_head logs,
u32  seed 
)

nilfs_add_checksums_on_logs - add checksums on the logs : list of segment buffers storing target logs : checksum seed value

Definition at line 326 of file segbuf.c.

void nilfs_clear_logs ( struct list_head logs)

Definition at line 274 of file segbuf.c.

int nilfs_segbuf_extend_payload ( struct nilfs_segment_buffer ,
struct buffer_head **   
)

Definition at line 121 of file segbuf.c.

int nilfs_segbuf_extend_segsum ( struct nilfs_segment_buffer )

Definition at line 108 of file segbuf.c.

void nilfs_segbuf_fill_in_segsum ( struct nilfs_segment_buffer )

Definition at line 157 of file segbuf.c.

void nilfs_segbuf_free ( struct nilfs_segment_buffer )

Definition at line 68 of file segbuf.c.

void nilfs_segbuf_map ( struct nilfs_segment_buffer ,
__u64  ,
unsigned  long,
struct the_nilfs  
)

Definition at line 73 of file segbuf.c.

void nilfs_segbuf_map_cont ( struct nilfs_segment_buffer segbuf,
struct nilfs_segment_buffer prev 
)

nilfs_segbuf_map_cont - map a new log behind a given log : new segment buffer : segment buffer containing a log to be continued

Definition at line 90 of file segbuf.c.

struct nilfs_segment_buffer* nilfs_segbuf_new ( struct super_block )
read

Definition at line 47 of file segbuf.c.

int nilfs_segbuf_reset ( struct nilfs_segment_buffer ,
unsigned  ,
time_t  ,
__u64   
)

Definition at line 136 of file segbuf.c.

void nilfs_segbuf_set_next_segnum ( struct nilfs_segment_buffer ,
__u64  ,
struct the_nilfs  
)

Definition at line 101 of file segbuf.c.

void nilfs_truncate_logs ( struct list_head logs,
struct nilfs_segment_buffer last 
)

Definition at line 282 of file segbuf.c.

int nilfs_wait_on_logs ( struct list_head logs)

Definition at line 308 of file segbuf.c.

int nilfs_write_logs ( struct list_head logs,
struct the_nilfs nilfs 
)

Definition at line 295 of file segbuf.c.

Variable Documentation

struct kmem_cache* nilfs_segbuf_cachep

Definition at line 72 of file super.c.