)]}'
{
  "commit": "6e857567dbbfe14dd6cc3f7414671b047b1ff5c7",
  "tree": "dde314cd6a22066e4cd7f3c498f89b00984838d7",
  "parents": [
    "055388a3188f56676c21e92962fc366ac8b5cb72"
  ],
  "author": {
    "name": "Dave Chinner",
    "email": "dchinner@redhat.com",
    "time": "Thu Dec 23 12:02:31 2010 +1100"
  },
  "committer": {
    "name": "Dave Chinner",
    "email": "david@fromorbit.com",
    "time": "Thu Dec 23 12:02:31 2010 +1100"
  },
  "message": "xfs: don\u0027t truncate prealloc from frequently accessed inodes\n\nA long standing problem for streaming writeѕ through the NFS server\nhas been that the NFS server opens and closes file descriptors on an\ninode for every write. The result of this behaviour is that the\n-\u003erelease() function is called on every close and that results in\nXFS truncating speculative preallocation beyond the EOF.  This has\nan adverse effect on file layout when multiple files are being\nwritten at the same time - they interleave their extents and can\nresult in severe fragmentation.\n\nTo avoid this problem, keep track of -\u003erelease calls made on a dirty\ninode. For most cases, an inode is only going to be opened once for\nwriting and then closed again during it\u0027s lifetime in cache. Hence\nif there are multiple -\u003erelease calls when the inode is dirty, there\nis a good chance that the inode is being accessed by the NFS server.\nHence set a flag the first time -\u003erelease is called while there are\ndelalloc blocks still outstanding on the inode.\n\nIf this flag is set when -\u003erelease is next called, then do no\ntruncate away the speculative preallocation - leave it there so that\nsubsequent writes do not need to reallocate the delalloc space. This\nwill prevent interleaving of extents of different inodes written\nconcurrently to the same AG.\n\nIf we get this wrong, it is not a big deal as we truncate\nspeculative allocation beyond EOF anyway in xfs_inactive() when the\ninode is thrown out of the cache.\n\nSigned-off-by: Dave Chinner \u003cdchinner@redhat.com\u003e\nReviewed-by: Christoph Hellwig \u003chch@lst.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1c6514d73dc877572a421103f43997c10d2e1b09",
      "old_mode": 33188,
      "old_path": "fs/xfs/xfs_inode.h",
      "new_id": "5c95fa8ec11da9c703f756b4dbe42e81a569a6ac",
      "new_mode": 33188,
      "new_path": "fs/xfs/xfs_inode.h"
    },
    {
      "type": "modify",
      "old_id": "8e4a63c4151a48e05a11d9c791f7c5a9092bf197",
      "old_mode": 33188,
      "old_path": "fs/xfs/xfs_vnodeops.c",
      "new_id": "d8e6f8cd6f0c89782dd0d5df7a2e7a0329688235",
      "new_mode": 33188,
      "new_path": "fs/xfs/xfs_vnodeops.c"
    }
  ]
}
