kfifo_avail (9) Linux Manual Page
kfifo_avail – returns the number of unused elements in the fifo Synopsis kfifo_avail(fifo); Arguments fifo address of the fifo to be used Copyright
The Linux Manuals (man pages) document is an important part of Linux documents. Linux Manuals are organized as several sections. Each section has a group of commands for a specific area in Linux usage, administration or development.
kfifo_avail – returns the number of unused elements in the fifo Synopsis kfifo_avail(fifo); Arguments fifo address of the fifo to be used Copyright
kfifo_alloc – dynamically allocates a new fifo buffer Synopsis kfifo_alloc(fifo, size, gfp_mask); Arguments fifo pointer to the fifo size the number of elements in the fifo, this must be a power of 2 gfp_mask get_free_pages mask, passed to kmalloc Description This macro dynamically allocates a new fifo buffer. The numer of elements will be rounded-up…
kernel_to_ipc64_perm – convert kernel ipc permissions to user Synopsis void kernel_to_ipc64_perm(struct kern_ipc_perm *in, struct ipc64_perm *out); Arguments in kernel permissions out new style ipc permissions Description Turn the kernel object in into a set of permissions descriptions for returning to userspace (out). Copyright
kernel_recvmsg – Receive a message from a socket (kernel space) Synopsis int kernel_recvmsg(struct socket *sock, struct msghdr *msg, struct kvec *vec, size_t num, size_t size, int flags); Arguments sock The socket to receive the message from msg Received message vec Input s/g array for message data num Size of input s/g array size Number of…
kcalloc – allocate memory for an array. The memory is set to zero. Synopsis void *kcalloc(size_t n, size_t size, gfp_t flags); Arguments n number of elements. size element size. flags the type of memory to allocate (see kmalloc). Copyright
jbd2_journal_wipe – Wipe journal contents Synopsis int jbd2_journal_wipe(journal_t *journal, int write); Arguments journal Journal to act on. write flag (see below) Description Wipe out all of the contents of a journal, safely. This will produce a warning if the journal contains any valid recovery information. Must be called between journal_init_*() and jbd2_journal_load. If ‘write’ is…
jbd2_journal_update_sb_errno – Update error in the journal. Synopsis void jbd2_journal_update_sb_errno(journal_t *journal); Arguments journal The journal to update. Description Update a journal’s errno. Write updated superblock to disk waiting for IO to complete. Authors Roger Gammans <rgammans [at] computer-surgery.co.uk> Author. Stephen Tweedie <sct [at] redhat.com> Author. Copyright
jbd2_journal_unlock_updates – release barrier Synopsis void jbd2_journal_unlock_updates(journal_t *journal); Arguments journal Journal to release the barrier on. Description Release a transaction barrier obtained with jbd2_journal_lock_updates. Should be called without the journal lock held. Authors Roger Gammans <rgammans [at] computer-surgery.co.uk> Author. Stephen Tweedie <sct [at] redhat.com> Author. Copyright
jbd2_journal_try_to_free_buffers – try to free page buffers. Synopsis int jbd2_journal_try_to_free_buffers(journal_t *journal, struct page *page, gfp_t gfp_mask); Arguments journal journal for operation page to try and free gfp_mask we use the mask to detect how hard should we try to release buffers. If __GFP_DIRECT_RECLAIM and __GFP_FS is set, we wait for commit code to release the…
jbd2_journal_stop – complete a transaction Synopsis int jbd2_journal_stop(handle_t *handle); Arguments handle transaction to complete. Description All done for a particular handle. There is not much action needed here. We just return any remaining buffer credits to the transaction and remove the handle. The only complication is that we need to start a commit operation if…
jbd2_journal_start_reserved – start reserved handle Synopsis int jbd2_journal_start_reserved(handle_t *handle, unsigned int type, unsigned int line_no); Arguments handle handle to start type — undescribed — line_no — undescribed — Description Start handle that has been previously reserved with jbd2_journal_reserve. This attaches handle to the running transaction (or creates one if there’s not transaction running). Unlike jbd2_journal_start…
jbd2_journal_skip_recovery – Start journal and wipe exiting records Synopsis int jbd2_journal_skip_recovery(journal_t *journal); Arguments journal journal to startup Description Locate any valid recovery information from the journal and set up the journal structures in memory to ignore it (presumably because the caller has evidence that it is out of date). This function doesn’t appear to be…
jbd2_journal_set_triggers – Add triggers for commit writeout Synopsis void jbd2_journal_set_triggers(struct buffer_head *bh, struct jbd2_buffer_trigger_type *type); Arguments bh buffer to trigger on type struct jbd2_buffer_trigger_type containing the trigger(s). Description Set any triggers on this journal_head. This is always safe, because triggers for a committing buffer will be saved off, and triggers for a running transaction will…
jbd2_journal_set_features – Mark a given journal feature in the superblock Synopsis int jbd2_journal_set_features(journal_t *journal, unsigned long compat, unsigned long ro, unsigned long incompat); Arguments journal Journal to act on. compat bitmask of compatible features ro bitmask of features that force read-only mount incompat bitmask of incompatible features Description Mark a given journal feature as present…
jbd2_journal_recover – recovers a on-disk journal Synopsis int jbd2_journal_recover(journal_t *journal); Arguments journal the journal to recover Description The primary function for recovering the log contents when mounting a journaled device. Recovery is done in three passes. In the first pass, we look for the end of the log. In the second, we assemble the list…
jbd2_journal_lock_updates – establish a transaction barrier. Synopsis void jbd2_journal_lock_updates(journal_t *journal); Arguments journal Journal to establish a barrier on. Description This locks out any further updates from being started, and blocks until all existing updates have completed, returning only once the journal is in a quiescent state with no updates running. The journal lock should not…
jbd2_journal_load – Read journal from disk. Synopsis int jbd2_journal_load(journal_t *journal); Arguments journal Journal to act on. Description Given a journal_t structure which tells us which disk blocks contain a journal, read the journal from disk to initialise the in-memory structures. Authors Roger Gammans <rgammans [at] computer-surgery.co.uk> Author. Stephen Tweedie <sct [at] redhat.com> Author. Copyright
jbd2_journal_invalidatepage – Synopsis int jbd2_journal_invalidatepage(journal_t *journal, struct page *page, unsigned int offset, unsigned int length); Arguments journal journal to use for flush… page page to flush offset start of the range to invalidate length length of the range to invalidate Description Reap page buffers containing data after in the specified range in page. Can return…
jbd2_journal_init_inode – creates a journal which maps to a inode. Synopsis journal_t * jbd2_journal_init_inode(struct inode * inode); Arguments inode An inode to create the journal in Description jbd2_journal_init_inode creates a journal which maps an on-disk inode as the journal. The inode must exist already, must support bmap and must have all data blocks preallocated. Authors Roger Gammans…
jbd2_journal_init_dev – creates and initialises a journal structure Synopsis journal_t * jbd2_journal_init_dev(struct block_device * bdev, struct block_device * fs_dev, unsigned long long start, int len, int blocksize); Arguments bdev Block device on which to create the journal fs_dev Device which hold journalled filesystem for this journal. start Block nr Start of journal. len Length of the journal in blocks. blocksize blocksize of…