Linux Kernel
3.7.1
|
#include <linux/fs.h>
#include <linux/string.h>
#include <linux/errno.h>
#include "nilfs.h"
#include "bmap.h"
#include "btree.h"
#include "direct.h"
#include "btnode.h"
#include "mdt.h"
#include "dat.h"
#include "alloc.h"
Go to the source code of this file.
Macros | |
#define | NILFS_BMAP_GROUP_DIV 8 |
int nilfs_bmap_assign | ( | struct nilfs_bmap * | bmap, |
struct buffer_head ** | bh, | ||
unsigned long | blocknr, | ||
union nilfs_binfo * | binfo | ||
) |
nilfs_bmap_assign - assign a new block number to a block : bmap : pointer to buffer head : block number : block information
Description: nilfs_bmap_assign() assigns the block number to the buffer specified by .
Return Value: On success, 0 is returned and the buffer head of a newly create buffer and the block information associated with the buffer are stored in the place pointed by and , respectively. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
void nilfs_bmap_clear | ( | struct nilfs_bmap * | bmap | ) |
nilfs_bmap_clear - free resources a bmap holds : bmap
Description: nilfs_bmap_clear() frees resources associated with .
int nilfs_bmap_delete | ( | struct nilfs_bmap * | bmap, |
unsigned long | key | ||
) |
nilfs_bmap_delete - delete a key-record pair from a bmap : bmap : key
Description: nilfs_bmap_delete() deletes the key-record pair specified by from .
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-ENOENT - A record associated with does not exist.
__u64 nilfs_bmap_find_target_in_group | ( | const struct nilfs_bmap * | bmap | ) |
__u64 nilfs_bmap_find_target_seq | ( | const struct nilfs_bmap * | bmap, |
__u64 | key | ||
) |
|
read |
void nilfs_bmap_init_gc | ( | struct nilfs_bmap * | bmap | ) |
int nilfs_bmap_insert | ( | struct nilfs_bmap * | bmap, |
unsigned long | key, | ||
unsigned long | rec | ||
) |
nilfs_bmap_insert - insert a new key-record pair into a bmap : bmap : key : record
Description: nilfs_bmap_insert() inserts the new key-record pair specified by and into .
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-EEXIST - A record associated with already exist.
int nilfs_bmap_last_key | ( | struct nilfs_bmap * | bmap, |
unsigned long * | key | ||
) |
nilfs_bmap_lookup_at_level - find a data block or node block : bmap : key : level : place to store the value associated to
Description: nilfs_bmap_lookup_at_level() finds a record whose key matches in the block at of the bmap.
Return Value: On success, 0 is returned and the record associated with is stored in the place pointed by . On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-ENOENT - A record associated with does not exist.
int nilfs_bmap_lookup_contig | ( | struct nilfs_bmap * | bmap, |
__u64 | key, | ||
__u64 * | ptrp, | ||
unsigned | maxblocks | ||
) |
void nilfs_bmap_lookup_dirty_buffers | ( | struct nilfs_bmap * | bmap, |
struct list_head * | listp | ||
) |
int nilfs_bmap_mark | ( | struct nilfs_bmap * | bmap, |
__u64 | key, | ||
int | level | ||
) |
nilfs_bmap_mark - mark block dirty : bmap : key : level
Description: nilfs_bmap_mark() marks the block specified by and as dirty.
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
int nilfs_bmap_propagate | ( | struct nilfs_bmap * | bmap, |
struct buffer_head * | bh | ||
) |
nilfs_bmap_propagate - propagate dirty state : bmap : buffer head
Description: nilfs_bmap_propagate() marks the buffers that directly or indirectly refer to the block specified by dirty.
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
int nilfs_bmap_read | ( | struct nilfs_bmap * | bmap, |
struct nilfs_inode * | raw_inode | ||
) |
nilfs_bmap_read - read a bmap from an inode : bmap : on-disk inode
Description: nilfs_bmap_read() initializes the bmap .
Return Value: On success, 0 is returned. On error, the following negative error code is returned.
%-ENOMEM - Insufficient amount of memory available.
void nilfs_bmap_restore | ( | struct nilfs_bmap * | bmap, |
const struct nilfs_bmap_store * | store | ||
) |
void nilfs_bmap_save | ( | const struct nilfs_bmap * | bmap, |
struct nilfs_bmap_store * | store | ||
) |
int nilfs_bmap_test_and_clear_dirty | ( | struct nilfs_bmap * | bmap | ) |
int nilfs_bmap_truncate | ( | struct nilfs_bmap * | bmap, |
unsigned long | key | ||
) |
nilfs_bmap_truncate - truncate a bmap to a specified key : bmap : key
Description: nilfs_bmap_truncate() removes key-record pairs whose keys are greater than or equal to from .
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
void nilfs_bmap_write | ( | struct nilfs_bmap * | bmap, |
struct nilfs_inode * | raw_inode | ||
) |
nilfs_bmap_write - write back a bmap to an inode : bmap : on-disk inode
Description: nilfs_bmap_write() stores in .