)]}'
{
  "commit": "93b270f76e7ef3b81001576860c2701931cdc78b",
  "tree": "abaca0e4d3e86721815498fafd06295dd9cfd002",
  "parents": [
    "da9cf5050a2e3dbc3cf26a8d908482eb4485ed49"
  ],
  "author": {
    "name": "NeilBrown",
    "email": "neilb@suse.de",
    "time": "Thu Feb 24 17:25:47 2011 +1100"
  },
  "committer": {
    "name": "NeilBrown",
    "email": "neilb@suse.de",
    "time": "Thu Feb 24 17:25:47 2011 +1100"
  },
  "message": "Fix over-zealous flush_disk when changing device size.\n\nThere are two cases when we call flush_disk.\nIn one, the device has disappeared (check_disk_change) so any\ndata will hold becomes irrelevant.\nIn the oter, the device has changed size (check_disk_size_change)\nso data we hold may be irrelevant.\n\nIn both cases it makes sense to discard any \u0027clean\u0027 buffers,\nso they will be read back from the device if needed.\n\nIn the former case it makes sense to discard \u0027dirty\u0027 buffers\nas there will never be anywhere safe to write the data.  In the\nsecond case it *does*not* make sense to discard dirty buffers\nas that will lead to file system corruption when you simply enlarge\nthe containing devices.\n\nflush_disk calls __invalidate_devices.\n__invalidate_device calls both invalidate_inodes and invalidate_bdev.\n\ninvalidate_inodes *does* discard I_DIRTY inodes and this does lead\nto fs corruption.\n\ninvalidate_bev *does*not* discard dirty pages, but I don\u0027t really care\nabout that at present.\n\nSo this patch adds a flag to __invalidate_device (calling it\n__invalidate_device2) to indicate whether dirty buffers should be\nkilled, and this is passed to invalidate_inodes which can choose to\nskip dirty inodes.\n\nflusk_disk then passes true from check_disk_change and false from\ncheck_disk_size_change.\n\ndm avoids tripping over this problem by calling i_size_write directly\nrathher than using check_disk_size_change.\n\nmd does use check_disk_size_change and so is affected.\n\nThis regression was introduced by commit 608aeef17a which causes\ncheck_disk_size_change to call flush_disk, so it is suitable for any\nkernel since 2.6.27.\n\nCc: stable@kernel.org\nAcked-by: Jeff Moyer \u003cjmoyer@redhat.com\u003e\nCc: Andrew Patterson \u003candrew.patterson@hp.com\u003e\nCc: Jens Axboe \u003caxboe@kernel.dk\u003e\nSigned-off-by: NeilBrown \u003cneilb@suse.de\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "6a5b772aa2016f52f986a2cca396daf94ad0c7c4",
      "old_mode": 33188,
      "old_path": "block/genhd.c",
      "new_id": "cbf1112a885c0c715e4d38a3dfad91f74cd1f1fa",
      "new_mode": 33188,
      "new_path": "block/genhd.c"
    },
    {
      "type": "modify",
      "old_id": "b9ba04fc2b34eb0845cf0c724b64151e53b05c65",
      "old_mode": 33188,
      "old_path": "drivers/block/floppy.c",
      "new_id": "77fc76f8aea91b79be3f8cfc6c640e3e23748de0",
      "new_mode": 33188,
      "new_path": "drivers/block/floppy.c"
    },
    {
      "type": "modify",
      "old_id": "333a7bb4cb9c0865543bc210c6df2613662950c9",
      "old_mode": 33188,
      "old_path": "fs/block_dev.c",
      "new_id": "5e23152d04ad02b8c871beb230e95389a5c79c90",
      "new_mode": 33188,
      "new_path": "fs/block_dev.c"
    },
    {
      "type": "modify",
      "old_id": "da85e56378f3e1d98c241901171e24e83882f189",
      "old_mode": 33188,
      "old_path": "fs/inode.c",
      "new_id": "c50d7feb87b1203b62df1f15d065d1dc109b6120",
      "new_mode": 33188,
      "new_path": "fs/inode.c"
    },
    {
      "type": "modify",
      "old_id": "0663568b1247f88a0ca57ad19b8f9c7d36680f8e",
      "old_mode": 33188,
      "old_path": "fs/internal.h",
      "new_id": "9b976b57d7fe3b4b731cbfe3d90b4918c0c8b730",
      "new_mode": 33188,
      "new_path": "fs/internal.h"
    },
    {
      "type": "modify",
      "old_id": "32b38cd829d33561163dd340ce1e307150db25d3",
      "old_mode": 33188,
      "old_path": "include/linux/fs.h",
      "new_id": "683f4c566c822880119a888958f61fe7bb1c0881",
      "new_mode": 33188,
      "new_path": "include/linux/fs.h"
    }
  ]
}
