*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->NetBSD man pages -> lfs_markv (2)              
Title
Content
Arch
Section
 

LFS_MARKV(2)

Contents


NAME    [Toc]    [Back]

     lfs_markv - rewrite disk blocks to new disk locations

LIBRARY    [Toc]    [Back]

     Standard C Library (libc, -lc)

SYNOPSIS    [Toc]    [Back]

     #include <sys/types.h>
     #include <ufs/lfs/lfs.h>

     int
     lfs_markv(fsid_t *fsidp, BLOCK_INFO *blkiov, int blkcnt);

DESCRIPTION    [Toc]    [Back]

     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    [Toc]    [Back]

     lfs_markv() returns 0 on success, or -1 on error.

ERRORS    [Toc]    [Back]

     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    [Toc]    [Back]

      
      
     lfs_markv(2), lfs_segclean(2), lfs_segwait(2), lfs_cleanerd(8)

HISTORY    [Toc]    [Back]

     The lfs_markv() function call appeared in 4.4BSD.

BUGS    [Toc]    [Back]

     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
[ Back ]
 Similar pages
Name OS Title
lfs_bmapv NetBSD retrieve disk addresses for arrays of blocks
df IRIX report number of free disk blocks
shblk Tru64 Displays disk blocks, as unformatted hexadecimal numbers
df HP-UX report number of free file system disk blocks
bdf HP-UX report number of free disk blocks (Berkeley version)
df_nfs HP-UX report number of free CDFS, HFS, or NFS file system disk blocks
df_vxfs HP-UX report number of free disk blocks on a VxFS file system
df_hfs HP-UX report number of free CDFS, HFS, or NFS file system disk blocks
df_cdfs HP-UX report number of free CDFS, HFS, or NFS file system disk blocks
disklabel Tru64 Reads and writes a disk pack label and formats disk partitions
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service