On Sun, Dec 20, 2009 at 9:43 AM, Bartlomiej Zolnierkiewicz <bzolnier@xxxxxxxxx> wrote: > On Sunday 20 December 2009 01:05:35 pm Clemens Fruhwirth wrote: >> Make the size attribute of block devices writable via sysfs. This >> allows userspace to force >> device boundaries in cases where the device driver is unable to detect >> the correct size, as >> with spec-incompliant SD card readers. Also see >> http://marc.info/?t=125555550200010&r=1&w=2 > > Just a wild idea but maybe the current block infrastructure for handling > ATA HPA (see commit db429e9 and e957b60 one) can be used to automatically > detect and workaround the issue? Are you referring to this change? + libata.ignore_hpa= [LIBATA] Ignore HPA limit + libata.ignore_hpa=0 keep BIOS limits (default) + libata.ignore_hpa=1 ignore limits, using full disk My git-foo isn't very good...what command will display the two changes you refer to above? Looking at latest drivers/ata/libata-core.c where ignore_hpa is used, that could be leveraged. Clemens will have to comment on if there is a "detect" method that would work for his problem. Secondly, the "ignore_hpa" approach is orthogonal to allowing user space to override the partition size. This patch does not prevent the kernel from attempting to fix up the partition/block size. If the kernel can't or doesn't know about b0rked HW, the user (or udev maybe?) can workaround this issue. Given how simple the patch, I don't see any reason to reject it. thanks, grant -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html