bdgrab (9) Linux Manual Page
bdgrab – – Grab a reference to an already referenced block device Synopsis struct block_device *bdgrab(struct block_device *bdev); Arguments bdev Block device to grab a reference to. Copyright
bdgrab – – Grab a reference to an already referenced block device Synopsis struct block_device *bdgrab(struct block_device *bdev); Arguments bdev Block device to grab a reference to. Copyright
bdget_disk – do bdget by gendisk and partition number Synopsis struct block_device *bdget_disk(struct gendisk *disk, int partno); Arguments disk gendisk of interest partno partition number Description Find partition partno from disk, do bdget on it. Context Don’t care. Return Resulting block_device on success, NULL on failure. Copyright
bdev_write_page – Start writing a page to a block device Synopsis int bdev_write_page(struct block_device *bdev, sector_t sector, struct page *page, struct writeback_control *wbc); Arguments bdev The device to write the page to sector The offset on the device to write the page to (need not be aligned) page The page to write wbc The writeback_control…
bdev_stack_limits – adjust queue limits for stacked drivers Synopsis int bdev_stack_limits(struct queue_limits *t, struct block_device *bdev, sector_t start); Arguments t the stacking driver limits (top device) bdev the component block_device (bottom) start first data sector within component device Description Merges queue limits for a top device and a block_device. Returns 0 if alignment didn’t change….
bdev_read_page – Start reading a page from a block device Synopsis int bdev_read_page(struct block_device *bdev, sector_t sector, struct page *page); Arguments bdev The device to read the page from sector The offset on the device to read the page to (need not be aligned) page The page to read Description On entry, the page should…
bdev_direct_access – Get the address for directly-accessibly memory Synopsis long bdev_direct_access(struct block_device *bdev, struct blk_dax_ctl *dax); Arguments bdev The device containing the memory dax control and output parameters for ->direct_access Description If a block device is made up of directly addressable memory, this function will tell the caller the PFN and the address of the…
bdev_dax_supported – Check if the device supports dax for filesystem Synopsis int bdev_dax_supported(struct super_block *sb, int blocksize); Arguments sb The superblock of the device blocksize The block size of the device Description This is a library function for filesystems to check if the block device can be mounted with dax option. Return negative errno if…
bd_unlink_disk_holder – destroy symlinks created by bd_link_disk_holder Synopsis void bd_unlink_disk_holder(struct block_device *bdev, struct gendisk *disk); Arguments bdev the calimed slave bdev disk the holding disk Description DON’T USE THIS UNLESS YOU’RE ALREADY USING IT. Context Might sleep. Copyright
bd_link_disk_holder – create symlinks between holding disk and slave bdev Synopsis int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); Arguments bdev the claimed slave bdev disk the holding disk Description DON’T USE THIS UNLESS YOU’RE ALREADY USING IT. This functions creates the following sysfs symlinks. – from “slaves” directory of the holder disk to the claimed…
balance_dirty_pages_ratelimited – balance dirty memory state Synopsis void balance_dirty_pages_ratelimited(struct address_space *mapping); Arguments mapping address_space which was dirtied Description Processes which are dirtying memory should call in here once for each page which was newly dirtied. The function will periodically check the system’s dirty state and will initiate writeback if needed. On really big machines, get_writeback_state…
auditsc_get_stamp – get local copies of audit_context values Synopsis int auditsc_get_stamp(struct audit_context *ctx, struct timespec *t, unsigned int *serial); Arguments ctx audit_context for the task t timespec to store time recorded in the audit_context serial serial value that is recorded in the audit_context Description Also sets the context as auditable. Copyright
audit_set_loginuid – set current task’s audit_context loginuid Synopsis int audit_set_loginuid(kuid_t loginuid); Arguments loginuid loginuid value Description Returns 0. Called (set) from fs/proc/base.c::proc_loginuid_write. Copyright
audit_rule_change – apply all rules to the specified message type Synopsis int audit_rule_change(int type, __u32 portid, int seq, void *data, size_t datasz); Arguments type audit message type portid target port id for netlink audit messages seq netlink audit message sequence (serial) number data payload data datasz size of payload data Copyright
audit_log_start – obtain an audit buffer Synopsis struct audit_buffer *audit_log_start(struct audit_context *ctx, gfp_t gfp_mask, int type); Arguments ctx audit_context (may be NULL) gfp_mask type of allocation type audit message type Description Returns audit_buffer pointer on success or NULL on error. Obtain an audit buffer. This routine does locking to obtain the audit buffer, but then…
audit_log_secctx – Converts and logs SELinux context Synopsis void audit_log_secctx(struct audit_buffer *ab, u32 secid); Arguments ab audit_buffer secid security number Description This is a helper function that calls security_secid_to_secctx to convert secid to secctx and then adds the (converted) SELinux context to the audit log by calling audit_log_format, thus also preventing leak of internal secid…
audit_log_format – format a message into the audit buffer. Synopsis void audit_log_format(struct audit_buffer *ab, const char *fmt, …); Arguments ab audit_buffer fmt format string … optional parameters matching fmt string Description All the work is done in audit_log_vformat. Copyright
audit_log_end – end one audit record Synopsis void audit_log_end(struct audit_buffer *ab); Arguments ab the audit_buffer Description netlink_unicast cannot be called inside an irq context because it blocks (last arg, flags, is not set to MSG_DONTWAIT), so the audit buffer is placed on a queue and a tasklet is scheduled to remove them from the queue…
audit_log – Log an audit record Synopsis void audit_log(struct audit_context *ctx, gfp_t gfp_mask, int type, const char *fmt, …); Arguments ctx audit context gfp_mask type of allocation type audit message type fmt format string to use … variable parameters matching the format string Description This is a convenience function that calls audit_log_start, audit_log_vformat, and audit_log_end….
audit_list_rules_send – list the audit rules Synopsis int audit_list_rules_send(struct sk_buff *request_skb, int seq); Arguments request_skb skb of request we are replying to (used to target the reply) seq netlink audit message sequence (serial) number Copyright
audit_core_dumps – record information about processes that end abnormally Synopsis void audit_core_dumps(long signr); Arguments signr signal value Description If a process ends with a core dump, something fishy is going on and we should record the event for investigation. Copyright