---559023410-851401618-978952425=:17453
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII
Content-ID: <Pine.SOL.3.96.1010108111401.18030C@libra.cus.cam.ac.uk>
Willem,
First of all thanks for tracking down this bug! Keep up the good work.
I have produced a IMHO more elegant solution (see attached patch) which
doesn't require introducing the ugly divide function by using the
asm/bitops.h::ffs() function and then replacing all clusterfactor
arithmetic with shifts by the (new) clusterfactorbits. In fact the
clusterfactor is completely replaced by the clusterfactorbits in the
driver.
The patch has been submitted to Alan for inclusion in the 2.4.0-ac series
as Linus at present only accepts critical patches which this clearly is
not.
btw. Patch is tested and works fine.
Best regards,
Anton Altaparmakov
-- Anton Altaparmakov Phone: +44-(0)1223-333541 (lab) Christ's College eMail: AntonA@bigfoot.com Cambridge CB2 3BU WWW: http://www-stu.christs.cam.ac.uk/~aia21/ United Kingdom ICQ: 8561279---559023410-851401618-978952425=:17453 Content-Type: TEXT/PLAIN; CHARSET=US-ASCII; NAME="ntfs_df_fix.diff" Content-Transfer-Encoding: BASE64 Content-ID: <Pine.SOL.3.96.1010108111345.17453B@libra.cus.cam.ac.uk> Content-Description:
LS0tIGxpbnV4L2ZzL250ZnMvc3VwZXIub2xkCU1vbiBKYW4gIDggMDk6MDg6 MTAgMjAwMQ0KKysrIGxpbnV4L2ZzL250ZnMvc3VwZXIuYwlNb24gSmFuICA4 IDAyOjM2OjMzIDIwMDENCkBAIC0xMiw2ICsxMiw3IEBADQogI2luY2x1ZGUg InN1cGVyLmgiDQogDQogI2luY2x1ZGUgPGxpbnV4L2Vycm5vLmg+DQorI2lu Y2x1ZGUgPGFzbS9iaXRvcHMuaD4NCiAjaW5jbHVkZSAibWFjcm9zLmgiDQog I2luY2x1ZGUgImlub2RlLmgiDQogI2luY2x1ZGUgInN1cHBvcnQuaCINCkBA IC03NSw3ICs3Niw3IEBADQogDQogCS8qIFNlY3RvciBzaXplICovDQogCXZv bC0+YmxvY2tzaXplPU5URlNfR0VUVTE2KGJvb3QrMHhCKTsNCi0J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lpbnQgbWZ0X2NsdXN0ZXJzX3Blcl9yZWNvcmQ7DQo= ---559023410-851401618-978952425=:17453-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/