Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\badblocks.c Create Date:2022-07-28 17:24:40
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:adblocks_show() - sysfs access to bad-blocks list*@bb: the badblocks structure that holds all badblock information*@page: buffer received from sysfs*@unack: weather to show unacknowledged badblocks* Return:* Length of returned data

Proto:ssize_t badblocks_show(struct badblocks *bb, char *page, int unack)

Type:ssize_t

Parameter:

TypeParameterName
struct badblocks *bb
char *page
intunack
471  p = badblock list
474  If shift from sectors to block size * a -ve shift means badblocks are * disabled. < 0 Then Return 0
477  retry :
478  seq = Read side functions for starting and finalizing a read side section.
480  len = 0
481  i = 0
483  When len < PAGE_SIZE && i < count of bad blocks cycle
484  s = BB_OFFSET(p[i])
485  length = BB_LEN(p[i])
486  ack = BB_ACK(p[i])
488  i++
490  If unack && ack Then Continue
493  len += snprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
497  If unack && len == 0 Then there probably are unacknowledged * bad blocks. This is only cleared * when a read discovers none = 0
500  If read_seqretry( & lock, seq) Then Go to retry
503  Return len