Denys Vlasenko wrote:
>> What info do you need? I will be happy to provide as much information
>> as is necessary for that issue to get resolved.
>> I'm using mdev to populate my /dev directory.
>
> Info you provided is good enough. I see that blkid does many reads
> even if first one fails.
>
> Try attached patch, it makes read failures to abort the probing
> and go to the next device.
Thanks, but the patch doesn't cleanly apply to 1.13.2 for me, see
attached files util.c.rej and volume_id_internal.h.rej).
ciao,
--
Alexander Griesser (Netzwerkadministration)
E-Mail: [email protected] | Web: http://www.lkh-vil.or.at
KABEG LKH Villach | Nikolaigasse 43 | 9500 Villach
Tel.: +43 4242 208 3061 | Fax.: +43 4242 208 971 2061
*************** void *volume_id_get_buffer(struct volume
*** 254,262 ****
dbg("requested 0x%x bytes, got 0x%x bytes",
(unsigned) len, (unsigned) read_len);
err:
- /* id->seekbuf_len or id->sbbuf_len is wrong now! Fixing.
- * Most likely user will not do any additional
- * calls anyway, it's a corrupted fs or something. */
volume_id_free_buffer(id);
return NULL;
}
--- 254,268 ----
dbg("requested 0x%x bytes, got 0x%x bytes",
(unsigned) len, (unsigned) read_len);
err:
+ /* No filesystem can be this tiny. It's most likely
+ * non-associated loop device, empty drive and so on.
+ * Flag it, making it possible to short circuit future
+ * accesses. Rationale:
+ * users complained of slow blkid due to empty floppy drives.
+ */
+ if (off < 64*1024)
+ id->error = 1;
+ /* id->seekbuf_len or id->sbbuf_len is wrong now! Fixing. */
volume_id_free_buffer(id);
return NULL;
}
*************** struct volume_id_partition {
*** 63,68 ****
struct volume_id {
int fd;
// int fd_close:1;
size_t sbbuf_len;
size_t seekbuf_len;
uint8_t *sbbuf;
--- 63,69 ----
struct volume_id {
int fd;
// int fd_close:1;
+ int error;
size_t sbbuf_len;
size_t seekbuf_len;
uint8_t *sbbuf;
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox