Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\ioctl.c Create Date:2022-07-28 20:06:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__generic_block_fiemap - FIEMAP for block based inodes (no locking)*@inode: the inode to map*@fieinfo: the fiemap info struct that will be passed back to userspace*@start: where to start mapping in the inode*@len: how much space to map*@get_block: the

Proto:int __generic_block_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, loff_t start, loff_t len, get_block_t *get_block)

Type:int

Parameter:

TypeParameterName
struct inode *inode
struct fiemap_extent_info *fieinfo
loff_tstart
loff_tlen
get_block_t *get_block
296  isize = NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
297  logical = 0 , phys = 0 , size = 0
298  flags = File does not natively* support extents. Result* merged for efficiency.
299  bool past_eof = TSC's on different sockets may be reset asynchronously.* This may cause the TSC ADJUST value on socket 0 to be NOT 0., whole_file = false
300  ret = 0
302  ret = map_check_flags - check validity of requested flags for fiemap*@fieinfo: Fiemap context passed into ->fiemap*@fs_flags: Set of fiemap flags that the file system understands* Called from file system ->fiemap callback. This will compute the
303  If ret Then Return ret
311  If len >= isize Then
312  whole_file = true
313  len = isize
320  If logical_to_blk(inode, len) == 0 Then len = blk_to_logical(inode, 1)
323  start_blk = logical_to_blk(inode, start)
324  last_blk = logical_to_blk(inode, start + len - 1)
326  Do
331  memset( & map_bh, 0, sizeof(structbuffer_head))
332  size of mapping = len
334  ret = get_block(inode, start_blk, & map_bh, 0)
335  If ret Then Break
339  If Not buffer_mapped( & map_bh) Then
340  start_blk++
349  If Not past_eof && blk_to_logical(inode, start_blk) >= isize Then past_eof = 1
357  If past_eof && size Then
362  Else if size Then
369  If start_blk > last_blk || past_eof || ret Then Break
371  Else
387  If start_blk > last_blk && Not whole_file Then
398  If size Then
402  If ret Then Break
418  If Not past_eof && logical + size >= isize Then past_eof = true
421  cond_resched()
423  ret = -EINTR
424  Break
427  When 1 cycle
430  If ret == 1 Then ret = 0
433  Return ret
Caller
NameDescribe
generic_block_fiemapgeneric_block_fiemap - FIEMAP for block based inodes*@inode: The inode to map*@fieinfo: The mapping information*@start: The initial block to map*@len: The length of the extect to attempt to map*@get_block: The block mapping function for the fs* Calls