Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932197AbWJASym (ORCPT ); Sun, 1 Oct 2006 14:54:42 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932199AbWJASym (ORCPT ); Sun, 1 Oct 2006 14:54:42 -0400 Received: from mout2.freenet.de ([194.97.50.155]:18652 "EHLO mout2.freenet.de") by vger.kernel.org with ESMTP id S932197AbWJASyk (ORCPT ); Sun, 1 Oct 2006 14:54:40 -0400 Date: Sun, 01 Oct 2006 20:55:25 +0200 To: "linux-kernel@vger.kernel.org" Subject: [PATCH 4/4] 2.6.18-mm2 pktcdvd: sysfs + debugfs interface, bio write congestion handling Reply-To: balagi@justmail.de From: "Thomas Maier" Cc: "petero2@telia.com" , akpm@osdl.org Content-Type: multipart/mixed; boundary=----------Rm46s5dEblEx1CEmXk26Vb MIME-Version: 1.0 Message-ID: User-Agent: Opera Mail/9.00 (Win32) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 41052 Lines: 649 ------------Rm46s5dEblEx1CEmXk26Vb Content-Type: text/plain; charset=iso-8859-15 Content-Transfer-Encoding: 7bit Hi, this patch 4/4 for pktcdvd against Linux 2.6.18 (stable) or 2.6.18-mm2 adds a sysfs and a debugfs interface. Also it adds the ability to control the bio write queue of the driver (write congestion control). For more infos see the Documentation/* files in the patch. You must first apply patch 1/4, 2/4 and 3/4 ! Sorry, my mail client damages the patch, so please use the (text) attachment or get the patch from http://people.freenet.de/BalaGi/download/4-sysfs-pktcdvd-patch-2.6.18 The merged patch (parts 1 to 4) is available at: http://people.freenet.de/BalaGi/download/pktcdvd-patch-2.6.18 There is also a tool available to control the pktcdvd driver using the new sysfs interface: http://people.freenet.de/BalaGi/download/pktcdvd http://people.freenet.de/BalaGi#pktcdvd Signed-off-by: Thomas Maier ------------Rm46s5dEblEx1CEmXk26Vb Content-Disposition: attachment; filename=4-sysfs-pktcdvd-patch-2.6.18 Content-Type: application/octet-st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iBmaW5pc2hlZCBwYWNrZXRz LgorCisgICAga2Jfd3JpdHRlbiAgICAgICAgICAgICgwNDQ0KSBrQnl0ZXMgd3Jp dHRlbi4KKyAgICBrYl9yZWFkICAgICAgICAgICAgICAgKDA0NDQpIGtCeXRlcyBy ZWFkLgorICAgIGtiX3JlYWRfZ2F0aGVyICAgICAgICAoMDQ0NCkga0J5dGVzIHJl YWQgdG8gZmlsbCB3cml0ZSBwYWNrZXRzLgorICAgIAorICAgIHJlc2V0ICAgICAg ICAgICAgICAgICAoMDIwMCkgV3JpdGUgYW55IHZhbHVlIHRvIGl0IHRvIHJlc2V0 CisgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBwa3RjZHZkIGRldmlj ZSBzdGF0aXN0aWMgdmFsdWVzLCBsaWtlCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBieXRlcyByZWFkL3dyaXR0ZW4uCisgICAgCisvc3lzL2NsYXNz L3BrdGNkdmQvcGt0Y2R2ZFswLTddL3dyaXRlX3F1ZXVlLworICAgIHNpemUgICAg ICAgICAgICAgICAgICAoMDQ0NCkgQ29udGFpbnMgdGhlIHNpemUgb2YgdGhlIGJp byB3cml0ZQorICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcXVldWUu CisKKyAgICBjb25nZXN0aW9uX29mZiAgICAgICAgKDA2NDQpIElmIGJpbyB3cml0 ZSBxdWV1ZSBzaXplIGlzIGJlbG93CisgICAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICB0aGlzIG1hcmssIGFjY2VwdCBuZXcgYmlvIHJlcXVlc3RzCisgICAg ICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tIHRoZSBibG9jayBsYXll ci4KKworICAgIGNvbmdlc3Rpb25fb24gICAgICAgICAoMDY0NCkgSWYgYmlvIHdy aXRlIHF1ZXVlIHNpemUgaXMgaGlnaGVyCisgICAgICAgICAgICAgICAgICAgICAg ICAgICAgICAgICBhcyB0aGlzIG1hcmssIGRv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KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioKKyAqCisgKiBzeXNmcyBpbnRlcmZhY2UgZm9yIHBrdGNkdmQKKyAqIGJ5IChD KSAyMDA2ICBUaG9tYXMgTWFpZXIgPGJhbGFnaUBqdXN0bWFpbC5kZT4KKyAqCisg KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKi8KKworI2RlZmluZSBERUZfQVRUUihfb2JqLF9uYW1lLF9tb2Rl KSBcCisJc3RhdGljIHN0cnVjdCBhdHRyaWJ1dGUgX29iaiA9IHsgXAorCQkubmFt ZSA9IF9uYW1lLCAub3duZXIgPSBUSElTX01PRFVMRSwgLm1vZGUgPSBfbW9kZSB9 CisKKy8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqCisgIC9zeXMvY2xhc3MvcGt0Y2R2ZC9wa3RjZHZkWzAt N10vCisgICAgICAgICAgICAgICAgICAgICB3cml0ZV9xdWV1ZS9zaXplCisgICAg ICAgICAgICAgICAgICAgICB3cml0ZV9xdWV1ZS9jb25nZXN0aW9uX29mZgorICAg ICAgICAgICAgICAgICAgICAgd3JpdGVfcXVldWUvY29uZ2VzdGlvbl9vbgorICAg ICAgICAgICAgICAgICAgICAgc3RhdC9yZXNldAorICAgICAgICAgICAgICAgICAg ICAgc3RhdC9wYWNrZXRzX3N0YXJ0ZWQKKyAgICAgICAgICAgICAgICAgICAgIHN0 YXQvcGFja2V0c19maW5pc2hlZAorICAgICAgICAgICAgICAgICAgICAgc3RhdC9r Yl93cml0dGVuCisgICAgICAgICAgICAgICAgICAgICBzdGF0L2tiX3JlYWQKKyAg ICAgICAgICAgICAgICAgICAgIHN0YXQva2JfcmVhZF9nYXRoZXIKKyAqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqLworCitERUZfQVRUUihrb2JqX3BrdF9hdHRyX3dxMSw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kmcGQtPmNsc2Rldi0+a29iaiwKKwkJCQkJ JmtvYmpfcGt0X3R5cGVfd3F1ZXVlKTsKKwl9Cit9CisKK3N0YXRpYyB2b2lkIHBr dF9zeXNmc19kZXZfcmVtb3ZlKHN0cnVjdCBwa3RjZHZkX2RldmljZSAqcGQpCit7 CisJcGt0X2tvYmpfcmVtb3ZlKHBkLT5rb2JqX3N0YXQpOworCXBrdF9rb2JqX3Jl bW92ZShwZC0+a29ial93cXVldWUpOworCWlmIChjbGFzc19wa3RjZHZkKQorCQlj bGFzc19kZXZpY2VfZGVzdHJveShjbGFzc19wa3RjZHZkLCBwZC0+cGt0X2Rldik7 Cit9CisKKworLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqCisgIC9zeXMvY2xhc3MvcGt0 Y2R2ZC8KKyAgICAgICAgICAgICAgICAgICAgIGFkZCAgICAgICAgICAgIG1hcCBi bG9jayBkZXZpY2UKKyAgICAgICAgICAgICAgICAgICAgIHJlbW92ZSAgICAgICAg IHVubWFwIHBhY2tldCBkZXYKKyAgICAgICAgICAgICAgICAgICAgIGRldmljZV9t YXAgICAgIHNob3cgbWFwcGluZ3MKKyAgICAgICAgICAgICAgICAgICAgIHBhY2tl dF9idWZmZXJzIG51bWJlciBvZiBwYWNrZXQgYnVmZmVycyBwZXIgZGV2CisgKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKi8KKworc3RhdGljIHZvaWQgY2xhc3NfcGt0Y2R2ZF9y ZWxlYXNlKHN0cnVjdCBjbGFzcyAqY2xzKQoreworCWtmcmVlKGNscyk7Cit9Citz dGF0aWMgc3NpemVfdCBjbGFzc19wa3RjZHZkX3Nob3dfbWFwKHN0cnVjdCBjbGFz cyAqYywgY2hhciAqZGF0YSkKK3sKKwlpbnQgbiA9IDA7CisJaW50IGlkeDsKKwlk YXRhWzBdID0gMDsKK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isJfQor CXJldHVybiAwOworfQorCitzdGF0aWMgdm9pZCBwa3Rfc3lzZnNfY2xlYW51cCh2 b2lkKQoreworCWlmIChjbGFzc19wa3RjZHZkKQorCQljbGFzc19kZXN0cm95KGNs YXNzX3BrdGNkdmQpOworCWNsYXNzX3BrdGNkdmQgPSBOVUxMOworfQorCisvKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioKKyAgZW50cmllcyBpbiBkZWJ1Z2ZzCisKKyAgL2Rl YnVnZnMvcGt0Y2R2ZFswLTddLworCQkJaW5mbworICAKKyAqKioqKioqKioqKioq KioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq KioqKioqLworc3RhdGljIGludCBwa3RfZGVidWdmc19zZXFfc2hvdyhzdHJ1Y3Qg c2VxX2ZpbGUgKm0sIHZvaWQgKnApCit7CisJc3RydWN0IHBrdGNkdmRfZGV2aWNl ICpwZCA9IG0tPnByaXZhdGU7CisJY2hhciBidWZbMTAyNF07CisJCisJcGt0X3By aW50X2luZm8ocGQsIGJ1Ziwgc2l6ZW9mKGJ1ZikpOworCXNlcV9wcmludGYobSwg IiVzIiwgYnVmKTsKKwlyZXR1cm4gMDsKK30KKworc3RhdGljIGludCBwa3RfZGVi dWdmc19mb3BzX29wZW4oc3RydWN0IGlub2RlICppbm9kZSwgc3RydWN0IGZpbGUg KmZpbGUpCit7CisJcmV0dXJuIHNpbmdsZV9vcGVuKGZpbGUsIHBrdF9kZWJ1Z2Zz X3NlcV9zaG93LCBpbm9kZS0+dS5nZW5lcmljX2lwKTsKK30KKworc3RhdGljIHN0 cnVjdCBmaWxlX29wZXJhdGlvbnMgZGVidWdfZm9wcyA9IHsKKwkub3BlbgkJPSBw a3RfZGVidWdmc19mb3BzX29wZW4sCisJLnJlYWQJCT0gc2VxX3JlYWQsCisJLmxs c2VlawkJPSBzZXFfbHNlZWssCisJLnJlbGVhc2UJPSBzaW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nVnZnM6IGluZm8gZmlsZSAqLwogfTsKIAogI2VuZGlm IC8qIF9fS0VSTkVMX18gKi8K ------------Rm46s5dEblEx1CEmXk26Vb-- - 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/