Date: Sat, 29 Aug 2009 04:04:55 +0200 From: Attilio Rao <attilio@freebsd.org> To: freebsd-arch@freebsd.org Cc: Konstantin Belousov <kib@freebsd.org> Subject: [PATCH] VFS KPI/API versioning Message-ID: <3bbf2fe10908281904l6f8119a5l2daa301016eac8ef@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Often I found as it would have been useful to verify, mostly at run-time, of a feature of the VFS was supported and I quickly thought that having a run-time check for VFS versioning would not be a bad idea. In order to do that, I made the following patch: http://www.freebsd.org/~attilio/vfs_modload.diff which basically builds the vfs layer as a module adding a version number that can be checked for filesystems/modules willing to load in order to see if a specific feature is supported. Obviously I didn't add an entry in the modules/ neither possibility to unload/shutdown the module because we would not be willing to have such operations (or a run-time load of the vfs). Something that concerned me is also the mis-usage of the VFS_VERSION macro, which can be easilly used at compile time in order to determine if a feature is present or not. Basically, I have no idea by when it doesn't get updated and if it has ever been checked in our codes. It seems to use a random number as the start count, while it could have been handled differently. Maybe it would be the case to start taking care of that too, which can be an interesting tool. Can you comment on the patch? If you think it is a good idea I will commit right away on -CURRENT and STABLE_8. Attilio -- Peace can only be achieved by understanding - A. Einstein
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3bbf2fe10908281904l6f8119a5l2daa301016eac8ef>