Updated patch for 2.1.122 dquota

Bill Hawes (whawes@transmeta.com)
Thu, 24 Sep 1998 11:19:53 -0700


This is a multi-part message in MIME format.
--------------5C3F2ACB18986A0C0539F69A
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

I found some further problems in the disk quota code and have attached an
updated patch that should fix things. It seems pretty solid in testing here
-- I set up some user quota on my machine and am able to do intensive disk
operations (simultaneous cp and rm -rf exceeding quota) without hangiing or
locking up.

I've simplified the dquot list management considerably by adding another list
header to the dquot structure so that it can put on the free list without
taking it off of the inuse_list. This avoids the awkward races with dquots
changing lists while being synced or invalidated.

There was a bug in the quota_off code that was NULLing the superblock dq_ops
before the call to reset_quota_ptrs, so that some quotas might not have been
written out. I changed this to check whether all quota has been turned off
for the device before clearing the dq_ops.

I'd appreciate further testing by anyone using disk quotas; hopefully this
will take care of the various problems that have been reported.

Regards,
Bill

--------------5C3F2ACB18986A0C0539F69A
Content-Type: application/x-gzip; name="dquot_122-patch.gz"
Content-Transfer-Encoding: base64
Content-Disposition: inline; filename="dquot_122-patch.gz"

H4sICKSICjYAA2RxdW90XzEyMi1wYXRjaADkPGtTG8eWn+Vf0SQVXwmNhF4gBMExMTh2xSEJ
4GS3sinVoGmhWaQZeWYE5ibc377n0T3TPQ8JbN/arVpXGdBM9+nT55w+71ar1RJzP1h9bPXa
3Xa319vxg8l85ckderrzYRUmbnvWDude7XXki5/ceyH2RXd4sDs46I9EdzTaf9ZsNh8DpPa7
9MSFXIpeX3S7B7v9g36PAbx8KVrdvV2nOxJN/A0DXr58Jr725NQPpDj5dfz6+MdTwf86Hwed
2s62CEJYdOEnsQiD+b1Yxe61FNs7z8QzESfRapIIDxcWfz1r1qwH296HcSA/Joc1BPNL6AeJ
jEQSCnyox+wUZuG05TKSt4fZq7kfJ+OZdD0YNJ5GUh4iSPyDXgk5lwsZlIKDCTM3nilMShDx
Ax5Kw6oQIhCMVQ4GPvPDVbwGzp3rJ+MPK7mShA5+zEPBZ2oEToTnuNNJu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
g4a6tOqWoxFvwEP3/j42o0i9iYrKu3iQgcqDISZ+OeHLdH5MzlEFTuy4WxukoVb4UwJKZRBt
65TIxbKYfsXhpdlXQunIJKYa28wQA4gN60EZpqJmVYI2DM2/VsuqILzb2e+x9O7rg4tfVITf
4uaz04LfaZQeyMyZ0WfMJInp6xQeHGXft2J4ME76DB0DR4eD5ogaBxSBh8fu3rgHzVNqxfeq
emdaXif3kE9++jDT4w6TpdvrOv0O0KXXHTkDLmllYUA4na67vZSa3sx11+XDkm8QIFNt2O2n
nY/ijZsJt3EobKwSh0gzDp8YfFReOfLjNNRnUA7i0eBEeNUk033HAlm2rFU7U1cAMoe/FO3s
EhE/bGQt3pwjKLurtGWjUJij60XluyupIOEN70QN5gyqNUOxwF5VVXjEkf11iebhYRpg8KXq
osoGStS/kSyxgbGqLzFCDHCZRDEnWCa6J6B4V9d8j7hOUXsUAy3+tgmtOzlO3LB17E/gut86
cITWugGi9NsqKqZxL4T8uARDrmd3KsYSEYtjm4oG9HUKKnA0ekZeUVPV3UxSAS0rmvr6aqiS
HMNygkz9z0C1I/KJAaD4h1aiiEUlBFI7KGlClQCzPVpKhnSQwcNKEPsRniGmcAFnBJjOGltc
+RuRRaCyEI240jfSAT3QUTP0DWKQEywNjYH9END0rqEJsPsNO8SSEz4FjzKebg3erwE54wI+
gkvc+C10KAW8bgc2PYEyAKkDm4lAH9aFjN0hn7CG5gCo76Dn7WSnFuWl5mggry8DH6MCAApl
lpdmWwAA
--------------5C3F2ACB18986A0C0539F69A--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/