Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lfs_markv(2) [netbsd man page]

LFS_MARKV(2)						      BSD System Calls Manual						      LFS_MARKV(2)

lfs_markv -- rewrite disk blocks to new disk locations LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> #include <ufs/lfs/lfs.h> int lfs_markv(fsid_t *fsidp, BLOCK_INFO *blkiov, int blkcnt); DESCRIPTION
lfs_markv() rewrites the blocks specified in blkiov to new disk locations, for the purposes of grouping them next to one another, or to move them out of a segment to clean it. All fields of the BLOCK_INFO structure must be filled in, except for bi_segcreate. If bi_daddr is not the correct current address for logical block bi_lbn of the file with inode number bi_inode, or if the file's version number does not match bi_version, the block will not be written to disk, but no error will be returned. The fsidp argument contains the id of the filesystem to which the inodes and blocks belong. The bi_bp field contains bi_size bytes of data to be written into the appropriate block. If bi_lbn is specified as LFS_UNUSED_LBN, the inode itself will be rewritten. 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_markv() returns 0 on success, or -1 on error. ERRORS
An error return from lfs_markv() indicates: [EFAULT] fsidp points outside the process's allocated address space. [EINVAL] *fsidp does not specify a valid filesystem. [EBUSY] One or more of the inodes whose blocks were to be written was locked, and its blocks were not rewritten. SEE ALSO
lfs_segclean(2), lfs_segwait(2), lfs_cleanerd(8) HISTORY
The lfs_markv() function call appeared in 4.4BSD. BUGS
The functionality of lfs_markv() does not really belong in user space. Among other things it could be used to work around the SF_IMMUTABLE and SF_APPEND file flags (see chflags(2)). BSD
May 23, 2000 BSD

Check Out this Related Man Page

MKFS.MINIX(8)                                                  System Administration                                                 MKFS.MINIX(8)

mkfs.minix - make a Minix filesystem SYNOPSIS
mkfs.minix [options] device [size-in-blocks] DESCRIPTION
mkfs.minix creates a Linux MINIX filesystem on a device (usually a disk partition). The device is usually of the following form: /dev/hda[1-8] (IDE disk 1) /dev/hdb[1-8] (IDE disk 2) /dev/sda[1-8] (SCSI disk 1) /dev/sdb[1-8] (SCSI disk 2) The device may be a block device or a image file of one, but this is not enforced. Expect not much fun on a character device :-). The size-in-blocks parameter is the desired size of the file system, in blocks. It is present only for backwards compatibility. If omit- ted the size will be determined automatically. Only block counts strictly greater than 10 and strictly less than 65536 are allowed. OPTIONS
-c, --check Check the device for bad blocks before creating the filesystem. If any are found, the count is printed. -n, --namelength length Specify the maximum length of filenames. Currently, the only allowable values are 14 and 30 for file system versions 1 and 2. Ver- sion 3 allows only value 60. The default is 30. -i, --inodes number Specify the number of inodes for the filesystem. -l, --badblocks filename Read the list of bad blocks from filename. The file has one bad-block number per line. The count of bad blocks read is printed. -1 Make a Minix version 1 filesystem. This is the default. -2, -v Make a Minix version 2 filesystem. -3 Make a Minix version 3 filesystem. -V, --version Display version information and exit. The long option cannot be combined with other options. -h, --help Display help text and exit. EXIT CODES
The exit code returned by mkfs.minix is one of the following: 0 No errors 8 Operational error 16 Usage or syntax error SEE ALSO
fsck(8), mkfs(8), reboot(8) AVAILABILITY
The mkfs.minix command is part of the util-linux package and is available from util-linux June 2015 MKFS.MINIX(8)
Man Page