)]}'
{
  "commit": "3dd09d5a8589c640abb49cfcf92b4ed669eafad1",
  "tree": "712c9512bb707959f129c31ac1637c47f30180e3",
  "parents": [
    "78420281a9d74014af7616958806c3aba056319e"
  ],
  "author": {
    "name": "Calvin Owens",
    "email": "calvinowens@fb.com",
    "time": "Mon Apr 03 12:22:29 2017 -0700"
  },
  "committer": {
    "name": "Darrick J. Wong",
    "email": "darrick.wong@oracle.com",
    "time": "Mon Apr 03 12:22:29 2017 -0700"
  },
  "message": "xfs: Honor FALLOC_FL_KEEP_SIZE when punching ends of files\n\nWhen punching past EOF on XFS, fallocate(mode\u003dPUNCH_HOLE|KEEP_SIZE) will\nround the file size up to the nearest multiple of PAGE_SIZE:\n\n  calvinow@vm-disks/generic-xfs-1 ~$ dd if\u003d/dev/urandom of\u003dtest bs\u003d2048 count\u003d1\n  calvinow@vm-disks/generic-xfs-1 ~$ stat test\n    Size: 2048            Blocks: 8          IO Block: 4096   regular file\n  calvinow@vm-disks/generic-xfs-1 ~$ fallocate -n -l 2048 -o 2048 -p test\n  calvinow@vm-disks/generic-xfs-1 ~$ stat test\n    Size: 4096            Blocks: 8          IO Block: 4096   regular file\n\nCommit 3c2bdc912a1cc050 (\"xfs: kill xfs_zero_remaining_bytes\") replaced\nxfs_zero_remaining_bytes() with calls to iomap helpers. The new helpers\ndon\u0027t enforce that [pos,offset) lies strictly on [0,i_size) when being\ncalled from xfs_free_file_space(), so by \"leaking\" these ranges into\nxfs_zero_range() we get this buggy behavior.\n\nFix this by reintroducing the checks xfs_zero_remaining_bytes() did\nagainst i_size at the bottom of xfs_free_file_space().\n\nReported-by: Aaron Gao \u003cgzh@fb.com\u003e\nFixes: 3c2bdc912a1cc050 (\"xfs: kill xfs_zero_remaining_bytes\")\nCc: Christoph Hellwig \u003chch@lst.de\u003e\nCc: Brian Foster \u003cbfoster@redhat.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e # 4.8+\nSigned-off-by: Calvin Owens \u003ccalvinowens@fb.com\u003e\nReviewed-by: Christoph Hellwig \u003chch@lst.de\u003e\nReviewed-by: Darrick J. Wong \u003cdarrick.wong@oracle.com\u003e\nSigned-off-by: Darrick J. Wong \u003cdarrick.wong@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "8b75dcea596680f1332412870546181d2f0a579c",
      "old_mode": 33188,
      "old_path": "fs/xfs/xfs_bmap_util.c",
      "new_id": "828532ce0adca80ddfa174540aae6aa06663302b",
      "new_mode": 33188,
      "new_path": "fs/xfs/xfs_bmap_util.c"
    }
  ]
}
