

Handling code implies lock dependency: mmap_sem -> sb_start_pagefault Put sb_start_pagefault() close to mmap_sem in lock ordering. Ordering of freeze protection and other filesystem locks. Since page fault freeze protection behaves as a lock, users have to preserve If the file system is already frozen, theįunction waits until the file system is thawed. This function increments number of running pageįaults preventing freezing. Operation into sb_start_pagefault() - sb_end_pagefault() pair to getĮxclusion against file system freezing. When a process starts handling write page fault, it should embed the Get write access to a superblock from a page fault Void sb_start_pagefault (struct super_block * sb ) ¶ In particular, we have: sb_start_write -> i_mutex (write path, truncate, directory ops. Generally,įreeze protection should be the outermost lock. Since freeze protection behaves as a lock, users have to preserve System is already frozen, the function waits until the file system is Thisįunction increments number of writers preventing freezing. Sb_end_write() pair to get exclusion against file system freezing. dirtyĪ page or an inode), it should embed the operation in a sb_start_write(). When a process wants to write data or metadata to a file system (i.e. Parameters struct super_block * sb the super we write to Void sb_start_write (struct super_block * sb ) ¶ Waiters wanting to freeze the filesystem. Void sb_end_intwrite (struct super_block * sb ) ¶ĭrop write access to a superblock for internal fs purposesĭecrement fs-internal number of writers to the filesystem. Wake up possible waiters wanting to freeze the filesystem. Void sb_end_pagefault (struct super_block * sb ) ¶ĭrop write access to a superblock from a page faultĭecrement number of processes handling write page fault to the filesystem. Parameters struct super_block * sb the super we wrote toĭecrement number of writers to the filesystem. Void sb_end_write (struct super_block * sb ) ¶ Page to allow for functions that return the number of bytes operated on in a These are much larger than the bytes in a ReturnedĪddress_space_operation functions return these large constants to indicate Reference, it should drop it before retrying. The caller should back up to acquiring a new page and

Unlocked it and the page might have been truncated. Writepage() AOP_TRUNCATED_PAGE The AOP method that was handed a locked page has To return the page to the active list – it won’tīe a candidate for writeback again in the nearįuture. Constants AOP_WRITEPAGE_ACTIVATE Informs the caller that page writeback hasĬompleted, that the page is still locked, and
