You are not logged in.

#1 2007-10-22 05:54:34

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Kernel 2.6.23 + CDFS

I was able to compile the latest CDFS source against Kernel 2.6.22-ARCH, but I am unable to do so with 2.6.23-ARCH. So, the CDFS module can't be loaded now that I have upgraded to Kernel 2.6.23.

Possibly relevant 'make' errors:

~/cdfs/cdfs-2.6.19/cddata.c:85: error: unknown field 'sendfile' specified in initializer
~/cdfs/cdfs-2.6.19/cddata.c:85: error: 'generic_file_sendfile' undeclared here (not in a function)

Coincidently or not, the CDFS site is down:

http://trappist.elis.ugent.be/~mronsse/cdfs/

It seems there hasn't been much development for CDFS in about a year or so (the latest source was written for 2.6.19).

Is this something that is going to require mods to the CDFS source, or can it be addressed with the Kernel source?

Thank you.

Offline

#2 2007-10-22 07:02:56

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Kernel 2.6.23 + CDFS

Yes, CDFS would required a patch to make it work with 2.6.23. In theory, you might be able to patch the kernel to work with the existing CDFS code, but that's not generally the way these situations are handled.

Offline

#3 2007-10-22 07:07:26

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Kernel 2.6.23 + CDFS

tomk wrote:

Yes, CDFS would required a patch to make it work with 2.6.23. In theory, you might be able to patch the kernel to work with the existing CDFS code, but that's not generally the way these situations are handled.

Thank you very much for that information.

I thought that might be the case.

Last edited by MrWeatherbee (2007-10-22 15:21:45)

Offline

#4 2007-10-22 07:10:36

ploxiln
Member
Registered: 2006-10-27
Posts: 50

Re: Kernel 2.6.23 + CDFS

I don't even know what cdfs is (some filesystem I guess) but I remembered seeing something related to sendfile changing in 2.6.23. Sure enough, if you go to http://kernelnewbies.org/LinuxChanges and go down to item "2.13. Use splice in the sendfile() implementation" there's something there related to it. Or maybe it just has to do with the way arch configured the 2.6.23 kernel (because the link suggests that sendfile was just reimplemented).

Offline

#5 2007-10-22 07:20:35

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Kernel 2.6.23 + CDFS

ploxiln wrote:

I don't even know what cdfs is (some filesystem I guess) but I remembered seeing something related to sendfile changing in 2.6.23. Sure enough, if you go to http://kernelnewbies.org/LinuxChanges and go down to item "2.13.

Nice find. Thank you.

kernelnewbies.org wrote:

For the particular case of sending the data from a file descriptor to a fd socket, there's been always the sendfile() syscall. splice() however is a generic mechanism, not just limited to what sendfile(). In other words, sendfile() is just a small subset of what splice can do, splice obsoletes it. In Linux 2.6.23, the sendfile() mechanism implementation is killed, but the API and its functionality is not removed, it's instead implemented internally with the splice() mechanisms.

Because sendfile() is critical for many programs, specially for static web servers and FTPs, performance regressions could happen (and performance improvements!) and the kernel hackers would really like to hear about them both in linux-kernel@vger.kernel.org and/or other usual communication channels.

I'll mull that over for a bit now.

Note:
And yes, CDFS is a file system:

CDFS source file - cdfs.html wrote:

CDfs is a file system for Linux systems that `exports' all tracks and boot images on a CD as normal files. These files can then be mounted (e.g. for ISO and boot images), copied, played (audio and VideoCD tracks).

Offline

#6 2007-10-22 09:18:15

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Kernel 2.6.23 + CDFS

MrWeatherbee wrote:
kernelnewbies.org wrote:

For the particular case of sending the data from a file descriptor to a fd socket, there's been always the sendfile() syscall. splice() however is a generic mechanism, not just limited to what sendfile(). In other words, sendfile() is just a small subset of what splice can do, splice obsoletes it. In Linux 2.6.23, the sendfile() mechanism implementation is killed, but the API and its functionality is not removed, it's instead implemented internally with the splice() mechanisms.

Because sendfile() is critical for many programs, specially for static web servers and FTPs, performance regressions could happen (and performance improvements!) and the kernel hackers would really like to hear about them both in linux-kernel@vger.kernel.org and/or other usual communication channels.

I'll mull that over for a bit now.

Okay.

After mulling it over for a few minutes and reading the kernel 2.6.23 'commits' per the KernelNewbies.org info, it seemed that the transition from .sendfile() to .splice() was relatively painless (at least to this untrained eye), so I found the following page and read through the sendfile > splice changes more fully:

http://www.kernel.org/pub/linux/kernel/ … Log-2.6.23

The result of the research was this 'diff' between the original source file 'cddata.c' and the one I modded:

*** ~/cdfs/cdfs-2.6.19/cddata.c_ORIG     2007-10-22 04:25:11.000000000 -0400
--- ~/cdfs/cdfs-2.6.19/cddata.c  2007-10-22 03:51:29.000000000 -0400
***************
*** 83,87 ****
  #else
    .mmap             = generic_file_readonly_mmap,
!   .sendfile         = generic_file_sendfile
  #endif
  };
--- 83,87 ----
  #else
    .mmap             = generic_file_readonly_mmap,
!   .splice_read      = generic_file_splice_read
  #endif
  };

After changing that small amount of code, CDFS compiled properly, the module was installed and so far, CDFS seems to be happy with 2.6.23 and vice versa.

I'm still doing some testing, but so far I can mount Audio CDs and Data / Image CDs just as with earlier kernels, though my primary use of CDFS was for mounting Audio CDs.

I've only noticed one 'bug' and that existed in compiles against earlier kernels as well: if you attempt to 'umount' the media while the mount directory is open in Nautilus, a segmentation fault occurs requiring a reboot to regain full stability. It is possible that this is a quirk of Nautilus' rather than CDFS, but I have not tested in other file managers.

Any thoughts on this 'patch' from people who really know what they are doing with kernels and file systems?

Thanks.

Offline

#7 2007-10-24 23:56:59

MrWeatherbee
Member
Registered: 2007-08-01
Posts: 277

Re: Kernel 2.6.23 + CDFS

MrWeatherbee wrote:

Any thoughts on this 'patch' from people who really know what they are doing with kernels and file systems?

To provide some peace of mind for those who may have used the posted "patch", it was correct per the developer of CDfs, Michiel Ronsse.

He has now released the updated source for Kernel 2.6.23 on his website:

http://trappist.elis.ugent.be/~mronsse/cdfs/

Thanks again to Mr. Ronsse for all his efforts.

Offline

Board footer

Powered by FluxBB