On Sat, Aug 20, 2011 at 08:15:34PM -0400, Rick Macklem wrote: > Hiroki, could you please test the attached patch. > > One problem with this patch is that I don't know how to create a fixed > table that matches what systems would already have been getting. > (I got the first 6 entries by booting a GENERIC i386 kernel with a > printf in vfs_init(), so I suspect those don't change much, although > I'm not sure if ZFS will usually end up before or after them?) > > Do you guys know what ZFS gets assigned typically? (I realize that > changes w.r.t. when it gets loaded, so the question also becomes > "do you know how it typically gets loaded" so the table can have > that vfc_typenum value assigned to it?) > Maybe you could boot a system with a printf like: > > printf("%s, %d\n", vfc->vfc_name, vfc->vfc_typenum); > > just after vfc->vfc_typenum = maxvfsconf++; in vfs_init() and > then look in dmesg after booting, to see what your tables look like? > (Without the attached patch installed.) Rick, I'm sorry to arrive so late, but in my opinion hardcoding list of file systems in the kernel is a step in wrong direction, really. We are trying to keep things modularized, so there are no such things laying around that have to be cleaned up when file system goes away or updated when new file system arrives. I remember for example fts code where I found that it keeps list of file systems that can be handled faster. ZFS could have been handled faster, but I found this after few years. For this case there should be VFCF_* flag that fts shuld recognize and not hardcore file system names. This was also the reason that when I added support for "jail-friendly" file systems and support for file systems with delegated administration I haven't created list of file system types that support it, but added VFCF_JAIL and VFCF_DELEGADMIN flags. Here you cannot use those flags to solve the problem, but hardcoding file system types in an array is really not the way to go. I much prefer Ben's idea of calculating a hash from file system name and detecting collisions. -- Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://yomoli.com
This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:17 UTC