1__MARK_INODE_DIRTY(9) The Linux VFS __MARK_INODE_DIRTY(9)
2
3
4
6 __mark_inode_dirty - internal function
7
9 void __mark_inode_dirty(struct inode * inode, int flags);
10
12 inode
13 inode to mark
14
15 flags
16 what kind of dirty (i.e. I_DIRTY_SYNC) Mark an inode as dirty.
17 Callers should use mark_inode_dirty or mark_inode_dirty_sync.
18
20 Put the inode on the super block´s dirty list.
21
22 CAREFUL! We mark it dirty unconditionally, but move it onto the dirty
23 list only if it is hashed or if it refers to a blockdev. If it was not
24 hashed, it will never be added to the dirty list even if it is later
25 hashed, as it will have been marked dirty already.
26
27 In short, make sure you hash any inodes _before_ you start marking them
28 dirty.
29
30 This function *must* be atomic for the I_DIRTY_PAGES case -
31 set_page_dirty is called under spinlock in several places.
32
33 Note that for blockdevs, inode->dirtied_when represents the dirtying
34 time of the block-special inode (/dev/hda1) itself. And the
35 ->dirtied_when field of the kernel-internal blockdev inode represents
36 the dirtying time of the blockdev´s pages. This is why for
37 I_DIRTY_PAGES we always use page->mapping->host, so the page-dirtying
38 time is recorded in the internal blockdev inode.
39
41Kernel Hackers Manual 2.6. June 2019 __MARK_INODE_DIRTY(9)