tech-kern archive

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

Re: Devices.



On May 29, 22:52, David Holland wrote:
} On Sat, May 29, 2021 at 05:41:38PM -0400, Mouse wrote:
} 
}  > > For disks, which for historical reasons live in both cdevsw and
}  > > bdevsw, both entries would point at the same disk_dev.
}  > 
}  > I would suggest getting rid of the bdev/cdev distinction.  It is, as
}  > you say, a historical artifact, and IMO it is not serving anyone at
}  > this point.
} 
} It is deeply baked into the system call API and into POSIX, so it's
} not going anywhere. It's been proposed that we should stop having
} block devices, which would have the same net effect; I have no strong
} opinion on that and it doesn't need to be part of this set of changes.

     I was thinking the same thing about getting rid of block
devices.  The only place they should ever be used is an argument
to mount(2) and mount(2) can be adjusted to use a block device
underneath when it is handed a character device.  FreeBSD got rid
of block devices a long time ago.  Doing that as a first step is
likely to simplify things to make other things easier.

}  > > A third question: how does this affect interfaces?
}  > 
}  > As in, network interfaces?  Good question.  I think they should be
}  > device nodes in the filesystem *somehow*.
} 
} That's probably true, but they currently aren't and the plumbing above
} them is unrelated to the VFS device plumbing, so for the time being
} it's a separate issue.
} 
} Disentangling the current situation with device special files on
} filesystems will make it easier to manifest interfaces on disk if we
} ultimately want that.

     We should really get with the times and create a devfs.  I
know that there are people that disagree with this (likely including
you), but the archaic device node system causes a lot of headaches
and it's time that we joined the 21st century.  Anything done with
devices should be done with idea of a devfs in mind.  Yes, devfs
like things have caused a lot of problems on other operating systems,
but I think we have enough brain power and enough real world examples
to be able to not repeat the mistakes of the past.

}-- End of excerpt from David Holland


Home | Main Index | Thread Index | Old Index