函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\badblocks.c Create Date:2022-07-27 19:00:01
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:ssize_t badblocks_show(struct badblocks *bb, char *page, int unack)

返回类型:ssize_t

参数:

类型参数名称
struct badblocks *bb
char *page
intunack
471  p等于 badblock list
474  如果 shift from sectors to block size * a -ve shift means badblocks are * disabled.小于0则返回:0
477  retry :
478  seq等于Read side functions for starting and finalizing a read side section.
480  len等于0
481  i等于0
483 len小于PAGE_SIZEi小于 count of bad blocks 循环
484  s等于BB_OFFSET(p[i])
485  length等于BB_LEN(p[i])
486  ack等于BB_ACK(p[i])
488  i自加
490  如果unackack则继续下一循环
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  如果unacklen恒等于0则 there probably are unacknowledged * bad blocks. This is only cleared * when a read discovers none等于0
500  如果read_seqretry( & lock, seq)则转到:retry
503  返回:len