)]}'
{
  "commit": "97b8f4a9dfd932997677136e11980eb2fafea91d",
  "tree": "63f1a6555c61f4ce421c7b9d7358a34a6e919c6a",
  "parents": [
    "dd43bcde23c527f64897eef41aa1fed2c9905ea9"
  ],
  "author": {
    "name": "Mark Fasheh",
    "email": "mfasheh@suse.com",
    "time": "Fri Aug 13 15:15:19 2010 -0700"
  },
  "committer": {
    "name": "Tao Ma",
    "email": "tao.ma@oracle.com",
    "time": "Wed Sep 08 14:26:00 2010 +0800"
  },
  "message": "ocfs2: Fix orphan add in ocfs2_create_inode_in_orphan\n\nocfs2_create_inode_in_orphan() is used by reflink to create the newly\nreflinked inode simultaneously in the orphan dir. This allows us to easily\nhandle partially-reflinked files during recovery cleanup.\n\nWe have a problem though - the orphan dir stringifies inode # to determine\na unique name under which the orphan entry dirent can be created. Since\nocfs2_create_inode_in_orphan() needs the space allocated in the orphan dir\nbefore it can allocate the inode, we currently call into the orphan code:\n\n       /*\n        * We give the orphan dir the root blkno to fake an orphan name,\n        * and allocate enough space for our insertion.\n        */\n       status \u003d ocfs2_prepare_orphan_dir(osb, \u0026orphan_dir,\n                                         osb-\u003eroot_blkno,\n                                         orphan_name, \u0026orphan_insert);\n\nUsing osb-\u003eroot_blkno might work fine on unindexed directories, but the\norphan dir can have an index.  When it has that index, the above code fails\nto allocate the proper index entry.  Later, when we try to remove the file\nfrom the orphan dir (using the actual inode #), the reflink operation will\nfail.\n\nTo fix this, I created a function ocfs2_alloc_orphaned_file() which uses the\nnewly split out orphan and inode alloc code to figure out what the inode\nblock number will be (once allocated) and then prepare the orphan dir from\nthat data.\n\nSigned-off-by: Mark Fasheh \u003cmfasheh@suse.com\u003e\nSigned-off-by: Tao Ma \u003ctao.ma@oracle.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "54c629855357e83d002372c861af18c7d0aea4c5",
      "old_mode": 33188,
      "old_path": "fs/ocfs2/namei.c",
      "new_id": "a00dda2e4f16698e5c7d8e0946ba1f09506651c6",
      "new_mode": 33188,
      "new_path": "fs/ocfs2/namei.c"
    }
  ]
}
