Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lfs_bmapv(2) [netbsd man page]

LFS_BMAPV(2)						      BSD System Calls Manual						      LFS_BMAPV(2)

NAME
lfs_bmapv -- retrieve disk addresses for arrays of blocks LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <ufs/lfs/lfs.h> int lfs_bmapv(fsid_t *fsidp, BLOCK_INFO *blkiov, int blkcnt); DESCRIPTION
lfs_bmapv() fills in the bi_daddr field for every block listed in the block array blkiov with the disk address corresponding to the logical block bi_lbn of the file with inode bi_inode. If bi_lbn is LFS_UNUSED_LBN, the disk location of the inode block containing the file's inode will be returned in bi_daddr instead. The fsidp argument contains the id of the file system to which the inodes and blocks belong. The blkiov argument is an array of BLOCK_INFO structures (see below). The blkcnt argument determines the size of the blkiov array. typedef struct block_info { ino_t bi_inode; /* inode # */ ufs_daddr_t bi_lbn; /* logical block w/in file */ ufs_daddr_t bi_daddr; /* disk address of block */ time_t bi_segcreate; /* origin segment create time */ int bi_version; /* file version number */ void *bi_bp; /* data buffer */ int bi_size; /* size of the block (if fragment) */ } BLOCK_INFO; RETURN VALUES
lfs_bmapv() returns 0 on success, or -1 on error. ERRORS
An error return from lfs_bmapv() indicates: [EFAULT] fsidp points outside the process's allocated address space. [EINVAL] *fsidp does not specify a valid file system. SEE ALSO
lfs_markv(2), lfs_segclean(2), lfs_segwait(2), lfs_cleanerd(8) HISTORY
The lfs_bmapv() function call appeared in 4.4BSD. BSD
May 23, 2000 BSD

Check Out this Related Man Page

DUMPLFS(8)						    BSD System Manager's Manual 						DUMPLFS(8)

NAME
dumplfs -- dump file system information SYNOPSIS
dumplfs [-adiS] [-b blkno] [-I blkno] [-s segno] filesys | device DESCRIPTION
dumplfs prints out the file system layout information for the LFS file system or special device specified. The listing is very long and detailed. This command is useful mostly for finding out certain file system information such as the file system block size. The following flags are interpreted by dumplfs. -a Dump the contents of all superblocks, not just the first. Superblocks appear in the dumplfs output with the segment containing them. -b Use the block specified immediately after the flag as the super block for the filesystem. -d Check partial segment data checksums and report mismatches. This makes dumplfs operate much more slowly. -I Use the block specified immediately after the flag as the inode block containing the index file inode. -i Dump information about the inode free list. -S Dump information about the segment table. -s Add the segment number immediately following the flag to a list of segments to dump. This flag may be specified more than once to dump more than one segment. The default is to dump all segments. SEE ALSO
disktab(5), fs(5), disklabel(8), newfs_lfs(8) HISTORY
The dumplfs command appeared in 4.4BSD. BSD
June 13, 2000 BSD
Man Page