Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:generic_perform_write

Proto:ssize_t generic_perform_write(struct file *file, struct iov_iter *i, loff_t pos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
struct iov_iter *i
loff_tpos
3271  mapping = f_mapping
3272  a_ops = a_ops
3273  status = 0
3274  written = 0
3275  flags = 0
3277  Do
3284  offset = pos & PAGE_SIZE - 1
3285  bytes = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedlong, PAGE_SIZE - offset, iov_iter_count(i))
3288  again :
3300  status = -EFAULT
3301  Break
3305  status = -EINTR
3306  Break
3309  status = write_begin(file, mapping, pos, bytes, flags, & page, & fsdata)
3311  If Value for the false possibility is greater at compile time(status < 0) Then Break
3314  If Might pages of this file have been modified in userspace?* Note that i_mmap_writable counts all VM_SHARED vmas: do_mmap_pgoff* marks vma as VM_SHARED if it is shared, and the file was opened for* writing i Then flush_dcache_page(page)
3317  copied = iov_iter_copy_from_user_atomic(page, i, offset, bytes)
3318  flush_dcache_page(page)
3320  status = write_end(file, mapping, pos, bytes, copied, page, fsdata)
3322  If Value for the false possibility is greater at compile time(status < 0) Then Break
3324  copied = status
3326  cond_resched()
3328  iov_iter_advance(i, copied)
3340  Go to again
3342  pos += copied
3343  written += copied
3345  balance_dirty_pages_ratelimited(mapping)
3346  When iov_iter_count(i) cycle
3348  Return If written Then written Else status
Caller
NameDescribe
__generic_file_write_iter__generic_file_write_iter - write data to a file*@iocb: IO state structure (file, offset, etc.)*@from: iov_iter with data to write* This function does all the work needed for actually writing data to a* file