tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: I can't generate a kernel crash core.



In article <n8do3t$ndb$1%serpens.de@localhost>,
Michael van Elst <mlelstv%serpens.de@localhost> wrote:
>christos%astron.com@localhost (Christos Zoulas) writes:
>
>>It is not easy to go from dev_t -> device_t to exclude...
>
>Ideally its impossible because both aren't related. But
>the common idiom is to search for the device with the
>same name.
>
>Something like:
>
>bool is_the_dump_device(device_t dev)
>{
>	const char *driver;
>	device_t d;
>
>	if (bdev_type(dumpdev) != D_DISK)
>		return false;
>
>	driver = devswblk2name(major(dumpdev));
>	d = device_find_by_driver_unit(driver, DISKUNIT(dumpdev));
>
>	return d == dev;
>}

Yes.. Or we can revert my change to prevent detaching if DUMP and
document that you need to set nosync if you want to dump...

christos



Home | Main Index | Thread Index | Old Index