On Tue, Jul 18, 2023 at 09:32:42PM -0700, Jason Thorpe wrote: > > Don't cloner instances differ in minor number? If not, shouldn't they? > > Not that I?m aware of. They result in a new file object with a new > private data pointer, but they don?t change the minor number and I > don?t see why forcing them to do so would be such a good idea. > What if you had a single driver (that consumes a major # slot) that > wanted to provide two cloning interfaces? If each clone got its > own minor #, then you?d be artificially limiting how many could be > created.
Well, as noted in this thread, traditionally you can tell when two files are the same by examining stat results. And the cloner mechanism replaced an older scheme where you had to pick the number of instances you wanted, and unless I'm misremembering badly in that world each had to have its own minor number. So it's not an unreasonable proposition. (And I don't see how two cloning interfaces per driver is different from one; either way you have the same number of minor numbers available.) That said, it almost certainly isn't important... -- David A. Holland dholl...@netbsd.org