Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 45150
b: refs/heads/master
c: 7f4a2a9
h: refs/heads/master
v: v3
  • Loading branch information
Mark Fasheh committed Dec 29, 2006
1 parent ea193f0 commit f3ca479
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6c2aad0567e693f9588d0a0683f96ed872fb4641
refs/heads/master: 7f4a2a97e324e8c826d1d983bc8efb5c59194f02
10 changes: 9 additions & 1 deletion trunk/fs/ocfs2/dlmglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -2718,14 +2718,22 @@ static int ocfs2_data_convert_worker(struct ocfs2_lock_res *lockres,
inode = ocfs2_lock_res_inode(lockres);
mapping = inode->i_mapping;

/*
* We need this before the filemap_fdatawrite() so that it can
* transfer the dirty bit from the PTE to the
* page. Unfortunately this means that even for EX->PR
* downconverts, we'll lose our mappings and have to build
* them up again.
*/
unmap_mapping_range(mapping, 0, 0, 0);

if (filemap_fdatawrite(mapping)) {
mlog(ML_ERROR, "Could not sync inode %llu for downconvert!",
(unsigned long long)OCFS2_I(inode)->ip_blkno);
}
sync_mapping_buffers(mapping);
if (blocking == LKM_EXMODE) {
truncate_inode_pages(mapping, 0);
unmap_mapping_range(mapping, 0, 0, 0);
} else {
/* We only need to wait on the I/O if we're not also
* truncating pages because truncate_inode_pages waits
Expand Down

0 comments on commit f3ca479

Please sign in to comment.