Linux Kernel
3.7.1
|
Go to the source code of this file.
nilfs_sufile_alloc - allocate a segment : inode of segment usage file : pointer to segment number
Description: nilfs_sufile_alloc() allocates a clean segment.
Return Value: On success, 0 is returned and the segment number of the allocated segment 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.
%-ENOSPC - No clean segment left.
int nilfs_sufile_get_stat | ( | struct inode * | sufile, |
struct nilfs_sustat * | sustat | ||
) |
nilfs_sufile_get_stat - get segment usage statistics : inode of segment usage file : pointer to a structure of segment usage statistics
Description: nilfs_sufile_get_stat() returns information about segment usage.
Return Value: On success, 0 is returned, and segment usage information 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.
ssize_t nilfs_sufile_get_suinfo | ( | struct inode * | sufile, |
__u64 | segnum, | ||
void * | buf, | ||
unsigned | sisz, | ||
size_t | nsi | ||
) |
nilfs_sufile_get_suinfo - : inode of segment usage file : segment number to start looking : array of suinfo : byte size of suinfo : size of suinfo array
Description:
Return Value: On success, 0 is returned and .... On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
int nilfs_sufile_read | ( | struct super_block * | sb, |
size_t | susize, | ||
struct nilfs_inode * | raw_inode, | ||
struct inode ** | inodep | ||
) |
nilfs_sufile_resize - resize segment array : inode of segment usage file : new number of segments
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.
%-ENOSPC - Enough free space is not left for shrinking
%-EBUSY - Dirty or active segments exist in the region to be truncated
nilfs_sufile_set_alloc_range - limit range of segment to be allocated : inode of segment usage file : minimum segment number of allocatable region (inclusive) : maximum segment number of allocatable region (inclusive)
Return Value: On success, 0 is returned. On error, one of the following negative error codes is returned.
%-ERANGE - invalid segment region
int nilfs_sufile_updatev | ( | struct inode * | sufile, |
__u64 * | segnumv, | ||
size_t | nsegs, | ||
int | create, | ||
size_t * | ndone, | ||
void(*)(struct inode *, __u64, struct buffer_head *, struct buffer_head *) | dofunc | ||
) |
nilfs_sufile_updatev - modify multiple segment usages at a time : inode of segment usage file : array of segment numbers : size of array : creation flag : place to store number of modified segments on : primitive operation for the update
Description: nilfs_sufile_updatev() repeatedly calls against the given array of segments. The is called with buffers of a header block and the sufile block in which the target segment usage entry is contained. If is given, the number of successfully modified segments from the head is stored in the place points to.
Return Value: On success, zero is returned. On error, one of the following negative error codes is returned.
%-EIO - I/O error.
%-ENOMEM - Insufficient amount of memory available.
%-ENOENT - Given segment usage is in hole block (may be returned if is zero)
%-EINVAL - Invalid segment usage number