Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-28 20:14:08
Last Modify:2020-03-18 10:38:29 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:fsync_buffers_list

Proto:static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)

Type:int

Parameter:

TypeParameterName
spinlock_t *lock
struct list_head *list
718  err = 0
721  Initialization list head
722  blk_start_plug( & plug)
724  spin_lock(lock)
725  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
726  bh = BH_ENTRY(next)
727  mapping = mapping this buffer is associated with
728  The buffer's backing address_space's private_lock must be held
731  smp_mb()
732  If buffer_dirty(bh) || buffer_locked(bh) Then
735  If buffer_dirty(bh) Then
736  get_bh(bh)
737  spin_unlock(lock)
753  brelse(bh)
754  spin_lock(lock)
759  spin_unlock(lock)
760  blk_finish_plug( & plug)
761  spin_lock(lock)
763  When Not list_empty - tests whether a list is empty*@head: the list to test. cycle
764  bh = BH_ENTRY(prev)
765  get_bh(bh)
766  mapping = mapping this buffer is associated with
767  The buffer's backing address_space's private_lock must be held
770  smp_mb()
771  If buffer_dirty(bh) Then
776  spin_unlock(lock)
777  wait_on_buffer(bh)
778  If Not Emit the buffer bitops functions. Note that there are also functions* of the form "mark_buffer_foo()". These are higher-level functions which* do something in addition to setting a b_state bit. Then err = -EIO
780  brelse(bh)
781  spin_lock(lock)
784  spin_unlock(lock)
785  err2 = sync is designed to support O_SYNC io
786  If err Then Return err
788  Else Return err2
Caller
NameDescribe
sync_mapping_bufferssync_mapping_buffers - write out & wait upon a mapping's "associated" buffers*@mapping: the mapping which wants those buffers written* Starts I/O against the buffers at mapping->private_list, and waits upon* that I/O.