Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

blk_init_queue(9) [suse man page]

BLK_INIT_QUEUE(9)						   Block Devices						 BLK_INIT_QUEUE(9)

NAME
blk_init_queue - prepare a request queue for use with a block device SYNOPSIS
struct request_queue * blk_init_queue(request_fn_proc * rfn, spinlock_t * lock); ARGUMENTS
rfn The function to be called to process requests that have been placed on the queue. lock Request queue spin lock DESCRIPTION
If a block device wishes to use the standard request handling procedures, which sorts requests and coalesces adjacent requests, then it must call blk_init_queue. The function rfn will be called when there are requests on the queue that need to be processed. If the device supports plugging, then rfn may not be called immediately when requests are available on the queue, but may be called at some time later instead. Plugged queues are generally unplugged when a buffer belonging to one of the requests on the queue is needed, or due to memory pressure. rfn is not required, or even expected, to remove all requests off the queue, but only as many as it can handle at a time. If it does leave requests on the queue, it is responsible for arranging that the requests get dealt with eventually. The queue spin lock must be held while manipulating the requests on the request queue; this lock will be taken also from interrupt context, so irq disabling is needed for it. Function returns a pointer to the initialized request queue, or NULL if it didn't succeed. NOTE
blk_init_queue must be paired with a blk_cleanup_queue call when the block device is deactivated (such as at module unload). COPYRIGHT
Kernel Hackers Manual 2.6. July 2010 BLK_INIT_QUEUE(9)

Check Out this Related Man Page

lprm(1) 						      General Commands Manual							   lprm(1)

NAME
lprm - Removes requests from the line printer spooling queue SYNOPSIS
lprm [-Pprinter] [-] [request_ID...] [user...] The lprm command removes one or more requests from a printer's spool queue. OPTIONS
Removes all requests that a user owns. If specified by a user with superuser authority, the spool queue is emptied entirely. Specifies the queue associated with a specific printer; otherwise, the default printer or the value of the PRINTER variable in the environment is used. DESCRIPTION
Because the spooling directory is protected from users, using lprm is normally the way a user can remove a request. The lprm command without any arguments deletes the currently active request if it is owned by the user who invoked lprm. The - flag removes all requests from the user issuing the command. If a user who has superuser authority uses this flag, the spool queue is emptied entirely. The owner is determined by the user's username and hostname on the machine where the lpr command was invoked. You can remove an individual request from a queue by specifying its request ID. (You can obtain the request ID by using the lpq or lpstat commands.) Specifying one or more users removes any requests queued belonging to those users. This works only for a user with superuser authority. The lprm command is silent if there are no requests in the queue that match the request list. The lprm command kills an active daemon, if necessary, before removing any spooling files. If a daemon is killed, a new one is automati- cally restarted upon completion of file removals. NOTES
Because race conditions are possible in the update of the lock file, the currently active request may be incorrectly identified. DIAGNOSTICS
The user tried to remove files that belong to another user. EXAMPLES
To remove a request from the default queue by specifying the request ID, enter: lprm 13 To remove a request from a specific queue, enter: lprm -Plp0 13 To remove from a specific queue a request from user guest, enter: lprm -Plp0 guest FILES
Printer description file. Spool directories. Daemon control files. Data files specified in cf files. Temporary copies of cf files. Lock file used to obtain the process ID of the current daemon and the request ID of the currently active request. SEE ALSO
Commands: lp(1), lpc(8), lpd(8), lpq(1), lpr(1), lpstat(1) lprm(1)
Man Page