Linux Kernel
3.7.1
|
#include <linux/buffer_head.h>
#include <linux/mpage.h>
#include <linux/mm.h>
#include <linux/writeback.h>
#include <linux/backing-dev.h>
#include <linux/swap.h>
#include <linux/slab.h>
#include "nilfs.h"
#include "btnode.h"
#include "segment.h"
#include "page.h"
#include "mdt.h"
Go to the source code of this file.
Macros | |
#define | NILFS_MDT_MAX_RA_BLOCKS (16 - 1) |
nilfs_mdt_forget_block - discard dirty state and try to remove the page : inode of the meta data file : block offset
nilfs_mdt_forget_block() clears a dirty flag of the specified buffer, and tries to release the page including the buffer from a page cache.
Return Value: On success, 0 is returned. On error, one of the following negative error code is returned.
%-EBUSY - page has an active buffer.
%-ENOENT - page cache has no page addressed by the offset.
int nilfs_mdt_get_block | ( | struct inode * | inode, |
unsigned long | blkoff, | ||
int | create, | ||
void(*)(struct inode *, struct buffer_head *, void *) | init_block, | ||
struct buffer_head ** | out_bh | ||
) |
nilfs_mdt_get_block - read or create a buffer on meta data file. : inode of the meta data file : block offset : create flag : initializer used for newly allocated block : output of a pointer to the buffer_head
nilfs_mdt_get_block() looks up the specified buffer and tries to create a new buffer if is not zero. On success, the returned buffer is assured to be either existing or formatted using a buffer lock on success. is substituted only when zero is returned.
Return Value: On success, it returns 0. On error, the following negative error code is returned.
%-ENOMEM - Insufficient memory available.
%-EIO - I/O error
%-ENOENT - the specified block does not exist (hole block)
%-EROFS - Read only filesystem (for create mode)
nilfs_mdt_mark_block_dirty - mark a block on the meta data file dirty. : inode of the meta data file : block offset
Return Value: On success, it returns 0. On error, the following negative error code is returned.
%-ENOMEM - Insufficient memory available.
%-EIO - I/O error
%-ENOENT - the specified block does not exist (hole block)