Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 47853
b: refs/heads/master
c: 549054a
h: refs/heads/master
i:
  47851: 6cfcf66
v: v3
  • Loading branch information
David Chinner authored and Tim Shimmin committed Feb 10, 2007
1 parent 2a02b31 commit 2c4157a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 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: 5478eead8528f6cb5ebe3015fb88b68b175e1093
refs/heads/master: 549054afadae44889c0b40d4c3bfb0207b98d5a0
13 changes: 9 additions & 4 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1283,13 +1283,18 @@ __xfs_get_blocks(
bh_result->b_bdev = iomap.iomap_target->bt_bdev;

/*
* If we previously allocated a block out beyond eof and we are
* now coming back to use it then we will need to flag it as new
* even if it has a disk address.
* If we previously allocated a block out beyond eof and we are now
* coming back to use it then we will need to flag it as new even if it
* has a disk address.
*
* With sub-block writes into unwritten extents we also need to mark
* the buffer as new so that the unwritten parts of the buffer gets
* correctly zeroed.
*/
if (create &&
((!buffer_mapped(bh_result) && !buffer_uptodate(bh_result)) ||
(offset >= i_size_read(inode)) || (iomap.iomap_flags & IOMAP_NEW)))
(offset >= i_size_read(inode)) ||
(iomap.iomap_flags & (IOMAP_NEW|IOMAP_UNWRITTEN))))
set_buffer_new(bh_result);

if (iomap.iomap_flags & IOMAP_DELAY) {
Expand Down

0 comments on commit 2c4157a

Please sign in to comment.