prepare_write problem for small write when page not uptodate
Quoted 2 lines
Seems like
invalidate_remote_inode(eventually callinginvalidate_complete_page) does not always actually free the page
Switching from invalidate_remote_inode (invalidate_mapping_pages) to invalidate_inode_pages2 in cifs worked and fixed the problem (partial page write corrupts a page that is marked not uptodate due to invalidate_remote_inode). Still not clear to me when you would use truncate_inode_pages and when you would use invalidate_inode_pages2.
Quoted 8 lines · Steve French
Quoted 2 lines
Seems like
invalidate_remote_inode(eventually callinginvalidate_complete_page) does not always actually free the pageSwitching from
invalidate_remote_inode(invalidate_mapping_pages) toinvalidate_inode_pages2in cifs worked and fixed the problem (partial page write corrupts a page that is marked not uptodate due toinvalidate_remote_inode). Still not clear to me when you would usetruncate_inode_pagesand when you would useinvalidate_inode_pages2.
False alarm - none of the three worked.
Looks like I am going to have to fall back to the hard way - in prepare_write if page is not up to date - read it from the server since I can't seem to force the mm code to do a readpage first by tossing the page via any of the three mechanisms.