Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 16 Oct 2002 14:54:44 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 16 Oct 2002 14:54:44 -0400 Received: from ns0.cobite.com ([208.222.80.10]:4877 "EHLO ns0.cobite.com") by vger.kernel.org with ESMTP id ; Wed, 16 Oct 2002 14:54:05 -0400 Date: Wed, 16 Oct 2002 14:59:30 -0400 (EDT) From: David Mansfield X-X-Sender: david@admin To: Alexander Viro , Subject: [PATCH] (quickfix) allow md devices to be used in 2.5.43 Message-ID: MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-556791216-928028080-1034794770=:30777" Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3183 Lines: 72 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. ---556791216-928028080-1034794770=:30777 Content-Type: TEXT/PLAIN; charset=US-ASCII Al, list, In order to accessing my md devices in 2.5.43, i needed the attached patch to fs/block_dev.c. WARNING: it's probably very broken, because I don't know what I'm doing. I essentially reverted most of the changes to the do_open function, allowing the open() method of a device without an attached gendisk to be called. In the md scheme of things, the gendisk is created in the md_run stage, which is only possible via ioctl after a successful open of the block device. However, something else is broken with the change to md.c, which detects whether the disk is idle by checking the number of sectors read/written to the disk. I'm going to take a look at that now. David -- /==============================\ | David Mansfield | | david@cobite.com | \==============================/ ---556791216-928028080-1034794770=:30777 Content-Type: TEXT/PLAIN; charset=US-ASCII; name="00-bd-open.patch" Content-Transfer-Encoding: BASE64 Content-Description: Content-Disposition: attachment; filename="00-bd-open.patch" LS0tIGxpbnV4LTIuNS40My9mcy9ibG9ja19kZXYuYwlNb24gU2VwIDE2IDA3 OjI1OjU5IDIwMDINCisrKyBsaW51eC1jdXJyZW50aXNoLXZhbmlsbGEvZnMv YmxvY2tfZGV2LmMJTW9uIFNlcCAxNiAx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BhY2l0eShkaXNrKSA8PCA5KTsNCisJCQlp ZiAoZGlzaykNCisJCQkJc2VjdCA9IGdldF9jYXBhY2l0eShkaXNrKTsNCisJ CQliZF9zZXRfc2l6ZShiZGV2LCAobG9mZl90KXNlY3QgPDwgOSk7DQogCQkJ YmRpID0gYmxrX2dldF9iYWNraW5nX2Rldl9pbmZvKGJkZXYpOw0KIAkJCWlm IChiZGkgPT0gTlVMTCkNCiAJCQkJYmRpID0gJmRlZmF1bHRfYmFja2luZ19k ZXZfaW5mbzsNCg== ---556791216-928028080-1034794770=:30777-- - 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/