)]}'
{
  "commit": "ebcf28e1c7a295f3321249dd235ad2e45938fdd9",
  "tree": "fdd2e131e627af55d3741a7fafad0edaa61410c1",
  "parents": [
    "469eb4d03878b676418f853011ebfb54ccf83a5e"
  ],
  "author": {
    "name": "Andrew Morton",
    "email": "akpm@osdl.org",
    "time": "Fri Mar 24 03:18:04 2006 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Fri Mar 24 07:33:25 2006 -0800"
  },
  "message": "[PATCH] fadvise(): write commands\n\nAdd two new linux-specific fadvise extensions():\n\nLINUX_FADV_ASYNC_WRITE: start async writeout of any dirty pages between file\noffsets `offset\u0027 and `offset+len\u0027.  Any pages which are currently under\nwriteout are skipped, whether or not they are dirty.\n\nLINUX_FADV_WRITE_WAIT: wait upon writeout of any dirty pages between file\noffsets `offset\u0027 and `offset+len\u0027.\n\nBy combining these two operations the application may do several things:\n\nLINUX_FADV_ASYNC_WRITE: push some or all of the dirty pages at the disk.\n\nLINUX_FADV_WRITE_WAIT, LINUX_FADV_ASYNC_WRITE: push all of the currently dirty\npages at the disk.\n\nLINUX_FADV_WRITE_WAIT, LINUX_FADV_ASYNC_WRITE, LINUX_FADV_WRITE_WAIT: push all\nof the currently dirty pages at the disk, wait until they have been written.\n\nIt should be noted that none of these operations write out the file\u0027s\nmetadata.  So unless the application is strictly performing overwrites of\nalready-instantiated disk blocks, there are no guarantees here that the data\nwill be available after a crash.\n\nTo complete this suite of operations I guess we should have a \"sync file\nmetadata only\" operation.  This gives applications access to all the building\nblocks needed for all sorts of sync operations.  But sync-metadata doesn\u0027t fit\nwell with the fadvise() interface.  Probably it should be a new syscall:\nsys_fmetadatasync().\n\nThe patch also diddles with the meaning of `endbyte\u0027 in sys_fadvise64_64().\nIt is made to represent that last affected byte in the file (ie: it is\ninclusive).  Generally, all these byterange and pagerange functions are\ninclusive so we can easily represent EOF with -1.\n\nAs Ulrich notes, these two functions are somewhat abusive of the fadvise()\nconcept, which appears to be \"set the future policy for this fd\".\n\nBut these commands are a perfect fit with the fadvise() impementation, and\nseveral of the existing fadvise() commands are synchronous and don\u0027t affect\nfuture policy either.   I think we can live with the slight incongruity.\n\nCc: Michael Kerrisk \u003cmtk-manpages@gmx.net\u003e\nSigned-off-by: Andrew Morton \u003cakpm@osdl.org\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@osdl.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e8e747139b9a1483897f8c4b0aa9e8b9f4a49588",
      "old_mode": 33188,
      "old_path": "include/linux/fadvise.h",
      "new_id": "b2913bba35d87dafbb042b086face216609cb107",
      "new_mode": 33188,
      "new_path": "include/linux/fadvise.h"
    },
    {
      "type": "modify",
      "old_id": "65e6df247ea559c3c40e22c8593926a8962ccb45",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "0ad70c1e5e5573cc27e9dbd86bed77eca7aeecc9",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    },
    {
      "type": "modify",
      "old_id": "d257c89e7704c60d8decf405c89c46f8de262153",
      "old_mode": 33188,
      "old_path": "mm/fadvise.c",
      "new_id": "907c39257ca06aea630915c9a46103518a4d631a",
      "new_mode": 33188,
      "new_path": "mm/fadvise.c"
    },
    {
      "type": "modify",
      "old_id": "c1b1708cc95de637a7fc18f88ac2f04f6a8353aa",
      "old_mode": 33188,
      "old_path": "mm/filemap.c",
      "new_id": "3ef20739e7252232c5822cbeed6e22eaa5247d0c",
      "new_mode": 33188,
      "new_path": "mm/filemap.c"
    }
  ]
}
