diff options
| -rw-r--r-- | fs/btrfs/send.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/btrfs/send.c b/fs/btrfs/send.c index 551294a6c9e2..ba8950bfd9c7 100644 --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c | |||
| @@ -5007,6 +5007,15 @@ static int send_hole(struct send_ctx *sctx, u64 end) | |||
| 5007 | u64 len; | 5007 | u64 len; |
| 5008 | int ret = 0; | 5008 | int ret = 0; |
| 5009 | 5009 | ||
| 5010 | /* | ||
| 5011 | * A hole that starts at EOF or beyond it. Since we do not yet support | ||
| 5012 | * fallocate (for extent preallocation and hole punching), sending a | ||
| 5013 | * write of zeroes starting at EOF or beyond would later require issuing | ||
| 5014 | * a truncate operation which would undo the write and achieve nothing. | ||
| 5015 | */ | ||
| 5016 | if (offset >= sctx->cur_inode_size) | ||
| 5017 | return 0; | ||
| 5018 | |||
| 5010 | if (sctx->flags & BTRFS_SEND_FLAG_NO_FILE_DATA) | 5019 | if (sctx->flags & BTRFS_SEND_FLAG_NO_FILE_DATA) |
| 5011 | return send_update_extent(sctx, offset, end - offset); | 5020 | return send_update_extent(sctx, offset, end - offset); |
| 5012 | 5021 | ||
