[Btrfs-devel] [PATCH 4/4] btrfs: Add unexported file_ra_state_init() when using kernels prior to 2.6.19

Zach Brown zach.brown at oracle.com
Thu Feb 7 10:28:46 PST 2008


> I did ask Jeff for these patches.  I know it clutters up the source but it is 
> relatively small and very easy to rip out at merge time.  Btrfs gains much 
> more from broadening the testing base than it does from keeping a few bits 
> pretty.

We had some slightly more rigorous infrastructure for doing this in the
RDS tree before it went over to OFED and had its hands tied by their
crazy build infrastructure.

The intent was to always maintain the source against current mainline
and provide compat headers for older kernels transparently.  That worked
a surprising amount of the time.  When it didn't we chose the ifdefs
carefully so that they could be ripped out with a script when we
generated a patch for mainline merging.

It was what you'd expect.. some autoconf, some --include of little API
header files, some awk to weed out the ifdefs, etc.

http://oss.oracle.com/projects/rds/src/trunk/kfeature.m4

http://oss.oracle.com/projects/rds/src/trunk/configure.in

http://oss.oracle.com/projects/rds/src/trunk/kapi-compat/

http://oss.oracle.com/projects/rds/src/trunk/scripts/makepatch.sh

As far as this kind of thing goes, I was pretty happy with it.  It got
the job done without butchering the code or adding tons of infrastructure.

If someone was excited about picking it up for btrfs I'd be happy to
answer questions about it, etc.

- z



More information about the Btrfs-devel mailing list