Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:iomap_write_begin

Proto:static int iomap_write_begin(struct inode *inode, loff_t pos, unsigned len, unsigned flags, struct page **pagep, struct iomap *iomap, struct iomap *srcmap)

Type:int

Parameter:

TypeParameterName
struct inode *inode
loff_tpos
unsignedlen
unsignedflags
struct page **pagep
struct iomap *iomap
struct iomap *srcmap
644  page_ops = page_ops
646  status = 0
648  BUG_ON(pos + len > file offset of mapping, bytes + length of mapping, bytes )
649  If srcmap != iomap Then BUG_ON(pos + len > file offset of mapping, bytes + length of mapping, bytes )
652  If fatal_signal_pending(current process) Then Return -EINTR
655  If page_ops && page_prepare Then
656  status = page_prepare(inode, pos, len, iomap)
657  If status Then Return status
661  page = Find or create a page at the given pagecache position. Return the locked* page. This function is specifically for buffered writes.
663  If Not page Then
664  status = -ENOMEM
665  Go to out_no_page
668  If type of mapping == data inline in the inode Then iomap_read_inline_data(inode, page, srcmap)
670  Else if flags for mapping & IOMAP_F_BUFFER_HEAD Then status = __block_write_begin_int(page, pos, len, NULL, srcmap)
672  Else status = __iomap_write_begin(inode, pos, len, flags, page, srcmap)
676  If Value for the false possibility is greater at compile time(status) Then Go to out_unlock
679  pagep = page
680  Return 0
682  out_unlock :
683  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
684  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
685  iomap_write_failed(inode, pos, len)
687  out_no_page :
688  If page_ops && page_done Then page_done(inode, pos, 0, NULL, iomap)
690  Return status
Caller
NameDescribe
iomap_write_actor
iomap_unshare_actor
iomap_zero