)]}'
{
  "commit": "0e56822d30184d0da35a6ecc51f38c4ceb457a80",
  "tree": "a9ee18ce0e724f16dde3c5c97af67fb3a92701f7",
  "parents": [
    "c4cc66351a24da5feec298be2da59a85f68dd3ea"
  ],
  "author": {
    "name": "Alasdair G Kergon",
    "email": "agk@redhat.com",
    "time": "Mon Nov 21 21:32:34 2005 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Tue Nov 22 09:14:31 2005 -0800"
  },
  "message": "[PATCH] device-mapper: mirror log bitset fix\n\nThe linux bitset operators (test_bit, set_bit etc) work on arrays of \"unsigned\nlong\".  dm-log uses such bitsets but treats them as arrays of uint32_t, only\nallocating and zeroing a multiple of 4 bytes (as \u0027clean_bits\u0027 is a uint32_t).\n\nThe patch below fixes this problem.\n\nThe problem is specific to 64-bit big endian machines such as s390x or ppc-64\nand can prevent pvmove terminating.\n\nIn the simplest case, if \"region_count\" were (say) 30, then\nbitset_size (below) would be 4 and bitset_uint32_count would be 1.\nThus the memory for this butset, after allocation and zeroing would\nbe\n   0 0 0 0 X X X X\nOn a bigendian 64bit machine, bit 0 for this bitset is in the 8th\nbyte! (and every bit that dm-log would use would be in the X area).\n\n   0 0 0 0 X X X X\n                 ^\n                 here\n\nwhich hasn\u0027t been cleared properly.\n\nAs the dm-raid1 code only syncs and counts regions which have a 0 in the\n\u0027sync_bits\u0027 bitset, and only finishes when it has counted high enough, a large\nnumber of 1\u0027s among those \u0027X\u0027s will cause the sync to not complete.\n\nIt is worth noting that the code uses the same bitsets for in-memory and\non-disk logs.  As these bitsets are host-endian and host-sized, this means\nthat they cannot safely be moved between computers with\n\nSigned-off-by: Neil Brown \u003cneilb@suse.de\u003e\nSigned-off-by: Alasdair G Kergon \u003cagk@redhat.com\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": "e110655eabdbcdd487b2275fc024bdb53d682c88",
      "old_mode": 33188,
      "old_path": "drivers/md/dm-log.c",
      "new_id": "a76349cb10a53aa571412af63d3115c4242815cc",
      "new_mode": 33188,
      "new_path": "drivers/md/dm-log.c"
    }
  ]
}
