[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] FreeMiNT & MiNTlib patchset - add new support



Hello!

This avoid any modification on the xfs, we don't have any compatibility
problems and the directories are handled generically inside the kernel.

Without adding a new flag to the XFS module to detect an older XFS, I'm
not sure how adding additional checks for EISDIR into the kernel
filesystem layer can help.

If you can move the two modifications inside the xfs into the upper layer
you don't need to modify the xfs at all. I think that's much better.

I still dont understand how you can do this.

The kernel is allowing read-only directories through to the XFS.

How is the filesystem layer meant to know to refuse that with an older
XFS ??

You don't get my idea. If you don't modify the xfs at all there exist no "old" or "new" xfs, they are untouched and thus no compatibility issue.

You only need to handle these two things inside Fopen() and Fread().

I also thought a little bit about this. I'm sure I already mentioned this ealier, but if you really allow and pass down FILEPTR of directories down to the xfs all xfs dev functions need to be checked to work correctly on such directories (e.g. xfs_lseek, xfs_ioctl, xfs_datime).

That's another reason to don't touch the xfs at all and catch and handle directories generically at the filesystem level (where the kernel have control and know how to handle directories; also you only have the code once; the code will be identically inside each xfs).

In summary:

dirs handled at xfs level (looks maybe simpler, but):
- you need to modify each xfs, effectivly duplicating the
  code (as the directory handling is the same, there is no
  filesystem specific code involved (or I overseen something))
- duplicating code is a very bad idea, a source of errors
  specially if you modify or change something (you need to change
  in several places the same thing); following murphy you always
  forget something ;-)
- you have a big compatibility problem; the kernel is not prepared to
  check for a specific xfs version or compatibility level; the interface
  is only designed to allow the xfs to check kernel features
  -> you need to completely overwork the module loading strategy
     (and I think we need a good reason for this, it's lot of work)
- your existing xfs modifications are not enough I think; you need
  additionaly to check and/or modify the other xfs-dev functions too
- and finally you need to test all this for each xfs seperately (and again
  for each modification)

dirs handled at kernel level:
- kernel have full control
- you only have the code once, placed at the system call
  entry points
- you only need to modify and debug in one place
- you don't need to modify any xfs, e.g. no compatibility problem
- you only need to test all system calls once

This make maybe a little bit more work in the first step but is much better in the long term.


Regards,
Frank

--
ATARI FALCON 060 // MILAN 060
-----------------------------
http://sparemint.org/
e-Mail: fnaumann@boerde.de