Re: [PATCH] utimensat implementation

From: Christoph Hellwig
Date: Thu May 10 2007 - 14:52:45 EST


On Thu, May 10, 2007 at 11:26:36AM -0700, Ulrich Drepper wrote:
> >That's still on the table. We might end up with an fpathconf() solution.
>
> OK, the pathconf()-based solution will most probably be in the next
> POSIX spec.
>
> Now, somebody has to provide a way to get to this information. The
> kernel does not export it so far. Is it finally time to break down and
> allow pathconf() and fpathconf() syscalls into the kernel?

I'd be happy to have them. While it's not the nicest API in the world
it's in Posix and we have to support it at the library level, so we
should better get it right.

I'd like to avoid having a big swithc statement in every filesystem,
though, instead of we should have a table-driven approach instead
where each filesystem defines one table (or multiple ones when it
supports subtypes with different limits) and just sets a pointer in
the superblock to it.

E.g.

long foofs_pathconf {
[_PC_LINK_MAX] = 16384,
[_PC_2_SYMLINKS] = 1,
...
}

and then in fill_super:

sb->s_pathconf = &foofs_pathconf;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/