Re: Linux 2.2.10ac6

Alexander Viro (viro@math.psu.edu)
Fri, 2 Jul 1999 00:59:21 -0400 (EDT)


This message is in MIME format. The first part should be readable text,
while the remaining parts are likely unreadable without MIME-aware tools.
Send mail to mime@docserver.cac.washington.edu for more info.

---559023410-1875587420-930891561=:11417
Content-Type: TEXT/PLAIN; charset=US-ASCII

On Thu, 1 Jul 1999, Alan Cox wrote:

> ftp://ftp.*.kernel.org/pub/linux/kernel/alan/...
[snip]

Alan, here is one more patch to FAT/VFAT. It tries to optimize the lookup
time (it does cyclic search from the postition of last hit; in case of
directory change or negative lookup postion is reset to 0, indeed). It
works here and it *does* speed ls -l up (well, actually anything that
does lookups in the order given by readdir - globbing, for one). It's a
BSD thing and they do it on all local filesystems. I didn't want to start
from ext2 ;-/ The thing passes Gordon's testsuite.
Cheers,
Al

---559023410-1875587420-930891561=:11417
Content-Type: TEXT/PLAIN; charset=US-ASCII; name=vfat-patch-2
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.GSO.4.10.9907020059210.11417@weyl.math.psu.edu>
Content-Description:
Content-Disposition: attachment; filename=vfat-patch-2

ZGlmZiAtdXJOIGxpbnV4LTIuMi4xMC1hYzYvZnMvZmF0L2Rpci5jIGxpbnV4
LWJpcmQuZGlyL2ZzL2ZhdC9kaXIuYw0KLS0tIGxpbnV4LTIuMi4xMC1hYzYv
ZnMvZmF0L2Rpci5jCUZyaSBKdWwgIDIgMDA6Mzk6MTIgMTk5OQ0KKysrIGxp
bnV4LWJpcmQuZGlyL2ZzL2ZhdC9kaXIuYwlGcmkgSnVsICAyIDAwOjQwOjEx
IDE5OTkNCkBAIC0xMzcsNyArMTM3LDggQEANCiAJY2hhciBjOw0KIAlzdHJ1
Y3QgYnVmZmVyX2hlYWQgKmJoID0gTlVMTDsNCiAJc3RydWN0IG1zZG9zX2Rp
cl9lbnRyeSAqZGU7DQotCWxvZmZfdCBjcG9zID0gMDsNCisJbG9mZl90IGNw
b3MgPSBNU0RPU19JKGRpciktPml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zX2ZzX2kuaCBs
aW51eC1iaXJkLmRpci9pbmNsdWRlL2xpbnV4L21zZG9zX2ZzX2kuaA0KLS0t
IGxpbnV4LTIuMi4xMC1hYzYvaW5jbHVkZS9saW51eC9tc2Rvc19mc19pLmgJ
RnJpIEp1bCAgMiAwMDozOToxNyAxOTk5DQorKysgbGludXgtYmlyZC5kaXIv
aW5jbHVkZS9saW51eC9tc2Rvc19mc19pLmgJRnJpIEp1bCAgMiAwMDo0MDox
MSAxOTk5DQpAQCAtMjksMTIgKzI5LDExIEBADQogCWludCBpX2xvZ3N0YXJ0
OwkvKiBsb2dpY2FsIGZpcnN0IGNsdXN0ZXIgKi8NCiAJaW50IGlfYXR0cnM7
CS8qIHVudXNlZCBhdHRyaWJ1dGUgYml0cyAqLw0KIAlpbnQgaV9jdGltZV9t
czsJLyogdW51c2VkIGNoYW5nZSB0aW1lIGluIG1pbGxpc2Vjb25kcyAqLw0K
LQlpbnQgaV9idXN5OwkvKiBmaWxlIGlzIGVpdGhlciBkZWxldGVkIGJ1dCBz
dGlsbCBvcGVuLCBvcg0KLQkJCSAgIGluY29uc2lzdGVudCAobWtkaXIpICov
DQogCWludCBpX2JpbmFyeTsJLyogZmlsZSBjb250YWlucyBub24tdGV4dCBk
YXRhICovDQogCWludCBpX2xvY2F0aW9uOwkvKiBvbi1kaXNrIHBvc2l0aW9u
IG9mIGRpcmVjdG9yeSBlbnRyeSBvciAwICovDQogCXN0cnVjdCBpbm9kZSAq
aV9mYXRfaW5vZGU7CS8qIHN0cnVjdCBpbm9kZSBvZiB0aGlzIG9uZSAqLw0K
IAlzdHJ1Y3QgbGlzdF9oZWFkIGlfZmF0X2hhc2g7CS8qIGhhc2ggYnkgaV9s
b2NhdGlvbiAqLw0KKwlvZmZfdCBpX2xhc3RfcG9zOy8qIHBvc2l0aW9uIG9m
IGxhc3QgbG9va3VwICovDQogfTsNCiANCiAjZW5kaWYNCg==
---559023410-1875587420-930891561=:11417--

-
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/