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

Re: [MiNT] New MiNTlib & FreeMiNT functions



On Wed, 2008-02-27 at 11:17 +0100, Frank Naumann wrote:
> Hello!
> 
> > Here's the patches to add fdopendir/fchdir/dirfd support to FreeMiNT and
> > MiNTlib.
> 
> I just took a quick look into the kernel patches and I'm sure that's 
> definitly not enough.
> 
> First you must define a format that Fread() give back on an open 
> directory. Then you need to enhance every (I think at least ext2, minix, 
> vfat and the ramfs) xfs to support this new feature and to return this 
> format on a Fread(). At the moment the xfs just return the on disk data (I 
> think this is a very bad idea).

I'll check the situation with Fread, but that should just return EISDIR
as reading isn't allowed. So I'll fix this.

> You need also to test this intensivly as until now all code paths of every 
> xfs assume a directory can't be openened (this may lead to unexpected side 
> effects in other parts of the xfs; just allowing open() on a directory 
> is definitly not enough). This is very important as the xfs have the 
> direct control over the filesystem and I'm sure that the data integrity is 
> the most important task every xfs have to fulfill. Playing with the xfs is 
> always very critical. A failure may lead to data loss on the users 
> computer.

Remember, we only allow opening a directory READONLY !

> > * O_DIRECTORY, O_NOFOLLOW & O_NOATIME support, again filesystem driver
> > updates are needed here for those that can support it (patches included)
> 
> I aggree with the O_NOFOLLOW & O_NOATIME patch, this seems ok at the first 
> look.
> 
> > Let me know if anyone can spot any problems with these. But I've been
> > testing coreutils with them and all is pretty good at the moment.
> 
> Believe me, that don't mean much about unexpected side effects, hidden 
> bugs and so on.

That's why I said "at the moment" and why I've sent the patches for
review. I'll certainly be doing more testing.

Thanks for the review Frank.

Alan.