--41973382-1272356615-994699721=:16113
Content-Type: TEXT/PLAIN; charset=US-ASCII
Hello,
I hope that I am sending this to the appropriate people. I have been
working on a project known as Self-Securing Storage here at Carnegie
Mellon University. We have developed our storage server to act as an
NFSv2 server, and have been using the Linux NFSv2 client to do our
benchmarking. I have run across a small problem with the 2.4
implementation of the Linux NFSv2 client.
The problem is in the readdir() operation. The current cookie for a given
readdir operation is being stored in the file descriptor. The problem is
that it is not being reset to 0 if a change has been made to the
directory as is indicated in the NFSv2 spec. This problem is often
seen when doing an operation such as rm -rf to a large directory tree due
to the asynchronous remove operation that has been implemented.
This has not traditionally been a problem for Linux because in ext2 the
cookie is the offset into the directory of the next entry. If a file
is deleted in that directory during the readdir() operation, it has no
effect since ext2 does lazy directory compaction.
Our system does automatic directory compaction through the use of a tree
structure, and so the cookie needs to be invalidated. Also, any other
file system whicih does immediate directory compaction would require this.
I have attached my proposed modifications to the end of this file. They
have been tested under 2.4.5.
Please let me know if there is anything more I need to do, or if you have
any questions. I would really like to get this proper behavior into the
kernel.
Thanks,
Craig Soules
--41973382-1272356615-994699721=:16113
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="patch.2.4.5"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.3.96L.1010709132841.16113P@happyplace.pdl.cmu.edu>
Content-Description:
LS0tIGxpbnV4L2luY2x1ZGUvbGludXgvbmZzX2ZzLmgJRnJpIE1heSAyNSAy
MTowMjoxMSAyMDAxDQorKysgL3Vzci9zcmMvbGludXgvaW5jbHVkZS9saW51
eC9uZnNfZnMuaAlTdW4gSnVsICA4IDE0OjQwOjU3IDIwMDENCkBAIC0xNjAs
MTMgKzE2MCwxOCBAQA0KIHN0YXRpYyBfX2lubGluZV9fIHN0cnVjdCBycGNf
Y3JlZCAqDQogbmZzX2ZpbGVfY3JlZChzdHJ1Y3QgZmlsZSAqZmlsZSkNCiB7
DQotCXN0cnVjdCBycGNfY3JlZCAqY3JlZCA9IChzdHJ1Y3QgcnBjX2NyZ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ZSksIEdGUF9LRVJORUwpOw0KIAlhdXRoID0gTkZTX0NMSUVO
VChpbm9kZSktPmNsX2F1dGg7DQotCWNyZWQgPSBycGNhdXRoX2xvb2t1cGNy
ZWQoYXV0aCwgMCk7DQotCWZpbHAtPnByaXZhdGVfZGF0YSA9IGNyZWQ7DQor
CXByaXYtPmNyZWQgPSBycGNhdXRoX2xvb2t1cGNyZWQoYXV0aCwgMCk7DQor
CWZpbHAtPnByaXZhdGVfZGF0YSA9IHByaXY7DQogCXVubG9ja19rZXJuZWwo
KTsNCiAJcmV0dXJuIDA7DQogfQ0KQEAgLTgxNCwxMiArODE1LDE3IEBADQog
ew0KIAlzdHJ1Y3QgcnBjX2F1dGggKmF1dGg7DQogCXN0cnVjdCBycGNfY3Jl
ZCAqY3JlZDsNCisJc3RydWN0IG5mc19maWxlX3ByaXZhdGUgKnByaXY7DQog
DQogCWxvY2tfa2VybmVsKCk7DQotCWF1dGggPSBORlNfQ0xJRU5UKGlub2Rl
KS0+Y2xfYXV0aDsNCi0JY3JlZCA9IG5mc19maWxlX2NyZWQoZmlscCk7DQot
CWlmIChjcmVkKQ0KLQkJcnBjYXV0aF9yZWxlYXNlY3JlZChhdXRoLCBjcmVk
KTsNCisJcHJpdiA9IGZpbHAtPnByaXZhdGVfZGF0YTsNCisJaWYocHJpdikg
ew0KKwkJYXV0aCA9IE5GU19DTElFTlQoaW5vZGUpLT5jbF9hdXRoOw0KKwkJ
Y3JlZCA9IG5mc19maWxlX2NyZWQoZmlscCk7DQorCQlpZiAoY3JlZCkNCisJ
CQlycGNhdXRoX3JlbGVhc2VjcmVkKGF1dGgsIGNyZWQpOw0KKwkJa2ZyZWUo
cHJpdik7DQorCX0NCiAJdW5sb2NrX2tlcm5lbCgpOw0KIAlyZXR1cm4gMDsN
CiB9DQo=
--41973382-1272356615-994699721=:16113--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/