)]}'
{
  "commit": "bd9aac523b812d58e644fde5e59f5697fb9e3822",
  "tree": "a3adb8ac833a8e776cca8df91e96f85aa28e81c6",
  "parents": [
    "893f87701c9e5bd5610dfbb3f8bf1135f86d85cb"
  ],
  "author": {
    "name": "NeilBrown",
    "email": "neilb@cse.unsw.edu.au",
    "time": "Thu Jul 07 17:59:19 2005 -0700"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@g5.osdl.org",
    "time": "Thu Jul 07 18:24:09 2005 -0700"
  },
  "message": "[PATCH] nfsd4: fix open_reclaim seqid\n\nThe sequence number we store in the sequence id is the last one we received\nfrom the client.  So on the next operation we\u0027ll check that the client gives\nus the next higher number.\n\nWe increment sequence id\u0027s at the last moment, in encode, so that we\u0027re sure\nof knowing the right error return.  (The decision to increment the sequence id\ndepends on the exact error returned.)\n\nHowever on the *first* use of a sequence number, if we set the sequence number\nto the one received from the client and then let the increment happen on\nencode, we\u0027ll be left with a sequence number one to high.\n\nFor that reason, ENCODE_SEQID_OP_TAIL only increments the sequence id on\n*confirmed* stateowners.\n\nThis creates a problem for open reclaims, which are confirmed on first use.\nTherefore the open reclaim code, as a special exception, *decrements* the\nsequence id, cancelling out the undesired increment on encode.  But this\nprevents the sequence id from ever being incremented in the case where\nmultiple reclaims are sent with the same openowner.  Yuch!\n\nWe could add another exception to the open reclaim code, decrementing the\nsequence id only if this is the first use of the open owner.\n\nBut it\u0027s simpler by far to modify the meaning of the op_seqid field: instead\nof representing the previous value sent by the client, we take op_seqid, after\nencoding, to represent the *next* sequence id that we expect from the client.\nThis eliminates the need for special-case handling of the first use of a\nstateowner.\n\nSigned-off-by: J. Bruce Fields \u003cbfields@citi.umich.edu\u003e\nSigned-off-by: Neil Brown \u003cneilb@cse.unsw.edu.au\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": "74cd9bf3e0a11d57b41007ebe1e527806255da12",
      "old_mode": 33188,
      "old_path": "fs/nfsd/nfs4state.c",
      "new_id": "f60bcad77f7162a7fff41b2d422c5e15d8d82d00",
      "new_mode": 33188,
      "new_path": "fs/nfsd/nfs4state.c"
    },
    {
      "type": "modify",
      "old_id": "91fb171d2aceee025712bc4783f2a04e2773255c",
      "old_mode": 33188,
      "old_path": "fs/nfsd/nfs4xdr.c",
      "new_id": "5207068cde1a8c550f618d332d1dba5a99eb1d86",
      "new_mode": 33188,
      "new_path": "fs/nfsd/nfs4xdr.c"
    }
  ]
}
