Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 102344
b: refs/heads/master
c: c0420ad
h: refs/heads/master
v: v3
  • Loading branch information
Coly Li authored and Mark Fasheh committed Jul 16, 2008
1 parent 80d3c4d commit 01eda42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 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: e75206517504461778c283b942440ef312e437d5
refs/heads/master: c0420ad2ca514551ca086510b0e7d17a05c70492
13 changes: 10 additions & 3 deletions trunk/fs/ocfs2/aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,17 @@ static int ocfs2_get_block(struct inode *inode, sector_t iblock,
* need to use BH_New is when we're extending i_size on a file
* system which doesn't support holes, in which case BH_New
* allows block_prepare_write() to zero.
*
* If we see this on a sparse file system, then a truncate has
* raced us and removed the cluster. In this case, we clear
* the buffers dirty and uptodate bits and let the buffer code
* ignore it as a hole.
*/
mlog_bug_on_msg(create && p_blkno == 0 && ocfs2_sparse_alloc(osb),
"ino %lu, iblock %llu\n", inode->i_ino,
(unsigned long long)iblock);
if (create && p_blkno == 0 && ocfs2_sparse_alloc(osb)) {
clear_buffer_dirty(bh_result);
clear_buffer_uptodate(bh_result);
goto bail;
}

/* Treat the unwritten extent as a hole for zeroing purposes. */
if (p_blkno && !(ext_flags & OCFS2_EXT_UNWRITTEN))
Expand Down

0 comments on commit 01eda42

Please sign in to comment.