Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lfs_segwait(2) [netbsd man page]

LFS_SEGWAIT(2)						      BSD System Calls Manual						    LFS_SEGWAIT(2)

lfs_segwait -- wait until a segment is written LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <sys/types.h> int lfs_segwait(fsid_t *fsidp, struct timeval *tv); DESCRIPTION
lfs_segwait() blocks until a new segment is acquired for writing by the filesystem specified by *fsidp or if *fsidp is -1, until a segment is acquired for writing by any LFS filesystem. If timeout is non-zero, lfs_segwait() will return after timeout milliseconds regardless of whether a new segment has been designated for writing or not. RETURN VALUES
lfs_segwait() returns 0 if a new segment was acquired; 1 if it timed out; or -1 on error. ERRORS
An error return from lfs_segwait() indicates: [EFAULT] fsidp points outside the process's allocated address space. [EINTR] A signal was delivered before the time limit expired and before a new segment was designated for writing. [EINVAL] The specified time limit is negative. SEE ALSO
lfs_bmapv(2), lfs_markv(2), lfs_segclean(2), lfs_cleanerd(8) HISTORY
The lfs_segwait() function call appeared in 4.4BSD. BSD
May 23, 2000 BSD

Check Out this Related 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
Man Page

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

assigning variables in sed command

I need to assign a variable within a variable in a sed command. I tried doing the following in c shell. set left = 1 set right = 2 set segment = qwerty sed -n -e "/$segment{$left}/,/$segment{$right}/p" file.txt what is wrong with this syntax? (3 Replies)
Discussion started by: wxornot
3 Replies

2. Shell Programming and Scripting

Grepping for filenames containing value in specific segment within file

I am trying to grep for filenames containing a specific value within a particular segment. The lines containing the segment I'm looking through reads like "HL^1^^1^1", "10^9^9^0", and "HL^11^4^8^1". I would like to find the data that contains only the number nine after the third caret where the... (4 Replies)
Discussion started by: HLee1981
4 Replies

3. IP Networking

Network Access on Different Segment

I do have 2 different segment network which different platform on each segment. E.g. 20 segment, Windows OS can talk to Unix OS and 21 segment practice same rule. Further more, Windows OS from 20 segment can talk to 21 segment other OS but only the UNIX OS in 20 segment fail to talk to 21 segment.... (3 Replies)
Discussion started by: HASM
3 Replies

4. Shell Programming and Scripting

extract segment

Hey all, could someone please direct me on how to extract a segment from a file between two tags? Thanks! (1 Reply)
Discussion started by: mpang_
1 Replies

5. UNIX for Dummies Questions & Answers

What does ls /nosuchdir means ???

I do have a segment in my code like follows: if then ls /nosuchdir fi what does the ls /nosuchdir means ?? (9 Replies)
Discussion started by: risshanth
9 Replies

6. UNIX for Dummies Questions & Answers

code segment

how do i close a do code segment? od? (1 Reply)
Discussion started by: trob
1 Replies

7. Programming

Memory addressing question

Forgive me if this sounds like a newbie question. Any time you obtain a stack address from a pointer, what is this relative to by default? Is it the extra segment, the stack segment, what? How do you change change the relative positioning in memory? Thanks in advance (1 Reply)
Discussion started by: stevenswj
1 Replies

8. Programming

Data segment or Text segment

Hi, Whether the following piece of code is placed in the read-only memory of code (text) segment or data segment? char *a = "Hello"; I am getting two different answers while searching in google :( that's why the confusion is (7 Replies)
Discussion started by: royalibrahim
7 Replies

9. Programming

why segment fault,

I always get segment fault, why? can sb help me and modify it, I have spend on much time on #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <sys/time.h> #include <string.h> #define MAX 10 pthread_t thread; void *thread1() { int *a; int i, n; ... (1 Reply)
Discussion started by: yanglei_fage
1 Replies

10. Shell Programming and Scripting

Reformat a string and pad space at the end

I need to read in the string from input file and reform it by cut each segment and check the last segement lenght. If the last segment length is not as expected (see below segment file or table. It is predefined), then pad enough space. Old string FU22222222CA6666666666AKxvbFMddreeadBP999... (1 Reply)
Discussion started by: menglm
1 Replies